:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --primary: #114d3d;
  --primary-dark: #0c3529;
  --secondary: #2e7d5d;
  --accent: #b99544;
  --text: #17212b;
  --muted: #5f6b7a;
  --border: #d9e0e7;
  --success: #207a4c;
  --warning: #c78400;
  --danger: #b42318;
  --info: #2563eb;
  --shadow: 0 20px 45px rgba(17, 77, 61, 0.08);
  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --transition: 180ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid rgba(217, 224, 231, 0.7);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.logo {
  width: 38px;
  height: 38px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-link {
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  background: rgba(17, 77, 61, 0.08);
  color: var(--primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: 0.5rem;
}

.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 0.3rem;
  border: 0;
  background: transparent;
  padding: 0.4rem;
}

.mobile-nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 999px;
}

.page-shell {
  padding: 2.25rem 0 4rem;
}

.flash-stack {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  box-shadow: var(--shadow);
}

.flash-content {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.flash-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.2rem;
  line-height: 1;
}

.flash-success {
  background: rgba(32, 122, 76, 0.12);
  color: var(--success);
  border-color: rgba(32, 122, 76, 0.2);
}

.flash-error {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.2);
}

.flash-warning {
  background: rgba(199, 132, 0, 0.12);
  color: var(--warning);
  border-color: rgba(199, 132, 0, 0.2);
}

.flash-info {
  background: rgba(37, 99, 235, 0.12);
  color: var(--info);
  border-color: rgba(37, 99, 235, 0.2);
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--secondary) 100%);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.hero h1,
.page-title {
  font-size: clamp(1.8rem, 2.5vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.hero p,
.page-intro,
.page-card p,
.stats-card p,
.notice-card p,
.document-card p,
.table-shell p,
.auth-card p {
  color: var(--muted);
  margin: 0;
}

.hero p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 650px;
  margin-bottom: 1.25rem;
}

.hero-actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.8rem;
}

.panel-card,
.page-card,
.auth-card,
.dashboard-card,
.feature-card,
.stats-card,
.document-card,
.table-shell,
.notice-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.page-card,
.auth-card,
.dashboard-card,
.notice-card,
.table-shell,
.document-card,
.stats-card {
  padding: 1.5rem;
}

.feature-grid,
.card-grid,
.documents-grid,
.metric-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.feature-card,
.stats-card {
  padding: 1.35rem;
}

.feature-card h3,
.stats-card h3,
.page-card h2,
.auth-card h1,
.auth-card h2,
.dashboard-card h2,
.document-card h3,
.notice-card h3 {
  margin: 0 0 0.6rem;
  color: var(--primary);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
}

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.8rem 1.15rem;
  font-weight: 700;
  line-height: 1;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn:hover,
button:hover,
.btn:focus-visible,
button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(17, 77, 61, 0.12);
}

.btn-primary,
button[type="submit"],
button.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #ffffff;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--primary);
  border-color: var(--border);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-warning {
  background: var(--warning);
  color: #ffffff;
}

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}

.btn-icon {
  min-width: 42px;
  padding-inline: 0.8rem;
}

.btn-block,
form button[type="submit"] {
  width: 100%;
}

.btn-sm {
  padding: 0.62rem 0.9rem;
  font-size: 0.94rem;
}

form {
  display: grid;
  gap: 1rem;
}

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

.field-group {
  display: grid;
  gap: 0.45rem;
}

label {
  font-weight: 600;
  color: var(--primary);
}

.required {
  color: var(--danger);
}

input,
select,
textarea {
  width: 100%;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(46, 125, 93, 0.15);
}

textarea {
  border-radius: 1rem;
  min-height: 110px;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 4.4rem;
}

.toggle-password {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--secondary);
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  box-shadow: none;
}

.file-input-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 999px;
}

.file-input-wrapper input {
  display: none;
}

.file-name {
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-shell {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 170px);
}

.auth-card {
  width: min(530px, 100%);
  padding: 2rem;
}

.auth-card .brand {
  margin-bottom: 1rem;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(17, 77, 61, 0.08);
  color: var(--primary);
}

.status-badge.success {
  background: rgba(32, 122, 76, 0.12);
  color: var(--success);
}

.status-badge.warning {
  background: rgba(199, 132, 0, 0.14);
  color: var(--warning);
}

.status-badge.danger {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

.table-shell {
  overflow-x: auto;
  padding: 1rem;
}

.data-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.data-table thead th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.data-table tbody tr:hover {
  background: rgba(17, 77, 61, 0.03);
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 0.5rem;
  padding: 2rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
}

.profile-list {
  display: grid;
  gap: 0.75rem;
}

.profile-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.profile-images {
  display: grid;
  gap: 1rem;
}

.profile-images img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  width: 100%;
  object-fit: cover;
  max-height: 220px;
}

.document-card {
  display: grid;
  gap: 0.7rem;
}

.documents-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.notice-card ul,
.page-card ul,
.site-footer ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.site-footer {
  padding: 2.5rem 0 1.3rem;
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.9);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 1.5rem;
}

.site-footer h3 {
  margin: 0 0 0.7rem;
  color: #ffffff;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.2rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.76);
}

@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 860px) {
  .hero,
  .profile-grid,
  .card-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    right: 1rem;
    top: calc(100% + 0.75rem);
    flex-direction: column;
    align-items: stretch;
    min-width: 220px;
    padding: 0.75rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link,
  .header-actions {
    width: 100%;
    justify-content: center;
  }

  .header-actions {
    margin-left: 0;
    padding-top: 0.5rem;
  }
}

@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .footer-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .page-shell {
    padding-top: 1.4rem;
  }

  .hero,
  .page-card,
  .auth-card,
  .dashboard-card,
  .notice-card,
  .table-shell,
  .document-card,
  .stats-card {
    padding: 1.2rem;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 1rem, 1180px);
  }

  .header-inner {
    min-height: 66px;
  }

  .btn,
  button {
    width: 100%;
  }

  .hero-actions,
  .button-row,
  .header-actions {
    flex-direction: column;
  }

  .file-input-wrapper {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
