:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --canvas: #f8fafc;
  --teal: #0d9488;
  --blue: #3b82f6;
  --amber: #f59e0b;
  --pink: #ec4899;
  --green: #10b981;
  --purple: #8b5cf6;
  --indigo: #6366f1;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --gradient-primary: linear-gradient(135deg, #0d9488 0%, #14b8a6 50%, #2dd4bf 100%);
  --gradient-secondary: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
  --gradient-accent: linear-gradient(135deg, #f59e0b 0%, #f97316 50%, #ef4444 100%);
}

html {
  font-size: 15px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

.btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 10px 20px;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn:hover::before {
  opacity: 1;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: white;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5);
}

.btn-outline-secondary {
  background: transparent;
  border: 2px solid var(--line);
  color: var(--ink);
}

.btn-outline-secondary:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: rgba(13, 148, 136, 0.05);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
}

.form-control,
.form-select {
  border-radius: 12px;
  border: 2px solid var(--line);
  min-height: 48px;
  padding: 12px 16px;
  font-size: 15px;
  transition: all 0.3s ease;
  background: var(--paper);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
  outline: none;
}

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

.auth-body {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(13, 148, 136, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
    linear-gradient(135deg, #f0fdfa 0%, #f0f9ff 50%, #faf5ff 100%);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.auth-body::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 30s ease-in-out infinite;
}

.auth-body::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 25s ease-in-out infinite reverse;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-shell {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(400px, 0.8fr);
  gap: 32px;
  align-items: stretch;
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.4);
  }

  50% {
    box-shadow: 0 0 0 20px rgba(13, 148, 136, 0);
  }
}

.login-hero,
.login-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
}

.login-hero:hover,
.login-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 50px -12px rgba(13, 148, 136, 0.25);
}

.login-hero {
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 680px;
  background:
    linear-gradient(135deg, rgba(13, 148, 136, 0.06) 0%, transparent 50%),
    linear-gradient(225deg, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
    linear-gradient(315deg, rgba(139, 92, 246, 0.04) 0%, transparent 50%),
    #ffffff;
  position: relative;
  overflow: hidden;
}

.login-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(15, 118, 110, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
}

.login-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -30px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.brand-mark,
.brand-lockup span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: #ffffff;
  background: var(--gradient-primary);
  border-radius: 16px;
  font-weight: 900;
  font-size: 28px;
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.4);
  animation: pulse-glow 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

.brand-mark::before {
  content: '+';
  position: absolute;
  top: -6px;
  right: -6px;
  width: 24px;
  height: 24px;
  background: var(--amber);
  border-radius: 50%;
  font-size: 16px;
  display: grid;
  place-items: center;
  animation: none;
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.4);
}

.login-hero h1 {
  margin: 36px 0 20px;
  font-size: 56px;
  line-height: 1.08;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
  letter-spacing: -0.02em;
}

.login-hero p {
  max-width: 540px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.login-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  position: relative;
  z-index: 1;
}

.login-stats span {
  padding: 20px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-stats span:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--teal);
}

.login-stats strong {
  display: block;
  font-size: 28px;
  font-weight: 900;
  color: var(--teal);
  letter-spacing: -0.01em;
}

.login-stats small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-panel {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-panel h2 {
  margin: 0 0 32px;
  font-size: 36px;
  font-weight: 900;
  color: var(--ink);
  position: relative;
  letter-spacing: -0.02em;
}

.login-panel h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 48px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.check-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.check-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--teal);
  cursor: pointer;
}

.demo-logins {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
}

.demo-logins h3 {
  margin: 0 0 16px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-logins h3::before {
  content: '👤';
}

.demo-logins div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #edf2f7;
  font-size: 13px;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.demo-logins div:hover {
  background: rgba(15, 118, 110, 0.04);
  transform: translateX(4px);
}

.demo-logins span {
  color: var(--muted);
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 12px;
}

/* Enhanced form styling for login */
.login-panel .form-control {
  border-radius: 10px;
  border-color: #e2e8f0;
  min-height: 48px;
  padding: 12px 16px;
  font-size: 15px;
  transition: all 0.2s ease;
}

.login-panel .form-control:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.login-panel .form-label {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
  font-size: 14px;
}

.login-panel .btn-primary {
  min-height: 48px;
  font-size: 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal) 0%, #0d9488 100%);
  border: none;
  box-shadow: 0 4px 6px -1px rgba(15, 118, 110, 0.3);
  transition: all 0.2s ease;
}

.login-panel .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px -2px rgba(15, 118, 110, 0.4);
}

.login-panel .btn-primary:active {
  transform: translateY(0);
}

.text-danger {
  color: #dc2626 !important;
  font-size: 13px;
  margin-top: 6px;
}

.validation-summary-errors {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.validation-summary-errors ul {
  margin: 0;
  padding-left: 20px;
}

.validation-summary-errors li {
  color: #dc2626;
  font-size: 14px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  color: #f8fafc;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-lockup {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
}

.brand-lockup strong {
  font-size: 18px;
}

.role-panel {
  margin: 28px 0;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.role-panel small,
.topbar span,
.panel-title span,
.permission-title span {
  display: block;
  color: #94a3b8;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 900;
}

.role-panel strong {
  display: block;
  margin-top: 5px;
}

.side-nav {
  display: grid;
  gap: 2px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  padding-right: 4px;
}

.side-nav::-webkit-scrollbar {
  width: 4px;
}

.side-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.nav-section {
  padding: 16px 14px 8px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.side-nav a.active {
  color: #ffffff;
  background: var(--gradient-primary);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.nav-icon {
  font-style: normal;
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.app-main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.topbar strong {
  display: block;
  margin-top: 2px;
}

.app-container {
  max-width: 1520px;
  padding: 32px;
}

.page-heading,
.dashboard-hero,
.panel,
.kpi-card,
.module-card,
.table-shell,
.form-panel,
.detail-list,
.permission-panel,
.home-actions a {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-heading,
.dashboard-hero {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-end;
  margin-bottom: 28px;
  padding: 32px;
}

.page-heading.compact {
  align-items: center;
}

.page-heading h1,
.dashboard-hero h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 820px;
  margin: 10px 0 0;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--role-accent, var(--teal));
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.75px;
}

.search-box,
.toolbar,
.actions,
.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.hero-ring,
.donut {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: conic-gradient(var(--role-accent, var(--teal)) calc(var(--ring, 0) * 1%), #e7edf5 0);
}

.hero-ring span,
.donut span {
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: #ffffff;
  font-size: 26px;
  font-weight: 900;
}

.hero-ring small {
  position: absolute;
  margin-top: 168px;
  color: var(--muted);
  font-weight: 800;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background: linear-gradient(135deg, var(--paper) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--teal);
  border-radius: 16px 0 0 16px;
}

.kpi-card.blue::before {
  background: var(--blue);
}

.kpi-card.amber::before {
  background: var(--amber);
}

.kpi-card.pink::before {
  background: var(--pink);
}

.kpi-card.green::before {
  background: var(--green);
}

.kpi-card.purple::before {
  background: var(--purple);
}

.kpi-card.indigo::before {
  background: var(--indigo);
}

.kpi-card span,
.kpi-card small {
  color: var(--muted);
  font-weight: 700;
}

.kpi-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 36px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  padding: 24px;
  min-height: 300px;
}

.panel-wide {
  grid-column: span 2;
}

.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-title strong,
.permission-title strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.line-chart {
  width: 100%;
  height: 180px;
  border-bottom: 1px solid var(--line);
}

.line-chart polyline {
  fill: none;
  stroke: var(--role-accent, var(--teal));
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 6px rgba(13, 148, 136, 0.2));
}

.chart-labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.donut-wrap {
  display: grid;
  place-items: center;
  min-height: 150px;
}

.donut {
  --ring: var(--donut);
  background: conic-gradient(var(--amber) calc(var(--donut, 0) * 1%), #e7edf5 0);
}

.status-list,
.work-list,
.shortcut-list,
.rank-bars {
  display: grid;
  gap: 10px;
}

.status-list div {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 10px;
  align-items: center;
}

.status-list i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--segment-color);
}

.status-list span,
.work-item small,
.shortcut-list small,
.shortcut-list span {
  color: var(--muted);
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
  height: 210px;
}

.bar-chart div {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  height: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bar-chart span {
  align-self: end;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--blue), #7c3aed);
}

.rank-bars div {
  display: grid;
  grid-template-columns: 118px 1fr 36px;
  gap: 10px;
  align-items: center;
}

.rank-bars label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.rank-bars span {
  height: 10px;
  border-radius: 99px;
  background: #e7edf5;
  overflow: hidden;
}

.rank-bars i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--role-accent, var(--teal));
}

.work-item,
.shortcut-list a {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid #e7edf5;
  border-radius: 7px;
  text-decoration: none;
}

.work-item:hover,
.shortcut-list a:hover {
  border-color: var(--role-accent, var(--teal));
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric span {
  display: block;
  font-size: 30px;
  font-weight: 900;
}

.metric label,
.module-card p,
.row-note {
  color: var(--muted);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.module-card {
  padding: 18px;
  box-shadow: none;
}

.module-card__top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.module-card h2 {
  margin: 14px 0 8px;
  min-height: 52px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 900;
}

.table-shell,
.permission-panel {
  overflow: hidden;
}

.table {
  margin-bottom: 0;
}

.table th {
  color: #475569;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--line);
}

.table td,
.table th {
  padding: 16px 18px;
  vertical-align: middle;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background: rgba(13, 148, 136, 0.03);
}

.status-pill {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 99px;
  color: #075985;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.25px;
}

.form-panel {
  padding: 24px;
}

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

.full-span {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.danger-actions {
  justify-content: flex-start;
}

.detail-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.detail-list div {
  padding: 20px;
  background: var(--paper);
  transition: all 0.2s ease;
}

.detail-list div:hover {
  background: rgba(13, 148, 136, 0.02);
}

.detail-list span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-list strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
}

.module-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.module-tabs a {
  white-space: nowrap;
  text-decoration: none;
  color: #475569;
  border: 2px solid #cbd5e1;
  border-radius: 99px;
  padding: 10px 18px;
  background: var(--paper);
  font-weight: 700;
  transition: all 0.3s ease;
}

.module-tabs a:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.module-tabs a.active {
  color: #ffffff;
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.home-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.home-actions a {
  display: block;
  padding: 28px;
  color: inherit;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-actions a:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.home-actions strong,
.home-actions span {
  display: block;
}

.home-actions strong {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.home-actions span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.permission-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}

.permission-table {
  max-height: 68vh;
  overflow: auto;
}

.permission-table input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--role-accent, var(--teal));
  cursor: pointer;
}

.alert {
  border-radius: 12px;
  padding: 16px 20px;
  font-weight: 600;
}

@media (max-width: 1100px) {

  .app-shell,
  .login-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    height: auto;
  }

  .side-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-grid,
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-wide {
    grid-column: span 2;
  }

  .login-hero {
    min-height: auto;
    padding: 40px;
  }

  .login-hero h1 {
    font-size: 42px;
  }
}

@media (max-width: 720px) {

  .app-container,
  .auth-shell {
    padding: 16px;
  }

  .page-heading,
  .dashboard-hero,
  .metric-grid,
  .home-actions,
  .form-grid,
  .dashboard-grid,
  .kpi-grid,
  .login-stats,
  .side-nav {
    grid-template-columns: 1fr;
  }

  .page-heading,
  .dashboard-hero,
  .topbar {
    display: grid;
    align-items: start;
  }

  .panel-wide {
    grid-column: span 1;
  }

  .search-box {
    width: 100%;
  }

  .login-hero {
    min-height: auto;
    padding: 28px;
  }

  .login-hero h1 {
    font-size: 36px;
  }
}