:root {
  --ink: #17202a;
  --muted: #647184;
  --line: #dfe5ec;
  --surface: #ffffff;
  --soft: #f4f7f9;
  --primary: #195c63;
  --primary-2: #0e7a73;
  --accent: #c48a31;
  --danger: #b3261e;
  --shadow: 0 24px 70px rgba(23, 32, 42, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(25, 92, 99, 0.12), transparent 38%),
    linear-gradient(290deg, rgba(196, 138, 49, 0.13), transparent 34%),
    var(--soft);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.login-view {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.6fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 42px;
  color: #fff;
  background:
    linear-gradient(rgba(15, 47, 55, 0.76), rgba(15, 47, 55, 0.82)),
    url("https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=1600&q=80");
  background-position: center;
  background-size: cover;
}

.brand-panel::after {
  position: absolute;
  right: -120px;
  bottom: -140px;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  content: "";
  transform: rotate(18deg);
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: max-content;
  text-decoration: none;
}

.brand-mark,
.brand-logo {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #103d43;
  background: #fff;
  font-weight: 800;
}

.brand-logo {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-logo.small {
  background: #102d33;
}

.brand small,
.status-card small,
.summary-grid small {
  display: block;
  color: inherit;
  opacity: 0.72;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.hero-copy h1 {
  margin: 12px 0 16px;
  max-width: 720px;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  max-width: 560px;
  font-size: 1.08rem;
  line-height: 1.7;
  opacity: 0.86;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-panel .eyebrow {
  color: #f2c879;
}

.login-card {
  align-self: center;
  justify-self: center;
  display: grid;
  width: min(420px, calc(100% - 36px));
  gap: 18px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.login-card h2,
.portal-header h1,
.content-section h2 {
  margin: 6px 0 0;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
}

input:focus,
select:focus {
  border-color: var(--primary-2);
  box-shadow: 0 0 0 3px rgba(14, 122, 115, 0.15);
  outline: 0;
}

button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  padding: 0 18px;
  color: #fff;
  background: var(--primary);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.text-link:hover {
  background: var(--primary-2);
}

.disabled-link {
  opacity: 0.45;
  pointer-events: none;
}

.secondary {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.secondary:hover {
  background: var(--soft);
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 700;
}

.form-success {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--primary);
  font-size: 0.88rem;
  font-weight: 800;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.is-hidden {
  display: none;
}

.portal-view {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
  width: 250px;
  padding: 28px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.compact .brand-mark {
  color: #fff;
  background: var(--primary);
}

nav {
  display: grid;
  gap: 8px;
}

nav a {
  border-radius: 7px;
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

nav a.active,
nav a:hover {
  color: var(--primary);
  background: rgba(25, 92, 99, 0.1);
}

.workspace {
  margin-left: 250px;
  padding: 34px;
}

.portal-header {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 22px;
  padding: 30px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(25, 92, 99, 0.94), rgba(14, 122, 115, 0.86)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1400&q=80");
  background-position: center;
  background-size: cover;
}

.portal-header p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.portal-header .eyebrow {
  color: #f2c879;
}

.portal-header h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  letter-spacing: 0;
}

.status-card,
.summary-grid article,
.content-section,
.delivered-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.status-card {
  display: grid;
  align-content: center;
  min-width: 230px;
  padding: 22px;
  color: var(--ink);
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: #29a66a;
  box-shadow: 0 0 0 6px rgba(41, 166, 106, 0.16);
}

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

.summary-grid article {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.summary-grid span {
  color: var(--accent);
  font-size: 1.7rem;
  font-weight: 900;
}

.content-section {
  margin-top: 22px;
  padding: 24px;
}

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

.search-input {
  max-width: 280px;
}

.reports-list {
  display: grid;
  gap: 12px;
}

.report-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.report-month {
  display: grid;
  height: 76px;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(140deg, var(--primary), var(--accent));
  font-size: 1.6rem;
  font-weight: 900;
}

.report-card h3 {
  margin: 0 0 6px;
}

.report-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.report-actions {
  display: flex;
  gap: 10px;
}

.delivered-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.delivered-box p,
.support-copy {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.support-copy a {
  color: var(--primary);
  font-weight: 800;
}

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

.admin-grid article {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fbfcfd;
}

.admin-grid h3 {
  margin: 0 0 12px;
}

.admin-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.user-table th,
.user-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.user-table th {
  color: var(--primary);
}

.admin-form {
  display: grid;
  gap: 12px;
}

.admin-form label {
  font-size: 0.84rem;
}

@media (max-width: 900px) {
  .login-view {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: 48vh;
    padding: 28px;
  }

  .login-card {
    margin: 28px 0;
  }

  .sidebar {
    position: static;
    width: auto;
  }

  .workspace {
    margin-left: 0;
    padding: 18px;
  }

  .portal-header,
  .section-heading,
  .delivered-box {
    flex-direction: column;
    align-items: flex-start;
  }

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

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

  .report-card {
    grid-template-columns: 1fr;
  }

  .report-actions {
    flex-wrap: wrap;
  }

  .search-input {
    max-width: 100%;
  }
}
