/* ============================================================
   SKY HRSS & Payroll — Skeuomorphic Design System
   Version sky_hrss 2026.9 · Daijo Technologies
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand Palette */
  --primary:        #1565c0;
  --primary-dark:   #0d47a1;
  --primary-light:  #e3f0ff;
  --accent:         #7a5c00;
  --accent-light:   #f5edd6;
  --success:        #1b5e20;
  --success-light:  #e8f5e9;
  --warning:        #b86800;
  --warning-light:  #fff3e0;
  --danger:         #b71c1c;
  --danger-light:   #ffebee;

  /* Surfaces */
  --surface:        #f5f2ee;           /* warm off-white parchment */
  --surface-2:      #ece8e2;           /* slightly darker warm grey */
  --surface-3:      #e0dbd4;
  --surface-raised: #faf8f5;           /* elevated skeu surface */

  /* Borders */
  --border:         #c8bfb0;
  --border-dark:    #a89a88;
  --border-light:   #ddd8d0;

  /* Text */
  --text:           #1c1a18;
  --text-2:         #4a4238;
  --text-3:         #8a7e70;

  /* Sidebar — deep burnished steel-blue leather */
  --sidebar-bg:     #1a2744;
  --sidebar-text:   #b8c8e8;
  --sidebar-hover:  rgba(255,255,255,0.07);
  --sidebar-active: #1565c0;

  /* Layout */
  --header-height:  62px;
  --sidebar-width:  240px;
  --radius:         6px;
  --radius-lg:      10px;
  --radius-xl:      16px;

  /* Skeuomorphic Shadows */
  --shadow-sm:      0 1px 2px rgba(0,0,0,0.08), 0 1px 0 rgba(255,255,255,0.6) inset;
  --shadow:         0 2px 6px rgba(0,0,0,0.14), 0 1px 0 rgba(255,255,255,0.55) inset;
  --shadow-lg:      0 6px 20px rgba(0,0,0,0.18), 0 1px 0 rgba(255,255,255,0.5) inset;
  --shadow-inset:   inset 0 2px 5px rgba(0,0,0,0.14), inset 0 1px 2px rgba(0,0,0,0.1);
  --shadow-raised:  0 4px 12px rgba(0,0,0,0.18), 0 1px 0 rgba(255,255,255,0.7) inset;

  /* Fonts */
  --font:           'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono:      'JetBrains Mono', monospace;
  --transition:     0.18s ease;
}

/* ============================================================
   GLOBAL RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 15px; scroll-behavior: smooth; }

body {
  background: var(--surface-2);
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(0,0,0,0.018) 28px,
      rgba(0,0,0,0.018) 29px
    );
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle paper texture on content bg */
.main-content {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 60%),
    var(--surface-2);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--surface-3); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #b0a090 0%, #8a7a68 100%);
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,0.1);
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 0 rgba(255,255,255,0.7);
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* Utility for multi-line description preservation */
.pre-wrap {
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ============================================================
   LAYOUT SYSTEM
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ============================================================
   SIDEBAR — Skeuomorphic Light White Polished Panel
   ============================================================ */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #fcfbfa 0%, #f4f1eb 60%, #e8e4dc 100%);
  box-shadow:
    2px 0 8px rgba(0,0,0,0.06),
    inset -1px 0 0 rgba(255,255,255,0.8);
  color: var(--text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: var(--transition);
  z-index: 100;
  position: relative;
  border-right: 1px solid var(--border-dark);
}

.sidebar::after {
  display: none; /* remove dark stitched edge */
}

.sidebar-logo {
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-dark);
  box-shadow: 0 1px 0 rgba(255,255,255,0.9);
  height: var(--header-height);
  background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, transparent 100%);
  flex-shrink: 0;
}

.sidebar-logo img { height: 32px; object-fit: contain; }

.sidebar-logo-text {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: 0.03em;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.sidebar-menu {
  flex-grow: 1;
  padding: 0.75rem 0.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  scrollbar-width: none;
}
.sidebar-menu::-webkit-scrollbar { display: none; }

.menu-header {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 1rem 0 0.4rem 0.6rem;
  letter-spacing: 0.08em;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.88rem; /* Match employees size (0.88rem) */
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.menu-item span {
  font-size: 1.15rem; /* Icon size */
  display: inline-block;
  min-width: 1.25rem;
  text-align: center;
}

.menu-item:hover {
  background: linear-gradient(180deg, #f5f2ee 0%, #ece8e2 100%);
  color: var(--primary);
  border-color: var(--border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 1px 2px rgba(0,0,0,0.04);
}

.menu-item.active {
  background: linear-gradient(180deg, #e3f0ff 0%, #c8e1ff 100%);
  color: var(--primary-dark);
  border-color: #b0d4ff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 2px 4px rgba(0,0,0,0.08);
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.menu-item-sub {
  font-size: 0.88rem;
  font-weight: 500;
}

/* Content Section Toggling */
.content-section { display: none; }
.content-section.active { display: block; }

.sidebar-profile {
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.03) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
  flex-shrink: 0;
}

.profile-meta h4 {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}
.profile-meta p {
  color: var(--text-3);
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

/* ============================================================
   TOPBAR — Polished brushed aluminium
   ============================================================ */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: 100vh;
}

.topbar {
  height: var(--header-height);
  background: linear-gradient(180deg, #fdfcfb 0%, #f5f2ee 55%, #ece8e2 100%);
  border-bottom: 1px solid var(--border);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.1),
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 -1px 0 rgba(0,0,0,0.06) inset;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-info {
  font-size: 0.85rem;
  color: var(--text-2);
}
.topbar-info strong { color: var(--text); }

/* ============================================================
   CONTENT BODY
   ============================================================ */
.content-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex-grow: 1;
}

/* Toggle Hamburger */
.menu-toggle {
  display: none;
  font-size: 1.25rem;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text);
}

/* ============================================================
   RESPONSIVE SIDEBAR — Mobile + Tablet
   ============================================================ */
@media (max-width: 992px) {
  .menu-toggle { display: block; }
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0; bottom: 0;
    width: var(--sidebar-width);
    box-shadow: 4px 0 24px rgba(0,0,0,0.35);
    z-index: 200;
    transition: left 0.22s ease;
  }
  .sidebar.active { left: 0; }
  
  /* Overlay when sidebar is open on mobile */
  .sidebar.active::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: -1;
  }

  .topbar { padding: 0 1rem; }
  .content-body { padding: 1rem; }
}

/* ── Tablet (481px – 992px) ── */
@media (min-width: 481px) and (max-width: 992px) {
  :root { --sidebar-width: 240px; }

  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card { padding: 1rem 1.25rem; }
  .stat-info .stat-value { font-size: 1.4rem; }

  .form-grid-2 { grid-template-columns: 1fr 1fr; }

  .card { padding: 1.25rem; margin-bottom: 1.25rem; }

  table { font-size: 0.82rem; }
  th { padding: 0.6rem 0.75rem; }
  td { padding: 0.6rem 0.75rem; }
}

/* ── Phone (≤480px) ── */
@media (max-width: 480px) {
  :root {
    --header-height: 54px;
  }

  html { font-size: 14px; }

  .topbar {
    padding: 0 0.75rem;
    height: var(--header-height);
  }

  .topbar-info { font-size: 0.78rem; }

  .content-body { padding: 0.75rem; }

  /* Stack dashboard grid to single column on phones */
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .stat-card {
    padding: 0.85rem 1rem;
  }
  .stat-info .stat-value { font-size: 1.35rem; }
  .stat-icon { font-size: 1.5rem; }

  .form-grid-2 { grid-template-columns: 1fr; }

  .card { padding: 1rem; margin-bottom: 1rem; border-radius: var(--radius); }

  /* Shrink buttons slightly */
  .btn { padding: 0.5rem 1rem; font-size: 0.82rem; }

  /* Modal: full width on phone */
  .modal-box { width: 96%; max-height: 92vh; border-radius: var(--radius-lg); }
  .modal-header { padding: 0.85rem 1rem; }

  /* Tables: allow horizontal scroll, don't crush columns */
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th { font-size: 0.68rem; padding: 0.55rem 0.6rem; }
  td { font-size: 0.8rem; padding: 0.55rem 0.6rem; }

  /* Profile meta — shrink max-width */
  .profile-meta h4 { max-width: 100px; font-size: 0.78rem; }

  /* Topbar: hide date/secondary info on very small screens */
  .topbar-date { display: none; }

  /* OT grid: single column */
  .ot-select-grid { grid-template-columns: 1fr; }
}

/* ── Safe area insets (notch support) ── */
@supports (padding: env(safe-area-inset-bottom)) {
  .sidebar-profile {
    padding-bottom: calc(0.9rem + env(safe-area-inset-bottom));
  }
  .chat-input-bar {
    padding-bottom: calc(0.85rem + env(safe-area-inset-bottom));
  }
}


/* ============================================================
   CARDS — Skeuomorphic raised paper
   ============================================================ */
.card {
  background: linear-gradient(180deg, #fdfcfb 0%, #f8f5f0 100%);
  border: 1px solid var(--border);
  border-bottom-color: var(--border-dark);
  border-right-color: var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.1),
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 -1px 0 rgba(0,0,0,0.05) inset;
  transition: box-shadow var(--transition), border-color var(--transition);
  position: relative;
  margin-bottom: 1.5rem;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,0.9);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  pointer-events: none;
}

.card:hover {
  box-shadow:
    0 4px 16px rgba(0,0,0,0.14),
    0 1px 0 rgba(255,255,255,0.9) inset;
  border-color: var(--border-dark);
}

/* ============================================================
   FORMS — Inset / Engraved Fields
   ============================================================ */
.form-group { margin-bottom: 1rem; }

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-2);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.form-control, select, textarea {
  width: 100%;
  background: linear-gradient(180deg, #e8e4de 0%, #f0ece6 60%, #f8f5f0 100%);
  border: 1px solid var(--border-dark);
  border-top-color: #8a7a68;
  border-radius: var(--radius);
  padding: 0.55rem 0.8rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  transition: var(--transition);
  box-shadow: var(--shadow-inset);
}

textarea.auto-grow {
  field-sizing: content;
  min-height: 34px;
  height: auto;
  resize: vertical;
  overflow-y: hidden;
}

.form-control:focus, select:focus, textarea:focus {
  outline: none;
  background: linear-gradient(180deg, #e0ecf8 0%, #eaf3fd 60%, #f5faff 100%);
  border-color: #1565c0;
  box-shadow:
    var(--shadow-inset),
    0 0 0 3px rgba(21,101,192,0.15);
}

.form-control::placeholder { color: var(--text-3); }
option { background-color: var(--surface); color: var(--text); }

/* ============================================================
   BUTTONS — 3D Pressed Skeuomorphic
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-weight: 700;
  padding: 0.58rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.12s ease;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  position: relative;
  text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2) !important;
}

/* Primary */
.btn-primary {
  background: linear-gradient(180deg, #2979d8 0%, #1565c0 50%, #0d47a1 100%);
  color: #ffffff;
  border-color: #0d47a1;
  border-bottom-color: #0a3880;
  box-shadow:
    0 2px 0 #0a3880,
    0 3px 6px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #3585e8 0%, #1976d2 50%, #1565c0 100%);
  box-shadow:
    0 3px 0 #0a3880,
    0 4px 10px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.3);
}

/* Secondary */
.btn-secondary {
  background: linear-gradient(180deg, #fdfcfb 0%, #f0ece6 60%, #e4dfd8 100%);
  color: var(--text);
  border-color: var(--border-dark);
  border-bottom-color: #8a7a68;
  box-shadow:
    0 2px 0 #a89a88,
    0 3px 6px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.7);
}
.btn-secondary:hover {
  background: linear-gradient(180deg, #fff 0%, #f5f0ea 60%, #ece8e0 100%);
  box-shadow:
    0 3px 0 #a89a88,
    0 4px 10px rgba(0,0,0,0.14),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

/* Danger */
.btn-danger {
  background: linear-gradient(180deg, #e53935 0%, #c62828 50%, #b71c1c 100%);
  color: #ffffff;
  border-color: #b71c1c;
  border-bottom-color: #8b0000;
  box-shadow:
    0 2px 0 #8b0000,
    0 3px 6px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-danger:hover {
  background: linear-gradient(180deg, #ef5350 0%, #d32f2f 50%, #c62828 100%);
  box-shadow:
    0 3px 0 #8b0000,
    0 4px 10px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.25);
}

/* Success (for clock-in etc) */
.btn-success-skeu, .btn-success {
  background: linear-gradient(180deg, #43a047 0%, #2e7d32 50%, #1b5e20 100%);
  color: #ffffff;
  border-color: #1b5e20;
  border-bottom-color: #124016;
  box-shadow:
    0 2px 0 #124016,
    0 3px 6px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.2);
}

/* ============================================================
   DASHBOARD STAT CARDS
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, #fdfcfb 0%, #f8f4ee 100%);
  box-shadow:
    0 3px 10px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 -1px 0 rgba(0,0,0,0.04);
  cursor: pointer;
  transition: all 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 18px rgba(0,0,0,0.16),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

.stat-info .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  margin-top: 0.1rem;
  text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}
.stat-info .stat-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-icon { font-size: 1.85rem; opacity: 0.22; }

/* ============================================================
   LOCATION SHIELD
   ============================================================ */
.location-shield {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.8rem;
  border-radius: 50px;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid transparent;
}
.location-shield.success {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-color: rgba(27,94,32,0.25);
  color: var(--success);
  box-shadow: var(--shadow-inset);
}
.location-shield.danger {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  border-color: rgba(183,28,28,0.25);
  color: var(--danger);
  box-shadow: var(--shadow-inset);
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

/* ============================================================
   TABLES
   ============================================================ */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-dark);
  background: linear-gradient(180deg, #fdfcfb 0%, #f8f5f0 100%);
  box-shadow: var(--shadow-inset);
}

table { width: 100%; border-collapse: collapse; text-align: left; }

th {
  background: linear-gradient(180deg, #e8e4de 0%, #ddd8d0 100%);
  color: var(--text);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.72rem 1rem;
  font-weight: 800;
  border-bottom: 1px solid var(--border-dark);
  text-shadow: 0 1px 0 rgba(255,255,255,0.7);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.06);
}

td {
  padding: 0.72rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-2);
  font-size: 0.85rem;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td {
  background: linear-gradient(90deg, rgba(21,101,192,0.04) 0%, transparent 100%);
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-inset);
}
.badge-pending {
  background: linear-gradient(135deg, #fff8e8 0%, #ffecc0 100%);
  color: var(--warning);
  border: 1px solid rgba(184,104,0,0.25);
}
.badge-approved {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  color: var(--success);
  border: 1px solid rgba(27,94,32,0.25);
}
.badge-rejected {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  color: var(--danger);
  border: 1px solid rgba(183,28,28,0.25);
}

/* ============================================================
   TAB NAV SYSTEM
   ============================================================ */
.tab-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-dark);
  padding-bottom: 0.5rem;
}

.tab-link {
  padding: 0.4rem 0.9rem;
  color: var(--text-2);
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition);
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  text-shadow: 0 1px 0 rgba(255,255,255,0.7);
}

.tab-link:hover {
  background: linear-gradient(180deg, #f5f2ee 0%, #ece8e2 100%);
  color: var(--text);
  border-color: var(--border);
}

.tab-link.active {
  background: linear-gradient(180deg, #fdfcfb 0%, #f8f5f0 100%);
  color: var(--primary);
  border-color: var(--border-dark);
  box-shadow:
    inset 0 2px 0 var(--primary),
    inset 0 1px 0 rgba(255,255,255,0.8);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   PROFILE PHOTO WIDGET
   ============================================================ */
.profile-photo-container {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--border-dark);
  box-shadow:
    0 2px 6px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.6);
  overflow: hidden;
  background: var(--surface-2);
}
.profile-photo-container img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-2);
  font-weight: 700;
}

/* ============================================================
   OT SELECT GRID
   ============================================================ */
.ot-select-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ============================================================
   LOGIN PAGE — Skeuomorphic Card
   ============================================================ */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(21,101,192,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(122,92,0,0.08) 0%, transparent 50%),
    linear-gradient(160deg, #ddd8d0 0%, #e8e4de 50%, #cfc9c0 100%);
}

/* ============================================================
   FORM GRID
   ============================================================ */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   MODALS — Skeuomorphic Dialog Box
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(20,16,12,0.45);
  backdrop-filter: blur(3px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal-box {
  background: linear-gradient(180deg, #fdfcfb 0%, #f8f4ee 100%);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-xl);
  box-shadow:
    0 24px 64px rgba(0,0,0,0.4),
    0 1px 0 rgba(255,255,255,0.85) inset,
    0 -1px 0 rgba(0,0,0,0.08) inset;
  max-width: 650px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from { transform: scale(0.96) translateY(8px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);   opacity: 1; }
}

.modal-header {
  padding: 1.2rem 1.5rem;
  background: linear-gradient(180deg, #e8e4de 0%, #ddd8d0 100%);
  border-bottom: 1px solid var(--border-dark);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================================================
   INTERACTIVE / STAT CARD HOVER
   ============================================================ */
.interactive-card {
  cursor: pointer;
  transition: all 0.15s ease;
}
.interactive-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 6px 18px rgba(0,0,0,0.16),
    inset 0 1px 0 rgba(255,255,255,0.9);
}

/* ============================================================
   MISCELLANEOUS UTILITIES
   ============================================================ */
.no-print { }

@media print {
  .no-print { display: none !important; }
}

.flat-panel { padding: 1.25rem 0; margin-bottom: 1.5rem; position: relative; }
.flat-panel-border { padding: 1.25rem 0; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); position: relative; }
