*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; border: none; outline: none; }
select { font: inherit; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Noto Sans SC", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

:root {
  --canvas: #f2f2ef;
  --surface: rgba(255,255,255,0.72);
  --surface-solid: #fafaf8;
  --surface-elevated: #ffffff;
  --surface-hover: rgba(111,125,122,0.06);
  --brand: #6f7d7a;
  --brand-soft: rgba(111,125,122,0.10);
  --brand-light: rgba(111,125,122,0.05);
  --brand-dark: #5a6966;
  --accent: #6f7d7a;
  --text-primary: #2a2826;
  --text-secondary: #8a8680;
  --text-tertiary: #b8b4ae;
  --border: rgba(0,0,0,0.04);
  --max: 1280px;
  --gutter: 24px;
  --nav-height: 56px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.03);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.08);
  --transition: 220ms cubic-bezier(0.33, 1, 0.68, 1);
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.07); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.12); }
* { scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.07) transparent; }

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  display: flex; align-items: center;
  padding: 0 var(--gutter);
  background: rgba(242,242,239,0.80);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.nav-inner {
  display: flex; align-items: center;
  width: 100%; max-width: var(--max); margin: 0 auto;
  gap: 24px;
}
.nav-logo {
  font-size: 16px; font-weight: 600;
  letter-spacing: 0.5px;
  display: flex; align-items: center; gap: 10px;
  color: var(--text-primary);
}
.nav-logo-icon {
  width: 28px; height: 28px;
  background: var(--brand);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff;
}
.nav-links {
  display: flex; gap: 4px;
  margin-left: 8px;
}
.nav-link {
  font-size: 13px; font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}
.nav-link:hover { color: var(--text-primary); background: var(--surface-hover); }
.nav-link.active { color: var(--text-primary); background: var(--surface); }
.nav-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
}
.nav-icon-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
}
.nav-icon-btn:hover { color: var(--text-primary); background: var(--surface-hover); }
.nav-icon-btn svg { width: 18px; height: 18px; }
.nav-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  margin-left: 4px;
  transition: box-shadow var(--transition);
}
.nav-avatar:hover { box-shadow: 0 0 0 2px var(--brand); }
.nav-dropdown {
  position: absolute; top: 44px; right: 0;
  min-width: 180px;
  background: var(--surface-elevated);
  backdrop-filter: blur(24px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0; transform: translateY(-4px);
  pointer-events: none;
  transition: all var(--transition);
  z-index: 200;
}
.nav-dropdown.open {
  opacity: 1; transform: translateY(0);
  pointer-events: auto;
}
.nav-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  font-size: 13px; color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition);
}
.nav-dropdown-item:hover { background: var(--surface-hover); color: var(--text-primary); }
.nav-dropdown-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.nav-notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 7px; height: 7px;
  background: #d95c5c;
  border-radius: 50%;
}

@media (hover: hover) and (pointer: fine) {
  .nav-link:hover { color: var(--text-primary); background: var(--surface-hover); }
  .nav-icon-btn:hover { color: var(--text-primary); background: var(--surface-hover); }
  .nav-avatar:hover { box-shadow: 0 0 0 2px var(--brand); }
  .nav-dropdown-item:hover { background: var(--surface-hover); color: var(--text-primary); }
}

.main {
  padding-top: var(--nav-height);
  min-height: 100vh;
}
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter) 48px;
}

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 0 24px;
  flex-wrap: wrap; gap: 12px;
}
.page-header h1 {
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}
.page-header p {
  font-size: 13px; color: var(--text-secondary);
  margin-top: 2px;
}
.page-header-actions {
  display: flex; gap: 8px;
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 18px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand); color: #fff;
}
.btn-primary:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(111,125,122,0.25);
}
.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: var(--surface-solid);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--surface-hover); color: var(--text-primary); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12px; }
.btn-xs { height: 26px; padding: 0 10px; font-size: 11px; }
.btn-danger { background: #d95c5c; color: #fff; }
.btn-danger:hover { background: #c94a4a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(217,92,92,0.25); }
.btn svg { width: 16px; height: 16px; }
.btn-sm svg { width: 14px; height: 14px; }

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(111,125,122,0.25); }
  .btn-secondary:hover { background: var(--surface-solid); transform: translateY(-1px); }
  .btn-ghost:hover { background: var(--surface-hover); color: var(--text-primary); }
  .btn-danger:hover { background: #c94a4a; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(217,92,92,0.25); }
}

.section {
  margin-bottom: 32px;
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 15px; font-weight: 600;
  color: var(--text-primary);
}
.section-link {
  font-size: 12px; font-weight: 500; color: var(--text-secondary);
  transition: color var(--transition);
}
.section-link:hover { color: var(--brand); }
.section-header .btn { height: 30px; }

@media (hover: hover) and (pointer: fine) {
  .section-link:hover { color: var(--brand); }
}

.card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  color: #fff;
  font-size: 0;
}
.stat-card-icon svg { width: 18px; height: 18px; }
.stat-card-icon.green { background: rgba(111,125,122,0.85); }
.stat-card-icon.blue { background: rgba(100,140,180,0.85); }
.stat-card-icon.amber { background: rgba(200,160,100,0.85); }
.stat-card-icon.rose { background: rgba(180,120,130,0.85); }
.stat-card-value {
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}
.stat-card-label {
  font-size: 12px; color: var(--text-secondary);
}
.stat-card-change {
  font-size: 11px; font-weight: 500;
  margin-top: 8px;
  display: inline-flex; align-items: center; gap: 3px;
}
.stat-card-change.up { color: #6f8f72; }
.stat-card-change.down { color: #d95c5c; }

.card-panel {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.card-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-panel-title {
  font-size: 15px; font-weight: 600;
  color: var(--text-primary);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px; font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
tbody td {
  padding: 12px;
  border-top: none;
  vertical-align: middle;
}
tbody tr {
  transition: background var(--transition);
}
tbody tr:hover { background: var(--surface-hover); }
tbody tr:first-child td { border-top: none; }
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px; font-weight: 600;
}
.status-badge.active, .status-badge.completed, .status-badge.approved { background: rgba(111,143,114,0.12); color: #5a7a5e; }
.status-badge.inactive, .status-badge.cancelled, .status-badge.rejected { background: rgba(217,92,92,0.10); color: #b85050; }
.status-badge.pending { background: rgba(200,160,100,0.12); color: #8a7a50; }
.status-badge.processing { background: rgba(100,140,180,0.10); color: #4a7a9a; }
.user-cell {
  display: flex; align-items: center; gap: 10px;
}
.user-cell img {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-solid);
}
.user-cell-info { line-height: 1.3; }
.user-cell-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.user-cell-role { font-size: 11px; color: var(--text-tertiary); }
.action-cell {
  display: flex; gap: 4px;
}
.action-btn {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.action-btn:hover { background: var(--surface-hover); color: var(--text-primary); }
.action-btn svg { width: 15px; height: 15px; }
.action-btn.danger:hover { color: #d95c5c; background: rgba(217,92,92,0.08); }

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}
.empty-state svg {
  width: 48px; height: 48px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}
.empty-state h3 { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

.form-group {
  margin-bottom: 16px;
}
.form-group.half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-label {
  display: block;
  font-size: 12px; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input {
  width: 100%; height: 38px;
  padding: 0 12px;
  background: var(--surface-solid);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  transition: background var(--transition), box-shadow var(--transition);
}
.form-input::placeholder { color: var(--text-tertiary); }
.form-input:focus { background: var(--surface-elevated); box-shadow: 0 0 0 1px var(--brand); }
.form-textarea {
  width: 100%; min-height: 80px;
  padding: 10px 12px;
  background: var(--surface-solid);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px; resize: vertical;
  transition: background var(--transition), box-shadow var(--transition);
}
.form-textarea::placeholder { color: var(--text-tertiary); }
.form-textarea:focus { background: var(--surface-elevated); box-shadow: 0 0 0 1px var(--brand); }
.form-select {
  width: 100%; height: 38px;
  padding: 0 32px 0 12px;
  background: var(--surface-solid);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a8680' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: box-shadow var(--transition);
}
.form-select:focus { box-shadow: 0 0 0 1px var(--brand); }
.form-row {
  display: flex; gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.form-search {
  position: relative;
  width: 240px;
}
.form-search input {
  width: 100%; height: 36px;
  padding: 0 12px 0 34px;
  background: var(--surface);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 13px;
  transition: background var(--transition), box-shadow var(--transition);
}
.form-search input::placeholder { color: var(--text-tertiary); }
.form-search input:focus { background: var(--surface-elevated); box-shadow: 0 0 0 1px var(--brand); }
.form-search svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-tertiary);
  pointer-events: none;
}

.filter-bar {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-tag {
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 500;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.filter-tag:hover { background: var(--brand-soft); color: var(--brand); }
.filter-tag.active { background: var(--brand); color: #fff; }
.filter-tag.active:hover { background: var(--brand-dark); }

@media (hover: hover) and (pointer: fine) {
  .filter-tag:hover { background: var(--brand-soft); color: var(--brand); }
  .filter-tag.active:hover { background: var(--brand-dark); }
}

.modal-overlay {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(3px);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface-elevated);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 90%; max-width: 520px;
  max-height: 80vh; overflow-y: auto;
  opacity: 0; transform: scale(0.97) translateY(8px);
  transition: all var(--transition);
}
.modal-overlay.open .modal {
  opacity: 1; transform: scale(1) translateY(0);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 12px;
}
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.modal-close:hover { background: var(--surface-hover); color: var(--text-primary); }
.modal-body { padding: 8px 24px 24px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 16px 24px 20px;
  border-top: none;
}

@media (hover: hover) and (pointer: fine) {
  .modal-close:hover { background: var(--surface-hover); color: var(--text-primary); }
}

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--surface-elevated);
  backdrop-filter: blur(16px);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  font-size: 13px; font-weight: 500;
  color: var(--text-primary);
  opacity: 0; transform: translateX(-50%) translateY(12px);
  pointer-events: none;
  transition: all var(--transition);
  z-index: 500;
  white-space: nowrap;
}
.toast.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

.pagination {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 20px 0;
}
.page-btn {
  min-width: 32px; height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.page-btn:hover { background: var(--surface-hover); color: var(--text-primary); }
.page-btn.active { background: var(--brand); color: #fff; }
.page-btn.active:hover { background: var(--brand-dark); }

@media (hover: hover) and (pointer: fine) {
  .page-btn:hover { background: var(--surface-hover); color: var(--text-primary); }
  .page-btn.active:hover { background: var(--brand-dark); }
}

.settings-section {
  margin-bottom: 28px;
}
.settings-section-title {
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.settings-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  gap: 16px;
}
.settings-row + .settings-row { border-top: none; }
.settings-row-info { flex: 1; min-width: 0; }
.settings-row-label { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.settings-row-desc { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

.toggle {
  position: relative;
  width: 40px; height: 22px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-track {
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.08);
  border-radius: 11px;
  transition: background var(--transition);
}
.toggle input:checked + .toggle-track { background: var(--brand); }
.toggle-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  transition: transform var(--transition);
}
.toggle input:checked ~ .toggle-thumb { transform: translateX(18px); }

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.role-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.role-card:hover { box-shadow: var(--shadow-md); }
.role-card-name {
  font-size: 15px; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.role-card-desc {
  font-size: 12px; color: var(--text-secondary);
  margin-bottom: 14px;
}
.role-card-users {
  font-size: 11px; color: var(--text-tertiary);
  margin-bottom: 12px;
}
.role-card-perms {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.perm-tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px; font-weight: 500;
  background: var(--brand-soft);
  color: var(--brand);
}

.activity-list {
  display: flex; flex-direction: column;
}
.activity-item {
  display: flex; gap: 12px;
  padding: 12px 0;
  align-items: flex-start;
}
.activity-item + .activity-item { border-top: none; }
.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.activity-dot.green { background: #6f8f72; }
.activity-dot.blue { background: #6a8fb0; }
.activity-dot.amber { background: #c8a064; }
.activity-content { flex: 1; min-width: 0; }
.activity-text { font-size: 13px; color: var(--text-primary); }
.activity-text strong { font-weight: 600; }
.activity-time { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }

.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--canvas);
  padding: var(--gutter);
}
.login-card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 40px 32px 32px;
  box-shadow: var(--shadow-lg);
}
.login-logo {
  display: flex; align-items: center; gap: 10px;
  justify-content: center;
  margin-bottom: 6px;
}
.login-logo-icon {
  width: 36px; height: 36px;
  background: var(--brand);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #fff; font-weight: 600;
}
.login-title {
  font-size: 20px; font-weight: 700;
  text-align: center;
  color: var(--text-primary);
}
.login-desc {
  font-size: 13px; color: var(--text-secondary);
  text-align: center;
  margin-bottom: 28px;
  margin-top: 4px;
}
.login-card .form-group { margin-bottom: 18px; }
.login-card .form-label { font-size: 13px; }
.login-card .form-input { height: 42px; font-size: 14px; }
.login-card .btn { width: 100%; height: 42px; justify-content: center; font-size: 14px; margin-top: 4px; }
.login-extra {
  display: flex; justify-content: space-between;
  margin-top: 16px;
  font-size: 12px;
}
.login-extra a { color: var(--text-secondary); transition: color var(--transition); }
.login-extra a:hover { color: var(--brand); }

@media (hover: hover) and (pointer: fine) {
  .login-extra a:hover { color: var(--brand); }
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .role-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --gutter: 16px; --nav-height: 52px; }

  .nav-links { gap: 2px; }
  .nav-link { padding: 6px 10px; font-size: 12px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card-value { font-size: 18px; }
  .stat-card-icon { width: 32px; height: 32px; }
  .stat-card-icon svg { width: 16px; height: 16px; }

  .page-header { padding: 20px 0 16px; }
  .page-header h1 { font-size: 18px; }

  .role-grid { grid-template-columns: 1fr; }

  .form-group.half { grid-template-columns: 1fr; }
  .form-search { width: 100%; }

  .table-wrap { margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
  .card-panel { padding: 16px; }

  .login-card { padding: 28px 20px 24px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; gap: 10px; }
  .nav-link { padding: 6px 8px; font-size: 11px; }
  .page-header { flex-direction: column; align-items: stretch; }
  .page-header-actions { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
