/* ─── admin.css — NexEvent.tech Admin Panel ─── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg: #050508;
    --bg2: #0c0c1a;
    --bg3: rgba(255, 255, 255, 0.04);
    --bg4: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.08);
    --border2: rgba(255, 255, 255, 0.14);
    --text: #f5f5f7;
    --text2: rgba(245, 245, 247, 0.65);
    --text3: rgba(245, 245, 247, 0.4);
    --accent: #5e8fff;
    --accent2: #a855f7;
    --danger: #ef4444;
    --success: #22c55e;
    --gradient: linear-gradient(135deg, #5e8fff, #a855f7);
    --radius: 12px;
    --radius-lg: 20px;
    --trans: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-w: 240px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

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

/* ── Login screen ── */
.login-screen {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(94, 143, 255, 0.1), transparent 60%), var(--bg);
    z-index: 999;
}

.login-card {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 28px;
}

.logo-icon {
    font-size: 1.6rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-dot {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
}

.login-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.login-sub {
    font-size: 0.875rem;
    color: var(--text2);
    margin-bottom: 32px;
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 0.875rem;
    color: #fca5a5;
    margin-bottom: 20px;
}

.form-group {
    text-align: left;
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text2);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--text);
    outline: none;
    transition: var(--trans);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    background: rgba(94, 143, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(94, 143, 255, 0.12);
}

.form-group select option {
    background: #1a1a2e;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

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

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--trans);
    margin-top: 8px;
}

.btn-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(94, 143, 255, 0.3);
}

/* ── Dashboard Layout ── */
.dashboard {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    padding: 0 8px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text2);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: var(--trans);
    position: relative;
}

.nav-item:hover {
    background: var(--bg3);
    color: var(--text);
}

.nav-item.active {
    background: rgba(94, 143, 255, 0.12);
    color: var(--accent);
    border: 1px solid rgba(94, 143, 255, 0.2);
}

.nav-icon {
    font-size: 1.1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--accent);
    color: #fff;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: auto;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.admin-email {
    font-size: 0.8125rem;
    color: var(--text3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px;
}

.btn-logout,
.btn-visit {
    padding: 10px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: var(--trans);
    border: 1px solid var(--border);
}

.btn-logout {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-visit {
    background: var(--bg3);
    color: var(--text2);
    text-decoration: none;
    display: block;
}

.btn-visit:hover {
    background: var(--bg4);
    color: var(--text);
}

/* ── Main Content ── */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    background: var(--bg);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.panel-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.panel-sub {
    font-size: 0.9375rem;
    color: var(--text2);
    margin-top: 6px;
}

/* ── Buttons ── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 100px;
    background: var(--gradient);
    color: #fff;
    border: none;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--trans);
    flex-shrink: 0;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(94, 143, 255, 0.3);
}

.btn-cancel {
    padding: 10px 20px;
    border-radius: 100px;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text2);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--trans);
}

.btn-cancel:hover {
    background: var(--bg4);
    color: var(--text);
}

.btn-danger {
    padding: 10px 20px;
    border-radius: 100px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--trans);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* ── Table ── */
.table-wrap {
    overflow: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table thead {
    background: var(--bg2);
    position: sticky;
    top: 0;
    z-index: 1;
}

.admin-table th {
    padding: 14px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text3);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr {
    transition: var(--trans);
}

.admin-table tbody tr:hover {
    background: var(--bg3);
}

.table-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
}

.role-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    background: rgba(94, 143, 255, 0.1);
    border: 1px solid rgba(94, 143, 255, 0.2);
    border-radius: 100px;
    color: var(--accent);
}

.cat-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
}

.cat-web {
    background: rgba(94, 143, 255, 0.1);
    color: var(--accent);
    border: 1px solid rgba(94, 143, 255, 0.2);
}

.cat-mobile {
    background: rgba(236, 72, 153, 0.1);
    color: #f472b6;
    border: 1px solid rgba(236, 72, 153, 0.2);
}

.cat-ai {
    background: rgba(168, 85, 247, 0.1);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.cat-cloud {
    background: rgba(6, 214, 160, 0.1);
    color: #34d399;
    border: 1px solid rgba(6, 214, 160, 0.2);
}

.bio-cell,
.msg-cell {
    max-width: 240px;
    color: var(--text2);
    font-size: 0.875rem;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.date-cell {
    font-size: 0.8125rem;
    color: var(--text3);
    white-space: nowrap;
}

.email-link {
    color: var(--accent);
}

.email-link:hover {
    text-decoration: underline;
}

.loading-cell {
    text-align: center;
    color: var(--text3);
    padding: 40px;
    font-style: italic;
}

.action-btns {
    display: flex;
    gap: 8px;
}

.btn-edit,
.btn-del {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--trans);
    border: 1px solid transparent;
}

.btn-edit {
    background: rgba(94, 143, 255, 0.1);
    color: var(--accent);
    border-color: rgba(94, 143, 255, 0.2);
}

.btn-edit:hover {
    background: rgba(94, 143, 255, 0.2);
}

.btn-del {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-del:hover {
    background: rgba(239, 68, 68, 0.25);
}

.empty-state {
    padding: 60px;
    text-align: center;
    color: var(--text3);
    font-size: 0.9375rem;
    font-style: italic;
}

/* ── Modals ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(8px);
    padding: 24px;
}

.modal {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.8);
    animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.modal-sm {
    max-width: 400px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg3);
    border: none;
    color: var(--text2);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--trans);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--bg4);
    color: var(--text);
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.delete-msg {
    font-size: 0.9375rem;
    color: var(--text2);
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(94, 143, 255, 0.4);
    border-radius: 3px;
}

/* ── New Layout Aliases ── */
.admin-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.admin-main {
    flex: 1;
    overflow-y: auto;
    padding: 36px 40px;
    background: var(--bg);
}

.admin-section {
    display: block;
}

.admin-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.admin-section-head h2 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.admin-section-head p {
    color: var(--text2);
    font-size: .9rem;
    margin-top: 4px;
}

/* Sidebar brand */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    padding: 0 8px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.sidebar-brand span {
    color: var(--text);
}

/* Admin user footer */
.admin-user {
    font-size: .78rem;
    color: var(--text3);
    padding: 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Auth backdrop */
.auth-backdrop {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(94, 143, 255, .1), transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Login box */
.login-box {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .6);
    position: relative;
    z-index: 1;
}

.login-box h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.login-sub {
    font-size: .875rem;
    color: var(--text2);
    margin-bottom: 28px;
}

.btn-signin {
    width: 100%;
    padding: 14px;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--trans);
    margin-top: 8px;
}

.btn-signin:hover {
    opacity: .9;
    transform: translateY(-1px);
}

/* Badge count (orders) */
.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: #fff;
    border-radius: 100px;
    font-size: .7rem;
    font-weight: 700;
    margin-left: auto;
}

/* Add button */
.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 20px;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--trans);
    white-space: nowrap;
}

.btn-add:hover {
    opacity: .9;
    transform: translateY(-1px);
}

.btn-add:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

/* Table row actions */
.actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-edit,
.btn-delete-row {
    padding: 6px 14px;
    border-radius: 100px;
    font-family: inherit;
    font-size: .8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--trans);
}

.btn-edit {
    background: rgba(94, 143, 255, .1);
    color: var(--accent);
    border: 1px solid rgba(94, 143, 255, .2);
}

.btn-edit:hover {
    background: rgba(94, 143, 255, .2);
}

.btn-delete-row {
    background: rgba(239, 68, 68, .1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, .2);
}

.btn-delete-row:hover {
    background: rgba(239, 68, 68, .2);
}

.btn-delete {
    padding: 10px 20px;
    border-radius: 100px;
    background: rgba(239, 68, 68, .1);
    border: 1px solid rgba(239, 68, 68, .3);
    color: #fca5a5;
    font-family: inherit;
    font-size: .9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--trans);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, .25);
}

/* Text utilities */
.text-truncate {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* badge (tag) in tables */
.badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 500;
    padding: 3px 8px;
    background: rgba(94, 143, 255, .12);
    border: 1px solid rgba(94, 143, 255, .2);
    border-radius: 100px;
    color: var(--accent);
    margin: 1px;
}

/* Status badge colours in tables */
.badge.status-new {
    background: rgba(251, 191, 36, .1);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, .2);
}

.badge.status-review {
    background: rgba(94, 143, 255, .1);
    color: var(--accent);
    border-color: rgba(94, 143, 255, .2);
}

.badge.status-in_progress {
    background: rgba(251, 146, 60, .1);
    color: #fb923c;
    border-color: rgba(251, 146, 60, .2);
}

.badge.status-completed {
    background: rgba(52, 211, 153, .1);
    color: #34d399;
    border-color: rgba(52, 211, 153, .2);
}

.badge.status-delivered {
    background: rgba(167, 139, 250, .1);
    color: #a78bfa;
    border-color: rgba(167, 139, 250, .2);
}

/* Modal box new style */
.modal-box {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .8);
    animation: modalIn .25s cubic-bezier(.4, 0, .2, 1) both;
}

.modal-box.large {
    max-width: 860px;
}

.modal-box.small {
    max-width: 400px;
}

.modal-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg2);
    z-index: 10;
}

.modal-head h3 {
    font-size: 1.1rem;
    font-weight: 800;
}

.modal-body {
    padding: 28px;
}

.modal-form {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Form row two-col */
.form-row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.settings-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.settings-card.full-width {
    grid-column: 1 / -1;
}

.settings-row-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.settings-save-msg {
    background: rgba(52, 211, 153, .1);
    border: 1px solid rgba(52, 211, 153, .3);
    border-radius: 10px;
    padding: 14px 20px;
    color: #34d399;
    font-size: .9rem;
    margin-top: 20px;
}

/* Status select */
.status-select {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text);
    font-family: inherit;
    font-size: .875rem;
    cursor: pointer;
}

.status-select:focus {
    outline: none;
    border-color: var(--accent);
}

.status-select option {
    background: #1a1a1a;
}

/* Order detail grid */
.order-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.detail-row {
    margin-bottom: 14px;
}

.detail-row span {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text2);
    margin-bottom: 3px;
}

.detail-row strong {
    font-size: .9375rem;
    font-weight: 600;
}

/* Admin messages */
.admin-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-messages h4 {
    font-size: .9375rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.messages-area {
    min-height: 160px;
    max-height: 260px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-msg-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.admin-msg-form input {
    flex: 1;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text);
    font-family: inherit;
    font-size: .875rem;
}

.admin-msg-form input:focus {
    outline: none;
    border-color: var(--accent);
}

.admin-msg-form button {
    background: var(--accent);
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    color: #fff;
    font-family: inherit;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
}

.admin-msg-form button:hover {
    opacity: .85;
}

@media (max-width: 900px) {
    .order-detail-grid {
        grid-template-columns: 1fr;
    }

    .admin-main {
        padding: 20px 16px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .form-row-two,
    .settings-row-two {
        grid-template-columns: 1fr;
    }
}

/* ── Utilities ── */
.hidden {
    display: none !important;
}

/* ── Status Badges (Orders + Tickets) ── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: capitalize;
    white-space: nowrap;
}

/* Order statuses */
.status-new, .badge.status-new           { background: rgba(251,191,36,.12); color: #fbbf24; border: 1px solid rgba(251,191,36,.25); }
.status-review, .badge.status-review     { background: rgba(94,143,255,.12); color: #5e8fff; border: 1px solid rgba(94,143,255,.25); }
.status-in_progress, .badge.status-in_progress { background: rgba(251,146,60,.12); color: #fb923c; border: 1px solid rgba(251,146,60,.25); }
.status-completed, .badge.status-completed { background: rgba(52,211,153,.12); color: #34d399; border: 1px solid rgba(52,211,153,.25); }
.status-delivered, .badge.status-delivered { background: rgba(167,139,250,.12); color: #a78bfa; border: 1px solid rgba(167,139,250,.25); }

/* Ticket statuses */
.status-open, .badge.status-open     { background: rgba(94,143,255,.12); color: #5e8fff; border: 1px solid rgba(94,143,255,.25); }
.status-pending, .badge.status-pending { background: rgba(251,191,36,.12); color: #fbbf24; border: 1px solid rgba(251,191,36,.25); }
.status-resolved, .badge.status-resolved { background: rgba(52,211,153,.12); color: #34d399; border: 1px solid rgba(52,211,153,.25); }
.status-closed, .badge.status-closed { background: rgba(255,255,255,.06); color: rgba(245,245,247,.5); border: 1px solid rgba(255,255,255,.1); }

/* ── Stat Cards ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--trans);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity .3s;
}

.stat-card:hover {
    border-color: rgba(94,143,255,.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(94,143,255,.1);
}

.stat-card:hover::before {
    opacity: .04;
}

.stat-label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text2);
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Modal form groups (for order detail inputs) ── */
.modal-body .form-group {
    margin-bottom: 14px;
}

.modal-body .form-group label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text2);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 6px;
}

.modal-body .form-group input,
.modal-body .form-group textarea {
    width: 100%;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text);
    font-family: inherit;
    font-size: .9rem;
    outline: none;
    transition: var(--trans);
}

.modal-body .form-group input:focus,
.modal-body .form-group textarea:focus {
    border-color: var(--accent);
    background: rgba(94,143,255,.06);
    box-shadow: 0 0 0 3px rgba(94,143,255,.1);
}

.modal-body .form-group input[type="range"] {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

/* Badge-count (orders tab nav) */
.badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--accent);
    color: #fff;
    border-radius: 100px;
    font-size: .7rem;
    font-weight: 700;
    margin-left: auto;
}