:root {
  --primary: #0f172a;
  --primary-light: #1e293b;
  --primary-lighter: #334155;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-dark: #d97706;
  --secondary: #0d9488;
  --secondary-light: #14b8a6;
  --surface: #faf7f2;
  --card-bg: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --info: #3b82f6;
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);
}

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

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: IRANSans, Tahoma, sans-serif;
  background: var(--surface);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ========= SIDEBAR ========= */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--primary);
  color: #fff;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-header .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--primary);
  flex-shrink: 0;
}

.sidebar-header .user-info { flex: 1; min-width: 0; }
.sidebar-header .user-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-header .user-role { font-size: 11px; color: var(--accent); opacity: 0.8; }

.sidebar-nav { padding: 12px 0; flex: 1; }
.sidebar-nav .nav-label {
  padding: 8px 20px 4px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.3);
  font-weight: 600;
}

.sidebar-nav .nav-item { position: relative; }
.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 400;
  transition: all .2s;
  border-right: 3px solid transparent;
  position: relative;
}

.sidebar-nav .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.sidebar-nav .nav-link.active {
  color: var(--accent);
  background: rgba(245, 158, 11, 0.08);
  border-right-color: var(--accent);
  font-weight: 600;
}

.sidebar-nav .nav-link .icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  transition: all .2s;
}

.sidebar-nav .nav-link:hover .icon,
.sidebar-nav .nav-link.active .icon {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-footer .logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-xs);
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  transition: all .2s;
}

.sidebar-footer .logout-btn:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

/* ========= MAIN CONTENT ========= */
.main-wrap {
  margin-right: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-left h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-right .date-display {
  font-size: 12px;
  color: var(--text-muted);
  direction: ltr;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
}

/* ========= CONTENT ========= */
.page-content { padding: 24px 32px; flex: 1; }

/* ========= CARDS ========= */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h5, .card-header .card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-body { padding: 20px; }
.card-body-sm { padding: 16px 20px; }

/* ========= STATS CARDS ========= */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 24px; }

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-card .stat-icon.gold { background: rgba(245, 158, 11, 0.12); color: var(--accent); }
.stat-card .stat-icon.teal { background: rgba(13, 148, 136, 0.12); color: var(--secondary); }
.stat-card .stat-icon.blue { background: rgba(59, 130, 246, 0.12); color: var(--info); }
.stat-card .stat-icon.purple { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }

.stat-card .stat-body { flex: 1; }
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.stat-card .stat-value { font-size: 24px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.stat-card .stat-change { font-size: 11px; color: var(--success); margin-top: 4px; }

/* ========= TABLES ========= */
.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: right;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  vertical-align: middle;
}

.table tr:hover td { background: rgba(0,0,0,0.01); }
.table tr:last-child td { border-bottom: none; }

.table .cell-id { font-weight: 600; color: var(--text-primary); font-size: 12px; }
.table .cell-name { font-weight: 500; color: var(--text-primary); }

/* ========= BUTTONS ========= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  white-space: nowrap;
  line-height: 1.4;
}

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }

.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }

.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #0f766e; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(245, 158, 11, 0.04);
}

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #16a34a; }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  padding: 6px 10px;
}
.btn-ghost:hover { color: var(--text-primary); background: rgba(0,0,0,0.04); }

.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-xs); }

/* ========= FORMS ========= */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-family: inherit;
  color: var(--text-primary);
  background: #fff;
  transition: all .2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-control::placeholder { color: var(--text-muted); }

select.form-control { cursor: pointer; }

.form-error { font-size: 11px; color: var(--danger); margin-top: 4px; }

/* ========= FILTER BOX (redesigned) ========= */
.filter-box {
  margin-bottom: 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow .2s;
}

.filter-box.expanded {
  border-color: rgba(245, 158, 11, 0.25);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.06);
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  user-select: none;
  transition: all .2s;
  border-bottom: 1px solid transparent;
}

.filter-bar:hover { color: var(--accent); }

.filter-bar.active {
  color: var(--accent);
  border-bottom-color: var(--border-light);
}

.filter-icon {
  font-size: 13px;
  color: var(--accent);
  opacity: 0.7;
}

.filter-bar.active .filter-icon { opacity: 1; }

.filter-arrow {
  margin-right: auto;
  font-size: 11px;
  transition: transform .3s ease;
}

.filter-bar.active .filter-arrow { transform: rotate(180deg); }

.filter-panel {
  display: none;
  padding: 20px;
  animation: filterSlide .25s ease;
}

.filter-panel.open { display: block; }

@keyframes filterSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }

.filter-grid .form-control { font-size: 13px; }

.filter-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* ========= ALERTS ========= */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.alert ul { margin: 4px 0 0 16px; }
.alert li { font-size: 12px; margin-bottom: 2px; }

/* ========= PAGINATION ========= */
.pagination-wrap { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 16px 0; }

.pagination-wrap .page-item { display: inline-flex; }
.pagination-wrap .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  background: var(--card-bg);
  transition: all .2s;
}

.pagination-wrap .page-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pagination-wrap .page-item.active .page-link {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pagination-wrap .page-item.disabled .page-link {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========= TABLE ACTION BUTTONS ========= */
.action-group { display: flex; gap: 4px; }

.action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
  font-size: 13px;
  background: transparent;
  color: var(--text-muted);
}

.action-btn:hover { background: rgba(0,0,0,0.04); color: var(--text-primary); }
.action-btn.danger:hover { background: rgba(239, 68, 68, 0.08); color: var(--danger); }
.action-btn.warning:hover { background: rgba(245, 158, 11, 0.08); color: var(--accent); }
.action-btn.info:hover { background: rgba(59, 130, 246, 0.08); color: var(--info); }

/* ========= BADGE ========= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
}

.badge-accent { background: rgba(245, 158, 11, 0.1); color: var(--accent); }
.badge-success { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.badge-info { background: rgba(59, 130, 246, 0.1); color: var(--info); }

/* ========= EMPTY STATE ========= */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state .empty-text { font-size: 14px; }

/* ========= OVERLAY ========= */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
}

/* ========= AUTH PAGES ========= */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0b1120 0%, #131d35 40%, #1a2744 70%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

/* subtle grid overlay */
.auth-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
}

/* decorative swoosh */
.auth-bg-decoration {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.15;
  background:
    radial-gradient(ellipse 80% 50% at 10% 90%, rgba(245,158,11,0.35) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(13,148,136,0.25) 0%, transparent 70%);
}

/* floating orbs */
.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  z-index: 0;
  animation: authFloat 8s ease-in-out infinite;
}

.auth-bg-orb--1 {
  width: 500px; height: 500px;
  top: -180px; right: -120px;
  background: radial-gradient(circle, rgba(245,158,11,0.07) 0%, transparent 70%);
  animation-delay: 0s;
}

.auth-bg-orb--2 {
  width: 350px; height: 350px;
  bottom: -100px; left: -80px;
  background: radial-gradient(circle, rgba(13,148,136,0.06) 0%, transparent 70%);
  animation-delay: -3s;
}

.auth-bg-orb--3 {
  width: 200px; height: 200px;
  top: 40%; left: 55%;
  background: radial-gradient(circle, rgba(245,158,11,0.04) 0%, transparent 70%);
  animation-delay: -5s;
}

@keyframes authFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-30px) scale(1.05); }
}

.auth-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 36px 40px 32px;
  width: 420px;
  max-width: 90vw;
  box-shadow:
    0 25px 50px -12px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.06);
}

.auth-card .auth-title {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-top: 8px;
  margin-bottom: 4px;
}

.auth-card .auth-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.6;
}

/* ---- input with icon ---- */
.auth-card .input-affix {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-card .input-affix .affix-icon {
  position: absolute;
  right: 14px;
  font-size: 14px;
  color: var(--text-muted);
  z-index: 2;
  pointer-events: none;
  transition: color .2s;
}

.auth-card .input-affix:focus-within .affix-icon {
  color: var(--accent);
}

.auth-card .input-affix .form-control {
  padding-right: 40px;
}

/* ---- auth-specific inputs ---- */
.auth-card .form-control {
  background: #fff;
  border: 1.5px solid #e2e0dc;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 14px;
  color: var(--text-primary);
  transition: all .2s;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.02);
}

.auth-card .form-control::placeholder {
  color: #b5b3ad;
  font-size: 13px;
}

.auth-card .form-control:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(245,158,11,0.1), inset 0 1px 3px transparent;
  outline: none;
}

.auth-card .form-control:hover:not(:focus) {
  border-color: #d0cdc6;
}

/* ---- errors inside auth ---- */
.auth-card .alert {
  margin-bottom: 20px;
  border-radius: 12px;
}

/* ---- auth link ---- */
.auth-card .auth-link {
  text-align: center;
  margin-top: 22px;
  font-size: 12px;
  color: var(--text-muted);
}

.auth-card .auth-link a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.auth-card .auth-link a:hover {
  text-decoration: underline;
}

/* ---- button full-width modifier ---- */
.btn-block {
  width: 100%;
  padding: 13px;
  font-size: 15px;
}

/* ========= PAYSLIP PRINT TABLE ========= */
.payslip-container {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  padding: 32px;
  overflow-x: auto;
}

.payslip-container table.c18 {
  direction: ltr;
  float: right;
  position: relative;
  overflow: hidden;
  width: auto;
  margin: 0 auto;
}

.payslip-container table.c18 * { font-family: IRANSans, serif !important; }

.payslip-container .golden-color { background: var(--accent); }
.payslip-container .golden-color p, .payslip-container .golden-color span { color: #fff !important; font-weight: 600 !important; }

/* ========= UPLOAD ZONE ========= */
.upload-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 16px;
  padding: 64px 32px;
  text-align: center;
  cursor: pointer;
  transition: all .25s ease;
  background: var(--card-bg);
}

.upload-zone:hover {
  border-color: var(--accent);
  background: rgba(245, 158, 11, 0.03);
}

.upload-zone.dragover {
  border-color: var(--accent);
  border-style: solid;
  background: rgba(245, 158, 11, 0.06);
  transform: scale(1.01);
}

.upload-zone.dragover .upload-icon {
  transform: translateY(-4px) scale(1.1);
}

.upload-zone.has-file {
  border-style: solid;
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.03);
}

.upload-icon {
  font-size: 52px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 12px;
  transition: transform .3s ease, color .25s;
}

.upload-zone:hover .upload-icon {
  color: var(--accent);
  transform: translateY(-4px);
}

.upload-zone.has-file .upload-icon {
  color: var(--success);
}

.upload-title {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  margin: 0 0 4px;
}

.upload-hint {
  color: var(--text-muted);
  font-size: 12px;
  margin: 0;
}

.upload-filename {
  display: none;
  margin-top: 12px;
  padding: 8px 14px;
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.15);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--success);
  direction: ltr;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.upload-filename.visible {
  display: inline-flex;
}

.upload-filename i {
  font-size: 14px;
}

/* ========= PRINT STYLES ========= */
@media print {
  .sidebar, .topbar, .sidebar-overlay { display: none !important; }
  .main-wrap { margin-right: 0 !important; }
  .page-content { padding: 0 !important; }
  .payslip-container { box-shadow: none !important; border: none !important; }
  .btn { display: none !important; }
}

/* ========= RESPONSIVE ========= */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(calc(var(--sidebar-width) + 20px));
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.open { display: block; }
  .main-wrap { margin-right: 0; }
  .topbar { padding: 0 16px; }
  .page-content { padding: 16px; }
  .hamburger { display: block; }
  .stats-grid { grid-template-columns: 1fr; }
  .filter-box { border-radius: var(--radius-sm); }
  .filter-bar { padding: 12px 14px; }
  .filter-panel { padding: 14px; }
  .filter-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 24px; }
}

@media (max-width: 480px) {
  .auth-card { padding: 24px 20px; }
  .card-header { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ========= Toast Notification ========= */
.toast-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn .3s ease, toastOut .3s ease 3.7s forwards;
}

@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(-12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(-50%) translateY(-12px); } }

/* ========= Password inline form fix ========= */
.password-inline { display: none; margin-top: 8px; }
.password-inline.open { display: block; }
.password-inline .form-control { padding: 6px 10px; font-size: 12px; }
.password-inline .btn { font-size: 11px; padding: 4px 10px; }
