:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #1d2939;
    --muted: #667085;
    --line: #d9e3ee;
    --primary: #1f5f93;
    --primary-dark: #17456b;
    --accent: #f28b2d;
    --danger: #b42318;
    --success: #16803a;
    --shadow: 0 18px 40px rgba(23, 43, 77, .10);
    --radius: 20px;
    --container: 1180px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.container {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.header-row {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: .05em;
}

.logo-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #2b8fd2);
    position: relative;
    box-shadow: 0 10px 20px rgba(31,95,147,.22);
}

.logo-mark::before {
    content: "";
    position: absolute;
    left: 10px;
    bottom: 12px;
    width: 23px;
    height: 14px;
    background: white;
    clip-path: polygon(0 100%, 45% 35%, 65% 65%, 100% 0, 100% 100%);
}

.logo-mark::after {
    content: "";
    position: absolute;
    right: 9px;
    top: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: white;
}

.nav {
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 15px;
    color: #344054;
}

.nav a:hover,
.nav a.active { color: var(--primary); }

.user-mini {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn {
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: .18s ease;
}

.btn.primary { background: var(--primary); color: white; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.accent { background: var(--accent); color: white; }
.btn.light { background: white; color: var(--primary); border-color: var(--primary); }
.btn.danger { background: var(--danger); color: white; }
.btn.block { width: 100%; }

.main { padding: 38px 0; }

.hero {
    display: grid;
    grid-template-columns: 1fr .96fr;
    align-items: center;
    gap: 32px;
    background: linear-gradient(135deg, #e8f4ff, #fff);
    border: 1px solid var(--line);
    border-radius: 30px;
    padding: 34px;
    box-shadow: var(--shadow);
}

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
}

.lead {
    color: var(--muted);
    font-size: 18px;
    margin: 0 0 24px;
}

.hero img {
    border-radius: 24px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.section { margin-top: 34px; }

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

.section-head h2 {
    margin: 0;
    font-size: 32px;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid.cards { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: .88fr 1.12fr; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.card-body { padding: 18px; }
.card h3, .card h2 { margin: 0 0 10px; }

.price {
    color: var(--accent);
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 8px;
}

.muted { color: var(--muted); }
.success { color: var(--success); }
.danger-text { color: var(--danger); }

.notice {
    padding: 14px 16px;
    border-radius: 14px;
    margin: 12px auto;
    border: 1px solid var(--line);
    background: white;
}

.notice.ok {
    border-color: #badbcc;
    background: #ecfdf3;
    color: #146c43;
}

.notice.error {
    border-color: #f5c2c7;
    background: #fff1f2;
    color: var(--danger);
}

.form { display: grid; gap: 14px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field label {
    display: block;
    font-weight: 700;
    margin-bottom: 7px;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    padding: 12px 14px;
    outline: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--primary); }

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.auth-shell {
    width: min(980px, calc(100% - 32px));
    margin: 42px auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 26px;
    box-shadow: var(--shadow);
}

.panel h1, .panel h2 { margin-top: 0; }

.dashboard-grid,
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.list { display: grid; gap: 10px; }

.list-item {
    padding: 14px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.list-item-row {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.footer {
    margin-top: 42px;
    background: #102a43;
    color: #dbe7f2;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 24px;
    padding: 34px 0;
}

.footer h3 { color: white; }

.footer p,
.footer a { color: #bdd0df; }

.badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 5px 10px;
    background: #e7f4ff;
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
}

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

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

.admin-table th {
    background: #f8fafc;
}

@media (max-width: 900px) {
    .hero, .grid.cards, .grid.two, .auth-shell, .dashboard-grid, .admin-grid, .footer-grid, .form-row {
        grid-template-columns: 1fr;
    }

    .header-row {
        flex-direction: column;
        padding: 14px 0;
    }

    .nav { justify-content: center; }
}


.card > img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    background: #eef6ff;
}
