
/* ==========================================
   DAILY FARE SYSTEM
   BALANCED GLASS DESIGN
   Bootstrap 5 RTL
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

/* ==========================================
   ROOT VARIABLES
   ========================================== */

:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #38bdf8;

    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.78);

    --glass-bg: rgba(12, 20, 42, 0.28);
    --glass-hover: rgba(12, 20, 42, 0.36);
    --glass-border: rgba(255, 255, 255, 0.28);
    --glass-blur: 7px;

    --radius-lg: 22px;
    --radius-md: 14px;
    --transition: 0.25s ease;
}

/* ==========================================
   GLOBAL
   ========================================== */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    background: #10182b;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: 'Cairo', sans-serif;
    color: var(--text-main);
    background: transparent;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

body,
button,
input,
select,
textarea {
    font-family: 'Cairo', sans-serif;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

button,
input,
select,
textarea {
    transition: var(--transition);
}

button {
    cursor: pointer;
}

::selection {
    background: rgba(99, 102, 241, 0.5);
    color: white;
}

/* ==========================================
   BACKGROUND IMAGE
   10% DARK OVERLAY
   ========================================== */

.backdrop {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 0;

    background-image:
        linear-gradient(
            rgba(5, 10, 25, 0.10),
            rgba(5, 10, 25, 0.10)
        ),
        url('../images/background.jpg');

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #10182b;

    opacity: 1;
    filter: none;
    pointer-events: none;
}

/* ==========================================
   MAIN CONTAINER
   ========================================== */

.container {
    position: relative;
    z-index: 1;
}

.container.py-4 {
    padding-bottom: 50px !important;
}

/* ==========================================
   GLASS EFFECT
   MEDIUM DARKNESS
   ========================================== */

.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);

    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.16);

    transition:
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

.glass:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.38);

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.20);
}

/* ==========================================
   NAVBAR
   ========================================== */

.navbar {
    min-height: 72px;
    padding: 15px 20px !important;
    border-radius: 18px !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: 900;
    color: white !important;
    white-space: nowrap;
}

.navbar-brand:hover {
    color: #dfe1ff !important;
}

.navbar .btn {
    white-space: nowrap;
}

.navbar .text-white-50 {
    color: rgba(255, 255, 255, 0.82) !important;
}

/* ==========================================
   HEADINGS
   ========================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 800;
    color: white;
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.2rem;
}

p {
    line-height: 1.9;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.78) !important;
}

.glass h1,
.glass h2,
.glass h3,
.glass h4,
.glass h5,
.glass p,
.glass label {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.30);
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    border-radius: 12px;
    font-weight: 700;
    padding: 10px 18px;

    transition:
        transform var(--transition),
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:focus-visible {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.35);
}

.btn-sm {
    padding: 7px 12px;
    font-size: 0.82rem;
}

.btn-lg {
    padding: 13px 24px;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border-color: #6366f1;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5558e8, #4338ca);
    border-color: #5558e8;
    color: white;
    box-shadow: 0 7px 22px rgba(99, 102, 241, 0.35);
}

.btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: #22c55e;
    color: white;
}

.btn-success:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: white;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.90);
    border-color: rgba(239, 68, 68, 0.9);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.btn-outline-light {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.50);
    color: white;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.20);
    border-color: rgba(255, 255, 255, 0.75);
    color: white;
}

.btn-outline-info {
    border-color: rgba(56, 189, 248, 0.7);
    color: #7dd3fc;
}

.btn-outline-info:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: white;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ==========================================
   AUTHENTICATION PAGES
   ========================================== */

.auth-wrapper {
    min-height: calc(100vh - 170px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    padding: 35px;
    margin: 0 auto;
    border-radius: 24px;
}

.auth-card:hover {
    background: rgba(12, 20, 42, 0.36);
}

.auth-icon {
    width: 76px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.1rem;
    border-radius: 22px;

    background: rgba(99, 102, 241, 0.20);
    border: 1px solid rgba(255, 255, 255, 0.22);

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* ==========================================
   FORMS
   ========================================== */

.form-page {
    width: 100%;
    max-width: 650px;
    margin: 30px auto;
}

.form-label {
    color: white;
    font-weight: 700;
    margin-bottom: 9px;
}

.form-control,
.form-select {
    min-height: 49px;
    background: rgba(8, 15, 35, 0.42);
    color: white;

    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 12px;

    padding: 11px 15px;
    font-weight: 600;
    color-scheme: dark;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.form-control:focus,
.form-select:focus {
    background: rgba(8, 15, 35, 0.55);
    color: white;
    border-color: #818cf8;
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

.form-control:disabled,
.form-select:disabled {
    background: rgba(8, 15, 35, 0.30);
    opacity: 0.65;
}

.input-group-text {
    background: rgba(99, 102, 241, 0.22);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.30);
    border-radius: 12px;
    font-weight: 800;
}

.input-group > .form-control {
    border-radius: 0 12px 12px 0;
}

.input-group > .input-group-text {
    border-radius: 12px 0 0 12px;
}

input[type="date"] {
    color-scheme: dark;
}

input[type="number"] {
    direction: ltr;
    text-align: right;
}

textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

/* ==========================================
   FORM RADIO OPTIONS
   ========================================== */

.btn-check + .btn {
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(8, 15, 35, 0.25);
    color: white;
    border-radius: 14px;
    min-height: 65px;
}

.btn-check:checked + .btn {
    background: rgba(99, 102, 241, 0.45);
    border-color: #a5b4fc;
    color: white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn-check:focus-visible + .btn {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.35);
}

/* ==========================================
   STATISTICS CARDS
   ========================================== */

.stat-card {
    height: 100%;
    min-height: 170px;
    padding: 25px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    border-radius: 20px;
}

.stat-card:hover {
    background: rgba(12, 20, 42, 0.36);
    transform: translateY(-3px);
}

.stat-icon {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.7rem;

    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);

    border-radius: 15px;
    margin-bottom: 15px;
}

.stat-card p {
    margin-bottom: 8px;
    font-size: 0.93rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
}

.stat-card h2 {
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: 900;
    margin-bottom: 0;
    overflow-wrap: anywhere;
}

.stat-card h2 small {
    font-size: 0.55em;
    font-weight: 700;
}

/* ==========================================
   TABLES
   ========================================== */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 14px;

    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.table {
    width: 100%;
    margin-bottom: 0;

    border-collapse: separate;
    border-spacing: 0;

    --bs-table-bg: transparent;
    --bs-table-color: #ffffff;
    --bs-table-border-color: rgba(255, 255, 255, 0.14);
    --bs-table-striped-bg: transparent;
    --bs-table-hover-bg: rgba(99, 102, 241, 0.12);
    --bs-table-hover-color: #ffffff;

    color: white;
}

.table th,
.table td {
    padding: 15px 13px;
    vertical-align: middle;

    border-bottom: 1px solid rgba(255, 255, 255, 0.14);

    background: transparent;
    color: white;
    white-space: nowrap;
}

.table thead th {
    background: rgba(99, 102, 241, 0.15);
    font-weight: 800;
    font-size: 0.88rem;
    color: white;

    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.table thead th:first-child {
    border-top-right-radius: 12px;
}

.table thead th:last-child {
    border-top-left-radius: 12px;
}

.table tbody tr {
    transition: background var(--transition);
}

.table tbody tr:hover td {
    background: rgba(99, 102, 241, 0.12);
    color: white;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table .btn {
    white-space: nowrap;
}

.table .text-success {
    color: #4ade80 !important;
}

/* ==========================================
   CHECKBOXES
   ========================================== */

.form-check-input {
    width: 19px;
    height: 19px;
    cursor: pointer;

    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    border-color: #a5b4fc;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.20);
}

/* ==========================================
   PAYMENT FOOTER
   ========================================== */

.payment-footer {
    margin-top: 25px;
    padding: 22px;

    border-radius: 16px;

    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);

    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.payment-footer h3 {
    font-size: 1.7rem;
    font-weight: 900;
}

/* ==========================================
   INFO BOX
   ========================================== */

.info-box {
    background: rgba(56, 189, 248, 0.11);
    border: 1px solid rgba(56, 189, 248, 0.25);

    border-radius: 15px;
    padding: 18px;

    color: white;
    line-height: 1.9;
}

.info-box hr {
    border-color: rgba(255, 255, 255, 0.22);
}

.info-box strong {
    color: white;
}

/* ==========================================
   EMPTY STATE
   ========================================== */

.empty-state {
    padding: 45px 20px;
    text-align: center;
    border-radius: 18px;

    background: rgba(8, 15, 35, 0.12);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 18px;
}

.empty-state h4 {
    margin-bottom: 10px;
}

.empty-state p {
    max-width: 420px;
    margin: 0 auto 20px;
}

/* ==========================================
   ALERTS
   ========================================== */

.alert {
    border-radius: 14px;
    padding: 15px 20px;
    font-weight: 700;
    border-width: 1px;

    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.alert-info {
    background: rgba(56, 189, 248, 0.22);
    border-color: rgba(56, 189, 248, 0.45);
    color: white;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(239, 68, 68, 0.50);
    color: white;
}

.alert-success {
    background: rgba(34, 197, 94, 0.22);
    border-color: rgba(34, 197, 94, 0.50);
    color: white;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.22);
    border-color: rgba(245, 158, 11, 0.50);
    color: white;
}

/* ==========================================
   DIVIDERS
   ========================================== */

hr {
    border-color: rgba(255, 255, 255, 0.22);
    opacity: 1;
}

/* ==========================================
   SCROLLBAR
   ========================================== */

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: rgba(8, 15, 35, 0.20);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.28);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.45);
}

/* ==========================================
   LINKS
   ========================================== */

.glass a:not(.btn):not(.navbar-brand) {
    color: #c7d2fe;
}

.glass a:not(.btn):not(.navbar-brand):hover {
    color: white;
}

/* ==========================================
   SMALL SCREENS
   ========================================== */

@media (max-width: 768px) {

    .container.py-4 {
        padding-top: 15px !important;
        padding-bottom: 30px !important;
    }

    .navbar {
        padding: 14px !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .navbar-brand {
        width: 100%;
        text-align: center;
        font-size: 1.15rem;
    }

    .navbar .ms-auto {
        margin: 0 auto !important;
        justify-content: center;
        width: 100%;
        gap: 7px !important;
    }

    .navbar .btn {
        font-size: 0.75rem;
        padding: 7px 10px;
    }

    .auth-wrapper {
        min-height: auto;
        padding: 15px 0;
    }

    .auth-card {
        padding: 25px 20px;
    }

    .form-page {
        margin: 15px auto;
    }

    .form-page > .glass {
        padding: 25px 18px !important;
    }

    .stat-card {
        min-height: 145px;
        padding: 20px;
    }

    .stat-card h2 {
        font-size: 1.8rem;
    }

    .glass.p-4 {
        padding: 20px !important;
    }

    .table th,
    .table td {
        padding: 12px 10px;
        font-size: 0.83rem;
    }

    .payment-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 20px 15px;
    }

    .payment-footer .btn {
        width: 100%;
    }

    .backdrop {
        background-position: center center;
    }
}

/* ==========================================
   EXTRA SMALL SCREENS
   ========================================== */

@media (max-width: 480px) {

    body {
        font-size: 0.92rem;
    }

    .glass {
        border-radius: 17px;
    }

    .navbar {
        border-radius: 16px !important;
    }

    .navbar .text-white-50 {
        width: 100%;
        text-align: center;
    }

    .stat-card {
        min-height: 130px;
    }

    .stat-card h2 {
        font-size: 1.6rem;
    }

    .auth-icon {
        width: 65px;
        height: 65px;
        font-size: 1.8rem;
    }

    .btn {
        font-size: 0.85rem;
    }

    .btn-sm {
        font-size: 0.73rem;
        padding: 7px 9px;
    }

    .table .btn {
        font-size: 0.73rem;
    }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
