@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

:root {
    --bg-primary: #081B1D;
    --bg-card: #0E2E30;
    --bg-card-hover: #123A3D;
    --accent: #44A1A0;
    --accent-hover: #5BB8B7;
    --text-primary: #FFFFFF;
    --text-secondary: #A0B4B5;
    --danger: #E74C3C;
    --warning: #F39C12;
    --success: #27AE60;
    --border: #1A4A4D;
}

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

html, body {
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

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

.sidebar {
    width: 240px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.sidebar-brand h3 {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.user-role {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.nav-links {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    flex: 1;
}

.nav-link {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(68, 161, 160, 0.1);
    border-left-color: var(--accent);
}

.nav-link.active {
    color: var(--accent);
    background: rgba(68, 161, 160, 0.15);
    border-left-color: var(--accent);
    font-weight: 600;
}

.nav-link.logout, .nav-link.logout-link {
    margin-top: auto;
    border-top: 1px solid var(--border);
    color: var(--danger);
}

.nav-link.logout:hover, .nav-link.logout-link:hover {
    background: rgba(231, 76, 60, 0.1);
    border-left-color: var(--danger);
}

.logout-brand-btn:hover {
    opacity: 1 !important;
    text-decoration: underline !important;
}

.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 1.5rem 2rem;
    min-height: 100vh;
}

/* === Sync Info Bar === */
.sync-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.sync-info-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sync-info-bar i.fa-sync {
    color: var(--accent);
}

/* === QR Pass === */
.qr-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.qr-result {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--accent);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.qr-result img {
    border-radius: 8px;
    margin-bottom: 1rem;
}

.qr-code-text {
    font-family: monospace;
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
    word-break: break-all;
}

.qr-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-whatsapp {
    padding: 0.6rem 1.25rem;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-whatsapp:hover { background: #1DA851; }

/* === Page Header === */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.last-sync {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

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

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.2s;
}

.stat-card:hover { transform: translateY(-2px); }

.stat-card.accent { border-color: var(--accent); }
.stat-card.warning { border-color: var(--warning); }
.stat-card.danger { border-color: var(--danger); }

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card.accent .stat-number { color: var(--accent); }
.stat-card.warning .stat-number { color: var(--warning); }
.stat-card.danger .stat-number { color: var(--danger); }

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* === Gradient Stat Cards (WPF-matching) === */
.stat-card.green {
    background: linear-gradient(135deg, #2ed47a, #1a9c5a);
    border-color: transparent;
}
.stat-card.green .stat-number,
.stat-card.green .stat-label { color: #fff; }

.stat-card.blue {
    background: linear-gradient(135deg, #4fc3f7, #2196f3);
    border-color: transparent;
}
.stat-card.blue .stat-number,
.stat-card.blue .stat-label { color: #fff; }

.stat-card.orange {
    background: linear-gradient(135deg, #ffb74d, #ff9800);
    border-color: transparent;
}
.stat-card.orange .stat-number,
.stat-card.orange .stat-label { color: #fff; }

.stat-card.red {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-color: transparent;
}
.stat-card.red .stat-number,
.stat-card.red .stat-label { color: #fff; }

.stat-card.teal {
    background: linear-gradient(135deg, #44a1a0, #2d7a79);
    border-color: transparent;
}
.stat-card.teal .stat-number,
.stat-card.teal .stat-label { color: #fff; }

.stat-card.purple {
    background: linear-gradient(135deg, #b39ddb, #7e57c2);
    border-color: transparent;
}
.stat-card.purple .stat-number,
.stat-card.purple .stat-label { color: #fff; }

/* === Content Grid === */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.content-card h3 {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* === Data Table === */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    color: var(--accent);
    font-weight: 600;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(26, 74, 77, 0.4);
    color: var(--text-primary);
}

.data-table tbody tr {
    transition: background 0.15s;
}

.data-table tbody tr:hover {
    background: rgba(68, 161, 160, 0.08);
}

.data-table tbody tr:nth-child(even) {
    background: rgba(14, 46, 48, 0.5);
}

.data-table tbody tr:nth-child(even):hover {
    background: rgba(68, 161, 160, 0.08);
}

/* === Badges === */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active { background: rgba(39, 174, 96, 0.2); color: var(--success); }
.badge-expired { background: rgba(231, 76, 60, 0.2); color: var(--danger); }
.badge-frozen { background: rgba(52, 152, 219, 0.2); color: #3498db; }
.badge.large { font-size: 0.9rem; padding: 0.3rem 1rem; }

/* === Colors === */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }

/* === Forms === */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.form-group.inline {
    display: inline-block;
    margin-right: 1rem;
}

.form-input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(68, 161, 160, 0.2);
}

.form-select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(68, 161, 160, 0.2);
}

.search-bar {
    margin-bottom: 1rem;
}

.search-bar .form-input {
    max-width: 400px;
}

.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-bar .form-input {
    width: auto;
}

/* === Buttons === */
.btn-accent {
    padding: 0.6rem 1.25rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-accent:hover { background: var(--accent-hover); }
.btn-accent:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-danger {
    padding: 0.6rem 1.25rem;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-danger:hover { background: #c0392b; }
.btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
}

.btn-outline {
    padding: 0.6rem 1.25rem;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

/* === Login === */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.login-title {
    text-align: center;
    color: var(--accent);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.login-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 0.6rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 600;
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.login-btn:hover { background: var(--accent-hover); }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.error-msg {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: var(--danger);
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    text-align: center;
}

.success-msg {
    background: rgba(39, 174, 96, 0.15);
    border: 1px solid rgba(39, 174, 96, 0.3);
    color: var(--success);
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    text-align: center;
}

/* === Player Card === */
.player-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
}

.player-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.player-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.player-header h3 {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.info-item {
    background: var(--bg-primary);
    padding: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.info-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.info-value {
    display: block;
    font-weight: 600;
    font-size: 1rem;
}

.no-data {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    font-style: italic;
}

/* === Filter Buttons === */
.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.4rem 0.9rem;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.filter-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent);
}

.filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 600;
}

/* === Date Filter Group === */
.filter-group {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.filter-group .filter-btn {
    background: rgba(8, 27, 29, 0.5);
}

/* === Player Avatar === */
.player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.player-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

/* === Player Name Cell === */
.player-name-cell {
    display: flex;
    flex-direction: column;
}

.name-primary {
    font-weight: 600;
}

.name-secondary {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* === Detail Row === */
.player-row {
    cursor: pointer;
    transition: background 0.2s;
}

.player-row:hover {
    background: rgba(68, 161, 160, 0.08) !important;
}

.player-row.expanded {
    background: rgba(68, 161, 160, 0.05);
}

.detail-row td {
    padding: 0 !important;
    border-bottom: 2px solid var(--accent) !important;
}

.player-detail {
    padding: 1rem 1.5rem;
    background: rgba(8, 27, 29, 0.5);
    border-top: 1px solid var(--border);
}

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

.detail-item {
    background: var(--bg-card);
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.detail-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
}

.detail-value {
    font-weight: 600;
    font-size: 0.9rem;
}

/* === Progress Bar === */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-bar-fill.progress-warning {
    background: var(--warning);
}

.progress-bar-fill.progress-danger {
    background: var(--danger);
}

/* === Badge: Expiring === */
.badge-expiring {
    background: rgba(243, 156, 18, 0.2);
    color: var(--warning);
}

/* === Table Responsive === */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.pagination .btn-accent,
.pagination .btn-outline {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    min-width: 100px;
}

.pagination .page-info {
    color: var(--text-secondary);
    font-size: 0.85rem;
    min-width: 150px;
    text-align: center;
}

/* === Device Info === */
.device-info-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.device-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(26, 74, 77, 0.3);
}

.device-info-row:last-child {
    border-bottom: none;
}

.device-info-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.device-info-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* === Language Toggle === */
.nav-link.lang-toggle {
    color: var(--accent);
    font-weight: 600;
    cursor: pointer;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.nav-link.lang-toggle:hover {
    background: rgba(68, 161, 160, 0.15);
}

/* === User Management === */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.user-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem;
    border-radius: 4px;
    transition: background 0.15s;
}

.permission-item:hover {
    background: rgba(68, 161, 160, 0.05);
}

.permission-item input[type="checkbox"] {
    accent-color: var(--accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.permission-item label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
}

/* === RTL Support === */
[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid var(--border);
}

[dir="rtl"] .nav-link {
    border-left: none;
    border-right: 3px solid transparent;
}

[dir="rtl"] .nav-link i {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .nav-link:hover,
[dir="rtl"] .nav-link.active {
    border-left: none;
    border-right-color: var(--accent);
}

[dir="rtl"] .main-content {
    margin-left: 0;
    margin-right: 240px;
}

[dir="rtl"] .data-table th {
    text-align: right;
}

[dir="rtl"] .form-group.inline {
    margin-right: 0;
    margin-left: 1rem;
}

/* === Blazor Error UI === */
#blazor-error-ui {
    display: none;
    background: var(--danger);
    color: white;
    padding: 0.5rem 1rem;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    text-align: center;
}

#blazor-error-ui a { color: #fff; text-decoration: underline; margin: 0 0.5rem; }
#blazor-error-ui .dismiss { cursor: pointer; margin-left: 1rem; }

.blazor-error-boundary {
    background: var(--danger);
    padding: 1rem;
    color: white;
    border-radius: 6px;
}

/* === Desktop/Mobile Toggle === */
/* Desktop (769px+): show tables, hide cards */
.desktop-only { display: block; }
.mobile-only { display: none; }

/* Mobile only (768px and below): show cards, hide tables */
@media screen and (max-width: 768px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
}

/* === Mobile Cards === */
.mobile-cards {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-card-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.mobile-card-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.mobile-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.15rem 0;
    font-size: 0.82rem;
}

.mobile-card-label {
    color: var(--text-secondary);
}

.mobile-card-value {
    font-weight: 600;
    color: var(--text-primary);
}

.mobile-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.3rem;
    flex-wrap: wrap;
}

.mobile-card-actions .btn-accent,
.mobile-card-actions .btn-outline,
.mobile-card-actions .btn-whatsapp,
.mobile-card-actions .btn-danger {
    width: auto;
    flex: 1;
    min-width: 0;
}

.mobile-card-divider {
    border-top: 1px solid var(--border);
    margin: 0.2rem 0;
}

/* Cards don't need tablet grid — cards only show on phones (<768px) */

/* Toggle handled above with multiple breakpoints */

/* === Responsive === */

/* Prevent any overflow */
html, body { overflow-x: hidden !important; max-width: 100vw !important; }
.app-container { max-width: 100vw !important; overflow-x: hidden !important; }
.main-content { overflow-x: hidden !important; }

/* All tables scrollable */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 0;
    width: 100%;
}

.table-responsive .data-table {
    min-width: 450px;
}

/* Content overflow protection */
.main-content img { max-width: 100%; height: auto; }
.content-card { overflow: hidden; word-wrap: break-word; }
.data-table td { word-break: break-word; max-width: 200px; }

/* Flexible containers — MUST wrap */
.filter-group, .filter-buttons, .filter-bar,
.form-actions, .qr-actions, .pagination,
.sync-info-bar, .page-header {
    flex-wrap: wrap !important;
}

@media (max-width: 768px) {
    /* Bottom navigation bar */
    .sidebar {
        position: fixed;
        width: 100% !important;
        height: 56px;
        bottom: 0;
        top: auto;
        left: 0 !important;
        right: 0 !important;
        border-right: none;
        border-top: 1px solid var(--border);
        flex-direction: row;
        z-index: 1000;
        overflow-x: auto;
        overflow-y: hidden;
        background: var(--bg-card);
    }

    .sidebar-brand { display: none !important; }

    .nav-links {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0;
        -webkit-overflow-scrolling: touch;
        height: 56px;
        align-items: center;
    }

    .nav-link {
        padding: 0.2rem;
        white-space: nowrap;
        font-size: 0.6rem;
        border-left: none !important;
        border-right: none !important;
        border-top: 2px solid transparent;
        text-align: center;
        min-width: 38px;
        max-width: 38px;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 54px;
    }

    /* Hide text on mobile, show only icons */
    .nav-link .nav-text {
        display: none !important;
    }

    .nav-link i {
        display: block;
        margin: 0 auto;
        font-size: 0.9rem;
    }

    .nav-link:hover, .nav-link.active {
        border-left: none !important;
        border-top-color: var(--accent);
    }

    .nav-link.logout, .nav-link.logout-link {
        margin-top: 0;
        margin-left: auto;
        border-top: none;
        color: var(--danger);
        flex-shrink: 0;
    }

    .main-content {
        margin-left: 0;
        margin-right: 0;
        padding: 0.75rem;
        padding-bottom: 5rem;
    }

    [dir="rtl"] .main-content {
        margin-right: 0;
    }

    [dir="rtl"] .sidebar {
        left: 0;
        right: 0;
        border-left: none;
    }

    [dir="rtl"] .nav-link {
        border-right: none;
        border-top: 3px solid transparent;
    }

    /* Page header stacks on mobile */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .page-header h1 {
        font-size: 1.2rem;
    }

    /* Stats grid: 2 columns, force fit */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.4rem !important;
        width: 100% !important;
    }

    .stat-card {
        padding: 0.5rem !important;
        min-width: 0 !important;
        overflow: hidden;
    }

    .stat-number { font-size: 1.1rem !important; }
    .stat-label { font-size: 0.65rem !important; }

    /* Content grid single column */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .content-card {
        padding: 0.75rem;
    }

    /* Tables */
    .data-table { font-size: 0.78rem; }
    .data-table th, .data-table td { padding: 0.35rem 0.5rem; }
    .data-table th { font-size: 0.75rem; }

    /* Filter buttons MUST wrap */
    .filter-buttons {
        gap: 0.2rem !important;
        flex-wrap: wrap !important;
        display: flex !important;
    }

    .filter-btn {
        font-size: 0.6rem !important;
        padding: 0.2rem !important;
        text-align: center;
    }

    .filter-group {
        padding: 0.3rem !important;
        gap: 0.2rem !important;
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        width: 100% !important;
    }

    /* Search bar full width */
    .search-bar {
        flex-direction: column !important;
    }

    .search-bar .form-input {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Forms single column */
    .form-row { grid-template-columns: 1fr; }

    /* QR form single column */
    .qr-form { grid-template-columns: 1fr; }

    .qr-result img {
        max-width: 200px;
    }

    .qr-actions {
        flex-direction: column;
        align-items: stretch;
    }

    /* Info grid single column on mobile */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    /* Sync info bar stacks */
    .sync-info-bar {
        flex-direction: column;
        gap: 0.4rem;
        text-align: center;
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }

    /* Pagination compact */
    .pagination {
        flex-wrap: wrap;
        gap: 0.3rem;
        justify-content: center;
    }

    .pagination .btn-accent,
    .pagination .btn-outline {
        min-width: 70px;
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }

    .pagination .page-info { font-size: 0.75rem; min-width: auto; }

    /* Avatars smaller */
    .player-avatar { width: 24px; height: 24px; font-size: 0.65rem; }
    .player-avatar-large { width: 50px; height: 50px; font-size: 1.2rem; }

    /* Badges smaller */
    .badge { font-size: 0.65rem; padding: 0.1rem 0.35rem; }

    /* Permissions single column */
    .permissions-grid { grid-template-columns: 1fr; }

    /* Login card tight */
    .login-card {
        padding: 1.2rem;
        margin: 0.5rem;
        max-width: 100%;
    }
    .login-title { font-size: 1.1rem; }
    .login-subtitle { font-size: 0.8rem; }
    .tab-btn { font-size: 0.8rem; padding: 0.4rem; }

    /* Device cards */
    .device-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.1rem;
    }

    /* User card */
    .user-card { padding: 0.6rem; }

    /* All buttons full width on mobile */
    .btn-accent, .btn-danger, .btn-outline, .btn-whatsapp {
        padding: 0.45rem 0.6rem;
        font-size: 0.78rem;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.4rem;
    }

    /* Form inputs full width */
    .form-input, .form-select {
        width: 100% !important;
        max-width: 100% !important;
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    /* Player card compact */
    .player-card { padding: 0.75rem; }
    .player-header h2 { font-size: 1.1rem; }
    .player-header h3 { font-size: 0.9rem; }

    /* QR result compact */
    .qr-result { padding: 0.75rem; }
    .qr-result img { max-width: 180px; }
    .qr-code-text { font-size: 0.9rem; }

    /* Content card compact */
    .content-card { padding: 0.6rem; margin-bottom: 0.6rem; }
    .content-card h3 { font-size: 0.9rem; margin-bottom: 0.5rem; }

    /* Table minimum width smaller for mobile */
    .table-responsive .data-table { min-width: 400px; }

    /* Filter group compact */
    .filter-group {
        padding: 0.3rem;
        gap: 0.2rem;
        border-radius: 6px;
        grid-template-columns: repeat(4, 1fr);
    }

    /* Tabs compact */
    .login-tabs { gap: 0; }

    /* Player name cell */
    .name-primary { font-size: 0.82rem; }
    .name-secondary { font-size: 0.7rem; }

    /* No data message */
    .no-data { padding: 1rem; font-size: 0.85rem; }

    /* Progress bar */
    .progress-bar-container { height: 6px; }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.3rem;
    }

    .stat-card { padding: 0.5rem; }
    .stat-number { font-size: 1.1rem; }
    .stat-label { font-size: 0.65rem; }

    .page-header h1 { font-size: 0.95rem; }

    .filter-btn { font-size: 0.62rem; padding: 0.15rem 0.35rem; }

    /* Hide less important table columns */
    .hide-mobile { display: none !important; }

    /* Very small screen adjustments */
    .main-content { padding: 0.5rem; padding-bottom: 4.5rem; }
    .table-responsive .data-table { min-width: 350px; }
    .data-table { font-size: 0.72rem; }
    .data-table th, .data-table td { padding: 0.25rem 0.35rem; }
}

@media (max-width: 360px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-card { padding: 0.4rem; }
    .stat-number { font-size: 1rem; }
    .nav-link { min-width: 40px; padding: 0.4rem; }
    .nav-link i { font-size: 0.9rem; }
}

/* ============================================ */
/* === Super Admin Theme (Purple Accent) === */
/* ============================================ */

.superadmin-container {
    --accent: #7E57C2;
    --accent-hover: #9575CD;
}

.superadmin-sidebar {
    background: #1A1A2E !important;
    border-right-color: rgba(126, 87, 194, 0.3) !important;
}

.superadmin-sidebar .sidebar-brand h3 {
    color: #7E57C2 !important;
}

.superadmin-sidebar .nav-link.sa-nav {
    border-left-color: transparent;
}

.superadmin-sidebar .nav-link.sa-nav:hover {
    color: var(--text-primary);
    background: rgba(126, 87, 194, 0.1);
    border-left-color: #7E57C2;
}

.superadmin-sidebar .nav-link.sa-nav.active {
    color: #7E57C2;
    background: rgba(126, 87, 194, 0.15);
    border-left-color: #7E57C2;
    font-weight: 600;
}

.superadmin-badge {
    background: rgba(126, 87, 194, 0.2);
    color: #7E57C2;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Super Admin form inputs focus with purple */
.superadmin-container .form-input:focus {
    border-color: #7E57C2;
    box-shadow: 0 0 0 2px rgba(126, 87, 194, 0.2);
}

/* Super Admin mobile adjustments */
@media (max-width: 768px) {
    .superadmin-sidebar {
        background: #1A1A2E !important;
    }

    .superadmin-sidebar .nav-link.sa-nav {
        border-left: none !important;
        border-top: 2px solid transparent;
    }

    .superadmin-sidebar .nav-link.sa-nav:hover,
    .superadmin-sidebar .nav-link.sa-nav.active {
        border-left: none !important;
        border-top-color: #7E57C2;
    }
}

/* ============================================ */
/* === Landing Page - Premium Redesign === */
/* ============================================ */

/* --- Base & Variables --- */
.landing-page {
    background: #060F10;
    color: #FFFFFF;
    font-family: 'Cairo', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* --- Animations --- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: slide-up 0.6s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }
.fade-in:nth-child(5) { animation-delay: 0.5s; }
.fade-in:nth-child(6) { animation-delay: 0.6s; }
.fade-in:nth-child(7) { animation-delay: 0.7s; }
.fade-in:nth-child(8) { animation-delay: 0.8s; }

.gradient-text {
    background: linear-gradient(135deg, #44A1A0, #2ED47A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Navigation --- */
.landing-nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(6, 15, 16, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(68, 161, 160, 0.15);
    transition: all 0.3s ease;
}

.landing-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 2rem;
}

.landing-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #44A1A0;
    text-decoration: none;
    transition: color 0.2s;
}

.landing-nav-brand i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #44A1A0, #2ED47A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-nav-brand:hover { color: #5BB8B7; }

.landing-nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.landing-nav-links a {
    color: #8BA5A7;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.landing-nav-links a:not(.landing-nav-login)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #44A1A0, #2ED47A);
    transition: width 0.3s ease;
}

.landing-nav-links a:not(.landing-nav-login):hover::after { width: 100%; }
.landing-nav-links a:hover { color: #FFFFFF; }

.landing-nav-login {
    background: linear-gradient(135deg, #44A1A0, #2d8a89);
    color: #FFFFFF !important;
    padding: 0.55rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(68, 161, 160, 0.3);
}

.landing-nav-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(68, 161, 160, 0.4);
}

.landing-nav-login::after { display: none !important; }

.landing-nav-login-mobile {
    display: none;
    color: #FFFFFF;
    background: linear-gradient(135deg, #44A1A0, #2d8a89);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* --- Hero Section --- */
.landing-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 7rem 2rem 4rem;
    overflow: hidden;
}

.hero-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    animation: pulse-glow 6s ease-in-out infinite;
}

.hero-glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(68, 161, 160, 0.2), transparent);
    top: -100px;
    right: -100px;
}

.hero-glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(46, 212, 122, 0.12), transparent);
    bottom: -100px;
    left: -100px;
    animation-delay: 3s;
}

.hero-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(68, 161, 160, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(68, 161, 160, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(68, 161, 160, 0.1);
    border: 1px solid rgba(68, 161, 160, 0.25);
    color: #44A1A0;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    animation: float 4s ease-in-out infinite;
}

.hero-badge i { color: #2ED47A; }

.hero-title {
    font-size: 3.8rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.2rem;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.35rem;
    color: #8BA5A7;
    margin-bottom: 0.5rem;
    font-weight: 400;
    line-height: 1.6;
}

.hero-subtitle-ar {
    font-size: 1.25rem;
    color: rgba(68, 161, 160, 0.7);
    margin-bottom: 2.5rem;
    direction: rtl;
    font-weight: 400;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

/* --- Shared Button Styles --- */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 2.2rem;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp.btn-full { width: 100%; }

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.9rem 2.2rem;
    background: transparent;
    color: #44A1A0;
    border: 2px solid rgba(68, 161, 160, 0.5);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: rgba(68, 161, 160, 0.1);
    border-color: #44A1A0;
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* --- Hero Stats --- */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem 2.5rem;
    background: rgba(10, 31, 34, 0.6);
    border: 1px solid rgba(68, 161, 160, 0.15);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.hero-stat { text-align: center; }

.hero-stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, #44A1A0, #2ED47A);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-stat-label {
    display: block;
    font-size: 0.8rem;
    color: #8BA5A7;
    font-weight: 500;
    margin-top: 0.15rem;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(68, 161, 160, 0.2);
}

/* --- Sections --- */
.landing-section {
    padding: 5rem 2rem;
    max-width: 1280px;
    margin: 0 auto;
}

.landing-section-alt {
    background: rgba(10, 31, 34, 0.4);
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.landing-section-alt > .section-header,
.landing-section-alt > .steps-container,
.landing-section-alt > .screenshots-grid {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #44A1A0;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
}

.section-tag i { font-size: 0.75rem; }

.section-header h2 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.section-desc {
    font-size: 1.05rem;
    color: #8BA5A7;
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- Features --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.feature-card {
    background: #0A1F22;
    border: 1px solid rgba(68, 161, 160, 0.1);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, transparent, rgba(68, 161, 160, 0.2), transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover::before { opacity: 1; }

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(68, 161, 160, 0.1);
    border-color: rgba(68, 161, 160, 0.25);
}

.feature-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(68, 161, 160, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    font-size: 1.5rem;
    color: var(--icon-color, #44A1A0);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon-wrap {
    background: rgba(68, 161, 160, 0.15);
    transform: scale(1.1);
}

.feature-card h3 {
    color: #FFFFFF;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.feature-card p {
    color: #8BA5A7;
    font-size: 0.88rem;
    line-height: 1.6;
}

/* --- How It Works / Steps --- */
.steps-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    position: relative;
    padding-top: 1rem;
}

.steps-line {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(68, 161, 160, 0.3), rgba(46, 212, 122, 0.3), transparent);
}

.step-card {
    flex: 1;
    text-align: center;
    padding: 0 2rem;
    position: relative;
    max-width: 320px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #44A1A0, #2ED47A);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 auto 1rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(68, 161, 160, 0.3);
}

.step-icon {
    font-size: 1.4rem;
    color: #44A1A0;
    margin-bottom: 0.8rem;
}

.step-card h3 {
    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-card p {
    color: #8BA5A7;
    font-size: 0.88rem;
    line-height: 1.6;
}

/* --- Pricing --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.pricing-card {
    background: #0A1F22;
    border: 1px solid rgba(68, 161, 160, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.pricing-featured {
    border-color: rgba(68, 161, 160, 0.4);
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(68, 161, 160, 0.15);
}

.pricing-featured:hover {
    transform: scale(1.05) translateY(-6px);
}

.pricing-badge {
    position: absolute;
    top: 16px;
    right: -32px;
    background: linear-gradient(135deg, #44A1A0, #2ED47A);
    color: #FFFFFF;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 2.5rem;
    transform: rotate(45deg);
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(68, 161, 160, 0.3);
}

.pricing-header {
    padding: 2rem 2rem 1.5rem;
    background: linear-gradient(180deg, rgba(68, 161, 160, 0.08), transparent);
    text-align: center;
}

.pricing-header h3 {
    color: #44A1A0;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pricing-price {
    font-size: 2.8rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.25rem;
}

.pricing-plus {
    font-size: 0.9rem;
    color: #8BA5A7;
    font-weight: 400;
}

.pricing-period {
    color: #8BA5A7;
    font-size: 0.85rem;
}

.pricing-features {
    list-style: none;
    padding: 0 2rem;
    margin: 0 0 1.5rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: #8BA5A7;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(68, 161, 160, 0.06);
}

.pricing-features li:last-child { border-bottom: none; }

.pricing-features li i {
    color: #2ED47A;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.pricing-btn {
    display: block;
    margin: 0 2rem 2rem;
    padding: 0.8rem 1.5rem;
    text-align: center;
    background: rgba(68, 161, 160, 0.1);
    color: #44A1A0;
    border: 1px solid rgba(68, 161, 160, 0.3);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pricing-btn:hover {
    background: rgba(68, 161, 160, 0.2);
    border-color: #44A1A0;
    transform: translateY(-1px);
}

.pricing-btn-featured {
    background: linear-gradient(135deg, #44A1A0, #2d8a89);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(68, 161, 160, 0.3);
}

.pricing-btn-featured:hover {
    box-shadow: 0 8px 30px rgba(68, 161, 160, 0.4);
    background: linear-gradient(135deg, #4fb3b2, #3a9d9c);
}

/* --- Screenshots --- */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.screenshot-card {
    transition: transform 0.4s ease;
}

.screenshot-card:hover { transform: translateY(-4px); }

.screenshot-mockup {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(68, 161, 160, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    background: #0A1F22;
}

.screenshot-toolbar {
    display: flex;
    gap: 6px;
    padding: 0.7rem 1rem;
    background: rgba(6, 15, 16, 0.8);
    border-bottom: 1px solid rgba(68, 161, 160, 0.1);
}

.ss-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(68, 161, 160, 0.3);
}

.ss-dot:first-child { background: #E57373; }
.ss-dot:nth-child(2) { background: #FFB74D; }
.ss-dot:nth-child(3) { background: #81C784; }

.screenshot-content {
    aspect-ratio: 16 / 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--ss-color-1, #44A1A0), var(--ss-color-2, #1A4A4D));
    opacity: 0.85;
    transition: opacity 0.3s;
}

.screenshot-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
    background: #0A1F22;
}

.screenshot-card:hover .screenshot-content { opacity: 1; }

.screenshot-content i {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.6);
}

.screenshot-content span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 600;
}

.screenshot-label {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-top: 0.75rem;
    line-height: 1.4;
}

/* --- Contact/Demo --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.contact-form-card,
.contact-info-card {
    background: #0A1F22;
    border: 1px solid rgba(68, 161, 160, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
}

.contact-form-card h3,
.contact-info-card h3 {
    color: #FFFFFF;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-form-card h3 i,
.contact-info-card h3 i {
    color: #44A1A0;
}

.contact-form-card > p {
    color: #8BA5A7;
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
}

.demo-form .form-group {
    position: relative;
    margin-bottom: 0.85rem;
}

.demo-form .form-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #44A1A0;
    font-size: 0.85rem;
    pointer-events: none;
}

.demo-form .form-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    background: rgba(6, 15, 16, 0.6);
    border: 1px solid rgba(68, 161, 160, 0.15);
    border-radius: 12px;
    color: #FFFFFF;
    font-family: 'Cairo', sans-serif;
    font-size: 0.92rem;
    transition: all 0.3s ease;
}

.demo-form .form-input:focus {
    outline: none;
    border-color: #44A1A0;
    box-shadow: 0 0 0 3px rgba(68, 161, 160, 0.1);
    background: rgba(6, 15, 16, 0.8);
}

.demo-form .form-input::placeholder {
    color: #5A7A7B;
}

.contact-info-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    padding: 1rem;
    background: rgba(6, 15, 16, 0.4);
    border: 1px solid rgba(68, 161, 160, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.contact-info-item:hover {
    border-color: rgba(68, 161, 160, 0.25);
    background: rgba(68, 161, 160, 0.05);
    transform: translateX(4px);
}

.contact-info-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-info-icon.whatsapp {
    background: rgba(37, 211, 102, 0.1);
    color: #25D366;
}

.contact-info-icon.phone {
    background: rgba(79, 195, 247, 0.1);
    color: #4FC3F7;
}

.contact-info-icon.email {
    background: rgba(206, 147, 216, 0.1);
    color: #CE93D8;
}

.contact-info-item strong {
    display: block;
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 600;
}

.contact-info-item span {
    display: block;
    color: #8BA5A7;
    font-size: 0.8rem;
}

/* --- Footer --- */
.landing-footer {
    background: #050C0D;
    border-top: 1px solid rgba(68, 161, 160, 0.1);
    padding: 0;
}

.landing-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    padding: 3.5rem 2rem 2rem;
}

.footer-col h4 {
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: 0.6rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #44A1A0, #2ED47A);
    border-radius: 1px;
}

.footer-col p {
    color: #8BA5A7;
    font-size: 0.88rem;
    line-height: 1.7;
    max-width: 320px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.6rem;
}

.footer-col ul li a {
    color: #8BA5A7;
    text-decoration: none;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.footer-col ul li a i {
    font-size: 0.55rem;
    color: #44A1A0;
    transition: transform 0.2s;
}

.footer-col ul li a:hover {
    color: #FFFFFF;
    transform: translateX(4px);
}

.footer-col ul li a:hover i { transform: translateX(2px); }

.landing-footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.landing-footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(68, 161, 160, 0.08);
    border: 1px solid rgba(68, 161, 160, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8BA5A7;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.landing-footer-social a:hover {
    background: rgba(68, 161, 160, 0.15);
    border-color: rgba(68, 161, 160, 0.3);
    color: #44A1A0;
    transform: translateY(-2px);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(68, 161, 160, 0.08);
    text-align: center;
}

.footer-bottom p {
    color: #5A7A7B;
    font-size: 0.82rem;
}

/* ============================================ */
/* === Landing Page - Responsive === */
/* ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: repeat(3, 1fr); }
    .pricing-featured { transform: scale(1.02); }
    .pricing-featured:hover { transform: scale(1.02) translateY(-6px); }
    .hero-title { font-size: 3rem; }
    .landing-footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .landing-nav-links { display: none; }
    .landing-nav-login-mobile { display: inline-flex; }
    .landing-nav-inner { padding: 0.75rem 1.25rem; }

    .landing-hero { min-height: 90vh; padding: 6rem 1.25rem 3rem; }
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1.05rem; }
    .hero-subtitle-ar { font-size: 1rem; }
    .hero-badge { font-size: 0.75rem; padding: 0.4rem 1rem; }
    .hero-stats { flex-direction: row; gap: 1.2rem; padding: 1rem 1.5rem; }
    .hero-stat-number { font-size: 1.4rem; }
    .hero-stat-label { font-size: 0.7rem; }
    .hero-stat-divider { width: 1px; height: 30px; }

    .landing-section { padding: 3.5rem 1.25rem; }
    .section-header h2 { font-size: 1.7rem; }
    .section-desc { font-size: 0.92rem; }

    .features-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
    .feature-card { padding: 1.5rem 1rem; }

    .steps-container { flex-direction: column; gap: 2rem; align-items: center; }
    .steps-line { display: none; }
    .step-card { max-width: 100%; padding: 0 1rem; }

    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .pricing-featured { transform: none; }
    .pricing-featured:hover { transform: translateY(-6px); }

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

    .contact-container { grid-template-columns: 1fr; }
    .contact-form-card, .contact-info-card { padding: 2rem 1.5rem; }

    .landing-footer-inner { grid-template-columns: 1fr; gap: 2rem; padding: 2.5rem 1.5rem 1.5rem; }
    .footer-col p { max-width: 100%; }
}

/* Phone */
@media (max-width: 480px) {
    .hero-title { font-size: 1.8rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .hero-subtitle-ar { font-size: 0.9rem; }
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .btn-whatsapp, .btn-outline { text-align: center; justify-content: center; font-size: 1rem; padding: 0.85rem 1.5rem; }
    .hero-stats { gap: 0.8rem; padding: 0.8rem 1rem; }
    .hero-stat-number { font-size: 1.2rem; }
    .hero-stat-label { font-size: 0.65rem; }

    .section-header h2 { font-size: 1.45rem; }
    .features-grid { grid-template-columns: 1fr; }
    .screenshots-grid { grid-template-columns: 1fr; }
    .landing-section { padding: 3rem 1rem; }

    .landing-nav-brand span { font-size: 1rem; }
    .landing-nav-brand i { font-size: 1.2rem; }
}

/* ==============================================
   DOCUMENTATION PAGE
   ============================================== */
.docs-page {
    min-height: 100vh;
    background: #081B1D;
    color: #e0e0e0;
    padding-top: 80px;
}

.docs-rtl {
    direction: rtl;
    text-align: right;
}

.docs-rtl .docs-sidebar {
    border-right: none;
    border-left: 1px solid rgba(68, 161, 160, 0.15);
}

.docs-lang-toggle {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1rem 0;
}

.docs-lang-btn {
    background: rgba(68, 161, 160, 0.1);
    border: 1px solid rgba(68, 161, 160, 0.2);
    color: #8fb8b8;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.docs-lang-btn:hover {
    background: rgba(68, 161, 160, 0.2);
}

.docs-lang-btn.active {
    background: #44A1A0;
    color: #fff;
    border-color: #44A1A0;
}

.docs-layout {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    gap: 2rem;
}

/* Sidebar */
.docs-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    align-self: flex-start;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding-right: 1.5rem;
    border-right: 1px solid rgba(68, 161, 160, 0.15);
}

.docs-sidebar-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #44A1A0;
    margin-bottom: 1rem;
}

.docs-toc {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-toc li {
    margin-bottom: 0.25rem;
}

.docs-toc a {
    display: block;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    color: #8fb8b8;
    text-decoration: none;
    font-size: 0.88rem;
    transition: all 0.2s;
}

.docs-toc a:hover {
    background: rgba(68, 161, 160, 0.1);
    color: #44A1A0;
}

.docs-sidebar-contact {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(68, 161, 160, 0.1);
}

.docs-help-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #25D366;
    color: #fff;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.docs-help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    color: #fff;
}

/* Main Content */
.docs-content {
    flex: 1;
    min-width: 0;
}

.docs-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.docs-subtitle {
    font-size: 1.05rem;
    color: #8fb8b8;
    margin-bottom: 2.5rem;
}

.docs-section {
    margin-bottom: 3rem;
    scroll-margin-top: 100px;
}

.docs-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(68, 161, 160, 0.2);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.docs-section h2 i {
    color: #44A1A0;
    font-size: 1.2rem;
}

.docs-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #c0e0df;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.docs-section p {
    line-height: 1.7;
    color: #b0c8c8;
    margin-bottom: 0.75rem;
}

.docs-list {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.docs-rtl .docs-list {
    padding-left: 0;
    padding-right: 1.5rem;
}

.docs-list li {
    margin-bottom: 0.4rem;
    color: #b0c8c8;
    line-height: 1.6;
}

.docs-steps {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.docs-rtl .docs-steps {
    padding-left: 0;
    padding-right: 1.5rem;
}

.docs-steps li {
    margin-bottom: 0.5rem;
    color: #b0c8c8;
    line-height: 1.6;
}

/* Tables */
.docs-table-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.docs-table th {
    background: rgba(68, 161, 160, 0.15);
    color: #44A1A0;
    padding: 0.6rem 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid rgba(68, 161, 160, 0.2);
}

.docs-rtl .docs-table th {
    text-align: right;
}

.docs-table td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(68, 161, 160, 0.08);
    color: #b0c8c8;
}

.docs-table tr:hover td {
    background: rgba(68, 161, 160, 0.05);
}

/* Badges */
.docs-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.docs-badge-green {
    background: rgba(46, 212, 122, 0.2);
    color: #2ED47A;
}

.docs-badge-red {
    background: rgba(229, 115, 115, 0.2);
    color: #E57373;
}

.docs-badge-blue {
    background: rgba(79, 195, 247, 0.2);
    color: #4FC3F7;
}

/* Code */
.docs-code {
    display: inline-block;
    background: rgba(68, 161, 160, 0.1);
    border: 1px solid rgba(68, 161, 160, 0.15);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    color: #44A1A0;
    margin-bottom: 0.5rem;
}

/* Warning box */
.docs-warning {
    background: rgba(255, 183, 77, 0.1);
    border: 1px solid rgba(255, 183, 77, 0.25);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    color: #FFB74D;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.docs-warning i {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

/* Troubleshooting items */
.docs-trouble-item {
    background: rgba(68, 161, 160, 0.05);
    border: 1px solid rgba(68, 161, 160, 0.1);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
}

.docs-trouble-item h3 {
    margin-top: 0;
    color: #fff;
}

/* Help section */
.docs-help-section {
    text-align: center;
    background: rgba(68, 161, 160, 0.05);
    border: 1px solid rgba(68, 161, 160, 0.12);
    border-radius: 16px;
    padding: 2.5rem;
}

.docs-help-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.25rem;
}

.docs-help-wa {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: #25D366;
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.docs-help-wa:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    color: #fff;
}

.docs-help-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: rgba(68, 161, 160, 0.15);
    color: #44A1A0;
    border: 1px solid rgba(68, 161, 160, 0.3);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.docs-help-email:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(68, 161, 160, 0.2);
    color: #44A1A0;
}

/* Docs responsive */
@media (max-width: 768px) {
    .docs-layout {
        flex-direction: column;
        padding: 1rem;
    }

    .docs-sidebar {
        position: static;
        width: 100%;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid rgba(68, 161, 160, 0.15);
        padding-right: 0;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .docs-rtl .docs-sidebar {
        border-left: none;
        border-bottom: 1px solid rgba(68, 161, 160, 0.15);
    }

    .docs-toc {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .docs-toc li {
        margin-bottom: 0;
    }

    .docs-toc a {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }

    .docs-title {
        font-size: 1.5rem;
    }

    .docs-help-buttons {
        flex-direction: column;
        align-items: center;
    }

    .docs-sidebar-contact {
        display: none;
    }
}

/* ==============================================
   LANGUAGE TOGGLE BUTTON
   ============================================== */
.lang-btn {
    background: rgba(68, 161, 160, 0.15);
    color: #44A1A0;
    border: 1px solid rgba(68, 161, 160, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: rgba(68, 161, 160, 0.25);
    color: #fff;
}

.lang-btn-mobile {
    display: none;
}

@media (max-width: 768px) {
    .lang-btn-mobile {
        display: inline-flex;
    }
}

/* ==============================================
   ADDITIONAL MOBILE RESPONSIVE FIXES
   ============================================== */
@media (max-width: 768px) {
    /* Super Admin pages */
    .superadmin-container .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .superadmin-container .data-table {
        font-size: 0.75rem;
    }

    /* Login form */
    .login-card {
        max-width: 100%;
        padding: 1.5rem;
    }
    .login-container {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    /* Super Admin pages */
    .superadmin-container .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ==============================================
   SYNC CONTROL UI — mobile behavior for
   Force-full-sync button + recent-errors alert
   ============================================== */
@media (max-width: 768px) {
    /* Stack the two buttons in sync-info-bar (Force Full Sync + Refresh) */
    .sync-info-bar > div[style*="display:flex"] {
        width: 100%;
        flex-wrap: wrap;
    }
    .sync-info-bar .filter-btn {
        flex: 1;
        min-width: 140px;
        min-height: 44px; /* touch target */
    }

    /* Error alert: breathing room + touch-friendly action button */
    .sync-error-alert {
        padding: 10px 12px !important;
        font-size: 0.9rem;
    }
    .sync-error-alert .filter-btn {
        min-height: 40px;
        padding: 6px 12px;
    }
    /* Stack header row on very narrow screens */
    .sync-error-alert > div:first-child {
        flex-direction: column;
        align-items: stretch !important;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    /* Larger touch targets on phone screens */
    .sync-info-bar .filter-btn,
    .page-header .filter-btn,
    .content-card .filter-btn {
        min-height: 44px;
        padding: 8px 14px;
        font-size: 0.9rem;
    }
    /* Error details code block: prevent horizontal scroll-lock on phones */
    .sync-error-alert div[style*="font-family:monospace"] {
        font-size: 11px;
        max-height: 150px;
    }
}
