:root {
    --primary: #111b21;
    --primary-hover: #223344;
    --bg-dark: #f0f2f5;
    --panel-bg: #ffffff;
    --border: #e2e8f0;
    --text-main: #111b21;
    --text-muted: #64748b;
    --success: #15803d;
    --danger: #b91c1c;
    --warning: #b45309;
    --success-bg: #dcfce7;
    --danger-bg: #fee2e2;
    --warning-bg: #fef3c7;
    --accent: #2563eb;
    --accent-bg: #f1f5f9;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
}

/* Light Theme Clean Cards */
.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(17, 27, 33, 0.04);
}

.glass-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(240, 242, 245, 0.95);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Header */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    margin:16px 11px;
    position: sticky;
    top: 1rem;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Dashboard Container */
.dashboard-container {
    padding:30px 12px 11px 12px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1.25rem 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(17, 27, 33, 0.06);
}

.stat-card h3 {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
}

/* Single Merged Main Card Container */
.main-management-card {
    padding: 0;
    overflow: hidden;
    background: #ffffff;
}

.merged-split-layout {
    display: grid;
    grid-template-columns: 6fr 4fr;
    min-height: 600px;
}

@media (max-width: 1100px) {
    .merged-split-layout {
        grid-template-columns: 1fr;
    }
}

/* Left Users Panel (60%) */
.left-users-panel {
    padding: 1.5rem 0;
    border-right: 1px solid #f1f5f9;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.75rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    gap: 1rem;
    flex-wrap: wrap;
}

.panel-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.search-input {
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.65rem 1rem;
    border-radius: 8px;
    width: 280px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--text-main);
    box-shadow: 0 0 0 3px rgba(17, 27, 33, 0.05);
}

/* Record Item List Format (Exact 25px Padding & Spacing from DevTools Inspector) */
.record-list-wrapper {
    max-height: 720px;
    overflow-y: auto;
}

.record-list {
    display: flex;
    flex-direction: column;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px; /* Exact 25px Padding requested by user */
    border-top: 1px solid rgba(112, 112, 112, 0.15);
    cursor: pointer;
    transition: background 0.15s ease;
}

.record-item:hover {
    background: #f8fafc;
}

.record-item.selected-record {
    background: #f1f5f9;
    border-left: 4px solid var(--primary);
}

.record-main-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.record-title {
    font-size: 16px; /* Exact 16px Font from DevTools Inspector */
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.record-subtitle {
    font-size: 14px;
    color: var(--text-muted);

}

.record-meta-tags {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

.meta-pill {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.meta-pill.warning-red {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fecdd3;
    font-weight: 700;
}

.record-right-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pill-badge-green {
    background: #008730;
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pill-badge-red {
    background: #dc2626;
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
}

.btn-icon-action {
    background: none;
    border: none;
    color: #475569;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-action:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.empty-list-loading {
    padding: 3rem 1.75rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Right Edit Panel (40%) */
.right-edit-panel {
    padding: 1.75rem 1.5rem;
    background: #ffffff;
    border-left: 1px solid #f1f5f9;
}

@media (max-width: 1100px) {
    .right-edit-panel {
        border-left: none;
        border-top: 1px solid var(--border);
    }
}

.edit-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.edit-panel-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.panel-subtext {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.empty-edit-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.empty-edit-state svg {
    margin-bottom: 0.75rem;
}

/* Edit Form Elements */
.edit-user-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 0.75rem 0.9rem;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--text-main);
    box-shadow: 0 0 0 3px rgba(17, 27, 33, 0.05);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-group.half {
    flex: 1;
}

.edit-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid #f1f5f9;
}

.btn-save-edit {
    background: var(--primary);
    color: #ffffff;
    border: 1px solid var(--primary);
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-save-edit:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-cancel-edit {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 0.7rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-cancel-edit:hover {
    background: var(--bg-dark);
}

/* Badges & Buttons */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge.active { background: var(--success-bg); color: var(--success); border: 1px solid #a7f3d0; }
.badge.suspended { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecdd3; }
.badge.warning { background: var(--warning-bg); color: var(--warning); border: 1px solid #fde68a; }

.btn-primary {
    background: #fff;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-primary:hover { 
    background: #fafafa; 
    border-color: #b8c0c5;
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-outline:hover {
    background: #f0f2f5;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(17, 27, 33, 0.4);
    backdrop-filter: blur(2px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
    background: #ffffff;
    border-radius: 16px;
    animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal-header h2 {
    font-size: 1.3rem;
    letter-spacing: -0.01em;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-cancel {
    background: transparent;
    color: var(--text-muted);
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}
.btn-cancel:hover { color: var(--text-main); }

/* Loader */
.loader {
    text-align: center;
    color: var(--text-main);
    font-weight: 600;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(17, 27, 33, 0.1);
    border-radius: 50%;
    border-top-color: var(--text-main);
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (720px down to 300px)
   ========================================================================== */

/* Breakpoint 1: 720px - 600px (Tablets & Large Mobiles) */
@media (max-width: 720px) {
    .admin-header {
        margin: 0.5rem 0.75rem 1rem;
        padding: 0.75rem 1rem;
    }

    .dashboard-container {
        padding: 0.5rem 0.75rem 2rem;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .merged-split-layout {
        grid-template-columns: 1fr;
    }

    .left-users-panel {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1.25rem 0;
    }

    .panel-header {
        padding: 0 1.25rem 1rem;
    }

    .search-input {
        width: 100%;
    }

    .record-item {
        padding: 18px 1.25rem;
    }

    .right-edit-panel {
        padding: 1.25rem;
        border-left: none;
    }
}

/* Breakpoint 2: 600px - 480px (Standard Mobiles) */
@media (max-width: 600px) {
    .admin-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .admin-profile {
        justify-content: flex-end;
        width: 100%;
        gap: 0.5rem;
    }

    .btn-outline {
        padding: 0.5rem 0.85rem;
        font-size: 0.8rem;
    }

    .form-row {
        flex-direction: column;
        gap: 1.1rem;
    }

    .edit-form-actions {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .btn-save-edit, .btn-cancel-edit {
        width: 100%;
        text-align: center;
    }
}

/* Breakpoint 3: 480px - 300px (Compact & Ultra Small Mobiles down to 300px) */
@media (max-width: 480px) {
    .admin-header {
        margin: 0.25rem 0.5rem 0.75rem;
        padding: 0.65rem 0.75rem;
    }

    .dashboard-container {
        padding: 0.25rem 0.5rem 1.5rem;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .stat-card {
        padding: 0.85rem 0.5rem;
    }

    .stat-card h3 {
        font-size: 0.72rem;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .panel-header {
        padding: 0 0.85rem 0.85rem;
    }

    .panel-header h2 {
        font-size: 1.15rem;
    }

    .record-item {
        padding: 14px 0.85rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .record-main-info {
        width: 100%;
    }

    .record-title {
        font-size: 14px;
        word-break: break-word;
    }

    .record-subtitle {
        font-size: 12px;
        word-break: break-all;
    }

    .record-meta-tags {
        flex-wrap: wrap;
        gap: 4px;
    }

    .meta-pill {
        font-size: 11px;
        padding: 2px 6px;
    }

    .record-right-actions {
        width: 100%;
        justify-content: space-between;
        padding-top: 6px;
        border-top: 1px dashed #f1f5f9;
    }

    .pill-badge-green, .pill-badge-red {
        padding: 4px 10px;
        font-size: 11px;
    }

    .right-edit-panel {
        padding: 1rem 0.85rem;
    }

    .edit-panel-header h2 {
        font-size: 1.1rem;
    }

    .form-control {
        padding: 0.65rem 0.75rem;
        font-size: 0.85rem;
    }

    .modal {
        width: 95%;
        padding: 1.25rem 0.85rem;
    }

    #admin-toast-container {
        top: 12px !important;
        right: 12px !important;
        left: 12px !important;
        max-width: none !important;
    }
}

/* Ultra Small 300px Breakpoint */
@media (max-width: 340px) {
    .stats-row {
        grid-template-columns: 1fr;
    }

    .admin-profile span {
        display: none;
    }
}

/* Delete User Button Styles */
.btn-delete-edit {
    background: #ef4444;
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-delete-edit:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-icon-action.btn-delete-user-item {
    transition: all 0.2s ease;
}

.btn-icon-action.btn-delete-user-item:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
}

