/* Housez24 Workspace — Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

:root {
  --navy: #1a3a5c;
  --navy-dark: #112844;
  --navy-mid: #254d7a;
  --navy-light: #2e6099;
  --orange: #e07020;
  --orange-light: #f28030;
  --orange-dim: rgba(224,112,32,0.12);
  --white: #ffffff;
  --bg: #f0f4f8;
  --bg-card: #ffffff;
  --text: #1a2332;
  --text-muted: #6b7a8d;
  --text-light: #9aa5b4;
  --border: #e2e8f0;
  --border-dark: #cbd5e0;
  --sidebar-w: 260px;
  --header-h: 64px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 2px 12px rgba(26,58,92,0.08);
  --shadow-md: 0 4px 24px rgba(26,58,92,0.12);
  --shadow-lg: 0 8px 40px rgba(26,58,92,0.16);
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0891b2;
  --transition: 0.2s ease;
}

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

html { font-size: 15px; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--navy-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--orange); }

img { max-width: 100%; }

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

/* ─── SIDEBAR ─── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy-dark);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

.sidebar-brand {
  padding: 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}

.sidebar-brand img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
}

.sidebar-brand-text {
  color: white;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
.sidebar-brand-text small {
  display: block;
  font-size: 10px;
  color: var(--orange);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.sidebar-user .avatar {
  width: 36px; height: 36px;
  background: var(--orange);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: white;
  flex-shrink: 0;
}

.sidebar-user-info {
  min-width: 0;
}
.sidebar-user-info .name {
  color: white;
  font-weight: 500;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-info .role {
  color: var(--orange);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.nav-section {
  padding: 14px 22px 6px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  font-weight: 500;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 22px;
  color: rgba(255,255,255,0.65);
  font-size: 13.5px;
  font-weight: 400;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  position: relative;
}

.sidebar-nav a:hover {
  color: white;
  background: rgba(255,255,255,0.05);
}

.sidebar-nav a.active {
  color: white;
  background: rgba(224,112,32,0.15);
  border-left-color: var(--orange);
  font-weight: 500;
}

.sidebar-nav a .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.8;
}

.sidebar-nav a.active .icon { opacity: 1; }

.sidebar-nav a .badge-count {
  margin-left: auto;
  background: var(--orange);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 14px 22px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  padding: 7px 0;
  transition: color var(--transition);
}
.sidebar-footer a:hover { color: #ff6b6b; }

/* ─── MAIN CONTENT ─── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── TOP HEADER ─── */
.topbar {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.topbar-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

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

.topbar-date {
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 0 12px;
  border-right: 1px solid var(--border);
}

.notif-btn {
  position: relative;
  width: 38px; height: 38px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
}
.notif-btn:hover { background: var(--navy); color: white; border-color: var(--navy); }

.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--orange);
  border-radius: 50%;
  border: 2px solid white;
}

.topbar-avatar {
  width: 36px; height: 36px;
  background: var(--navy);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: white;
  cursor: pointer;
}

/* ─── PAGE CONTENT ─── */
.page-content {
  padding: 28px;
  flex: 1;
}

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

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.page-header p {
  color: var(--text-muted);
  font-size: 13.5px;
  margin-top: 3px;
}

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

.card-header {
  padding: 18px 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.card-body {
  padding: 20px 22px;
}

.card-footer {
  padding: 14px 22px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── STAT CARDS ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

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

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.stat-card.navy::before { background: var(--navy); }
.stat-card.orange::before { background: var(--orange); }
.stat-card.green::before { background: var(--success); }
.stat-card.blue::before { background: var(--info); }
.stat-card.red::before { background: var(--danger); }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  font-size: 20px;
}

.stat-card.navy .stat-icon { background: rgba(26,58,92,0.1); color: var(--navy); }
.stat-card.orange .stat-icon { background: var(--orange-dim); color: var(--orange); }
.stat-card.green .stat-icon { background: rgba(22,163,74,0.1); color: var(--success); }
.stat-card.blue .stat-icon { background: rgba(8,145,178,0.1); color: var(--info); }
.stat-card.red .stat-icon { background: rgba(220,38,38,0.1); color: var(--danger); }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-change {
  font-size: 11.5px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.btn-primary:hover {
  background: var(--navy-mid);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,58,92,0.3);
}

.btn-orange {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}
.btn-orange:hover {
  background: var(--orange-light);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(224,112,32,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--border-dark);
}
.btn-outline:hover { background: var(--bg); color: var(--navy); }

.btn-danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}
.btn-danger:hover { background: #b91c1c; color: white; }

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

.btn-icon {
  width: 32px; height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-icon:hover { background: var(--navy); color: white; border-color: var(--navy); }
.btn-icon.danger:hover { background: var(--danger); border-color: var(--danger); }

/* ─── FORMS ─── */
.form-group {
  margin-bottom: 18px;
}

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

.form-label .req { color: var(--danger); margin-left: 2px; }

.form-control, .form-select {
  width: 100%;
  padding: 9px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-control:focus, .form-select:focus {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(30,90,158,0.1);
}

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

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7a8d'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 34px;
  cursor: pointer;
}

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* ─── TABLES ─── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

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

th {
  background: var(--bg);
  padding: 11px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

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

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(240,244,248,0.7); }

.td-avatar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.td-avatar .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: white;
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.td-name { font-weight: 500; font-size: 13.5px; }
.td-sub { font-size: 12px; color: var(--text-muted); }

/* ─── BADGES ─── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.badge-admin { background: rgba(26,58,92,0.12); color: var(--navy); }
.badge-manager { background: var(--orange-dim); color: var(--orange); }
.badge-employee { background: rgba(8,145,178,0.1); color: var(--info); }
.badge-success { background: rgba(22,163,74,0.1); color: var(--success); }
.badge-danger { background: rgba(220,38,38,0.1); color: var(--danger); }
.badge-warning { background: rgba(217,119,6,0.1); color: var(--warning); }
.badge-info { background: rgba(8,145,178,0.1); color: var(--info); }
.badge-secondary { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }

/* ─── FLASH MESSAGES ─── */
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 13.5px;
  font-weight: 500;
  animation: slideIn 0.3s ease;
}

.flash span {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.flash-success { background: rgba(22,163,74,0.1); color: var(--success); border: 1px solid rgba(22,163,74,0.2); }
.flash-success span { background: var(--success); color: white; }
.flash-error { background: rgba(220,38,38,0.08); color: var(--danger); border: 1px solid rgba(220,38,38,0.2); }
.flash-error span { background: var(--danger); color: white; }
.flash-warning { background: rgba(217,119,6,0.1); color: var(--warning); border: 1px solid rgba(217,119,6,0.2); }
.flash-warning span { background: var(--warning); color: white; }

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

/* ─── GRID HELPERS ─── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-cols-7-3 { display: grid; grid-template-columns: 7fr 3fr; gap: 22px; }
.grid-cols-6-4 { display: grid; grid-template-columns: 6fr 4fr; gap: 22px; }

/* ─── ANNOUNCEMENT CARDS ─── */
.announcement-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.announcement-item:last-child { border-bottom: none; }

.ann-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.ann-dot.normal { background: var(--info); }
.ann-dot.important { background: var(--orange); }
.ann-dot.urgent { background: var(--danger); }

.ann-title { font-weight: 600; font-size: 13.5px; margin-bottom: 3px; }
.ann-content { font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.ann-meta { font-size: 11.5px; color: var(--text-light); margin-top: 5px; }

/* ─── FORM BUILDER FIELDS ─── */
.field-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
}

.field-block-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* ─── ACTIVITY LOG ENTRIES ─── */
.activity-entry {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.activity-entry:last-child { border-bottom: none; }

.activity-time {
  font-size: 12px;
  color: var(--text-muted);
  width: 52px;
  flex-shrink: 0;
  font-family: 'DM Mono', monospace;
  padding-top: 2px;
}

.activity-cat {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}

.activity-desc { font-size: 13.5px; flex: 1; }
.activity-dur { font-size: 12px; color: var(--text-muted); flex-shrink: 0; }

/* ─── TABS ─── */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 22px;
}

.tab-btn {
  padding: 9px 20px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}
.tab-btn:hover { color: var(--navy); }
.tab-btn.active { color: var(--navy); border-bottom-color: var(--navy); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── SEARCH BAR ─── */
.search-bar {
  position: relative;
}
.search-bar input {
  padding-left: 36px;
}
.search-bar .search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
}

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 42px;
  margin-bottom: 12px;
  opacity: 0.4;
}
.empty-state h3 { font-size: 15px; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 13.5px; }

/* ─── QUICK LINK CARDS ─── */
.form-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.form-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.form-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--navy);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.form-card:hover {
  border-color: var(--navy);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.form-card:hover::after { transform: scaleX(1); }

.form-card-icon {
  width: 46px; height: 46px;
  background: rgba(26,58,92,0.08);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.form-card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.form-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-card-meta {
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── CLOCK WIDGET ─── */
.clock-widget {
  background: var(--navy-dark);
  border-radius: var(--radius-lg);
  padding: 22px;
  color: white;
  text-align: center;
}

.clock-time {
  font-size: 38px;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-bottom: 6px;
}

.clock-date { font-size: 13px; color: rgba(255,255,255,0.6); margin-bottom: 18px; }

.clock-actions { display: flex; gap: 10px; justify-content: center; }

.clock-btn {
  flex: 1;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.clock-btn-in {
  background: var(--orange);
  color: white;
}
.clock-btn-in:hover { background: var(--orange-light); }

.clock-btn-out {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}
.clock-btn-out:hover { background: rgba(255,255,255,0.2); }

/* ─── PROFILE PIC UPLOAD ─── */
.profile-pic-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}

.profile-pic-preview {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: white;
  overflow: hidden;
  flex-shrink: 0;
}
.profile-pic-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--text-muted);
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

.modal-body { padding: 22px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ─── LOGIN PAGE ─── */
.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--navy-dark);
}

.login-left {
  flex: 1;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-mid) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(224,112,32,0.08);
}

.login-left::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.login-brand {
  text-align: center;
  position: relative;
  z-index: 1;
}

.login-brand img {
  height: 56px;
  margin-bottom: 24px;
  filter: brightness(0) invert(1);
}

.login-brand h1 {
  font-size: 28px;
  color: white;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-brand p {
  color: rgba(255,255,255,0.55);
  font-size: 15px;
}

.login-features {
  margin-top: 50px;
  position: relative;
  z-index: 1;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}
.login-feature .icon {
  width: 34px; height: 34px;
  background: rgba(224,112,32,0.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.login-right {
  width: 440px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-form-box {
  width: 100%;
  max-width: 360px;
}

.login-form-box h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.login-form-box p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ─── PAGINATION ─── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius);
  font-size: 13px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}
.pagination a:hover { background: var(--navy); color: white; border-color: var(--navy); }
.pagination span.current { background: var(--navy); color: white; border-color: var(--navy); }

/* ─── UTILITIES ─── */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12.5px; }
.text-right { text-align: right; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.w-full { width: 100%; }
.fw-600 { font-weight: 600; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .grid-2, .form-row { grid-template-columns: 1fr; }
  .grid-cols-7-3, .grid-cols-6-4 { grid-template-columns: 1fr; }
  .grid-3, .form-row-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar { padding: 0 16px; }
  .page-content { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .login-left { display: none; }
  .login-right { width: 100%; }
  .grid-3, .form-row-3 { grid-template-columns: 1fr; }
}
