:root {
    --bg-main: #f4f6f9;
    --bg-sidebar: #1a1b26;
    --sidebar-text: #a9b1d6;
    --sidebar-text-active: #ffc107;
    --sidebar-active-bg: #2f334d;
    --card-bg: #ffffff;
    --text-dark: #202124;
    --text-muted: #5f6368;

    --color-primary: #007bff;
    --color-success: #28a745;
    --color-info: #17a2b8;
    --color-warning: #ffc107;
    --color-danger: #dc3545;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
}

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

/* Global input outline reset */
input, select, textarea, button {
    outline: none !important;
    font-family: 'Tajawal', sans-serif;
}

input:focus, select:focus, textarea:focus {
    outline: none !important;
}

.app-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Custom Country Dropdown with Flags */
.custom-dropdown {
    position: relative;
    min-width: 200px;
    user-select: none;
}

.custom-dropdown-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.custom-dropdown-selected:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.custom-dropdown.open .custom-dropdown-selected {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    background: #fff;
}

.custom-dropdown-selected img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.custom-dropdown-selected .dd-arrow {
    margin-right: auto;
    font-size: 0.7rem;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.custom-dropdown.open .dd-arrow {
    transform: rotate(180deg);
}

.custom-dropdown-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
    display: none;
    animation: ddSlideIn 0.2s ease;
}

.custom-dropdown.open .custom-dropdown-list {
    display: block;
}

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

.custom-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-dark);
}

.custom-dropdown-item:first-child {
    border-radius: 10px 10px 0 0;
}

.custom-dropdown-item:last-child {
    border-radius: 0 0 10px 10px;
}

.custom-dropdown-item:hover {
    background: #f1f5f9;
}

.custom-dropdown-item.active {
    background: rgba(0, 123, 255, 0.08);
    color: var(--color-primary);
    font-weight: 700;
}

.custom-dropdown-item img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e2e8f0;
}

.custom-dropdown-list::-webkit-scrollbar {
    width: 5px;
}

.custom-dropdown-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Typography Utility */
.text-yellow {
    color: #f1c40f;
}

.text-red {
    color: #e74c3c;
}

.text-blue {
    color: #3498db;
}

.text-grey {
    color: #95a5a6;
}

.text-dark {
    color: #34495e;
}

.text-green {
    color: #2ecc71;
}

.icon-yellow {
    color: #f1c40f;
    font-size: 1.5rem;
}

.icon-cyan {
    color: #00bcd4;
    font-size: 1.5rem;
}

.icon-green {
    color: #4caf50;
    font-size: 1.5rem;
}

.icon-blue {
    color: #2196f3;
    font-size: 1.5rem;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: var(--transition);
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-header .logo {
    max-width: 120px;
    margin-bottom: 10px;
}

.sidebar-header .logo-text {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}

.sidebar-menu {
    padding: 20px 0;
    overflow-y: auto;
}

.menu-category {
    padding: 10px 25px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #565f89;
    font-weight: 700;
    margin-top: 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

.menu-item:hover,
.menu-item.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-text-active);
    border-right: 4px solid var(--color-warning);
}

.menu-item i:first-child {
    width: 24px;
    font-size: 1.1rem;
    margin-left: 10px;
    text-align: center;
}

.menu-item span {
    flex-grow: 1;
    font-weight: 500;
}

.submenu-icon {
    font-size: 0.8rem;
    transition: var(--transition);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: var(--transition);
}

/* Topbar */
.topbar {
    height: 70px;
    background-color: var(--card-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    box-shadow: var(--shadow-sm);
}

.topbar-right,
.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
}

.gold-indicator {
    background-color: #f8f9fa;
    padding: 8px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.gold-price {
    color: var(--text-dark);
}

.gold-label {
    color: #d4af37;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-success);
    box-shadow: 0 0 5px var(--color-success);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    font-weight: 700;
    font-size: 0.95rem;
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #6366f1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Dashboard Container */
.dashboard-container {
    padding: 30px;
    flex-grow: 1;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--text-dark);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.stat-card-body {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card-footer {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Bottom lines for stat cards */
.bottom-line-cyan::after,
.bottom-line-green::after,
.bottom-line-blue::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 4px;
    border-radius: 4px;
}

.bottom-line-cyan::after {
    background-color: #00bcd4;
}

.bottom-line-green::after {
    background-color: #4caf50;
}

.bottom-line-blue::after {
    background-color: #2196f3;
}

/* Main Sections Grid */
.main-sections-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.section-container {
    background: transparent;
}

.section-container.systems-status {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.mt-4 {
    margin-top: 25px;
}

.section-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.section-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.action-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 24px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background-color: #f8faff;
}

.action-card i {
    font-size: 2rem;
}

.action-card span {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* System Info Card (Dark) */
.system-info-card {
    background-color: #222222;
    border-radius: var(--border-radius-lg);
    padding: 30px 25px;
    color: white;
    box-shadow: var(--shadow-md);
}

.system-info-card h2 {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #e0e0e0;
}

.info-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 25px;
    text-align: right;
}

.info-label {
    font-size: 0.75rem;
    color: #a0a0a0;
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 700;
}

.date-time-item {
    margin-top: 40px;
}

.highlight-time {
    font-size: 1.6rem;
    color: #ffffff;
    letter-spacing: 1px;
}

/* Responsive Layout */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .main-sections-grid {
        grid-template-columns: 1fr;
    }

    .system-info-card {
        order: -1;
    }
}

@media (max-width: 768px) {

    /* Container adjustments */
    .dashboard-container {
        padding: 15px;
    }

    .topbar {
        padding: 0 15px;
    }

    .page-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    /* Sidebar Mobile RTL */
    .sidebar {
        position: fixed;
        right: -260px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .sidebar.show {
        right: 0;
    }

    /* Grids */
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 15px;
    }

    .action-card {
        padding: 15px 10px;
    }

    .action-card i {
        font-size: 1.5rem;
    }

    .action-card span {
        font-size: 0.85rem;
    }

    /* System Info */
    .system-info-card {
        padding: 20px 15px;
    }

    .highlight-time {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .topbar-right .user-name {
        display: none;
    }

    .gold-indicator {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

/* Table Styles */
.premium-table-container {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-top: 20px;
    overflow-x: auto;
}

.table-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 11px 22px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0069d9 0%, #004494 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}

.search-box {
    padding: 11px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    width: 250px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9rem;
    background: #f8fafc;
}

.search-box:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.search-box:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1), 0 2px 8px rgba(0, 123, 255, 0.08);
    background: #fff;
}

.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 600px;
}

.premium-table th,
.premium-table td {
    padding: 14px 16px;
    text-align: right;
    border-bottom: 1px solid #f0f2f5;
}

.premium-table th {
    background: linear-gradient(135deg, #f8f9fb 0%, #f1f3f6 100%);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.premium-table th:first-child {
    border-radius: 0 10px 0 0;
}

.premium-table th:last-child {
    border-radius: 10px 0 0 0;
}

.premium-table tbody tr {
    transition: all 0.2s ease;
}

.premium-table tbody tr:hover {
    background-color: #f8faff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.status-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-active {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--color-success);
}

.status-inactive {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--color-danger);
}

.action-btns {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.btn-edit {
    color: var(--color-primary);
    background: rgba(0, 123, 255, 0.08);
}

.btn-edit:hover {
    color: #fff;
    background: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 123, 255, 0.3);
}

.btn-delete {
    color: var(--color-danger);
    background: rgba(220, 53, 69, 0.08);
}

.btn-delete:hover {
    color: #fff;
    background: var(--color-danger);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(220, 53, 69, 0.3);
}

/* Login Page Styles */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-sidebar);
    /* Dark premium background */
    margin: 0;
    padding: 0;
}

.login-card {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 400px;
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.login-logo {
    width: 100px;
    margin-bottom: 20px;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--text-dark);
}

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

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

.form-control {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: 'Tajawal', sans-serif;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
    color: var(--text-dark);
}

.form-control:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.form-control:focus {
    border-color: var(--color-warning);
    box-shadow: 0 0 0 4px rgba(255, 193, 7, 0.15), 0 2px 8px rgba(255, 193, 7, 0.1);
    background: #fff;
}

.form-control::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

/* Textarea */
textarea.form-control {
    resize: vertical;
    min-height: 80px;
    line-height: 1.6;
}

/* Select */
select.form-control {
    appearance: none;
    -webkit-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 fill='%235f6368' d='M6 8.825L.6 3.4l.85-.85L6 7.125 10.55 2.55l.85.85z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 36px;
    cursor: pointer;
}

/* Modern Checkbox / Toggle */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 44px !important;
    height: 24px !important;
    background: #cbd5e1;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    flex-shrink: 0;
}

input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #28a745, #20c997);
}

input[type="checkbox"]:checked::after {
    right: calc(100% - 21px);
}

input[type="checkbox"]:hover {
    box-shadow: 0 0 0 3px rgba(203, 213, 225, 0.4);
}

input[type="checkbox"]:checked:hover {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

/* Radio Buttons */
input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    flex-shrink: 0;
}

input[type="radio"]:checked {
    border-color: var(--color-primary);
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--color-primary);
    border-radius: 50%;
}

/* Number Input - Hide spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.btn-login {
    width: 100%;
    background-color: var(--color-warning);
    color: #000;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-login:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
}

.login-alert {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: none;
    font-size: 0.9rem;
}

.alert-error {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--color-danger);
    border: 1px solid var(--color-danger);
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

/* Modern Premium Login Enhancements */
.login-page {
    background: linear-gradient(135deg, #111116 0%, #1a1b26 100%);
    position: relative;
    overflow: hidden;
}

/* Subtle Animated Background Elements */
.login-page::before,
.login-page::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0) 70%);
    filter: blur(40px);
    z-index: 0;
    animation: float 10s infinite ease-in-out alternate;
}

.login-page::before {
    top: -100px;
    left: -100px;
}

.login-page::after {
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, 30px) scale(1.1);
    }
}

.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 1000px;
    background: rgba(30, 32, 48, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    z-index: 1;
    overflow: hidden;
    margin: 20px;
}

/* Redesigning Login Card to fit the Wrapper */
.login-card {
    background: transparent;
    width: 100%;
    max-width: 500px;
    border-radius: 0;
    padding: 50px;
    box-shadow: none;
    text-align: right;
    /* Default RTL */
    flex: 1;
}

.login-illustration {
    flex: 1;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(0, 0, 0, 0) 100%), url('https://images.unsplash.com/photo-1610375461246-83df859d849d?q=80&w=1000&auto=format&fit=crop') center/cover;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    border-right: 1px solid rgba(255, 215, 0, 0.1);
}

.login-illustration::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #1e2030, transparent);
    /* Blend with card depending on RTL/LTR */
}

/* Flip gradient based on direction */
[dir="rtl"] .login-illustration::before {
    background: linear-gradient(to right, transparent, rgba(30, 32, 48, 0.95));
}

[dir="ltr"] .login-illustration::before {
    background: linear-gradient(to left, transparent, rgba(30, 32, 48, 0.95));
}

.illustration-text {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
}

.illustration-text h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--color-warning);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.illustration-text p {
    font-size: 1.1rem;
    color: #ddd;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
    line-height: 1.6;
}

/* Enhanced Form Inputs */
.login-card .form-control {
    background: rgba(20, 21, 31, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 15px 20px;
    border-radius: 12px;
}

.login-card .form-control:focus {
    background: rgba(20, 21, 31, 0.8);
    border-color: var(--color-warning);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.15);
}

.login-card .form-group label {
    color: #a9b1d6;
}

.btn-login {
    background: linear-gradient(135deg, #FFD700 0%, #FDB931 100%);
    color: #111;
    font-size: 1.2rem;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.2);
    letter-spacing: 0.5px;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(255, 215, 0, 0.3);
}

@media (max-width: 768px) {
    .login-illustration {
        display: none;
    }

    .login-wrapper {
        max-width: 450px;
    }

    .login-card {
        padding: 40px 30px;
    }
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    margin: auto;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlide 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.04);
}

@keyframes modalSlide {
    from {
        transform: translateY(-20px) scale(0.97);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 15px;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.close-btn {
    color: var(--text-muted);
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.close-btn:hover {
    color: var(--color-danger);
    background: rgba(220, 53, 69, 0.08);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f2f5;
}

/* ==================== Premium Tabs ==================== */
.premium-tabs {
    display: inline-flex;
    background: #f0f2f5;
    border-radius: 14px;
    padding: 5px;
    position: relative;
    gap: 4px;
    margin-bottom: 22px;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.06);
}

.premium-tab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    border-radius: 11px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    white-space: nowrap;
    user-select: none;
}

.premium-tab:hover:not(.active) {
    color: var(--text-dark);
    background: rgba(0,0,0,0.04);
}

.premium-tab .tab-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.35s ease;
    flex-shrink: 0;
}

.premium-tab .tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.06);
    color: var(--text-muted);
}

/* Gold Tab Active */
.premium-tab.active.tab-gold {
    background: linear-gradient(135deg, #fff9e6, #fff4cc);
    color: #8B6914;
    box-shadow: 0 4px 16px rgba(218, 165, 32, 0.2),
                0 1px 3px rgba(0,0,0,0.06);
}

.premium-tab.active.tab-gold .tab-icon {
    background: linear-gradient(135deg, #daa520, #c49000);
    color: #fff;
    box-shadow: 0 3px 10px rgba(218, 165, 32, 0.35);
}

.premium-tab.active.tab-gold .tab-count {
    background: rgba(218, 165, 32, 0.15);
    color: #8B6914;
}

/* Silver Tab Active */
.premium-tab.active.tab-silver {
    background: linear-gradient(135deg, #f0f4f8, #e2e8f0);
    color: #475569;
    box-shadow: 0 4px 16px rgba(100, 116, 139, 0.18),
                0 1px 3px rgba(0,0,0,0.06);
}

.premium-tab.active.tab-silver .tab-icon {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #fff;
    box-shadow: 0 3px 10px rgba(100, 116, 139, 0.3);
}

.premium-tab.active.tab-silver .tab-count {
    background: rgba(100, 116, 139, 0.15);
    color: #475569;
}

/* Inactive tab icon styles */
.premium-tab:not(.active) .tab-icon {
    background: rgba(0,0,0,0.05);
    color: var(--text-muted);
}

/* Ripple / click effect */
.premium-tab:active {
    transform: scale(0.97);
}

/* Responsive */
@media (max-width: 600px) {
    .premium-tabs {
        width: 100%;
    }
    .premium-tab {
        flex: 1;
        justify-content: center;
        padding: 10px 14px;
        font-size: 0.85rem;
    }
}