:root {
  --primary: #006838;
  --secondary: #008f5a;
  --accent: #f4b400;
  --bg: #f7f9fb;
  --surface: #ffffff;
  --text: #14213d;
  --muted: #6b7280;
  --border: rgba(20, 33, 61, 0.08);
  --shadow: 0 20px 40px rgba(22, 45, 84, 0.08);
  --radius: 24px;
  --radius-sm: 16px;
}

:root[data-theme="dark"] {
  --bg: #09111e;
  --surface: #111c2e;
  --text: #f6f8ff;
  --muted: #97a4b8;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  transition: background 0.3s ease, color 0.3s ease;
}

body.login-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(120deg, rgba(0, 104, 56, 0.08), rgba(0, 143, 90, 0.03));
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-loader {
  position: fixed;
  inset: 0;
  background: rgba(247, 249, 251, 0.92);
  display: grid;
  place-items: center;
  z-index: 2000;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-ring {
  width: 54px;
  height: 54px;
  border: 4px solid rgba(0, 104, 56, 0.14);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.auth-shell {
  width: min(1200px, calc(100% - 32px));
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.9fr;
  align-items: center;
  gap: 24px;
  padding: 32px 0 92px;
}

.auth-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 42px 40px;
  position: relative;
  overflow: hidden;
}

.auth-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 30px rgba(0, 104, 56, 0.25);
}

.brand-mark--large {
  width: 60px;
  height: 60px;
  border-radius: 18px;
}

.brand-pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 104, 56, 0.09);
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-content {
  max-width: 440px;
}

.auth-content h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 3vw, 2.6rem);
}

.auth-subtitle {
  margin: 0 0 28px;
  font-size: 1.05rem;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.login-form .form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
}

.login-form .form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.9);
  color: var(--text);
}

.login-form .form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0,104,56,0.1);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 25px rgba(0, 104, 56, 0.16);
}

.btn-google {
  background: #fff;
  color: #1f2937;
  border: 1px solid rgba(20, 33, 61, 0.08);
  padding-inline: 24px;
  margin-bottom: 22px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}

.btn-outline-secondary {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-sm {
  padding: 10px 14px;
  font-size: 0.95rem;
}

.auth-footer {
  max-width: 380px;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-footer-bar {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-illustration {
  position: relative;
  display: grid;
  min-height: 480px;
  place-items: center;
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 104, 56, 0.95), rgba(0, 143, 90, 0.8));
  box-shadow: var(--shadow);
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.4;
}

.glow-one {
  width: 240px;
  height: 240px;
  background: rgba(255,255,255,0.2);
  top: -40px;
  right: -20px;
}

.glow-two {
  width: 180px;
  height: 180px;
  background: rgba(255,255,255,0.16);
  bottom: -20px;
  left: -10px;
}

.illustration-card {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(92%, 360px);
  padding: 24px;
  border-radius: 24px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(12px);
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.2);
  color: white;
  font-weight: 600;
}

.mini-card.active {
  background: rgba(255,255,255,0.32);
}

.card,
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover,
.widget:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(22, 45, 84, 0.12);
}

.dashboard-page {
  min-height: 100vh;
  background: var(--bg);
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  padding: 24px 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,249,251,0.98));
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-head h2 {
  margin: 0;
  font-size: 1.08rem;
}

.sidebar-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(0, 104, 56, 0.08);
  color: var(--primary);
}

.sidebar-support {
  margin-top: auto;
  padding: 16px;
  border-radius: 18px;
  background: rgba(0, 104, 56, 0.08);
}

.support-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.sidebar-support p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.main-panel {
  flex: 1;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(420px, 42vw);
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(20, 33, 61, 0.04);
}

.search-shell input {
  border: none;
  outline: none;
  flex: 1;
  background: transparent;
  color: var(--text);
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(20, 33, 61, 0.05);
  transition: transform 0.2s ease, background 0.2s ease;
  position: relative;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  transform: translateY(-1px);
}

.icon-btn--ghost {
  background: transparent;
  box-shadow: none;
}

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  padding: 3px 6px;
  border-radius: 999px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface);
}

.user-chip p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 700;
}

.hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(0,104,56,0.95), rgba(0,143,90,0.9));
  color: white;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.hero-card h1 {
  margin: 4px 0 6px;
  font-size: 1.7rem;
}

.hero-copy {
  margin: 0;
  opacity: 0.9;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.74rem;
  font-weight: 700;
  opacity: 0.9;
}

.hero-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.date-pill,
.status-pill,
.chip,
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
}

.date-pill,
.chip {
  background: rgba(255,255,255,0.16);
  color: white;
}

.status-pill {
  background: rgba(255,255,255,0.12);
}

.chip-btn {
  border: none;
  background: rgba(0,104,56,0.07);
  color: var(--primary);
}

.chip-success { background: rgba(0,104,56,0.1); color: var(--primary); }
.chip-accent { background: rgba(244,180,0,0.2); color: #8a5a00; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.widget {
  padding: 20px;
}

.widget-compact { grid-column: span 3; }
.widget-large { grid-column: span 6; }

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.card-head h3 {
  margin: 0;
  font-size: 1.06rem;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(0, 104, 56, 0.05);
  color: var(--text);
  font-weight: 600;
}

.quick-item i {
  color: var(--primary);
  font-size: 1.12rem;
}

.metric-stack {
  display: grid;
  gap: 12px;
}

.metric {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(0,104,56,0.05);
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.counter {
  font-size: 1.4rem;
  color: var(--primary);
}

.task-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.task-summary strong {
  display: block;
  font-size: 1.2rem;
}

.mini-label {
  color: var(--muted);
  font-size: 0.88rem;
}

.progress-line {
  position: relative;
  height: 8px;
  flex: 1;
  border-radius: 999px;
  background: rgba(0,104,56,0.1);
  overflow: hidden;
}

.progress-line span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.task-list,
.list-stack {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.task-list li,
.list-stack li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(20, 33, 61, 0.06);
}

.task-list li:last-child,
.list-stack li:last-child {
  border-bottom: none;
}

.task-list em,
.list-stack em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
}

.calendar {
  display: grid;
  gap: 10px;
}

.calendar-days,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-days span {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.calendar-grid button {
  border: none;
  border-radius: 10px;
  padding: 8px 0;
  background: rgba(0,104,56,0.05);
  color: var(--text);
}

.calendar-grid button.active {
  background: var(--primary);
  color: white;
}

.announcement-card {
  padding: 14px;
  border-radius: 16px;
  background: rgba(244,180,0,0.12);
}

.announcement-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.tool-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-pills span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0, 104, 56, 0.06);
  font-size: 0.9rem;
}

.notification-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(420px, 100vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 1400;
  padding: 24px 20px;
  overflow-y: auto;
}

.notification-drawer.open {
  transform: translateX(0);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 17, 30, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1300;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer-head,
.drawer-section,
.drawer-summary {
  margin-bottom: 18px;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.drawer-tab {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(0,104,56,0.08);
  color: var(--muted);
}

.drawer-tab.active {
  background: var(--primary);
  color: white;
}

.notification-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(0,104,56,0.05);
  margin-bottom: 10px;
}

.notification-card.unread {
  border: 1px solid rgba(244,180,0,0.25);
}

.notification-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0,104,56,0.1);
  color: var(--primary);
  flex-shrink: 0;
}

.notification-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.drawer-summary {
  margin-top: 24px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(0,104,56,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.is-hidden {
  display: none !important;
}

body[data-theme="dark"] .auth-card,
body[data-theme="dark"] .sidebar,
body[data-theme="dark"] .search-shell,
body[data-theme="dark"] .widget,
body[data-theme="dark"] .notification-drawer,
body[data-theme="dark"] .user-chip,
body[data-theme="dark"] .icon-btn {
  background: var(--surface);
}
