:root {
  --bg: #0f172a;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #dbeafe;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --success: #059669;
  --success-soft: #d1fae5;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 22px;
  --radius-sm: 14px;
  --section-surface: rgba(255, 255, 255, 0.9);
  --section-surface-strong: rgba(255, 255, 255, 0.96);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, "Segoe UI", Arial, sans-serif; color: var(--text); background: #f1f5f9; }
a { color: inherit; text-decoration: none; }
p { line-height: 1.6; }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.2; }
.muted { color: var(--muted); }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.public-header { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(18px); background: rgba(255,255,255,0.82); border-bottom: 1px solid rgba(226,232,240,0.9); }
.header-row { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.04em; }
.logo {
  display: flex;
  align-items: center;
}

.logo-image {
  height: 32px;
  width: auto;
  object-fit: contain;
}
.public-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hero { position: relative; isolation: isolate; overflow: hidden; padding: 72px 0 132px; background: #0f172a; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 0.9fr; gap: 28px; align-items: center; }
.kicker { display: inline-flex; align-items: center; min-height: 36px; border-radius: 999px; padding: 0 14px; background: var(--primary-soft); color: var(--primary-dark); font-size: 0.92rem; font-weight: 700; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.25rem, 5vw, 4rem); max-width: 760px; }
.lead { font-size: 1.08rem; color: #334155; max-width: 760px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-card { display: flex; justify-content: flex-end; }
.metric-card { width: 100%; background: linear-gradient(180deg, #ffffff, #f8fafc); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); padding: 28px; }
.metric-label { color: var(--muted); font-weight: 700; margin-bottom: 14px; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.feature-list li { border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); padding: 14px 16px; }
.section { position: relative; padding: 64px 0; }
.section.alt { background: #fff; border-top: 1px solid rgba(226,232,240,0.6); border-bottom: 1px solid rgba(226,232,240,0.6); }
.section-with-bg { isolation: isolate; overflow: hidden; background: #0f172a; }
.section-with-bg::before,
.section-with-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.section-with-bg::before {
  inset: -24px;
  z-index: -2;
  background-image: var(--section-background-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(10px);
  transform: scale(1.06);
}
.section-with-bg::after {
  z-index: -1;
  background: var(--section-overlay, linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.4)));
}
.hero::after {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0) 54%, rgba(15, 23, 42, 0.18) 72%, rgba(15, 23, 42, 0.55) 86%, rgba(15, 23, 42, 0.92) 100%),
    var(--section-overlay, linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.4)));
}
.section-with-bg > .container {
  position: relative;
  z-index: 1;
}
.section-with-bg.section.alt {
  background: #0f172a;
  border-top-color: transparent;
  border-bottom-color: transparent;
}
.section-with-bg .kicker {
  background: rgba(219, 234, 254, 0.16);
  color: #eff6ff;
  border: 1px solid rgba(191, 219, 254, 0.28);
  backdrop-filter: blur(12px);
}
.hero h1,
.section-with-bg .section-heading h2 {
  color: #fff;
}
.hero .lead,
.section-with-bg .section-heading p {
  color: rgba(255, 255, 255, 0.84);
}
.section-with-bg .metric-card,
.section-with-bg .service-card,
.section-with-bg .panel {
  background: var(--section-surface);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(16px);
}
.section-with-bg .button-outline {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}
.section-with-bg .button-outline:hover {
  background: rgba(255, 255, 255, 0.2);
}
.request-form-panel {
  background: var(--section-surface-strong);
}
#about {
  z-index: 2;
  margin-top: -54px;
  padding-top: 102px;
  border-top-left-radius: 34px;
  border-top-right-radius: 34px;
  background: rgba(15, 23, 42, 0.72);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 -18px 36px rgba(15, 23, 42, 0.14), 0 28px 52px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(14px);
}
#about::after {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.16) 0%, rgba(15, 23, 42, 0.66) 18%, rgba(15, 23, 42, 0.42) 100%),
    var(--section-overlay, linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.4)));
}
.section-heading { max-width: 760px; margin-bottom: 28px; }
.section-heading h2 { font-size: clamp(1.8rem, 4vw, 2.7rem); }
.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.service-card { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, #ffffff, #f8fafc); padding: 24px; box-shadow: 0 10px 24px rgba(15,23,42,0.05); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 26px rgba(15,23,42,0.05); padding: 24px; }
.panel-narrow { max-width: 880px; }
.inset-panel { margin-top: 18px; padding: 20px; background: var(--panel-soft); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 14px; background: var(--primary); color: white; font-weight: 700; border: none; cursor: pointer; transition: .2s ease; }
.button:hover { background: var(--primary-dark); }
.button-outline { background: white; color: var(--text); border: 1px solid var(--line); }
.button-outline:hover { background: #f8fafc; }
.button-small { min-height: 38px; padding: 0 14px; border-radius: 12px; font-size: .95rem; }
.full-width { width: 100%; }
.app-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, #0f172a, #111827); color: white; padding: 28px 20px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; }
.brand, .login-brand { display: flex; align-items: center; gap: 14px; }
.brand-title { font-weight: 800; letter-spacing: .04em; }
.brand-subtitle { color: rgba(255,255,255,.68); font-size: .9rem; }
.brand-mark { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, #2563eb, #1e40af); color: white; font-weight: 800; letter-spacing: .04em; }
.nav { display: grid; gap: 8px; }
.nav-link { min-height: 46px; padding: 0 14px; display: flex; align-items: center; border-radius: 14px; color: rgba(255,255,255,.88); }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.08); color: #fff; }
.logout-form { margin-top: auto; }
.main-panel { padding: 28px; }
.topbar { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.topbar h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; margin-bottom: 18px; }
.stat-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 10px 24px rgba(15,23,42,0.05); }
.stat-card strong { display: block; font-size: 2rem; margin-top: 10px; }
.stat-label { color: var(--muted); font-weight: 700; }
.content-grid { display: grid; grid-template-columns: 1.25fr .95fr; gap: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.panel-head-wrap { flex-wrap: wrap; }
.toolbar, .toolbar-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 15px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .92rem; font-weight: 700; }
.actions-cell { white-space: nowrap; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.text-link { color: var(--primary-dark); font-weight: 700; background: transparent; border: none; cursor: pointer; padding: 0; }
.danger-link { color: var(--danger); }
.status-badge { display: inline-flex; min-height: 30px; padding: 0 12px; align-items: center; border-radius: 999px; font-size: .88rem; font-weight: 700; background: #e2e8f0; color: #334155; }
.status-new { background: #dbeafe; color: #1d4ed8; }
.status-progress, .status-work { background: #d1fae5; color: #047857; }
.status-review { background: #fef3c7; color: #b45309; }
.status-done { background: #dcfce7; color: #15803d; }
.status-rejected { background: #fee2e2; color: #b91c1c; }
form.inline-form, .filters-form { display: flex; gap: 10px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.full-span { grid-column: 1 / -1; }
label { display: block; font-size: .95rem; font-weight: 700; margin-bottom: 8px; }
input, select, textarea { width: 100%; min-height: 46px; border-radius: 14px; border: 1px solid var(--line); padding: 0 14px; font: inherit; color: var(--text); background: #fff; }
textarea { min-height: 130px; padding: 14px; resize: vertical; }
.public-request-form input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12); }
.public-request-form input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; }
.field-error { min-height: 20px; margin-top: 6px; color: var(--danger); font-size: .88rem; }
.actions-row { display: flex; gap: 12px; flex-wrap: wrap; }
.alert { margin-bottom: 18px; border-radius: 16px; padding: 14px 16px; border: 1px solid #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.alert.success { border-color: #a7f3d0; background: var(--success-soft); color: #047857; }
.alert.danger { border-color: #fecaca; background: var(--danger-soft); color: #b91c1c; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, rgba(37,99,235,.18), transparent 32%), linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%); }
.login-card { width: min(480px, calc(100% - 24px)); }
.stack-list { display: grid; gap: 14px; }
.stack-item { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: white; }
.details-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.detail-card { border: 1px solid var(--line); background: white; border-radius: 18px; padding: 18px; }
.detail-label { display: block; color: var(--muted); font-size: .92rem; margin-bottom: 8px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.timeline-item { display: grid; grid-template-columns: 18px 1fr; gap: 14px; }
.timeline-marker { width: 14px; height: 14px; margin-top: 6px; border-radius: 999px; background: var(--primary); box-shadow: 0 0 0 6px rgba(37,99,235,0.12); }
.timeline-content { border: 1px solid var(--line); border-radius: 16px; background: white; padding: 16px; }
@media (max-width: 1100px) { .cards-grid, .stats-grid, .details-grid, .content-grid, .hero-grid { grid-template-columns: 1fr; } }
@media (max-width: 920px) { .app-shell { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; } }
@media (max-width: 720px) {
  .main-panel, .section, .hero { padding-left: 16px; padding-right: 16px; }
  .hero {
    padding-bottom: 104px;
  }
  .section-with-bg::before {
    inset: -18px;
    transform: scale(1.04);
  }
  #about {
    margin-top: -34px;
    padding-top: 82px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
  }
  .header-row { flex-direction: column; align-items: start; padding: 16px 0; }
  .public-nav { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
}
