:root {
    --orange: #F57C22;
    --dark: #0b0b0b;
    --panel: #151515;
    --panel2: #1f1f1f;
    --text: #f8fafc;
    --muted: #9ca3af;
    --border: #2a2a2a;
    --danger: #ef4444;
    --success: #22c55e;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    background: #0b0b0b;
    color: var(--text);
}

a {
    color: inherit;
    text-decoration: none;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    background: #080808;
    border-right: 1px solid var(--border);
    padding: 24px 18px;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 34px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--orange);
    color: #111;
    font-weight: 900;
}

.brand span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

nav {
    display: grid;
    gap: 8px;
}

nav a {
    padding: 13px 14px;
    color: #d1d5db;
    border-radius: 14px;
}

nav a:hover {
    background: #171717;
    color: white;
}

.main {
    margin-left: 260px;
    min-height: 100vh;
}

.topbar {
    height: 96px;
    padding: 20px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
}

.topbar p {
    margin: 5px 0 0;
    color: var(--muted);
}

.content {
    padding: 28px 32px;
}

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

.cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 24px;
}

.card, .panel {
    background: linear-gradient(180deg, #171717, #111);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 18px 50px rgba(0,0,0,.18);
}

.card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.card strong {
    font-size: 24px;
}

.card.danger strong {
    color: var(--danger);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

.panel h2 {
    margin-top: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

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

th {
    color: var(--muted);
    font-weight: 600;
}

.profit {
    color: var(--success);
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: #27272a;
    color: #e5e7eb;
    font-size: 12px;
}

.risk-high, .risk-critical {
    background: rgba(239, 68, 68, .18);
    color: #fca5a5;
}

.risk-medium {
    background: rgba(245, 124, 34, .18);
    color: #fdba74;
}

.risk-low {
    background: rgba(34, 197, 94, .18);
    color: #86efac;
}

.btn {
    border: 0;
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
}

.btn-primary {
    background: var(--orange);
    color: #111;
}

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid var(--border);
}

.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

input, select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: #0b0b0b;
    color: white;
}

.form-panel {
    max-width: 620px;
}

.form-panel label, .login-card label {
    display: block;
    margin: 14px 0 7px;
    color: #d1d5db;
}

.role-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.alert {
    background: rgba(239, 68, 68, .12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, .25);
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 16px;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at top left, rgba(245,124,34,.25), transparent 30%),
        #0b0b0b;
}

.login-card {
    width: min(440px, calc(100vw - 32px));
    background: #151515;
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 32px;
    box-shadow: 0 28px 80px rgba(0,0,0,.35);
}

.login-brand {
    color: var(--orange);
    font-size: 34px;
    font-weight: 900;
    margin-bottom: 14px;
}

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

.login-card p {
    color: var(--muted);
    margin-bottom: 24px;
}

.login-card .btn {
    width: 100%;
    margin-top: 20px;
}

@media (max-width: 1000px) {
    .sidebar {
        position: static;
        width: 100%;
    }

    .main {
        margin-left: 0;
    }

    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .cards {
        grid-template-columns: 1fr;
    }

    .topbar {
        height: auto;
        gap: 12px;
        align-items: flex-start;
        flex-direction: column;
    }

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

    .panel-head h2 {
        margin: 0;
    }

    .panel-head p {
        margin: 6px 0 0;
        color: var(--muted);
    }

.notice {
    border-radius: 14px;
    padding: 13px 15px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    font-weight: 700;
}

    .notice.success {
        color: #86efac;
        background: rgba(34, 197, 94, .12);
        border-color: rgba(34, 197, 94, .25);
    }

    .notice.danger {
        color: #fca5a5;
        background: rgba(239, 68, 68, .12);
        border-color: rgba(239, 68, 68, .25);
    }

.btn-sm {
    padding: 8px 11px;
    border-radius: 10px;
    font-size: 12px;
}

.table-actions {
    white-space: nowrap;
    display: flex;
    gap: 8px;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.inline-form {
    display: inline;
}

.checkbox-row {
    display: flex !important;
    align-items: center;
    gap: 10px;
}

    .checkbox-row input {
        width: auto;
    }

.muted-text {
    color: var(--muted);
    font-size: 13px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

    .detail-grid div {
        background: #0b0b0b;
        border: 1px solid var(--border);
        border-radius: 16px;
        padding: 14px;
    }

    .detail-grid span {
        display: block;
        color: var(--muted);
        font-size: 12px;
        margin-bottom: 7px;
    }

    .detail-grid strong {
        display: block;
        font-size: 15px;
        word-break: break-word;
    }

@media (max-width: 980px) {
    .detail-grid,
    .two-col {
        grid-template-columns: 1fr;
    }

    .panel-head {
        display: grid;
    }

    .table-actions {
        display: grid;
    }
}
.filters-wrap {
    display: grid;
    grid-template-columns: 1.4fr repeat(5, minmax(140px, 1fr)) auto auto;
    align-items: center;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 20px;
}

.page-actions {
    margin-bottom: 18px;
}

.text-link {
    color: #fdba74;
    font-weight: 800;
}

    .text-link:hover {
        color: #fff7ed;
    }

.status-stack {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.one-col-grid {
    grid-template-columns: 1fr;
}

.soft-line {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 18px 0;
}

.mt-24 {
    margin-top: 24px;
}

.metadata-box {
    max-height: 520px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: #070707;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    color: #e5e7eb;
    line-height: 1.55;
    font-size: 13px;
}

@media (max-width: 1300px) {
    .filters-wrap {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .filters-wrap {
        grid-template-columns: 1fr;
    }

    .status-stack {
        justify-content: flex-start;
    }
}
.user-filters {
    display: grid;
    grid-template-columns: 1.4fr minmax(150px, .6fr) minmax(170px, .6fr) auto auto;
    align-items: center;
}

@media (max-width: 900px) {
    .user-filters {
        grid-template-columns: 1fr;
    }
}
.security-filters {
    display: grid;
    grid-template-columns: 1.5fr minmax(130px, .6fr) minmax(190px, .8fr) minmax(140px, .6fr) minmax(110px, .45fr) minmax(140px, .6fr) minmax(140px, .6fr) auto auto;
    align-items: center;
}

.clamp-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 340px;
}

.danger-text {
    color: #fca5a5;
}

.risk-critical {
    color: #fca5a5;
}

.risk-high {
    color: #fdba74;
}

.risk-medium {
    color: #fde68a;
}

.risk-low {
    color: #86efac;
}

@media (max-width: 1400px) {
    .security-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .security-filters {
        grid-template-columns: 1fr;
    }
}
.notification-filters {
    display: grid;
    grid-template-columns: 1.5fr minmax(150px, .7fr) minmax(130px, .6fr) minmax(130px, .6fr) minmax(140px, .6fr) minmax(140px, .6fr) auto auto;
    align-items: center;
}

textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: #090909;
    color: var(--text);
    border-radius: 14px;
    padding: 13px 14px;
    resize: vertical;
    outline: none;
}

    textarea:focus {
        border-color: rgba(245, 124, 34, .7);
    }

.notification-preview {
    border: 1px solid rgba(245, 124, 34, .35);
    background: linear-gradient(145deg, rgba(245, 124, 34, .12), rgba(255, 255, 255, .03));
    border-radius: 18px;
    padding: 16px;
    margin-top: 18px;
}

    .notification-preview span {
        display: block;
        color: var(--muted);
        font-size: 12px;
        margin-bottom: 8px;
    }

    .notification-preview strong {
        display: block;
        color: var(--text);
        font-size: 18px;
        margin-bottom: 8px;
    }

    .notification-preview p {
        margin: 0;
        color: var(--muted);
        line-height: 1.6;
    }

.mini-info {
    border: 1px solid var(--border);
    background: #0b0b0b;
    border-radius: 14px;
    padding: 12px;
    margin: 10px 0 16px;
}

    .mini-info strong,
    .mini-info span {
        display: block;
    }

    .mini-info span {
        color: var(--muted);
        margin-top: 4px;
    }

@media (max-width: 1300px) {
    .notification-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .notification-filters {
        grid-template-columns: 1fr;
    }
}
input[type="file"] {
    width: 100%;
    border: 1px dashed rgba(245, 124, 34, .5);
    background: #090909;
    color: var(--text);
    border-radius: 14px;
    padding: 13px 14px;
    cursor: pointer;
}

    input[type="file"]::file-selector-button {
        background: var(--primary);
        color: #111;
        border: 0;
        border-radius: 10px;
        padding: 9px 13px;
        font-weight: 900;
        margin-right: 12px;
        cursor: pointer;
    }

.notification-image-preview {
    display: none;
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 16px;
    margin-top: 14px;
    border: 1px solid var(--border);
}

.notification-detail-image {
    display: block;
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 16px;
    margin-top: 12px;
    border: 1px solid var(--border);
}
.services-filters {
    display: grid;
    grid-template-columns: 1.5fr minmax(150px, .6fr) minmax(150px, .6fr) auto auto;
    align-items: center;
}

@media (max-width: 900px) {
    .services-filters {
        grid-template-columns: 1fr;
    }
}
.food-order-filters {
    display: grid;
    grid-template-columns: 1.5fr minmax(150px, .7fr) minmax(140px, .6fr) minmax(140px, .6fr) minmax(140px, .6fr) auto auto;
    align-items: center;
}

@media (max-width: 1100px) {
    .food-order-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .food-order-filters {
        grid-template-columns: 1fr;
    }
}
.reports-filters {
    display: grid;
    grid-template-columns: minmax(150px, .6fr) minmax(150px, .6fr) auto auto auto;
    align-items: center;
}

@media (max-width: 1000px) {
    .reports-filters {
        grid-template-columns: 1fr;
    }
}
.sidebar,
.admin-sidebar,
.side-nav {
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

    .sidebar nav,
    .admin-sidebar nav,
    .side-nav nav {
        padding-bottom: 40px;
    }
.notice.warning {
    color: #fdba74;
    background: rgba(245, 124, 34, .12);
    border-color: rgba(245, 124, 34, .25);
}

.settings-list {
    display: grid;
    gap: 14px;
}

.setting-row {
    display: grid;
    grid-template-columns: 1.2fr 1.4fr auto;
    gap: 14px;
    align-items: start;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #0b0b0b;
}

    .setting-row strong {
        display: block;
        margin-bottom: 6px;
    }

    .setting-row span {
        display: block;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.5;
    }

    .setting-row small {
        display: block;
        color: #6b7280;
        margin-top: 8px;
        word-break: break-word;
    }

    .setting-row textarea {
        width: 100%;
        resize: vertical;
        padding: 13px 14px;
        border-radius: 14px;
        border: 1px solid var(--border);
        background: #111;
        color: white;
        font-family: inherit;
    }

    .setting-row input {
        background: #111;
    }

.setting-actions {
    display: grid;
    gap: 8px;
    justify-items: end;
}

@media (max-width: 1000px) {
    .setting-row {
        grid-template-columns: 1fr;
    }

    .setting-actions {
        justify-items: start;
    }
}
.refund-filters {
    display: grid;
    grid-template-columns: 1.5fr minmax(160px, .7fr) minmax(150px, .6fr) minmax(150px, .6fr) auto auto;
    align-items: center;
}

.stacked-actions {
    display: grid;
    gap: 10px;
}

.danger-outline {
    border-color: rgba(239, 68, 68, .55) !important;
    color: #fca5a5 !important;
}

@media (max-width: 1000px) {
    .refund-filters {
        grid-template-columns: 1fr;
    }
}