:root {
    --bg-main: #070a14;
    --bg-card: rgba(15, 23, 42, 0.85);
    --bg-subtle: #0f172a;
    --border-color: rgba(255, 255, 255, 0.09);
    
    --primary: #06b6d4;
    --primary-glow: rgba(6, 182, 212, 0.4);
    --accent: #8b5cf6;
    
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
        linear-gradient(180deg, #050811 0%, #0c1222 100%);
    background-attachment: fixed;
    line-height: 1.6;
}

.hidden { display: none !important; }

/* =========================================================================
   1. LOGIN SCREEN
   ========================================================================= */
.login-wrapper {
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 1.5rem;
    box-sizing: border-box;
}

.login-card {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.95) 0%, rgba(10, 15, 29, 0.98) 100%);
    border: 1px solid rgba(6, 182, 212, 0.35);
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 35px rgba(6, 182, 212, 0.15);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 450px;
    margin: auto !important;
    padding: 2.5rem 2rem;
    animation: fadeInCard 0.3s ease-out;
    box-sizing: border-box;
}

@keyframes fadeInCard {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    box-shadow: 0 0 25px var(--primary-glow);
}

.login-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.3rem;
}

.login-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.form-group input,
.input-text,
.input-select,
.input-number {
    width: 100%;
    background: rgba(10, 15, 29, 0.85);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.input-text:focus,
.input-select:focus,
.input-number:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

.login-alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
}

.btn-block {
    width: 100%;
}

.login-footer-links {
    text-align: center;
    margin-top: 1.5rem;
}

.login-footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.login-footer-links a:hover {
    color: var(--primary);
}

/* =========================================================================
   2. BUTTONS & UI ELEMENTS
   ========================================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 0.92rem;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #0891b2);
    color: #041017;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #22d3ee, var(--primary));
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: #a5f3fc;
}
.btn-outline:hover {
    background: rgba(6, 182, 212, 0.15);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}
.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
}

.glow-btn {
    box-shadow: 0 0 16px var(--primary-glow);
}

/* =========================================================================
   3. ADMIN DASHBOARD LAYOUT
   ========================================================================= */
.admin-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2.5rem;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
}

.pulse-icon {
    animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.85; }
}

.brand-text h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
}

.brand-text .sub-title {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.admin-nav-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #eab308);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.user-details-mini {
    display: flex;
    flex-direction: column;
}

.user-details-mini strong {
    font-size: 0.85rem;
    line-height: 1.1;
}

.role-tag {
    font-size: 0.7rem;
    color: #fbbf24;
    font-weight: 600;
}

/* CONTAINER & TABS */
.admin-container {
    max-width: 1280px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    flex: 1;
    width: 100%;
}

.admin-tabs-bar {
    display: flex;
    gap: 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    overflow-x: auto;
}

.admin-tab {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.admin-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.admin-tab.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(139, 92, 246, 0.2));
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: #fff;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.15);
}

/* PANELS */
.admin-panel {
    display: none;
    animation: fadeInPanel 0.25s ease-out;
}

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

@keyframes fadeInPanel {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.panel-header h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.panel-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* =========================================================================
   4. USERS TABLE
   ========================================================================= */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.admin-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 1.2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.admin-table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.role-badge {
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-block;
}

.role-super_admin { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.role-admin { background: rgba(6, 182, 212, 0.15); color: #38bdf8; border: 1px solid rgba(6, 182, 212, 0.4); }
.role-operator { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.role-viewer { background: rgba(148, 163, 184, 0.15); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.4); }

.status-badge {
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
}
.status-active { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.status-inactive { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.perm-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.perm-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    color: var(--text-muted);
}

.actions-cell {
    display: flex;
    gap: 0.4rem;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-subtle);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: scale(1.08);
}
.action-btn.btn-del:hover {
    color: var(--danger);
    border-color: var(--danger);
}

/* =========================================================================
   5. SETTINGS CARDS & FORMS
   ========================================================================= */
.settings-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.admin-card.highlight-card {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.06), rgba(6, 182, 212, 0.06));
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.05);
}

.card-header-styled {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-header-styled h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.toggle-row strong {
    font-size: 0.95rem;
    color: #fff;
    display: block;
}

.toggle-row p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.control-box-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.box-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.form-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    display: block;
}

.helper-text {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.badge-num {
    color: #fbbf24;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
}

.number-badge-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.input-number {
    width: 65px;
    text-align: center;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fbbf24;
}

.slider-styled {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    cursor: pointer;
}

.slider-styled::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #eab308);
    cursor: pointer;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.7);
}

.chips-flex {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.preset-chip {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.4rem 0.85rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.preset-chip:hover,
.preset-chip.active {
    background: var(--warning);
    color: #000;
    border-color: var(--warning);
    font-weight: 800;
}

/* Grids */
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.dot-green { background: var(--success); }
.dot-blue { background: var(--primary); }
.dot-yellow { background: var(--warning); }

/* Switch Toggle (iOS style) */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    transition: .3s;
    border-radius: 34px;
}

.switch-toggle .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #94a3b8;
    transition: .3s;
    border-radius: 50%;
}

.switch-toggle input:checked + .slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

.switch-toggle input:checked + .slider:before {
    transform: translateX(22px);
    background-color: #fff;
}

/* =========================================================================
   6. MODAL STYLES
   ========================================================================= */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(3, 6, 15, 0.85);
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeInModal 0.2s ease-out;
}

.modal-dialog {
    background: linear-gradient(180deg, #111827 0%, #0a0f1d 100%);
    border: 1px solid rgba(6, 182, 212, 0.35);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.modal-dialog form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.98);
    flex-shrink: 0;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-title h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.7rem;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    max-height: calc(90vh - 140px);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.permissions-checklist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.perm-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    transition: var(--transition);
}

.perm-item:hover {
    border-color: rgba(6, 182, 212, 0.4);
}

.perm-item input {
    margin-top: 0.25rem;
}

.perm-item strong {
    display: block;
    font-size: 0.85rem;
    color: #fff;
}

.perm-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    padding: 1.2rem 1.75rem;
    border-top: 1px solid var(--border-color);
    background: rgba(10, 16, 31, 0.98);
    flex-shrink: 0;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.3);
}

/* Info Cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.2rem;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-icon {
    font-size: 2rem;
}

.info-text {
    display: flex;
    flex-direction: column;
}

.info-title {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.info-text strong {
    font-size: 0.95rem;
    color: #fff;
}

.text-cyan { color: #06b6d4; }
.text-yellow { color: #f59e0b; }
.text-emerald { color: #10b981; }
.text-purple { color: #a855f7; }
.text-green { color: #10b981; }
.text-danger { color: #ef4444; }

/* =========================================================================
   SUBSCRIPTION SAAS & KPI STYLES
   ========================================================================= */
.sub-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sub-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.15rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.sub-stat-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.sub-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.sub-stat-info {
    display: flex;
    flex-direction: column;
}

.sub-stat-title {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.sub-stat-val {
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.2;
}

/* Subscription Badges */
.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-expiring {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    animation: pulse 2s infinite;
}

.badge-expired {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-lifetime {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.4);
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.subscription-form-card {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.card-header-mini {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: #fbbf24;
}

.quick-days-chips {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.quick-chip {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: 4px;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.quick-chip:hover {
    background: rgba(6, 182, 212, 0.2);
    border-color: var(--primary);
    color: #fff;
}

.btn-renew {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition);
}

.btn-renew:hover {
    background: #10b981;
    color: #041017;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

/* Panel Footer Actions & Large Buttons */
.admin-panel-footer-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1.5rem 0 0.5rem 0;
    margin-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-lg {
    padding: 0.85rem 2.2rem;
    font-size: 1.05rem;
    font-weight: 800;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
}

.form-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

/* =========================================================================
   IPAD & TABLET OPTIMIZATIONS (769px to 1024px)
   ========================================================================= */
@media (min-width: 769px) and (max-width: 1024px) {
    .admin-container {
        padding: 0 1.25rem;
        margin: 1.25rem auto;
    }
    .sub-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.85rem;
    }
    .table-card {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}

/* =========================================================================
   MOBILE PHONES (< 768px)
   ========================================================================= */
@media (max-width: 768px) {
    .admin-navbar {
        padding: 0.85rem 1rem !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.85rem !important;
    }
    .admin-brand {
        justify-content: flex-start;
    }
    .brand-text h1 {
        font-size: 1.15rem !important;
    }
    .brand-text .sub-title {
        display: none !important;
    }
    .admin-nav-actions {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .admin-tabs-bar {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding: 0.4rem !important;
        gap: 0.4rem !important;
        -webkit-overflow-scrolling: touch;
    }
    .admin-tab {
        padding: 0.65rem 0.9rem !important;
        font-size: 0.82rem !important;
        flex-shrink: 0;
    }
    .admin-container {
        padding: 0 0.75rem !important;
        margin: 0.85rem auto !important;
    }
    .panel-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    .panel-header .btn {
        width: 100% !important;
        justify-content: center !important;
    }
    .sub-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
    }
    .sub-stat-card {
        padding: 0.85rem 0.75rem !important;
    }
    .sub-stat-val {
        font-size: 1.3rem !important;
    }
    .table-card {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border-radius: var(--radius-sm);
    }
    .admin-table {
        min-width: 650px;
    }
    .form-grid-4, .form-grid-3, .form-grid-2, .permissions-checklist {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
    }
    .modal-card {
        width: 95vw !important;
        max-width: 95vw !important;
        margin: 1rem auto !important;
        border-radius: var(--radius-md) !important;
    }
    .admin-panel-footer-actions {
        justify-content: stretch;
    }
    .admin-panel-footer-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
