/**
 * Employee Portal - Unified styles for supervisor/employee self-service
 * Include after sb-admin-2.min.css
 */

/* ===== Typography ===== */
body.app-unified,
.app-unified body {
  font-family: 'DM Sans', 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ===== Page hero (employee portal gradient) ===== */
.unified-hero {
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 50%, #4f46e5 100%);
  color: #fff;
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 40px -10px rgba(79, 70, 229, 0.4);
}
.unified-hero h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 0.25rem 0; }
.unified-hero p { margin: 0; opacity: .92; font-size: 0.95rem; }

.unified-hero-teal {
  background: linear-gradient(135deg, #0d9488 0%, #059669 50%, #047857 100%) !important;
  box-shadow: 0 10px 40px -10px rgba(13, 148, 136, 0.4);
}

/* ===== Action cards (dashboard quick actions) ===== */
.portal-action-card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
  height: 100%;
}
.portal-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.portal-action-card .card-body {
  padding: 1.25rem 1.5rem;
}
.portal-action-card .action-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}
.portal-action-card .action-title { font-weight: 600; color: #334155; font-size: 0.95rem; }
.portal-action-card .btn { border-radius: 8px; font-weight: 600; }

/* ===== Welcome / quote cards ===== */
.portal-welcome-card {
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.portal-quote-card {
  border-radius: 14px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
}
.portal-timer-card {
  border-radius: 14px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #a7f3d0;
}

/* ===== Sidebar (employee portal) ===== */
.app-unified .sidebar .nav-link {
  border-radius: 10px;
  margin: 0 0.5rem 2px 0.5rem;
}
.app-unified .sidebar .nav-link:hover { background: rgba(255,255,255,0.15); }
.app-unified .sidebar .sidebar-brand { padding: 1rem; }

/* ===== Login page ===== */
.portal-login-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.portal-login-card {
  border: none;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}
.portal-login-card .form-control {
  border-radius: 10px;
  padding: 0.65rem 1rem;
}
.portal-login-card .btn-primary {
  border-radius: 10px;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
}

/* ===== Cards & modals ===== */
.unified-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.unified-card-header {
  background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%);
  padding: 0.9rem 1.25rem;
  font-weight: 600;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
}
.app-unified .modal-content { border-radius: 12px; border: 1px solid #e2e8f0; }
.app-unified .modal-header { border-bottom-color: #e2e8f0; background: #fafbfc; }
.app-unified .alert { border-radius: 10px; }

/* ===== Stat / KPI ===== */
.unified-stat {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 1rem;
  text-align: center;
  background: #fff;
}
.unified-stat .value { font-size: 1.25rem; font-weight: 700; color: #4f46e5; }

/* ===== Dashboard sections & navigation ===== */
.dash-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid #e2e8f0;
}
.dash-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
  border-radius: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.dash-card-link:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}
.dash-card-link .portal-action-card { height: 100%; margin: 0; }
.dash-card-link .portal-action-card .card-body { padding: 1.25rem 1.5rem; }
.dash-hero-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.dash-hero-compact .hero-text { flex: 1; min-width: 200px; }
.dash-hero-compact .hero-meta { font-size: 0.9rem; opacity: .9; }
.dash-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.dash-info-bar .info-chip {
  flex: 1;
  min-width: 200px;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dash-info-bar .info-chip.timer { border-color: #a7f3d0; background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%); }
.dash-info-bar .info-chip.quote { border-color: #bae6fd; background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%); }
.dash-info-bar .info-chip strong { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: #64748b; }
.dash-info-bar .info-chip .value { font-size: 1rem; margin-top: 0.25rem; }
.dash-grid { display: grid; gap: 1rem; }
.dash-grid-2 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.dash-grid-3 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media (min-width: 768px) {
  .dash-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1200px) {
  .dash-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Mobile-first & responsive ===== */
@media (max-width: 767.98px) {
  .app-unified .container-fluid { padding-left: 0.75rem; padding-right: 0.75rem; }
  .app-unified .unified-hero { padding: 1rem 1rem; border-radius: 12px; }
  .app-unified .unified-hero h1 { font-size: 1.35rem; }
  .app-unified .unified-card-header { padding: 0.75rem 1rem; font-size: 0.95rem; }
  .app-unified .btn { min-height: 44px; padding: 0.5rem 1rem; }
  .app-unified .form-control { min-height: 44px; font-size: 16px; }
  .app-unified .table-responsive { margin-left: -0.75rem; margin-right: -0.75rem; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .app-unified .table { font-size: 0.875rem; }
  .app-unified .table th, .app-unified .table td { padding: 0.6rem 0.5rem; white-space: nowrap; }
  .app-unified .modal-dialog { margin: 0.5rem; max-width: calc(100% - 1rem); }
  .app-unified .modal-content { border-radius: 12px; }
  .app-unified .d-flex.flex-wrap { flex-direction: column; align-items: stretch !important; }
  .app-unified .dash-info-bar .info-chip { min-width: 100%; }
}
.app-unified .touch-target { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
.app-unified .card-mobile-stack .row > [class*="col-"] { margin-bottom: 0.75rem; }
@media (max-width: 575.98px) {
  .app-unified .unified-stat .value { font-size: 1.1rem; }
  .app-unified .row .col-6 { flex: 0 0 100%; max-width: 100%; }
}
