:root {
    --bg: #0d0d0f;
    --panel: #16161a;
    --panel-2: #1d1d22;
    --border: #2c2c33;
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --red: #e11d2e;
    --red-dark: #b91c26;
    --red-soft: rgba(225, 29, 46, .12);
    --green: #22c55e;
    --amber: #f59e0b;
    --radius: 14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(225,29,46,.16), transparent 60%),
        radial-gradient(700px 500px at 0% 100%, rgba(225,29,46,.08), transparent 55%),
        var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px clamp(18px, 4vw, 44px);
    background: rgba(22,22,26,.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    box-shadow: 0 10px 24px rgba(225,29,46,.28);
}

.brand-title { font-size: 18px; font-weight: 700; }
.brand-sub { font-size: 12px; color: var(--muted); }

.user-chip {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 10px 8px 16px;
}

.user-name { font-size: 14px; font-weight: 600; }

.logout {
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    background: var(--red);
    padding: 7px 12px;
    border-radius: 999px;
}

.logout:hover { background: var(--red-dark); }

.content {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 38px);
    flex: 1;
}

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

.page-head h1 {
    margin: 0 0 6px;
    font-size: clamp(24px, 4vw, 34px);
}

.page-head p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.panel {
    background: linear-gradient(180deg, rgba(255,255,255,.025), transparent), var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: 0 20px 50px rgba(0,0,0,.28);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.stat {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    position: relative;
    overflow: hidden;
}

.stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--red);
}

.stat-label {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 8px;
}

.stat-value { font-size: 30px; font-weight: 800; }

.toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
}

input, select, textarea {
    width: 100%;
    background: var(--panel-2);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 10px;
    padding: 11px 13px;
    font: inherit;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-soft);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    padding: 11px 16px;
    color: #fff;
    background: var(--red);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: .2s;
}

.btn:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.btn.ghost {
    background: var(--panel-2);
    border: 1px solid var(--border);
}

.btn.ghost:hover {
    border-color: var(--red);
    background: var(--panel-2);
}

.btn.danger {
    background: #7f1d1d;
}

.btn.danger:hover {
    background: #991b1b;
}

.btn.small {
    padding: 8px 12px;
    font-size: 12px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

th, td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

th {
    background: #101013;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

th a {
    color: var(--muted);
    text-decoration: none;
}

th a:hover { color: var(--red); }

tbody tr:last-child td { border-bottom: 0; }

tbody tr:hover { background: rgba(225,29,46,.045); }

.request-title {
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.request-title:hover { color: var(--red); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.badge::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status-pending { color: #fca5a5; background: rgba(225,29,46,.13); }
.status-processing { color: #fcd34d; background: rgba(245,158,11,.13); }
.status-done { color: #86efac; background: rgba(34,197,94,.13); }

.type-chip {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    background: var(--red-soft);
    color: #fda4af;
}

.thumb {
    width: 84px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
}

.graphic-preview {
    max-width: 340px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: block;
    margin-top: 12px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.grid .full { grid-column: 1 / -1; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.info {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 15px;
}

.info.full { grid-column: 1 / -1; }

.info-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 7px;
}

.info-value {
    font-size: 15px;
    line-height: 1.55;
    word-break: break-word;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}

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

.hint {
    color: var(--muted);
    font-size: 12px;
    margin-top: 6px;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 38px 30px;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,.5);
}

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    box-shadow: 0 16px 34px rgba(225,29,46,.3);
}

.login-card h1 { margin: 0 0 8px; font-size: 26px; }

.login-card p {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 22px;
}

.footer {
    padding: 18px;
    text-align: center;
    color: #52525b;
    font-size: 12px;
    border-top: 1px solid var(--border);
}

@media (max-width: 900px) {
    .stats, .grid, .info-grid { grid-template-columns: 1fr; }
}