:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --text: #16212f;
    --muted: #68778a;
    --line: #dde5ee;
    --primary: #b42318;
    --primary-dark: #8f1d14;
    --soft: #fff2f0;
    --shadow: 0 16px 50px rgba(16, 24, 40, 0.08);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(180, 35, 24, 0.08), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, #f4f6f8 100%);
    color: var(--text);
}
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.nav { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: var(--shadow);
    background: #fff;
}
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-subtitle {
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.03em;
}
.nav-links { display: flex; gap: 18px; align-items: center; color: var(--muted); font-weight: 600; }
.nav-links a:hover { color: var(--primary); }
.hero {
    padding: 36px 0 20px;
    border-bottom: 1px solid var(--line);
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr);
    gap: 28px;
    align-items: center;
}
.hero-copy {
    background: rgba(255,255,255,0.75);
    border: 1px solid rgba(221, 229, 238, 0.9);
    border-radius: 32px;
    box-shadow: var(--shadow);
    padding: 40px;
}
h1 { font-size: clamp(40px, 6vw, 74px); line-height: .98; margin: 0 0 18px; }
h2 { font-size: 28px; margin: 0 0 18px; }
h3 { margin: 0 0 12px; }
.hero-text, .lead { color: var(--muted); font-size: 18px; line-height: 1.6; }
.search-box {
    display: flex;
    gap: 10px;
    margin-top: 28px;
    background: var(--surface);
    padding: 10px;
    border-radius: 18px;
    box-shadow: var(--shadow);
}
.search-box input, input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    background: #fff;
}
textarea { resize: vertical; }
button, .button {
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    display: inline-block;
}
button:hover, .button:hover { background: var(--primary-dark); }
.btn-light {
    background: #f0f3f8;
    color: var(--text);
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.hero-slider {
    position: relative;
    min-height: 430px;
    background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
    border-radius: 32px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,.7);
    overflow: hidden;
}
.hero-slider-track {
    position: relative;
    min-height: 430px;
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .35s ease;
    display: grid;
    place-items: center;
    padding: 24px;
    margin: 0;
}
.hero-slide.is-active {
    opacity: 1;
    position: relative;
}
.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.hero-slider-controls {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.slider-arrow,
.slider-dot {
    border: 0;
    cursor: pointer;
}
.slider-arrow {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: rgba(15, 23, 32, 0.72);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    padding: 0;
}
.slider-arrow:hover {
    background: rgba(15, 23, 32, 0.9);
}
.slider-dots {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.86);
    backdrop-filter: blur(8px);
}
.slider-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: #b8c2cf;
    padding: 0;
}
.slider-dot.is-active {
    background: var(--primary);
    transform: scale(1.15);
}
.section, .page { padding: 42px 0; }
.section-head, .page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.type-grid, .cards-grid, .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.type-card, .card, .panel, .row-card, .stat, .auth-card, .detail {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}
.type-card { padding: 22px; font-weight: 800; }
.type-card:hover, .card:hover, .row-card:hover { border-color: #f2b5ad; }
.card { padding: 22px; }
.card p, .row-card p { color: var(--muted); line-height: 1.5; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.meta span, .meta a { background: #f2f4f7; padding: 5px 9px; border-radius: 999px; }
.card-foot { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 18px; }
.two-cols { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.list-stack { display: grid; gap: 14px; }
.row-card { padding: 18px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.panel { padding: 20px; margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { background: #f2f4f7; border-radius: 999px; padding: 8px 10px; color: var(--muted); }
.small-link { display: block; padding: 10px 0; border-top: 1px solid var(--line); color: var(--text); }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 10px; margin-bottom: 24px; }
.empty { padding: 32px; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); background: #fff; }
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.detail { padding: 32px; }
.content-body { line-height: 1.75; font-size: 17px; margin-top: 26px; }
.order-number { color: var(--primary); font-weight: 800; }
.attachment-section { margin-top: 32px; }
.attachment { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; margin: 8px 0; }
.auth-page { min-height: calc(100vh - 150px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card { width: min(440px, 100%); padding: 28px; display: grid; gap: 12px; }
.alert { background: var(--soft); color: var(--primary); padding: 12px; border-radius: 12px; font-weight: 700; }
.muted { color: var(--muted); }
.footer {
    margin-top: 52px;
    background: #0f1720;
    color: #d8dee7;
    padding: 34px 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}
.footer-brand {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.footer-logo {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    object-fit: cover;
    background: #fff;
    flex-shrink: 0;
}
.footer-brand strong {
    display: block;
    margin-bottom: 8px;
    color: #fff;
}
.footer-brand p, .footer p {
    margin: 0;
    line-height: 1.6;
    color: #b7c2d0;
}
.footer-link {
    display: block;
    color: #d8dee7;
    margin-bottom: 8px;
}
.footer-link:hover { color: #ffffff; }
.admin-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 32px 0; align-items: start; }
.admin-sidebar { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 14px; position: sticky; top: 92px; }
.admin-sidebar a { display: block; padding: 12px 14px; border-radius: 12px; font-weight: 700; color: var(--muted); }
.admin-sidebar a:hover { background: var(--soft); color: var(--primary); }
.admin-content { min-width: 0; }
.stats-grid { margin-bottom: 28px; }
.stat { padding: 22px; }
.stat b { display: block; font-size: 32px; }
.stat span { color: var(--muted); }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { background: #f8fafc; color: var(--muted); font-size: 13px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions form { display: inline; }
.actions button { padding: 8px 10px; font-size: 12px; background: #eef2f6; color: var(--text); }
.actions .danger { background: #fee4e2; color: #b42318; }
.form-grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.form-main, .form-side { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 22px; display: grid; gap: 12px; }
.form-side { position: sticky; top: 92px; }
label { font-weight: 800; font-size: 14px; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: auto; }
.inline-form { display: grid; grid-template-columns: 1fr 120px 2fr auto; gap: 10px; margin-bottom: 20px; }
.existing-files { display: flex; flex-direction: column; gap: 8px; color: var(--primary); }
.center { text-align: center; }
@media (max-width: 980px) {
    .hero-grid,
    .two-cols,
    .detail-layout,
    .admin-layout,
    .form-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero-slider,
    .hero-slider-track {
        min-height: 260px;
    }
    .filters { grid-template-columns: 1fr; }
    .row-card { align-items: flex-start; flex-direction: column; }
    .nav { padding: 16px 0; align-items: flex-start; }
    .nav-links { flex-wrap: wrap; }
    .search-box { flex-direction: column; }
    .admin-sidebar, .form-side { position: static; }
    .inline-form { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .brand {
        align-items: flex-start;
    }
    .brand-logo {
        width: 52px;
        height: 52px;
    }
    .brand-subtitle {
        font-size: 24px;
        line-height: 1.1;
    }
    .hero-copy {
        padding: 28px 22px;
        border-radius: 24px;
    }
    h1 {
        font-size: 38px;
    }
    .hero-slider-controls {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }
    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}
