:root {
  --bg: #f4efe7;
  --surface: #fffdf9;
  --surface-alt: #f5eee5;
  --ink: #1d302c;
  --muted: #64706c;
  --line: rgba(23, 63, 55, 0.12);
  --brand: #173f37;
  --brand-dark: #0f2d27;
  --accent: #d97732;
  --success: #1f7a4e;
  --danger: #a6382b;
  --warning: #8a6126;
  --shadow: 0 22px 60px rgba(23, 63, 55, 0.12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8f3ea 0%, #f0ebe1 100%);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
input, select, textarea, button { font: inherit; }
.eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.auth-shell {
  min-height: 100vh;
  padding: 2rem;
  display: grid;
  place-items: center;
}
.auth-grid {
  width: min(1180px, 100%);
  min-height: calc(100vh - 4rem);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background: linear-gradient(135deg, rgba(23, 63, 55, 0.95), rgba(15, 45, 39, 0.9));
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.auth-copy {
  padding: 4rem;
  color: #f8f2ea;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-copy h1 {
  margin: 0 0 1rem;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: clamp(2.5rem, 4vw, 4.8rem);
  line-height: 1.02;
}
.auth-copy p {
  margin: 0 0 2rem;
  color: rgba(248, 242, 234, 0.82);
  line-height: 1.85;
  max-width: 680px;
}
.feature-list {
  display: grid;
  gap: 1rem;
}
.feature-list div {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  font-weight: 700;
}
.feature-list i {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #ffd2b5;
}
.login-card {
  background: rgba(255, 253, 249, 0.98);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.brand-lockup img,
.sidebar-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.brand-lockup strong,
.sidebar-brand strong {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.12rem;
}
.brand-lockup span,
.sidebar-brand span { color: var(--muted); font-size: 0.92rem; }
.login-card h2 { margin: 0; font-size: 2rem; font-family: "Plus Jakarta Sans", sans-serif; }
.login-card p { color: var(--muted); line-height: 1.7; }
.form-grid { display: grid; gap: 0.85rem; }
.form-grid.two-col, .form-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
label { font-size: 0.92rem; font-weight: 700; }
input[type="text"], input[type="email"], input[type="password"], select, textarea {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 0.85rem 0.95rem;
  background: #fff;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid rgba(217,119,50,0.14);
  border-color: var(--accent);
}
.btn-primary, .btn-secondary, .btn-danger, .btn-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  border-radius: 999px;
  padding: 0.8rem 1.15rem;
  border: 0;
  cursor: pointer;
  font-weight: 800;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), #c25e1b); color: #fff; }
.btn-secondary { background: var(--surface-alt); color: var(--brand); border: 1px solid var(--line); }
.btn-danger { background: #f8e4df; color: var(--danger); }
.btn-inline { min-height: 36px; padding: 0.45rem 0.85rem; font-size: 0.88rem; }
.alert {
  padding: 0.95rem 1rem;
  border-radius: 14px;
  margin-bottom: 1rem;
  font-weight: 700;
}
.alert.success { background: #e4f7ee; color: var(--success); }
.alert.error { background: #fde6e0; color: var(--danger); }
.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 290px 1fr;
}
.sidebar {
  background: linear-gradient(180deg, rgba(18,53,46,0.98), rgba(10,28,24,0.98));
  color: #edf5f2;
  padding: 1.6rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.sidebar-nav { display: grid; gap: 0.4rem; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  color: rgba(237,245,242,0.84);
  font-weight: 700;
}
.sidebar-nav a.active,
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-card {
  margin-top: auto;
  padding: 1.2rem;
  border-radius: 22px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.sidebar-card span { color: #ffd2b5; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; }
.sidebar-card strong { display: block; margin: 0.5rem 0; font-size: 1.2rem; }
.sidebar-card p { color: rgba(237,245,242,0.74); line-height: 1.7; margin: 0; }
.sidebar-note {
  padding: 1.05rem 1.15rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.sidebar-note strong {
  display: block;
  margin-bottom: 0.55rem;
  color: #f8f2ea;
  font-family: "Plus Jakarta Sans", sans-serif;
}
.sidebar-note p {
  margin: 0.35rem 0;
  color: rgba(237,245,242,0.74);
  font-size: 0.92rem;
}
.logout-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(217,119,50,0.14);
  color: #ffd8be;
  font-weight: 800;
}
.main {
  padding: 2rem;
}
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.topbar h1, .panel h3, .hero-strip h2, .table-card h3 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
}
.topbar p, .hero-strip p, .panel p { color: var(--muted); line-height: 1.75; }
.topbar-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.topbar-actions a {
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-weight: 700;
}
.hero-strip, .panel, .table-card, .stats-grid article {
  background: var(--surface);
  border: 1px solid rgba(23,63,55,0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.hero-strip {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  background: radial-gradient(circle at top right, rgba(217,119,50,0.16), transparent 20%), linear-gradient(135deg, rgba(255,253,249,0.96), rgba(246,238,227,0.96));
}
.hero-chip {
  min-width: 220px;
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: var(--brand);
  color: #f8f2ea;
}
.hero-chip strong { display: block; margin-bottom: 0.4rem; }
.section-banner {
  margin-bottom: 1.1rem;
  padding: 1.35rem 1.45rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(255,253,249,0.98), rgba(240,232,219,0.96));
  border: 1px solid rgba(23,63,55,0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.section-banner h2 {
  margin: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
}
.section-banner p {
  margin: 0.7rem 0 0;
  color: var(--muted);
  line-height: 1.75;
}
.banner-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}
.banner-metrics div {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(23,63,55,0.05);
  border: 1px solid rgba(23,63,55,0.08);
}
.banner-metrics strong {
  display: block;
  color: var(--brand);
  font-size: 1.5rem;
  font-family: "Plus Jakarta Sans", sans-serif;
}
.banner-metrics span {
  color: var(--muted);
  font-size: 0.88rem;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.3rem;
}
.stats-grid article { padding: 1.2rem; }
.stats-grid span { color: var(--muted); font-size: 0.9rem; }
.stats-grid strong {
  display: block;
  margin: 0.6rem 0 0.3rem;
  font-size: 2rem;
  color: var(--brand);
  font-family: "Plus Jakarta Sans", sans-serif;
}
.stats-grid p { color: var(--success); font-weight: 700; margin: 0; }
.layout-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 1rem;
  margin-top: 1.3rem;
}
.panel, .table-card { padding: 1.3rem; }
.panel-head, .table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.panel-head a, .table-head a { color: var(--accent); font-weight: 800; }
.table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.85rem;
}
.filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(23,63,55,0.05), rgba(217,119,50,0.08));
  border: 1px solid rgba(23,63,55,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}
.filter-form label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--brand);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.filter-field {
  min-width: 180px;
}
.filter-form input[type="date"] {
  min-width: 180px;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(23,63,55,0.12);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 8px 18px rgba(23,63,55,0.06);
  color: var(--brand);
  font-weight: 700;
  padding: 0.75rem 0.95rem;
}
.export-link {
  white-space: nowrap;
  min-height: 46px;
  box-shadow: 0 10px 24px rgba(23,63,55,0.08);
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.9rem 0.8rem; text-align: left; border-bottom: 1px solid rgba(23,63,55,0.08); vertical-align: top; }
th { color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }
.leads-table-card {
  padding: 1.4rem;
  background: linear-gradient(180deg, rgba(255,253,249,0.98), rgba(250,246,239,0.98));
}
.leads-table-wrap {
  border-radius: 22px;
  border: 1px solid rgba(23,63,55,0.08);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
  overflow-x: auto;
}
.leads-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}
.leads-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.58rem 0.7rem;
  background: linear-gradient(135deg, rgba(23,63,55,0.96), rgba(15,45,39,0.96));
  color: #f6efe5;
  border-bottom: 0;
  line-height: 1.2;
}
.leads-table tbody tr:nth-child(odd) {
  background: rgba(245,238,229,0.4);
}
.leads-table tbody tr {
  height: 1px;
}
.leads-table tbody tr:hover {
  background: rgba(217,119,50,0.08);
}
.leads-table td {
  height: 1px;
  padding: 0.5rem 0.7rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.9rem;
  line-height: 1.35;
}
.leads-table td strong {
  color: var(--brand);
  font-family: "Plus Jakarta Sans", sans-serif;
}
.leads-table .helper-text {
  display: -webkit-box;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.leads-table td:last-child {
  min-width: 0;
}
.leads-table th:nth-child(1),
.leads-table td:nth-child(1) {
  width: 17%;
}
.leads-table th:nth-child(2),
.leads-table td:nth-child(2) {
  width: 11%;
}
.leads-table th:nth-child(3),
.leads-table td:nth-child(3) {
  width: 7%;
}
.leads-table th:nth-child(4),
.leads-table td:nth-child(4) {
  width: 12%;
}
.leads-table th:nth-child(5),
.leads-table td:nth-child(5) {
  width: 28%;
}
.leads-table th:nth-child(6),
.leads-table td:nth-child(6) {
  width: 11%;
}
.leads-table th:nth-child(7),
.leads-table td:nth-child(7) {
  width: 6%;
}
.leads-table th:nth-child(8),
.leads-table td:nth-child(8) {
  width: 8%;
}
.leads-table td form,
.leads-table td .btn-inline {
  width: 100%;
}
.leads-table td .icon-btn {
  width: 38px;
  min-width: 38px;
  height: 34px;
  min-height: 34px;
  padding: 0;
}
.leads-table td .inline-form {
  display: inline-block;
  margin-bottom: 0.3rem;
  margin-right: 0.3rem;
}
.leads-table td .inline-form:last-child {
  margin-bottom: 0;
  margin-right: 0;
}
.status {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
}
.status-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 30px;
  padding: 0;
}
.status.published, .status.new { background: #e4f7ee; color: var(--success); }
.status.draft, .status.review { background: #fff0d7; color: var(--warning); }
.status.archived, .status.closed { background: #f3e5e2; color: var(--danger); }
.action-stack, .mini-list { display: grid; gap: 0.8rem; }
.action-stack a, .mini-item {
  padding: 1rem;
  border-radius: 18px;
  background: var(--surface-alt);
  border: 1px solid rgba(23,63,55,0.06);
}
.mini-item strong { display: block; margin-bottom: 0.25rem; }
.mini-item span { color: var(--muted); font-size: 0.88rem; }
.manage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 1rem;
  margin-top: 1.3rem;
}
.editor-card, .list-card {
  background: var(--surface);
  border: 1px solid rgba(23,63,55,0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.3rem;
}
.item-list { display: grid; gap: 0.9rem; }
.item-card {
  padding: 1rem;
  border-radius: 18px;
  background: var(--surface-alt);
  border: 1px solid rgba(23,63,55,0.06);
}
.item-card h4 { margin: 0 0 0.35rem; color: var(--brand); font-family: "Plus Jakarta Sans", sans-serif; }
.item-card p { margin: 0.35rem 0; color: var(--muted); line-height: 1.7; }
.item-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 0.6rem; }
.item-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.9rem; }
.inline-form { display: inline; }
.helper-text { color: var(--muted); font-size: 0.88rem; margin-top: 0.35rem; }
.media-preview {
  margin-top: 1rem;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(217,119,50,0.26), transparent 28%),
    linear-gradient(145deg, #102d27, #183d35);
  border: 1px solid rgba(23,63,55,0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 18px 34px rgba(16, 45, 39, 0.18);
  padding: 0.9rem;
}
.admin-video-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  display: block;
  background: #0f2d27;
  border-radius: 18px;
  object-fit: cover;
}
.homepage-media-card {
  padding: 1.15rem;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(245,238,229,0.78), rgba(255,255,255,0.96));
  border: 1px solid rgba(23,63,55,0.08);
}
.homepage-media-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.homepage-media-label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}
.homepage-media-info {
  margin-top: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(23,63,55,0.06);
}
.homepage-media-info h4 {
  margin: 0 0 0.45rem;
  color: var(--brand);
  font-family: "Plus Jakarta Sans", sans-serif;
}
.homepage-media-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  word-break: break-word;
}
.homepage-media-form {
  gap: 1rem;
}
.homepage-form-block {
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(245,238,229,0.62), rgba(255,255,255,0.98));
  border: 1px solid rgba(23,63,55,0.08);
}
.homepage-form-block label {
  display: block;
  margin-bottom: 0.55rem;
}
.homepage-form-block input[type="file"],
.homepage-form-block input[type="text"] {
  background: rgba(255,255,255,0.96);
}
.empty-state {
  padding: 1.2rem;
  border-radius: 18px;
  background: var(--surface-alt);
  color: var(--muted);
}
@media (max-width: 1100px) {
  .dashboard-shell { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layout-grid, .manage-grid, .section-banner { grid-template-columns: 1fr; }
  .hero-strip, .topbar { display: grid; }
  .table-actions { justify-content: flex-start; }
  .leads-table th:nth-child(2),
  .leads-table td:nth-child(2) {
    width: 12%;
  }
  .leads-table th:nth-child(3),
  .leads-table td:nth-child(3) {
    width: 8%;
  }
  .leads-table th:nth-child(6),
  .leads-table td:nth-child(6) {
    width: 12%;
  }
}
@media (max-width: 720px) {
  .auth-shell, .main { padding: 1rem; }
  .auth-grid { grid-template-columns: 1fr; }
  .auth-copy, .login-card, .sidebar, .panel, .table-card, .editor-card, .list-card, .hero-strip { padding: 1.2rem; }
  .stats-grid, .form-grid.two-col, .form-row, .banner-metrics { grid-template-columns: 1fr; }
  .topbar-actions a { width: 100%; text-align: center; }
  .filter-form,
  .table-actions { width: 100%; }
  .filter-form > div,
  .filter-form .btn-inline,
  .export-link { width: 100%; }
  .filter-field,
  .filter-form input[type="date"] { min-width: 100%; }
  .leads-table {
    min-width: 720px;
    table-layout: auto;
  }
  .homepage-media-topline {
    flex-direction: column;
    align-items: flex-start;
  }
}
