/* ════════════════════════════════════════════════════════════
   Admin Pages – Shared UX/UI Enhancements
   ════════════════════════════════════════════════════════════ */

/* ─── Page Header / Breadcrumb area ─── */
.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.admin-page-header .page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--vz-heading-color, #495057);
    margin: 0;
}
.admin-page-header .page-subtitle {
    font-size: 0.82rem;
    color: var(--vz-secondary-color, #74788d);
    margin: 0;
}

/* ─── Card enhancements ─── */
.admin-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.admin-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.admin-card > .card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding: 1rem 1.25rem;
}
.admin-card > .card-body {
    padding: 1.25rem;
}
.admin-card > .card-footer {
    background: transparent;
    border-top: 1px solid rgba(0,0,0,0.06);
    padding: 0.75rem 1.25rem;
}

/* Card header flex layout */
.admin-card-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.admin-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--vz-heading-color, #495057);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.admin-card-title i {
    font-size: 1.15rem;
    opacity: 0.7;
}

/* ─── Table enhancements ─── */
.admin-table {
    margin-bottom: 0;
}
.admin-table thead {
    background: var(--vz-light, #f3f6f9);
}
.admin-table thead th {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--vz-secondary-color, #74788d);
    padding: 0.75rem 1rem;
    white-space: nowrap;
    border-bottom: 2px solid rgba(0,0,0,0.06) !important;
}
.admin-table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    font-size: 0.875rem;
    color: var(--vz-body-color, #212529);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}
.admin-table tbody tr {
    transition: background 0.15s ease;
}
.admin-table tbody tr:hover {
    background: rgba(var(--vz-primary-rgb, 64, 81, 137), 0.03);
}
.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* ─── Status badges ─── */
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3em 0.75em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    white-space: nowrap;
}
.admin-badge-success {
    background: rgba(25, 135, 84, 0.1);
    color: #198754;
}
.admin-badge-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #b58a00;
}
.admin-badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}
.admin-badge-info {
    background: rgba(13, 202, 240, 0.1);
    color: #0aa2c0;
}
.admin-badge-primary {
    background: rgba(var(--vz-primary-rgb, 64, 81, 137), 0.1);
    color: var(--vz-primary, #405189);
}

/* ─── Action buttons in tables ─── */
.admin-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.admin-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}
.admin-btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.admin-btn-action i {
    font-size: 0.9rem;
}

/* ─── Search box improvements ─── */
.admin-search-box {
    position: relative;
    max-width: 300px;
}
.admin-search-box .search-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vz-secondary-color, #74788d);
    font-size: 0.9rem;
}
[dir="ltr"] .admin-search-box .search-icon { left: 0.75rem; }
[dir="rtl"] .admin-search-box .search-icon { right: 0.75rem; }

.admin-search-box .form-control {
    border-radius: 0.5rem;
    border: 1px solid rgba(0,0,0,0.1);
    transition: border-color 0.2s, box-shadow 0.2s;
    font-size: 0.85rem;
}
[dir="ltr"] .admin-search-box .form-control { padding-left: 2.25rem; }
[dir="rtl"] .admin-search-box .form-control { padding-right: 2.25rem; }

.admin-search-box .form-control:focus {
    border-color: var(--vz-primary, #405189);
    box-shadow: 0 0 0 0.15rem rgba(var(--vz-primary-rgb, 64, 81, 137), 0.15);
}

/* ─── Empty state ─── */
.admin-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
}
.admin-empty-state i {
    font-size: 3rem;
    color: var(--vz-secondary-color, #74788d);
    opacity: 0.4;
    margin-bottom: 1rem;
    display: block;
}
.admin-empty-state h5 {
    font-weight: 600;
    color: var(--vz-heading-color, #495057);
    margin-bottom: 0.5rem;
}
.admin-empty-state p {
    color: var(--vz-secondary-color, #74788d);
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* ─── Count badge in card header ─── */
.admin-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.65rem;
    height: 1.65rem;
    padding: 0 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50rem;
    background: rgba(var(--vz-primary-rgb, 64, 81, 137), 0.1);
    color: var(--vz-primary, #405189);
}

/* ─── Form enhancements ─── */
.admin-form-section {
    background: var(--vz-light, #f3f6f9);
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.admin-form-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--vz-secondary-color, #74788d);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.admin-form label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--vz-heading-color, #495057);
    margin-bottom: 0.35rem;
}
.admin-form .form-control:disabled,
.admin-form .form-control[readonly] {
    background: #fff;
    border-color: rgba(0,0,0,0.08);
    color: var(--vz-body-color, #212529);
    opacity: 0.85;
}

/* ─── Detail page info grid ─── */
.admin-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.admin-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.admin-info-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--vz-secondary-color, #74788d);
}
.admin-info-value {
    font-size: 0.9rem;
    color: var(--vz-body-color, #212529);
    word-break: break-word;
}

/* ─── Responsive adjustments ─── */
@media (max-width: 768px) {
    .admin-card-header-flex {
        flex-direction: column;
        align-items: flex-start;
    }
    .admin-search-box {
        max-width: 100%;
        width: 100%;
    }
    .admin-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Animated row entrance (subtle) ─── */
@keyframes adminRowFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.admin-table tbody tr {
    animation: adminRowFadeIn 0.25s ease forwards;
}
.admin-table tbody tr:nth-child(1)  { animation-delay: 0.02s; }
.admin-table tbody tr:nth-child(2)  { animation-delay: 0.04s; }
.admin-table tbody tr:nth-child(3)  { animation-delay: 0.06s; }
.admin-table tbody tr:nth-child(4)  { animation-delay: 0.08s; }
.admin-table tbody tr:nth-child(5)  { animation-delay: 0.10s; }
.admin-table tbody tr:nth-child(n+6){ animation-delay: 0.12s; }
