@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:           #F5F5F7;
  --card:         #FFFFFF;
  --primary:      #0F0F11;
  --primary-h:    #27272A;
  --secondary:    #71717A;
  --muted:        #A1A1AA;
  --border:       #E4E4E7;
  --border-focus: #0F0F11;
  --sidebar-bg:   #FAFAFA;
  --sidebar-w:    264px;

  --success:      #059669;
  --success-bg:   #ECFDF5;
  --success-t:    #065F46;
  --warning:      #D97706;
  --warning-bg:   #FFFBEB;
  --warning-t:    #92400E;
  --danger:       #DC2626;
  --danger-bg:    #FEF2F2;
  --danger-t:     #991B1B;

  --sh-xs: 0 1px 2px rgba(0,0,0,.04);
  --sh-sm: 0 1px 3px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
  --sh-md: 0 4px 16px rgba(0,0,0,.07), 0 2px 6px rgba(0,0,0,.04);
  --sh-lg: 0 12px 32px rgba(0,0,0,.09), 0 4px 12px rgba(0,0,0,.05);
  --sh-xl: 0 24px 48px rgba(0,0,0,.12), 0 8px 20px rgba(0,0,0,.06);

  --r:    12px;
  --r-sm:  8px;
  --r-lg: 18px;
  --r-xl: 24px;
}

html { font-size: 14px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ============================
   LOGIN PAGE — Split Panel
   ============================ */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: 40px 40px 36px;
}

.login-card-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.login-brand-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-brand-icon svg { width: 17px; height: 17px; stroke: #fff; }

.login-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -.2px;
}

.login-card-header { margin-bottom: 28px; }

.login-card-header h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.4px;
  margin-bottom: 5px;
}

.login-card-header p {
  font-size: 13.5px;
  color: var(--secondary);
}

.login-hints {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.login-hint-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.login-hint-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--secondary);
  flex-shrink: 0;
}

.login-hint-cred {
  font-size: 12px;
  color: var(--muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ============================
   APP LAYOUT
   ============================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ============================
   SIDEBAR
   ============================ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand-icon {
  width: 36px; height: 36px;
  background: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-brand-icon svg { width: 18px; height: 18px; stroke: #fff; }

.sidebar-brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.2px;
}

.sidebar-nav { flex: 1; padding: 14px 12px 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: none;
  background: none;
  color: var(--secondary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
  margin-bottom: 2px;
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
}

.nav-item svg { width: 16px; height: 16px; stroke-width: 1.9; flex-shrink: 0; transition: stroke .15s; }
.nav-item:hover { background: var(--border); color: var(--primary); }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item.active svg { stroke: #fff; }

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-user { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.sidebar-user-info { min-width: 0; }
.sidebar-user-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role { display: block; font-size: 11.5px; color: var(--muted); }

/* ============================
   AVATAR
   ============================ */
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar-md { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
.avatar-xl { width: 72px; height: 72px; font-size: 24px; border: 3px solid var(--border); }

/* ============================
   PROFILE PHOTO UPLOAD
   ============================ */
.profile-photo-wrap {
  position: relative;
  cursor: pointer;
  display: inline-block;
  border-radius: 50%;
  flex-shrink: 0;
}

.profile-photo-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  opacity: 0;
  transition: opacity .2s ease;
  color: #fff;
}

.profile-photo-wrap:hover .profile-photo-overlay { opacity: 1; }
.profile-photo-overlay svg { width: 18px; height: 18px; stroke: #fff; }
.profile-photo-overlay span { font-size: 10px; font-weight: 600; letter-spacing: .3px; }

/* ============================
   MAIN CONTENT
   ============================ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 36px;
  max-width: calc(100vw - var(--sidebar-w));
}

/* ============================
   PAGE
   ============================ */
.page { display: none; }
.page.active { display: block; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
}

.page-title {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.5px;
}

.page-subtitle {
  font-size: 13.5px;
  color: var(--secondary);
  margin-top: 3px;
}

/* ============================
   CARDS
   ============================ */
.card {
  background: var(--card);
  border-radius: var(--r);
  border: 1px solid var(--border);
  box-shadow: var(--sh-sm);
  margin-bottom: 16px;
}

/* ============================
   STATS GRID
   ============================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow .2s, transform .2s;
}

.stat-card:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon svg { width: 19px; height: 19px; }
.stat-icon-blue    { background: #EFF6FF; } .stat-icon-blue svg    { stroke: #2563EB; }
.stat-icon-green   { background: #F0FDF4; } .stat-icon-green svg   { stroke: #16A34A; }
.stat-icon-success { background: var(--success-bg); } .stat-icon-success svg { stroke: var(--success); }
.stat-icon-warning { background: var(--warning-bg); } .stat-icon-warning svg { stroke: var(--warning); }

.stat-value {
  display: block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.6px;
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--secondary);
  margin-top: 4px;
}

/* ============================
   SECTION HEADER
   ============================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.2px;
}

/* ============================
   TABLE
   ============================ */
.table-responsive { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; }

.table thead tr { border-bottom: 1px solid var(--border); }

.table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: #FAFAFA; }

.report-title-cell { display: flex; flex-direction: column; gap: 3px; }
.font-medium { font-weight: 500; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 12px; }

/* ============================
   FILTERS
   ============================ */
.filters-card { padding: 14px 18px; margin-bottom: 14px; }

.filters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto auto auto;
  gap: 9px;
  align-items: center;
}

/* ============================
   FORMS
   ============================ */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--secondary);
  letter-spacing: .1px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--primary);
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  appearance: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(15,15,17,.07);
}

.form-input::placeholder, .form-textarea::placeholder { color: var(--muted); }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.form-textarea { resize: vertical; min-height: 80px; }

.input-icon { position: relative; }
.input-icon svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  stroke: var(--muted);
  stroke-width: 1.8;
  pointer-events: none;
}
.input-icon .form-input { padding-left: 36px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-col-2 { grid-column: span 2; }

/* ============================
   BUTTONS
   ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all .15s ease;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -.01em;
  box-sizing: border-box;
}

.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-h);
  border-color: var(--primary-h);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--bg); border-color: #D4D4D8; }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #B91C1C; transform: translateY(-1px); }

.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-sm svg { width: 12px; height: 12px; }

.btn-icon {
  width: 34px; height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--secondary);
  cursor: pointer;
  transition: all .15s ease;
  flex-shrink: 0;
}

.btn-icon svg { width: 15px; height: 15px; }
.btn-icon:hover { background: var(--bg); color: var(--primary); border-color: #D4D4D8; }
.btn-icon-sm { width: 28px; height: 28px; border-radius: 6px; }
.btn-icon-sm svg { width: 13px; height: 13px; }
.btn-icon-danger:hover { background: var(--danger-bg); color: var(--danger); border-color: #FECACA; }

.logout-btn { border-color: transparent; background: none; color: var(--secondary); }
.logout-btn:hover { background: var(--danger-bg); color: var(--danger); border-color: transparent; }

.action-btns { display: flex; align-items: center; gap: 5px; }

/* ============================
   BADGES
   ============================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .1px;
}

.badge-success { background: var(--success-bg); color: var(--success-t); }
.badge-warning { background: var(--warning-bg); color: var(--warning-t); }
.badge-neutral { background: var(--bg); color: var(--secondary); border: 1px solid var(--border); }
.badge-danger  { background: var(--danger-bg); color: var(--danger-t); }
.badge-blue    { background: #EFF6FF; color: #1D4ED8; }
/* Report type */
.badge-daily   { background: #EFF6FF; color: #1D4ED8; }
.badge-weekly  { background: #F5F3FF; color: #6D28D9; }
.badge-monthly { background: #FFF7ED; color: #C2410C; }

/* ============================
   ALERTS
   ============================ */
.alert {
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert-danger { background: var(--danger-bg); color: var(--danger-t); border: 1px solid #FECACA; }

/* ============================
   MODALS
   ============================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: modalIn .18s cubic-bezier(.16,1,.3,1);
}

.modal-lg { max-width: 620px; }
.modal-xl { max-width: 920px; }
.modal-sm { max-width: 400px; }

.er-filters {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-wrap: wrap;
  align-items: center;
}
.er-week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: #FAFAFA;
  gap: 12px;
}
.er-week-nav-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  flex: 1;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -.2px; flex:1; }

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: var(--bg);
  color: var(--secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: #FEE2E2; color: #DC2626; }
.modal-close svg { width: 18px; height: 18px; }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: #FAFAFA;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}

/* ============================
   EMPLOYEE CARDS
   ============================ */
.employees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.employee-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
  padding: 22px;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s;
}

.employee-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
  border-color: #D4D4D8;
}

.employee-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.employee-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.2px;
  margin-bottom: 8px;
}

.employee-meta { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }

.employee-meta-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--secondary);
  font-size: 12.5px;
}

.employee-meta-row svg { width: 13px; height: 13px; flex-shrink: 0; stroke: var(--muted); }

.employee-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.emp-stat { text-align: center; }
.emp-stat-value { display: block; font-size: 17px; font-weight: 700; }
.emp-stat-label { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ============================
   REPORT TYPE SELECTOR
   ============================ */
.type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--bg);
}

.type-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border: none;
  border-right: 1px solid var(--border);
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--secondary);
  cursor: pointer;
  transition: all .15s;
}

.type-btn:last-child { border-right: none; }
.type-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.type-btn:hover { background: #EDEDF0; color: var(--primary); }
.type-btn.active { background: var(--primary); color: #fff; }
.type-btn.active svg { stroke: #fff; }

/* ============================
   REPORT CARDS
   ============================ */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.report-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s;
}

.report-card:hover {
  box-shadow: var(--sh-md);
  transform: translateY(-2px);
  border-color: #D4D4D8;
}

.report-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.report-card-meta { display: flex; align-items: center; gap: 6px; }

.report-period {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -.2px;
}

.report-card-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.2px;
  line-height: 1.45;
  color: var(--primary);
}

.report-card-desc {
  font-size: 12.5px;
  color: var(--secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.report-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.report-card-date {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}

.report-card-date svg { width: 12px; height: 12px; }

/* ============================
   REPORT DETAIL (modal)
   ============================ */
.report-detail { display: flex; flex-direction: column; }

.report-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.report-detail-row:last-child { border-bottom: none; }
.detail-label { font-size: 12.5px; color: var(--secondary); font-weight: 500; }

.report-description { padding-top: 14px; }
.report-description .detail-label { display: block; margin-bottom: 6px; }
.report-description p { font-size: 13.5px; color: var(--secondary); line-height: 1.6; }

/* ============================
   EMPTY STATES
   ============================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 20px;
  gap: 10px;
  text-align: center;
}

.empty-state > svg { width: 32px; height: 32px; stroke: var(--muted); }
.empty-state p { color: var(--secondary); font-size: 13.5px; }

.empty-state-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 32px;
  gap: 12px;
  text-align: center;
}

.empty-icon { width: 40px; height: 40px; stroke: var(--muted); }
.empty-state-card h3 { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.empty-state-card p { color: var(--secondary); font-size: 13.5px; max-width: 280px; line-height: 1.5; }

/* ============================
   REPORT COUNT CHIP
   ============================ */
.report-count-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12.5px;
  color: var(--secondary);
  font-weight: 500;
}

/* ============================
   PROFILE PAGE
   ============================ */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
  margin-bottom: 16px;
}

.profile-hero-info h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.3px;
}

.profile-hero-info p {
  color: var(--secondary);
  font-size: 13.5px;
  margin-top: 4px;
}

.profile-hero-date {
  display: flex !important;
  align-items: center;
  gap: 5px;
  margin-top: 8px !important;
  font-size: 12px !important;
  color: var(--muted) !important;
}

.profile-hero-date svg { width: 12px; height: 12px; }

.profile-section { overflow: hidden; margin-bottom: 14px; }

.profile-section-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-section-header svg { width: 15px; height: 15px; stroke: var(--muted); }
.profile-section-header h3 { font-size: 14px; font-weight: 700; letter-spacing: -.2px; }

.profile-section-body { padding: 22px; }

.profile-section-footer {
  padding: 13px 22px;
  border-top: 1px solid var(--border);
  background: #FAFAFA;
  display: flex;
  justify-content: flex-end;
}

/* ============================
   TOAST
   ============================ */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--r);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--sh-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease;
  z-index: 9999;
  pointer-events: none;
}

.toast.toast-show { opacity: 1; transform: translateY(0); }
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.toast-success { background: var(--primary); }
.toast-error   { background: var(--danger); }

/* ============================
   SIDEBAR USER POPUP MENU
   ============================ */
.sidebar-footer {
  position: relative;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}

.sidebar-user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s;
  text-align: left;
}

.sidebar-user-btn:hover { background: var(--border); }

.sidebar-user-btn .sidebar-user-info { min-width: 0; flex: 1; }

.sidebar-user-btn .chevron {
  width: 14px; height: 14px;
  stroke: var(--muted);
  flex-shrink: 0;
  transition: transform .2s ease;
}

.sidebar-user-btn.open .chevron { transform: rotate(180deg); }

.sidebar-user-popup {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 12px;
  right: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--sh-lg);
  overflow: hidden;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events: none;
  z-index: 200;
}

.sidebar-user-popup.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.sidebar-popup-header {
  padding: 13px 14px 11px;
  border-bottom: 1px solid var(--border);
}

.sidebar-popup-header-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-popup-header-email {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-popup-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--primary);
  cursor: pointer;
  transition: background .1s;
  text-align: left;
}

.sidebar-popup-item svg { width: 15px; height: 15px; flex-shrink: 0; }
.sidebar-popup-item:hover { background: var(--bg); }
.sidebar-popup-item.danger { color: var(--danger); }
.sidebar-popup-item.danger:hover { background: var(--danger-bg); }

.sidebar-popup-divider { height: 1px; background: var(--border); margin: 2px 0; }

/* ============================
   EMPLOYEE REPORTS MODAL STATS
   ============================ */
.er-stat {
  padding: 14px 20px;
  background: var(--card);
  text-align: center;
}

.er-stat-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.4px;
  line-height: 1;
}

.er-stat-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* ============================
   PAGINATION
   ============================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 12.5px;
  color: var(--secondary);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}

.page-btn:hover:not(:disabled):not(.active) {
  background: var(--bg);
  color: var(--primary);
  border-color: #D4D4D8;
}

.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.page-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.page-btn svg { width: 14px; height: 14px; }

.page-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 32px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 768px) {
  .pagination { gap: 8px; }
  .pagination-info { font-size: 11.5px; }
  .page-btn { min-width: 30px; height: 30px; font-size: 12px; }
}

/* ============================
   MISC
   ============================ */
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.text-danger { color: var(--danger); }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }

/* ============================
   MOBILE TOPBAR
   ============================ */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 90;
  box-shadow: var(--sh-sm);
}

.mobile-topbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.2px;
}

.mobile-topbar-icon {
  width: 30px; height: 30px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-topbar-icon svg { width: 14px; height: 14px; stroke: #fff; }

.hamburger {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: none;
  cursor: pointer;
  transition: background .15s;
}

.hamburger:hover { background: var(--bg); }
.hamburger svg { width: 16px; height: 16px; }

/* ============================
   SIDEBAR OVERLAY
   ============================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 100;
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

/* ============================
   RESPONSIVE — Tablet (≤1024px)
   ============================ */
@media (max-width: 1024px) {
  .filters-grid {
    grid-template-columns: 1fr 1fr 1fr auto;
  }
}

/* ============================
   RESPONSIVE — Mobile (≤768px)
   ============================ */
@media (max-width: 768px) {

  /* Topbar */
  .mobile-topbar { display: flex; }

  /* Sidebar — off-canvas */
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 110;
    top: 0;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-overlay {
    display: block;
    opacity: 1;
    pointer-events: all;
  }

  /* Main content — full width, pad for topbar */
  .main-content {
    margin-left: 0;
    max-width: 100vw;
    padding: 72px 16px 24px;
  }

  /* Stats grids */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
  }

  #myStats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }

  .stat-card { padding: 14px 16px; gap: 12px; }
  .stat-value { font-size: 22px; }
  .stat-icon { width: 38px; height: 38px; }
  .stat-icon svg { width: 16px; height: 16px; }

  /* Page header */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
  }

  .page-title { font-size: 19px; }

  /* Filters */
  .filters-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .filters-card { padding: 12px 14px; }

  /* Tables */
  .table th, .table td { padding: 10px 12px; }

  /* Employee grid */
  .employees-grid {
    grid-template-columns: 1fr;
  }

  /* Form grid */
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-col-2 { grid-column: span 1; }

  /* Modals — slide up from bottom */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal {
    max-width: 100%;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    max-height: 92vh;
    animation: modalInMobile .22s cubic-bezier(.16,1,.3,1);
  }

  @keyframes modalInMobile {
    from { transform: translateY(40px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
  }

  .modal-lg, .modal-xl, .modal-sm { max-width: 100%; }
  .er-filters { flex-direction: column; }
  .er-week-nav { flex-wrap: wrap; gap: 8px; }

  /* Profile hero */
  .profile-hero {
    flex-direction: column;
    text-align: center;
    padding: 24px 20px;
    gap: 16px;
  }

  /* Login */
  .login-body { padding: 16px; align-items: flex-start; padding-top: 48px; }
  .login-card { padding: 28px 24px; }

  /* Section header on reports page */
  .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* Report count chip */
  .report-count-chip { font-size: 11.5px; }

  /* Toast */
  .toast { left: 16px; right: 16px; bottom: 20px; }

  /* Dashboard */
  .stats-grid-3  { grid-template-columns: repeat(2, 1fr); }
  .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-two-col  { grid-template-columns: 1fr; }
  .welcome-banner { flex-direction: column; text-align: center; gap: 16px; }
  .welcome-banner-action { margin-left: 0; }
}

/* ============================
   DASHBOARD ADDITIONS
   ============================ */

/* Logo images */
.sidebar-logo  { height: 34px; max-width: 180px; object-fit: contain; }
.topbar-logo   { height: 26px; max-width: 140px; object-fit: contain; }
.login-logo    { height: 38px; max-width: 180px; object-fit: contain; }

/* Bulk action toolbar */
.bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  animation: slideDown .15s ease;
}
.bulk-toolbar-count { flex: 1; }
.bulk-toolbar .btn-danger-outline {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s;
}
.bulk-toolbar .btn-danger-outline:hover { background: rgba(255,255,255,.25); }
.bulk-toolbar .btn-clear {
  background: transparent;
  color: rgba(255,255,255,.75);
  border: none;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color .15s;
}
.bulk-toolbar .btn-clear:hover { color: #fff; }
@keyframes slideDown { from { opacity:0; transform:translateY(-6px);} to { opacity:1; transform:translateY(0);} }
tr.row-selected { background: color-mix(in srgb, var(--primary) 6%, transparent); }

/* ─── Custom Checkboxes (bulk select) ─── */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background: var(--card);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .15s, border-color .15s, box-shadow .15s;
  vertical-align: middle;
  position: relative;
}
input[type="checkbox"]:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
}
input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}
input[type="checkbox"]:checked::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
  position: absolute;
}
input[type="checkbox"]:indeterminate {
  background: var(--primary);
  border-color: var(--primary);
}
input[type="checkbox"]:indeterminate::after {
  content: '';
  display: block;
  width: 8px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  position: absolute;
}

/* Main content copyright footer */
.main-footer {
  text-align: center;
  padding: 32px 0 4px;
  font-size: 11px;
  color: var(--muted);
}

/* Extra stat icon colors */
.stat-icon-purple { background: #F5F3FF; }
.stat-icon-purple svg { stroke: #7C3AED; }
.stat-icon-danger { background: var(--danger-bg); }
.stat-icon-danger svg { stroke: var(--danger); }

/* 3-column stats grid (for 6 stats) */
.stats-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* Quick action cards */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 16px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s, transform .1s;
  cursor: pointer;
}
.quick-action-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.08);
  transform: translateY(-2px);
}
.quick-action-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.quick-action-icon svg { width: 20px; height: 20px; }
.qa-blue   { background: #EFF6FF; } .qa-blue svg   { stroke: #2563EB; }
.qa-green  { background: #F0FDF4; } .qa-green svg  { stroke: #16A34A; }
.qa-purple { background: #F5F3FF; } .qa-purple svg { stroke: #7C3AED; }
.qa-orange { background: #FFF7ED; } .qa-orange svg { stroke: #EA580C; }
.quick-action-label { font-size: 13px; font-weight: 600; text-align: center; color: var(--text); }
.quick-action-sub   { font-size: 11.5px; color: var(--muted); text-align: center; line-height: 1.3; }

/* Dashboard two-column layout */
.dash-two-col {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
  margin-bottom: 20px;
}

/* Dash list items (pending reports) */
.dash-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  transition: background .1s;
  cursor: pointer;
}
.dash-list-item:last-child { border-bottom: none; }
.dash-list-item:hover { background: var(--bg); }
.dash-list-item-info { flex: 1; min-width: 0; }
.dash-list-item-title {
  font-size: 13.5px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-list-item-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Top employees list */
.dash-emp-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.dash-emp-item:last-child { border-bottom: none; }
.dash-emp-info { flex: 1; min-width: 0; }
.dash-emp-name { font-size: 13.5px; font-weight: 500; }
.dash-emp-dept { font-size: 12px; color: var(--muted); margin-top: 1px; }
.dash-emp-count { font-size: 20px; font-weight: 700; color: var(--primary); }

/* Welcome banner (employee dashboard) */
.welcome-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%);
  border-radius: var(--r);
  color: white;
  margin-bottom: 20px;
}
.welcome-banner-text { flex: 1; }
.welcome-banner-text h2 { font-size: 20px; font-weight: 700; letter-spacing: -.3px; margin-bottom: 4px; }
.welcome-banner-text p  { font-size: 13.5px; opacity: .85; }
.welcome-banner-action  { flex-shrink: 0; }
.welcome-banner .btn-primary {
  background: white; color: var(--primary); border-color: white;
}
.welcome-banner .btn-primary:hover { background: rgba(255,255,255,.88); }
.welcome-banner .avatar { border: 3px solid rgba(255,255,255,.35); }

/* This week's report rows */
.week-report-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--border);
}
.week-report-row:last-child { border-bottom: none; }
.week-day-tag  { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--muted); width: 30px; flex-shrink: 0; }
.week-report-info  { flex: 1; min-width: 0; }
.week-report-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-report-sub   { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ============================
   ATTENDANCE
   ============================ */
.attendance-today-card {
  background: var(--card);
  border: 2px solid var(--border);
  margin-bottom: 20px;
}
.attendance-today-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.attendance-today-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.3px;
}
.attendance-today-date {
  font-size: 13px;
  color: var(--secondary);
  margin-top: 2px;
}
.attendance-today-body {
  padding: 20px 24px;
}
.attendance-time-inputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.attendance-today-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.attendance-time {
  font-weight: 600;
  font-size: 13.5px;
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-block;
}
.attendance-in {
  background: var(--success-bg);
  color: var(--success-t);
}
.attendance-out {
  background: #EFF6FF;
  color: #1D4ED8;
}

.badge-late {
  background: var(--danger-bg);
  color: var(--danger-t);
}
.badge-overtime-plus {
  background: #ECFDF5;
  color: #065F46;
  font-weight: 600;
}
.badge-overtime-minus {
  background: #FEF2F2;
  color: #991B1B;
  font-weight: 600;
}

/* Overtime summary card */
.overtime-summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
}
.overtime-summary-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.overtime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.overtime-item {
  text-align: center;
  padding: 14px 8px;
  border-radius: 10px;
  background: var(--bg);
}
.overtime-item-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}
.overtime-item-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.overtime-item.positive .overtime-item-value { color: #065F46; }
.overtime-item.negative .overtime-item-value { color: #991B1B; }
.overtime-item.neutral .overtime-item-value { color: var(--primary); }

/* Attendance action zone */
.att-action-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
}
.att-action-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--secondary);
}
.att-times-display {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.att-time-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.att-time-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
}
.att-time-separator {
  display: flex;
  align-items: center;
  padding-top: 18px;
}
.att-complete-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--success-t);
  background: var(--success-bg);
  padding: 8px 16px;
  border-radius: 8px;
}

/* Check-in / Check-out buttons */
.btn-checkin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  border-radius: var(--r);
  border: 2px solid var(--success);
  background: var(--success);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
  letter-spacing: -.02em;
}
.btn-checkin svg { width: 18px; height: 18px; }
.btn-checkin:hover {
  background: #047857;
  border-color: #047857;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5,150,105,.35);
}

.btn-checkout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  border-radius: var(--r);
  border: 2px solid #2563EB;
  background: #2563EB;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
  letter-spacing: -.02em;
}
.btn-checkout svg { width: 18px; height: 18px; }
.btn-checkout:hover {
  background: #1D4ED8;
  border-color: #1D4ED8;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,.35);
}

/* ============================
   NOTIFICATION SYSTEM
   ============================ */
.sidebar-notif-bar {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  position: relative;
}

.sidebar-notif-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--secondary);
  cursor: pointer;
  transition: background .15s, color .15s;
  position: relative;
  font-family: inherit;
}
.sidebar-notif-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-notif-btn:hover { background: var(--border); color: var(--primary); }

.notif-badge {
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  margin-left: auto;
}

.notif-panel {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 12px;
  right: 12px;
  width: calc(var(--sidebar-w) - 24px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--sh-lg);
  z-index: 300;
  display: none;
  overflow: hidden;
}
.notif-panel.open { display: block; }

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.notif-panel-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -.2px;
  white-space: nowrap;
}
.notif-mark-all {
  font-size: 11px;
  font-weight: 600;
  color: #2563EB;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 5px 10px;
  border-radius: 6px;
  transition: background .15s, color .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.notif-mark-all:hover { background: #EFF6FF; color: #1D4ED8; }

.notif-panel-list {
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
  position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: #F8FAFF; }
.notif-item.unread .notif-item-title { font-weight: 700; }
.notif-item:hover .notif-item-close { opacity: 1; }

.notif-item-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 34px 10px 14px;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}

.notif-item-close {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--muted);
  opacity: 0;
  transition: opacity .15s, background .15s, color .15s;
  padding: 0;
}
.notif-item-close svg { width: 14px; height: 14px; }
.notif-item-close:hover { background: var(--danger-bg); color: var(--danger); opacity: 1; }

.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notif-item-icon svg { width: 15px; height: 15px; }

.notif-item-content { flex: 1; min-width: 0; }
.notif-item-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 1px;
}
.notif-item-msg {
  font-size: 11.5px;
  color: var(--secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item-time {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 3px;
}

.notif-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13px;
}

/* Mobile notification bell */
.mobile-notif-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  color: var(--primary);
}
.mobile-notif-btn svg { width: 20px; height: 20px; }
.notif-badge-mobile {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
