:root {
    --bg: #050b14;
    --bg2: #07111f;
    --panel: rgba(15, 29, 51, 0.88);
    --panel2: rgba(19, 36, 62, 0.92);
    --text: #eaf2ff;
    --muted: #9fb0c7;
    --blue: #2563eb;
    --cyan: #38bdf8;
    --line: rgba(56, 189, 248, 0.28);
    --border: rgba(148, 163, 184, 0.22);
    --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.25), transparent 34rem),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 30rem),
        var(--bg);
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

/* LOGIN */

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(90deg, rgba(5, 11, 20, 0.92), rgba(5, 11, 20, 0.62)),
        url("https://images.unsplash.com/photo-1510511459019-5dda7724fd87?auto=format&fit=crop&w=1800&q=80");
    background-size: cover;
    background-position: center;
}

.login-card {
    width: min(460px, 100%);
    background: rgba(15, 29, 51, 0.9);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 38px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.login-logo {
    text-align: center;
    margin-bottom: 26px;
}

.login-logo img {
    width: 260px;
    max-width: 100%;
    filter: drop-shadow(0 20px 45px rgba(56, 189, 248, 0.22));
}

.login-form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.login-footer {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin-top: 24px;
}

/* LAYOUT */

.portal-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 300px 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid var(--border);
    background: rgba(5, 11, 20, 0.94);
    backdrop-filter: blur(18px);
    padding: 28px;
}

.brand {
    margin-bottom: 38px;
}

.brand img {
    width: 220px;
    max-width: 100%;
    display: block;
    filter: drop-shadow(0 14px 35px rgba(56, 189, 248, 0.22));
}

.sidebar nav {
    display: grid;
    gap: 12px;
}

.sidebar nav a {
    color: #dbeafe;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    font-weight: 850;
    border: 1px solid transparent;
    transition: 0.2s ease;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(56, 189, 248, 0.86));
    color: #ffffff;
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateX(2px);
}

.main-content {
    padding: 42px;
}

/* TYPO */

.eyebrow {
    color: var(--cyan);
    font-size: 13px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 8px;
}

h1 {
    font-size: clamp(38px, 4vw, 58px);
    line-height: 1.05;
    margin: 0 0 10px;
}

h2 {
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.12;
    margin: 0 0 18px;
}

h3 {
    font-size: 22px;
    margin: 0 0 8px;
}

.muted {
    color: var(--muted);
}

/* TOPBAR */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

/* CARDS */

.stat-card,
.panel,
.order-card,
.empty-state,
.info-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.panel {
    margin-bottom: 28px;
}

.panel-head {
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 32px;
}

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(56, 189, 248, 0.06));
    pointer-events: none;
}

.stat-card span,
.stat-card strong {
    position: relative;
    z-index: 1;
}

.stat-card span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 700;
}

.stat-card strong {
    font-size: 34px;
}

/* FORMS */

label {
    display: block;
    font-weight: 850;
    color: #dbeafe;
}

input,
select,
textarea {
    width: 100%;
    margin-top: 8px;
    padding: 15px 16px;
    border-radius: 15px;
    background: #091427;
    border: 1px solid var(--border);
    color: var(--text);
    font: inherit;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.admin-form,
.inline-form {
    display: grid;
    gap: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* BUTTONS */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 950;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: 0.2s ease;
}

.btn.primary {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: white;
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.065);
    color: white;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.full-width {
    width: 100%;
}

/* ORDERS */

.order-list {
    display: grid;
    gap: 18px;
}

.order-card {
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: center;
}

.order-id {
    display: inline-block;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 950;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.order-card p {
    color: var(--muted);
    margin: 0;
}

.order-status {
    display: grid;
    gap: 12px;
    justify-items: end;
}

.status-badge {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.14);
    color: var(--cyan);
    font-weight: 950;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

/* TABLE */

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    color: var(--cyan);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* DETAILS */

.notice-box {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(56, 189, 248, 0.08);
    color: #dbeafe;
}

.action-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 22px;
    margin-bottom: 28px;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

.timeline {
    display: grid;
    gap: 14px;
}

.timeline-item {
    display: flex;
    gap: 12px;
    align-items: center;
    color: var(--muted);
}

.timeline-item span {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid rgba(148, 163, 184, 0.45);
    background: transparent;
}

.timeline-item.active {
    color: #eaf2ff;
    font-weight: 950;
}

.timeline-item.active span {
    border-color: var(--cyan);
    background: var(--cyan);
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.55);
}

/* REPORTS */

.report-list {
    display: grid;
    gap: 14px;
}

.report-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.045);
}

/* EMPTY / ERRORS */

.empty-state {
    text-align: center;
}

.empty-state p {
    color: var(--muted);
}

.error-box {
    padding: 15px;
    border-radius: 15px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fecaca;
    margin-top: 18px;
}

/* MOBILE */

@media (max-width: 1000px) {
    .portal-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .brand img {
        width: 180px;
    }

    .main-content {
        padding: 24px;
    }

    .topbar,
    .order-card,
    .report-card {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-grid,
    .form-row,
    .details-grid {
        grid-template-columns: 1fr;
    }

    .order-status {
        justify-items: start;
    }
}

@media (max-width: 560px) {
    .login-card {
        padding: 26px;
        border-radius: 24px;
    }

    h1 {
        font-size: 34px;
    }

    .sidebar {
        padding: 22px;
    }

    .main-content {
        padding: 18px;
    }

    .stat-card,
    .panel,
    .order-card,
    .empty-state,
    .info-card {
        padding: 20px;
        border-radius: 22px;
    }
}
.admin-stats {
    grid-template-columns: repeat(5, 1fr);
}

.success-box {
    padding: 15px;
    border-radius: 15px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #bbf7d0;
    margin-bottom: 22px;
    font-weight: 800;
}

@media (max-width: 1200px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 700px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
}
.ticket-admin-list {
    display: grid;
    gap: 18px;
}

.ticket-admin-card {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 22px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.045);
}

.ticket-message-preview {
    margin-top: 16px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.28);
    color: #dbeafe;
}

.ticket-reply-form {
    align-self: start;
}

@media (max-width: 900px) {
    .ticket-admin-card {
        grid-template-columns: 1fr;
    }
}