/* ElsLift Admin - v2 visual system (full refresh) */
:root{
    /* Dark theme (not pure black) */
    --bg0:#0B0F16;
    --bg1:#0E1420;
    --panel:#121A28;
    --panel2:#0F1724;
    --text:#E7ECF4;
    --muted:#A2AAB8;
    --line:rgba(255,255,255,.10);
    --line2:rgba(255,255,255,.14);
    --shadow: 0 18px 52px rgba(0,0,0,.55);
    --shadow2: 0 10px 28px rgba(0,0,0,.35);
    /* Accent: sky + teal (no purple) */
    --accent:#0EA5E9;
    --accent2:#14B8A6;
    --good:#10B981;
    --warn:#F59E0B;
    --bad:#EF4444;
    --radius:16px;
    --radius2:20px;
    --sidebarW: 296px;
    --sidebarWCollapsed: 92px;
}

*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%}
body{
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
    background: linear-gradient(180deg, var(--bg0), var(--bg1));
    color: var(--text);
    line-height: 1.55;
    overflow-x: hidden; /* prevent horizontal page scroll on mobile */
}

img, svg, canvas { max-width: 100%; }

/* Layout */
.admin-container{min-height:100vh;display:flex}

.admin-container {
    /* keep legacy selector alive */
}

/* Sidebar */
.sidebar {
    width: var(--sidebarW);
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
    border-right: 1px solid var(--line);
    color: var(--text);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: 0 0 0 rgba(0,0,0,0);
    backdrop-filter: blur(14px);
    display:flex;
    flex-direction:column;
}

.sidebar-header {
    padding: 20px 18px;
    border-bottom: 1px solid var(--line);
}

.sidebar-brand{
    display:flex;
    align-items:center;
    gap:12px;
}
.sidebar-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: rgba(255,255,255,.06);
    border:1px solid var(--line);
    border-radius: 14px;
    padding:8px;
}
.sidebar-brand-title{
    font-weight: 900;
    letter-spacing: .2px;
    font-size: 16px;
}
.sidebar-brand-subtitle{
    margin-top:2px;
    color: var(--muted);
    font-size: 11px;
}

.sidebar-header h2 {
    /* legacy */
}

.sidebar-subtitle {
    /* legacy */
}

.sidebar-nav {
    padding: 12px 10px;
    display:flex;
    flex-direction:column;
    gap:6px;
}

.nav-item {
    display:flex;
    align-items:center;
    gap:12px;
    padding: 12px 12px;
    color: rgba(231,236,244,.86);
    text-decoration:none;
    transition: transform .08s ease, background .2s ease, border-color .2s ease;
    border: 1px solid transparent;
    border-radius: 14px;
}

.nav-item:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.10);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(14,165,233,.22), rgba(20,184,166,.14));
    border-color: rgba(14,165,233,.30);
    box-shadow: 0 10px 26px rgba(14,165,233,.12);
}

.nav-icon {
    width: 34px;
    height: 34px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.05);
    font-size: 15px;
}

.nav-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .1px;
}

.sidebar-footer{
    margin-top:auto;
    padding: 14px 12px 16px 12px;
    border-top: 1px solid var(--line);
    display:grid;
    gap:12px;
}
.sidebar-user{
    display:flex;
    align-items:center;
    gap:10px;
    padding: 10px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.05);
}
.sidebar-user-avatar{
    width:38px;height:38px;border-radius: 14px;
    display:flex;align-items:center;justify-content:center;
    font-weight: 900;
    background: linear-gradient(135deg, rgba(14,165,233,.55), rgba(20,184,166,.30));
    border: 1px solid rgba(255,255,255,.14);
}
.sidebar-user-name{font-weight: 900; font-size: 13px; line-height:1.2}
.sidebar-user-role{color: var(--muted); font-size: 11px; margin-top:2px}
.btn-block{width:100%}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebarW);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: transparent;
}

/* Header */
.admin-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
    border-bottom: 1px solid var(--line);
    color: var(--text);
    padding: 16px 22px;
    backdrop-filter: blur(14px);
}

.header-content {
    max-width: 1480px;
    margin: 0 auto;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    flex-wrap: wrap;
}

.admin-header h1 {
    font-size: 18px;
    font-weight: 950;
    letter-spacing: -.2px;
    color: var(--text);
}

.header-left{display:flex; align-items:center; gap:12px}
.header-titles{display:flex; flex-direction:column; gap:2px}
.header-subtitle{color: var(--muted); font-size: 12px}
.icon-pill{
    width: 42px; height: 42px;
    display:flex; align-items:center; justify-content:center;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.06);
    color: var(--text);
    cursor:pointer;
}
.icon-pill:hover{background: rgba(255,255,255,.10)}

.header-actions {
    display:flex;
    gap:10px;
}

/* Buttons */
.btn {
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .08s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
    text-transform: none;
    color: var(--text);
    background: rgba(255,255,255,.06);
}

.btn-primary {
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: white;
    box-shadow: 0 18px 42px rgba(14,165,233,.18);
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: saturate(1.05);
}

.btn-secondary {
    background: rgba(255,255,255,.06);
    color: var(--text);
    border: 1px solid rgba(255,255,255,.12);
}

.btn-secondary:hover {
    background: rgba(255,255,255,.10);
}

/* Secondary button in modal (match theme) */
.modal .btn-secondary {
    background: rgba(255,255,255,.06);
    color: var(--text);
    border: 1px solid rgba(255,255,255,.12);
}

.modal .btn-secondary:hover {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.16);
}

.btn-danger {
    background: rgba(239,68,68,.14);
    border-color: rgba(239,68,68,.32);
    color: #FCA5A5;
}

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

.btn-edit {
    background: rgba(14,165,233,.12);
    border-color: rgba(14,165,233,.30);
    color: #A5F3FC;
    padding: 7px 10px;
    font-size: 12px;
}

.btn-edit:hover {
    background: rgba(14,165,233,.16);
    border-color: rgba(14,165,233,.38);
}

.btn-delete {
    background: rgba(239,68,68,.16);
    border-color: rgba(239,68,68,.35);
    color: #FCA5A5;
    padding: 7px 10px;
    font-size: 12px;
}

.btn-delete:hover {
    background: rgba(239,68,68,.22);
    border-color: rgba(239,68,68,.45);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-info {
    background: rgba(14,165,233,.16);
    border-color: rgba(14,165,233,.35);
    color: #A5F3FC;
}

.btn-info:hover {
    background: rgba(14,165,233,.22);
    border-color: rgba(14,165,233,.45);
}

.btn-success {
    background: rgba(16,185,129,.16);
    border-color: rgba(16,185,129,.35);
    color: #A7F3D0;
}

.btn-success:hover {
    background: rgba(16,185,129,.22);
    border-color: rgba(16,185,129,.45);
}

/* Main Content */
.admin-main {
    flex: 1;
    max-width: 1480px;
    width: 100%;
    margin: 22px auto;
    padding: 0 22px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h2 {
    font-size: 28px;
    color: var(--text);
    font-weight: 700;
}

.pdis-section {
    background: var(--panel);
    border-radius: var(--radius2);
    box-shadow: var(--shadow2);
    padding: 18px;
    border:1px solid var(--line);
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    font-size: 14px;
    font-family: inherit;
    background: rgba(3,6,16,.30);
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-select option {
    background: #0F1724;
    color: var(--text);
}

.filter-select:focus {
    outline: none;
    border-color: rgba(14,165,233,.70);
}

.pdis-table {
    width: 100%;
    border-collapse: collapse;
}

.pdis-table thead {
    background: rgba(3,6,16,.40);
}

.pdis-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid rgba(255,255,255,.10);
    font-size: 14px;
}

.pdis-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: 14px;
    color: rgba(231,236,244,.88);
}

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

.pdi-status-pending {
    background: #856404;
    color: #fff3cd;
}

.pdi-status-approved {
    background: #155724;
    color: #d4edda;
}

.pdi-status-rejected {
    background: #721c24;
    color: #f8d7da;
}

.settings-section {
    background: var(--panel);
    border-radius: var(--radius2);
    box-shadow: var(--shadow2);
    padding: 18px;
    border:1px solid var(--line);
}

.settings-card {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.settings-card:last-child {
    border-bottom: none;
}

.settings-card h3 {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 10px;
}

.modal-large {
    max-width: 900px;
}

.pdi-detail-section {
    margin-bottom: 24px;
}

.pdi-detail-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #404040;
}

.pdi-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pdi-detail-item {
    display: flex;
    flex-direction: column;
}

.pdi-detail-label {
    font-size: 12px;
    color: #b0b0b0;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pdi-detail-value {
    font-size: 16px;
    color: #e0e0e0;
    font-weight: 500;
}

.pdi-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.pdi-photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #404040;
}

.pdi-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdi-photo-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px;
    font-size: 12px;
    text-align: center;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
    padding: 18px;
    border-radius: var(--radius2);
    box-shadow: var(--shadow2);
    border:1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.stat-icon {
    font-size: 26px;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(14,165,233,.70), rgba(20,184,166,.35));
    border-radius: 16px;
    border:1px solid rgba(15,23,42,.10);
}

.stat-info h3 {
    font-size: 32px;
    color: var(--text);
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--muted);
    font-size: 14px;
}

/* Users Section */
.users-section {
    background: var(--panel);
    border-radius: var(--radius2);
    box-shadow: var(--shadow2);
    padding: 18px;
    border:1px solid var(--line);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    font-size: 24px;
    color: var(--text);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 10px 40px 10px 15px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    font-size: 14px;
    width: 300px;
    background: rgba(3,6,16,.30);
    color: var(--text);
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: rgba(14,165,233,.70);
}

.search-box input::placeholder {
    color: rgba(162,170,184,.85);
}

.search-icon {
    position: absolute;
    right: 12px;
    color: rgba(162,170,184,.85);
}

/* Table */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table thead {
    background: rgba(3,6,16,.40);
}

.users-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px solid rgba(255,255,255,.10);
    font-size: 14px;
}

.users-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: 14px;
    color: rgba(231,236,244,.88);
}

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

.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: #155724;
    color: #d4edda;
}

.status-inactive {
    background: #721c24;
    color: #f8d7da;
}

.role-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.role-personel {
    background: #1976d2;
    color: #e3f2fd;
}

.role-kalite_kontrol {
    background: #f57c00;
    color: #fff3e0;
}

.role-admin {
    background: #7b1fa2;
    color: #f3e5f5;
}

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

.loading {
    text-align: center;
    padding: 40px;
    color: #808080;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #808080;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.72);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
    border:1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 28px 90px rgba(0,0,0,.55);
    backdrop-filter: blur(14px);
}

.modal-large {
    max-width: 95%;
    width: 1200px;
    max-height: 95vh;
}

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

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: var(--text);
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.modal-close {
    background: rgba(255,255,255,.10);
    border: none;
    font-size: 24px;
    color: var(--text);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-weight: bold;
}

.modal-close:hover {
    background: rgba(255,255,255,.20);
    color: var(--text);
    transform: rotate(90deg);
}

.modal-body {
    padding: 22px;
    background: rgba(3,6,16,.35);
    color: var(--text);
}

.modal-body * {
    color: inherit;
}

.modal-body h1,
.modal-body h2,
.modal-body h3,
.modal-body h4,
.modal-body h5,
.modal-body h6 {
    color: var(--text);
}

.modal-body p {
    color: rgba(231,236,244,.88);
}

.modal-large .modal-body {
    padding: 30px;
    max-height: calc(95vh - 200px);
    overflow-y: auto;
}

.warning-text {
    color: rgba(239,68,68,.95);
    font-weight: 600;
    margin-top: 10px;
}

/* Form */
#userForm {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    font-size: 14px;
    font-family: inherit;
    background: rgba(3,6,16,.30);
    color: var(--text);
    transition: border-color 0.3s ease;
}

.form-group select option {
    background: #0F1724;
    color: var(--text);
    padding: 10px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(14,165,233,.70);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(71,85,105,.80);
}

/* Template Section Styles */
.template-section {
    background: #ffffff !important;
    border: 1px solid rgba(15,23,42,.12) !important;
    color: var(--text);
}

.template-section h4 {
    color: var(--text) !important;
}

.section-title-input,
.question-input {
    background: #ffffff !important;
    border: 1px solid rgba(15,23,42,.12) !important;
    color: var(--text) !important;
}

.section-title-input:focus,
.question-input:focus {
    border-color: rgba(14,165,233,.70) !important;
    outline: none;
}

.section-title-input::placeholder,
.question-input::placeholder {
    color: #808080 !important;
}

#templateModels {
    background: #1a1a1a !important;
    border: 1px solid #404040 !important;
    color: #e0e0e0;
}

#templateModels label {
    color: #e0e0e0 !important;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #b0b0b0;
    font-size: 12px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #404040;
    margin-top: 20px;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 16px;
    color: white;
    font-weight: 600;
    font-size: 15px;
    z-index: 2000;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 500px;
    backdrop-filter: blur(14px);
}

.notification::before {
    content: '';
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.notification.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-left: 4px solid #047857;
}

.notification.success::before {
    content: '✓';
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-left: 4px solid #b91c1c;
}

.notification.error::before {
    content: '✕';
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    /* Keep sidebar as overlay (handled in 900px rules below) */
    .main-content { margin-left: 0; }

    .admin-header {
        padding: 12px 14px;
    }

    .admin-header h1 {
        font-size: 18px;
    }

    .header-content {
        flex-direction: column;
        align-items: stretch;
    }
    .header-left{width:100%}
    .header-actions{width:100%}
    .header-actions .btn{width:100%}
    .header-subtitle{display:none}

    .admin-main {
        padding: 0 12px;
        margin: 14px auto;
    }

    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    .page-header{flex-direction: column; align-items: stretch}
    .page-header .btn{width:100%}

    .search-box input {
        width: 100%;
    }

    .users-table,
    .pdis-table {
        font-size: 12px;
    }

    /* Prevent page-level horizontal scrolling on small screens */
    .admin-container,
    .main-content,
    .admin-main,
    .users-section,
    .pdis-section,
    .settings-section{
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Stack dashboard stat cards */
    .stats-section{
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 16px;
    }

    /* Force single-column for inline-styled grids in index.html */
    #dashboardChartsContent > div[style*="grid-template-columns"]{
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .statistics-container{
        padding: 12px !important;
    }
    .statistics-container .stats-grid{
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        margin-bottom: 16px !important;
    }
    div[style*="grid-template-columns: 1fr 120px 90px"]{
        grid-template-columns: 1fr !important;
    }

    /* Tables scroll inside container only */
    .table-container{
        width: 100%;
        overflow-x: auto;
    }

    .users-table th,
    .users-table td,
    .pdis-table th,
    .pdis-table td {
        padding: 10px 8px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        margin: 14px;
    }
}

@media (max-width: 420px){
    .btn{width:100%}
    .icon-pill{width:40px;height:40px}
}

/* Sidebar collapse */
body.sidebar-collapsed .sidebar{width: var(--sidebarWCollapsed)}
body.sidebar-collapsed .main-content{margin-left: var(--sidebarWCollapsed)}
body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .sidebar-user-meta,
body.sidebar-collapsed .sidebar-brand-text{display:none}
body.sidebar-collapsed .sidebar-nav{padding-left:8px; padding-right:8px}

/* Mobile sidebar overlay */
@media (max-width: 900px){
    /* On mobile we always use overlay; ignore collapsed layout */
    body.sidebar-collapsed .sidebar{width: var(--sidebarW); }
    body.sidebar-collapsed .main-content{margin-left: 0}
    body.sidebar-collapsed .nav-text,
    body.sidebar-collapsed .sidebar-user-meta,
    body.sidebar-collapsed .sidebar-brand-text{display: initial}

    .sidebar{transform: translateX(-105%); transition: transform .22s ease}
    body.sidebar-open .sidebar{transform: translateX(0)}
    .main-content{margin-left:0}
    body.sidebar-open::before{
        content:"";
        position:fixed;
        inset:0;
        background: rgba(0,0,0,.45);
        backdrop-filter: blur(2px);
        z-index: 90;
    }
    .sidebar{z-index: 100}
    .admin-header{z-index: 80}
}
