/* ===== RKKB Tech - Global Styles ===== */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
    --orange: #e8732a;
    --orange-dark: #cf6222;
    --orange-light: #fdf0e8;
    --black: #0a0a0a;
    --dark: #1a1a2e;
    --gray-900: #212529;
    --gray-800: #343a40;
    --gray-700: #495057;
    --gray-600: #6c757d;
    --gray-500: #adb5bd;
    --gray-400: #ced4da;
    --gray-300: #dee2e6;
    --gray-200: #e9ecef;
    --gray-100: #f8f9fa;
    --white: #ffffff;
    --green: #28a745;
    --green-light: #e8f5e9;
    --blue: #007bff;
    --blue-light: #e3f2fd;
    --red: #dc3545;
    --red-light: #fdecea;
    --yellow: #ffc107;
    --yellow-light: #fff8e1;
    --sidebar-width: 260px;
    --header-height: 60px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 10px;
    --radius-sm: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    direction: rtl;
    background: var(--gray-100);
    color: var(--gray-900);
    font-size: 14px;
    line-height: 1.6;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 3px; }

/* ===== LOGIN PAGE ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--black) 0%, #1a1a2e 50%, var(--orange-dark) 100%);
}

.login-card {
    background: var(--white);
    border-radius: 16px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: var(--orange);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
    color: var(--white);
}

.login-card h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--black);
}

.login-card p {
    color: var(--gray-600);
    margin-bottom: 32px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 13px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    direction: rtl;
    transition: border-color 0.2s;
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(232, 115, 42, 0.15);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%236c757d'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 32px;
}

textarea.form-control { resize: vertical; min-height: 80px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--orange);
    color: var(--white);
}
.btn-primary:hover { background: var(--orange-dark); }

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}
.btn-secondary:hover { background: var(--gray-300); }

.btn-success { background: var(--green); color: var(--white); }
.btn-success:hover { background: #218838; }

.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { background: #c82333; }

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--orange);
    color: var(--orange);
}
.btn-outline:hover { background: var(--orange-light); }

.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
}
.alert-error { background: var(--red-light); color: var(--red); border: 1px solid #f5c6cb; }
.alert-success { background: var(--green-light); color: var(--green); border: 1px solid #c3e6cb; }

/* ===== LAYOUT ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--black);
    color: var(--white);
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: var(--orange);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.sidebar-brand { font-size: 18px; font-weight: 700; }
.sidebar-brand small { display: block; font-size: 11px; color: var(--gray-500); font-weight: 400; }

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section { margin-bottom: 24px; }
.nav-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-600);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 2px;
}

.nav-item:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.nav-item.active { background: var(--orange); color: var(--white); }
.nav-item .nav-icon { font-size: 18px; width: 24px; text-align: center; }

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.user-name { font-size: 13px; font-weight: 600; }
.user-role { font-size: 11px; color: var(--gray-500); }

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    width: 100%;
    transition: all 0.2s;
}
.logout-btn:hover { background: rgba(220,53,69,0.15); color: var(--red); border-color: var(--red); }

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    min-height: 100vh;
}

.page-header {
    background: var(--white);
    padding: 20px 32px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title { font-size: 20px; font-weight: 700; color: var(--black); }

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

.page-body { padding: 24px 32px; }

/* ===== STAT CARDS ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border-right: 4px solid var(--gray-300);
}

.stat-card.orange { border-right-color: var(--orange); }
.stat-card.blue { border-right-color: var(--blue); }
.stat-card.green { border-right-color: var(--green); }
.stat-card.red { border-right-color: var(--red); }
.stat-card.yellow { border-right-color: var(--yellow); }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--black);
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 4px;
}

/* ===== TABLE ===== */
.table-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-toolbar {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--gray-200);
}

.search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 8px 16px 8px 36px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    direction: rtl;
}

.search-box input:focus { outline: none; border-color: var(--orange); }

.search-box .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 14px;
}

.filter-select {
    padding: 8px 12px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    background: var(--white);
    min-width: 120px;
}

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

th {
    padding: 12px 16px;
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 13px;
    vertical-align: middle;
}

tr:hover td { background: rgba(232, 115, 42, 0.03); }

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-new { background: var(--blue-light); color: var(--blue); }
.badge-accepted { background: #e8eaf6; color: #3f51b5; }
.badge-in_progress { background: var(--yellow-light); color: #e65100; }
.badge-completed { background: var(--green-light); color: var(--green); }
.badge-cancelled { background: var(--gray-200); color: var(--gray-600); }
.badge-overdue { background: var(--red-light); color: var(--red); }

.badge-urgent { background: var(--red-light); color: var(--red); }
.badge-high { background: var(--yellow-light); color: #e65100; }
.badge-medium { background: var(--blue-light); color: var(--blue); }
.badge-low { background: var(--gray-200); color: var(--gray-600); }

.badge-installation { background: var(--blue-light); color: var(--blue); }
.badge-maintenance { background: var(--green-light); color: var(--green); }

.badge-driver { background: #e8eaf6; color: #3f51b5; }
.badge-technician { background: var(--orange-light); color: var(--orange); }
.badge-assistant_tech { background: var(--green-light); color: var(--green); }
.badge-helper { background: var(--gray-200); color: var(--gray-700); }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px;
    direction: rtl;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    background: var(--white);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 36px;
}

.pagination button:hover:not(:disabled) { border-color: var(--orange); color: var(--orange); }
.pagination button.active { background: var(--orange); color: var(--white); border-color: var(--orange); }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== TASK CARDS (Technician) ===== */
.tasks-section { margin-bottom: 32px; }

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title .count {
    background: var(--orange);
    color: var(--white);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.task-cards { display: flex; flex-direction: column; gap: 12px; }

.task-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s;
    border-right: 4px solid var(--gray-300);
    text-decoration: none;
    color: inherit;
    display: block;
}

.task-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.task-card.urgent { border-right-color: var(--red); }
.task-card.high { border-right-color: var(--orange); }
.task-card.medium { border-right-color: var(--blue); }
.task-card.low { border-right-color: var(--gray-400); }

.task-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.task-card-title { font-size: 15px; font-weight: 600; color: var(--black); }
.task-card-meta { font-size: 12px; color: var(--gray-600); display: flex; flex-direction: column; gap: 4px; }
.task-card-meta span { display: flex; align-items: center; gap: 6px; }

.task-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

/* ===== TASK EXECUTION ===== */
.task-detail-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.task-detail-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gray-200);
}

.detail-row {
    display: flex;
    padding: 8px 0;
    font-size: 13px;
}

.detail-label {
    width: 120px;
    color: var(--gray-600);
    flex-shrink: 0;
    font-weight: 500;
}

.detail-value { flex: 1; color: var(--black); }

.progress-bar {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 20px 0;
    position: relative;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.progress-step .step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 14px;
    color: var(--white);
    position: relative;
    z-index: 2;
}

.progress-step.active .step-dot { background: var(--orange); }
.progress-step.done .step-dot { background: var(--green); }

.progress-step .step-label { font-size: 11px; color: var(--gray-600); }
.progress-step.active .step-label { color: var(--orange); font-weight: 600; }
.progress-step.done .step-label { color: var(--green); }

.progress-line {
    position: absolute;
    top: 16px;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--gray-300);
    z-index: 1;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--gray-700);
}

.action-btn:hover { border-color: var(--orange); color: var(--orange); }
.action-btn.done { background: var(--green-light); border-color: var(--green); color: var(--green); cursor: default; }
.action-btn.active { border-color: var(--orange); background: var(--orange-light); color: var(--orange); }

.action-btn .icon { font-size: 20px; }

/* Signature pad */
.signature-container {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    margin-top: 8px;
    position: relative;
    background: var(--white);
}

.signature-container canvas {
    width: 100%;
    height: 200px;
    display: block;
    cursor: crosshair;
}

.signature-actions {
    display: flex;
    gap: 8px;
    padding: 8px;
    border-top: 1px solid var(--gray-200);
}

/* Photo grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.photo-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.photo-upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    aspect-ratio: 1;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-sm);
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.photo-upload-btn:hover { border-color: var(--orange); color: var(--orange); }
.photo-upload-btn .icon { font-size: 24px; }

/* ===== TEAM CARDS ===== */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.team-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.team-card-header {
    padding: 16px 20px;
    background: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.team-card-header h3 { font-size: 16px; font-weight: 700; }

.team-card-body { padding: 16px 20px; }

.team-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
}

.team-member:last-child { border-bottom: none; }

.team-member-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-member-avatar {
    width: 32px;
    height: 32px;
    background: var(--orange-light);
    color: var(--orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.team-card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 8px;
}

/* ===== STATS PAGE ===== */
.tech-stats-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 16px;
}

.tech-stats-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.tech-stats-avatar {
    width: 48px;
    height: 48px;
    background: var(--orange);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.progress-ring {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    margin-right: auto;
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.mini-stat {
    text-align: center;
    padding: 12px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.mini-stat-value { font-size: 20px; font-weight: 700; color: var(--black); }
.mini-stat-label { font-size: 11px; color: var(--gray-600); }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 { font-size: 18px; font-weight: 700; }

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-500);
    padding: 4px;
}

.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-500);
}

.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state p { font-size: 14px; }

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast-success { background: var(--green); color: var(--white); }
.toast-error { background: var(--red); color: var(--white); }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== LOADING ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--gray-300);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== RATING ===== */
.rating { display: flex; gap: 4px; direction: ltr; }
.rating .star {
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-300);
    transition: color 0.2s;
}
.rating .star.active { color: #ffc107; }
.rating .star:hover { color: #ffb300; }

/* ===== CHANGE PASSWORD MODAL ===== */
.pwd-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}
.pwd-modal-overlay.show { display: flex; }

.pwd-modal {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.pwd-modal .modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pwd-modal .modal-header h3 { font-size: 18px; font-weight: 700; }

.pwd-modal .modal-body { padding: 24px; }

.pwd-modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .sidebar { transform: translateX(100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-right: 0; }
    .mobile-toggle { display: block; }
    .page-body { padding: 16px; }
    .page-header { padding: 16px; }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 99;
        display: none;
    }
    .sidebar-overlay.show { display: block; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-right: 0; }
    .mobile-toggle { display: block; }

    /* Ensure hamburger is always visible and tappable on mobile */
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        font-size: 24px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--black);
        border-radius: var(--radius-sm);
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-toggle:active { background: var(--gray-200); }

    /* Sidebar overlay for mobile */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 99;
        display: none;
    }
    .sidebar-overlay.show { display: block; }

    /* Ensure all nav items are touch-friendly */
    .nav-item {
        min-height: 44px;
        padding: 12px 12px;
    }

    .logout-btn {
        min-height: 44px;
    }

    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .table-toolbar { flex-direction: column; }
    .search-box { min-width: 100%; }
    .mini-stats { grid-template-columns: repeat(2, 1fr); }
    .teams-grid { grid-template-columns: 1fr; }

    /* Responsive table */
    .table-responsive { overflow-x: auto; }

    /* Two-column grid becomes single on small screens */
    .page-body [style*="grid-template-columns:1fr 1fr"],
    .page-body [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 22px; }
    .login-card { padding: 32px 24px; }
}
