/* ═══════════════════════════════════════════════
   ADMIN SHARED STYLES — Sutr Admin Panel
   ═══════════════════════════════════════════════ */

/* ── Base ── */
.admin-page {
    padding: 7.5rem 0 4rem;
    background: #f7f7f8;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
}

/* ── Page Header ── */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.admin-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.admin-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

/* ── Nav Links ── */
a.adm-btn,
a.adm-btn:link,
a.adm-btn:visited,
button.adm-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-family: 'Inter', sans-serif;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: .5rem .9rem;
    border: 1px solid #ddd;
    background: #fff;
    color: #333 !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: all .2s;
}

a.adm-btn:hover,
button.adm-btn:hover {
    border-color: #000;
    color: #000 !important;
    background: #fafafa;
}

a.adm-btn.primary,
button.adm-btn.primary {
    background: #000;
    border-color: #000;
    color: #fff !important;
}

a.adm-btn.primary:hover,
button.adm-btn.primary:hover {
    background: #333;
}

a.adm-btn.danger,
a.adm-btn.danger:visited {
    border-color: #e5e5e5;
    color: #dc2626 !important;
}

a.adm-btn.danger:hover {
    border-color: #dc2626;
    background: #fef2f2;
}

/* ── Section Panel ── */
.adm-panel {
    background: #fff;
    border: 1px solid #e8e8e8;
    margin-bottom: 1.5rem;
}

.adm-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e8e8e8;
}

.adm-panel-header h2 {
    font-family: 'Inter', sans-serif;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #111;
    margin: 0;
}

.adm-panel-header .badge-count {
    font-size: .68rem;
    font-weight: 600;
    color: #888;
    letter-spacing: .3px;
}

.adm-panel-body {
    padding: 1.25rem;
}

/* ── Tables ── */
.adm-table {
    width: 100%;
    border-collapse: collapse;
}

.adm-table thead th {
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: #888;
    padding: .7rem 1rem;
    border-bottom: 1px solid #e8e8e8;
    background: #fafafa;
    white-space: nowrap;
}

.adm-table tbody td {
    font-size: .8rem;
    color: #333;
    padding: .75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.adm-table tbody tr:hover {
    background: #fafafa;
}

/* ── Row status backgrounds ── */
.adm-table tbody tr.row-pending {
    background: #fffbeb;
}

.adm-table tbody tr.row-pending:hover {
    background: #fef3c7;
}

.adm-table tbody tr.row-processing {
    background: #f0f9ff;
}

.adm-table tbody tr.row-processing:hover {
    background: #e0f2fe;
}

.adm-table tbody tr.row-shipped {
    background: #eef2ff;
}

.adm-table tbody tr.row-shipped:hover {
    background: #e0e7ff;
}

.adm-table tbody tr.row-completed {
    background: #f0fdf4;
}

.adm-table tbody tr.row-completed:hover {
    background: #dcfce7;
}

.adm-table tbody tr.row-cancelled {
    background: #fef2f2;
}

.adm-table tbody tr.row-cancelled:hover {
    background: #fee2e2;
}

.adm-table tbody tr.row-payment_pending {
    background: #fffbeb;
}

.adm-table tbody tr.row-payment_pending:hover {
    background: #fef3c7;
}

.adm-table tbody tr:last-child td {
    border-bottom: none;
}

.adm-table .col-id {
    color: #a3a3a3;
    font-size: .75rem;
}

.adm-table .col-name {
    font-weight: 500;
}

.adm-table .col-truncate {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Table product images */
.adm-tbl-img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border: 1px solid #eee;
}

/* Table responsive wrapper */
.adm-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Status Dots ── */
.adm-dot {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .3px;
}

.adm-dot::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.adm-dot.green::before {
    background: #16a34a;
}

.adm-dot.gray::before {
    background: #a3a3a3;
}

.adm-dot.red::before {
    background: #dc2626;
}

.adm-dot.blue::before {
    background: #2563eb;
}

.adm-dot.orange::before {
    background: #ea580c;
}

/* ── Order Badges ── */
.adm-badge {
    display: inline-block;
    font-family: 'Inter', sans-serif;
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: .2rem .55rem;
    border: 1px solid;
}

.adm-badge.pending {
    color: #b45309;
    border-color: #fbbf24;
    background: #fffbeb;
}

.adm-badge.processing {
    color: #0369a1;
    border-color: #38bdf8;
    background: #f0f9ff;
}

.adm-badge.shipped {
    color: #4338ca;
    border-color: #818cf8;
    background: #eef2ff;
}

.adm-badge.completed {
    color: #15803d;
    border-color: #4ade80;
    background: #f0fdf4;
}

.adm-badge.cancelled {
    color: #b91c1c;
    border-color: #f87171;
    background: #fef2f2;
}

.adm-badge.payment_pending {
    color: #92400e;
    border-color: #f59e0b;
    background: #fffbeb;
}

.adm-badge.active {
    color: #15803d;
    border-color: #4ade80;
    background: #f0fdf4;
}

.adm-badge.inactive {
    color: #b91c1c;
    border-color: #f87171;
    background: #fef2f2;
}

.adm-badge.unread {
    color: #b45309;
    border-color: #fbbf24;
    background: #fffbeb;
}

.adm-badge.read {
    color: #15803d;
    border-color: #4ade80;
    background: #f0fdf4;
}

.adm-badge.visible {
    color: #15803d;
    border-color: #4ade80;
    background: #f0fdf4;
}

.adm-badge.hidden {
    color: #525252;
    border-color: #d4d4d4;
    background: #f5f5f5;
}

.adm-badge.info {
    color: #0369a1;
    border-color: #38bdf8;
    background: #f0f9ff;
}

.adm-badge.neutral {
    color: #525252;
    border-color: #d4d4d4;
    background: #fafafa;
}

/* ── Action Buttons (inline/table) ── */
.adm-action-btn {
    font-family: 'Inter', sans-serif;
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: .3rem .65rem;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

a.adm-action-btn,
a.adm-action-btn:link,
a.adm-action-btn:visited {
    color: #333 !important;
}

.adm-action-btn:hover,
a.adm-action-btn:hover {
    border-color: #000;
    color: #000 !important;
}

.adm-action-btn.warn {
    color: #b45309 !important;
    border-color: #fbbf24;
}

.adm-action-btn.warn:hover {
    background: #fffbeb;
    border-color: #b45309;
}

.adm-action-btn.del {
    color: #dc2626 !important;
    border-color: #fecaca;
}

.adm-action-btn.del:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

/* ── Forms ── */
.adm-panel .form-control,
.adm-panel .form-select {
    border-radius: 0;
    font-family: 'Inter', sans-serif;
    font-size: .82rem;
    border: 1px solid #d4d4d4;
    padding: .6rem .75rem;
}

.adm-panel .form-control:focus,
.adm-panel .form-select:focus {
    border-color: #000;
    box-shadow: none;
}

.adm-panel .form-label {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .3px;
    color: #555;
    margin-bottom: .3rem;
}

.adm-panel .form-text,
.adm-panel small.text-muted {
    font-size: .7rem;
}

.adm-panel .form-check-label {
    font-size: .82rem;
}

/* ── Submit buttons inside panels ── */
.adm-submit {
    font-family: 'Inter', sans-serif;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: #000;
    color: #fff;
    border: 1px solid #000;
    padding: .6rem 1.5rem;
    cursor: pointer;
    transition: all .2s;
}

.adm-submit:hover {
    background: #fff;
    color: #000;
}

/* ── Empty States ── */
.adm-empty {
    text-align: center;
    padding: 3rem 1.5rem;
}

.adm-empty i {
    font-size: 2.5rem;
    color: #d4d4d4;
    display: block;
    margin-bottom: .75rem;
}

.adm-empty h4 {
    font-family: 'Inter', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    color: #555;
    margin-bottom: .35rem;
}

.adm-empty p {
    font-size: .78rem;
    color: #a3a3a3;
}

/* ── Success alert ── */
.adm-alert {
    font-family: 'Inter', sans-serif;
    font-size: .82rem;
    border-radius: 0;
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
    padding: .75rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.adm-alert .btn-close {
    font-size: .6rem;
}

/* ── Modal Overrides ── */
.adm-page-modal .modal-content {
    border-radius: 0 !important;
    border: 1px solid #e8e8e8;
}

.adm-page-modal .modal-header {
    border-bottom: 1px solid #e8e8e8;
    padding: 1rem 1.25rem;
}

.adm-page-modal .modal-header .modal-title {
    font-family: 'Inter', sans-serif;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.adm-page-modal .modal-body {
    padding: 1.25rem;
    font-size: .82rem;
}

.adm-page-modal .modal-body .form-control,
.adm-page-modal .modal-body .form-select {
    border-radius: 0;
    font-size: .82rem;
    border: 1px solid #d4d4d4;
}

.adm-page-modal .modal-body .form-control:focus,
.adm-page-modal .modal-body .form-select:focus {
    border-color: #000;
    box-shadow: none;
}

.adm-page-modal .modal-body .form-label {
    font-size: .72rem;
    font-weight: 600;
    color: #555;
}

.adm-page-modal .modal-body h6 {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: .75rem;
}

.adm-page-modal .modal-footer {
    border-top: 1px solid #e8e8e8;
    padding: .85rem 1.25rem;
}

.adm-page-modal .modal-footer .btn {
    border-radius: 0;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
}

/* ── Pagination ── */
.adm-panel .pagination {
    margin: 0;
}

.adm-panel .page-link {
    border-radius: 0 !important;
    font-size: .78rem;
    color: #333;
    border-color: #ddd;
}

.adm-panel .page-item.active .page-link {
    background: #000;
    border-color: #000;
    color: #fff;
}

/* ── Responsive ── */
@media (max-width: 767.98px) {
    .admin-page {
        padding: 6.5rem 0 3rem;
    }

    .admin-header h1 {
        font-size: 1.3rem;
    }

    .adm-panel-header {
        padding: .85rem 1rem;
    }

    .adm-panel-body {
        padding: 1rem;
    }

    .adm-table thead th,
    .adm-table tbody td {
        padding: .6rem .65rem;
        font-size: .73rem;
    }
}

/* Code monospace */
.adm-code {
    font-family: 'Inter', monospace;
    font-size: .78rem;
    font-weight: 700;
    color: #111;
}