:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #122033;
    --muted: #5b677a;
    --line: #d9e2ef;
    --primary: #155e75;
    --primary-dark: #0f3f50;
    --accent: #0f766e;
    --danger: #b42318;
    --success: #067647;
    --warning: #92400e;
    --shadow: 0 24px 60px rgba(15, 23, 42, .12);
    --radius: 24px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    min-height: 100%;
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, #dff7fb 0, transparent 35%), var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.page-wrap {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 48px;
}

.home-body .page-wrap {
    min-height: calc(100vh - 90px);
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr .82fr;
    gap: 28px;
    align-items: stretch;
    width: 100%;
}

.hero-card,
.auth-card,
.content-card,
.panel-card {
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(217,226,239,.8);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.hero-card { overflow: hidden; }
.hero-image {
    width: 100%;
    min-height: 390px;
    display: block;
    object-fit: cover;
    background: #0f172a;
}
.hero-copy { padding: 28px; }
.eyebrow {
    color: var(--accent);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 12px;
}
h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3.3rem);
    letter-spacing: -.04em;
    line-height: 1.02;
}
h2 {
    margin: 0 0 16px;
    font-size: clamp(1.45rem, 3vw, 2rem);
    letter-spacing: -.025em;
}
h3 { margin-top: 0; }
p { line-height: 1.65; color: var(--muted); }
.location-list {
    display: grid;
    gap: 7px;
    margin-top: 18px;
    padding: 0;
    list-style: none;
    color: #2d3a4d;
    font-weight: 600;
}
.location-list li::before {
    content: "•";
    color: var(--accent);
    margin-right: 8px;
}

.auth-card,
.content-card,
.panel-card { padding: 26px; }
.auth-card { align-self: center; }
.form-grid { display: grid; gap: 16px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
label { display: grid; gap: 7px; font-weight: 650; color: #26364a; }
input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
    color: var(--text);
    outline: none;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, textarea:focus, select:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20,184,166,.12);
}

.btn, button {
    appearance: none;
    border: 0;
    cursor: pointer;
    border-radius: 14px;
    padding: 13px 18px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 12px 28px rgba(21,94,117,.22);
}
.btn:hover, button:hover { background: var(--primary-dark); text-decoration: none; }
.btn.secondary { background: #e6eef6; color: #172033; box-shadow: none; }
.btn.secondary:hover { background: #d9e4ef; }
.btn.danger { background: var(--danger); }
.btn.small { padding: 8px 11px; border-radius: 10px; font-size: .9rem; }
.full { width: 100%; }
.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    justify-content: space-between;
    font-weight: 700;
}

.alert {
    border-radius: 14px;
    padding: 13px 15px;
    margin: 0 0 16px;
    font-weight: 650;
}
.alert-error { background: #fee4e2; color: #7a271a; }
.alert-success { background: #dcfae6; color: #05603a; }
.alert-info { background: #e0f2fe; color: #075985; }
.alert-warning { background: #fef0c7; color: #7a2e0e; }

.topbar {
    width: min(1180px, calc(100% - 32px));
    margin: 18px auto 0;
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(217,226,239,.9);
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, .08);
}
.brand-mini {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: #0f172a;
    color: white;
    font-weight: 900;
    letter-spacing: -.06em;
}
.topbar nav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.topbar nav a { font-weight: 800; color: #223047; padding: 9px 10px; border-radius: 10px; }
.topbar nav a:hover { background: #eef4f8; text-decoration: none; }

.header-block { margin-bottom: 22px; }
.header-block p { margin: 0; }
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.page-tile {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 220px;
}
.page-tile p { flex: 1; margin: 0; }

.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}
th, td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
th { background: #eef4f8; color: #24344b; font-size: .92rem; }
.badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: .78rem;
    font-weight: 800;
}
.badge.success { background: #dcfae6; color: #05603a; }
.badge.danger { background: #fee4e2; color: #7a271a; }
.badge.info { background: #e0f2fe; color: #075985; }
.badge.warning { background: #fef0c7; color: #7a2e0e; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.checkbox-list {
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: #fbfdff;
}
.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 600;
}
.checkbox-row input { width: auto; margin-top: 3px; }
.small-muted { color: var(--muted); font-size: .9rem; }
.footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 24px;
    color: #637083;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    font-size: .9rem;
}

@media (max-width: 920px) {
    .hero-grid { grid-template-columns: 1fr; }
    .home-body .page-wrap { align-items: flex-start; }
    .cards-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .page-wrap { width: min(100% - 22px, 1180px); padding-top: 18px; }
    .topbar { width: min(100% - 22px, 1180px); align-items: flex-start; flex-direction: column; }
    .topbar nav { width: 100%; }
    .hero-copy, .auth-card, .content-card, .panel-card { padding: 20px; }
    .hero-image { min-height: 260px; }
    .cards-grid, .form-grid.two { grid-template-columns: 1fr; }
    .auth-links { flex-direction: column; }
    .footer { width: min(100% - 22px, 1180px); }
}
