@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

/* ============================================================
   RAKSHA TRANSPORT — UNIFIED COLOR THEME
   Dark Navbar (#2c3e50) · Orange Accent (#e67e22) · Light Body
   ============================================================ */

:root {
    /* Brand Colors */
    --primary-color:   #1e3c72;        /* deep navy (sidebar, table headers) */
    --secondary-color: #e67e22;        /* orange accent */
    --accent-color:    #0072e5;        /* electric blue (primary buttons) */

    /* HSL vars (used by existing page code via hsl(var(--primary)) etc.) */
    --primary:    210 100% 40%;        /* #0072e5 – blue */
    --secondary:  30  82%  50%;        /* #e67e22 – orange */
    --accent:     210 100% 45%;

    --background: 210 14% 97%;         /* #f5f7fa */
    --foreground: 210 29% 24%;         /* #2c3e50 */

    --success:    145 63% 42%;         /* #2ecc71 */
    --danger:     6   78% 57%;         /* #e74c3c */
    --warning:    37  90% 51%;         /* #f39c12 */
    --info:       207 90% 54%;         /* #3498db */

    --success-foreground: 0 0% 100%;

    --card:       0 0% 100%;           /* white */
    --card-foreground: 210 29% 24%;

    --border:     214 20% 88%;
    --input:      214 20% 88%;
    --muted:      215 16% 47%;

    --radius: 0.75rem;

    /* Glass vars (kept for backward compat; now light-themed) */
    --glass-bg:     rgba(255, 255, 255, 0.92);
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-blur:   12px;

    /* Shadows */
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.07);
    --shadow-md:  0 5px 18px rgba(0,0,0,0.10);
    --shadow-lg:  0 10px 30px rgba(0,0,0,0.13);

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Body ── */
body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: 'Inter', 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: hsl(var(--foreground));
    margin-bottom: 0.5rem;
}

/* Light-theme text overrides (so pages using text-white still match) */
.text-white    { color: hsl(var(--foreground)) !important; }
.text-white-50 { color: hsl(var(--muted))      !important; }

/* ── Utility helpers ── */
.uppercase        { text-transform: uppercase; }
.tracking-widest  { letter-spacing: 0.1em; }

/* ── Hero gradient (subtle page bg accent) ── */
.hero-gradient {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(0,114,229,0.06), transparent 55%),
        radial-gradient(ellipse at 80% 90%, rgba(230,126,34,0.05), transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ============================================================
   GLASS / CARD COMPONENTS
   ============================================================ */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.glass-card {
    background: #ffffff;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 114, 229, 0.25);
}

.glass-success {
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.25);
    border-radius: var(--radius);
}

.glass-danger {
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: var(--radius);
}

/* ============================================================
   NAVBAR — dark full-width sticky (matches screenshot)
   ============================================================ */
.nav-premium {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050;
    background: #2c3e50 !important;
    border: none !important;
    border-radius: 0 !important;
    border-bottom: 2px solid var(--secondary-color) !important;
    padding: 0.65rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    transform: none;
}

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

/* Brand text: orange */
.nav-premium .brand-text,
.nav-premium span.h4,
.nav-premium .h4 {
    color: var(--secondary-color) !important;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
}

.nav-link-premium {
    color: rgba(255,255,255,0.85) !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link-premium:hover,
.nav-link-premium.active {
    color: var(--secondary-color) !important;
    background: rgba(255,255,255,0.10);
}

/* Icon in nav brand box */
.nav-premium .glass-icon {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 0.4rem 0.6rem;
    margin-right: 0.5rem;
}

/* Responsive nav */
@media (max-width: 768px) {
    .nav-premium { padding: 0.6rem 1rem; }
    .nav-links   { display: none; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-premium {
    background: linear-gradient(135deg, var(--accent-color), #1565c0);
    color: #ffffff !important;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0,114,229,0.30);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(0,114,229,0.40);
    color: #ffffff !important;
}

.btn-secondary-premium {
    background: #ffffff;
    border: 1.5px solid hsl(var(--border));
    color: hsl(var(--foreground)) !important;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.btn-secondary-premium:hover {
    background: hsl(var(--background));
    border-color: var(--accent-color);
    color: var(--accent-color) !important;
    transform: translateY(-2px);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-input-premium {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid hsl(var(--border));
    padding: 0.7rem 1rem;
    border-radius: var(--radius);
    color: hsl(var(--foreground));
    outline: none;
    transition: var(--transition);
    cursor: text;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

select.form-input-premium {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23334155'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 2.8rem;
    -webkit-appearance: none;
    -moz-appearance:    none;
    appearance: none;
    cursor: pointer;
}

.form-input-premium option { background: #fff; color: #1e293b; }

.form-input-premium:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 114, 229, 0.12);
}

.form-label { color: hsl(var(--muted)); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ============================================================
   STATS
   ============================================================ */
.stat-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.stat-item-premium { padding: 1.5rem; text-align: center; }

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 0.4rem;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.animate-fade-up { animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

/* ============================================================
   ADMIN SIDEBAR — light bordered panel
   ============================================================ */
.admin-sidebar-premium {
    position: fixed;
    top: 0; left: 0;
    width: 260px;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    padding: 0;
    border-radius: 0;
    border-right: 1px solid hsl(var(--border));
    background: #2c3e50 !important;
    box-shadow: 2px 0 16px rgba(0,0,0,0.10);
}

/* Sidebar text always white on the dark bg */
.admin-sidebar-premium h6,
.admin-sidebar-premium span,
.admin-sidebar-premium p {
    color: #ffffff !important;
}

.admin-sidebar-premium .text-white-50 {
    color: rgba(255,255,255,0.55) !important;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    padding: 0.7rem 1.2rem;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.88rem;
}

.admin-nav-link:hover {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
    transform: translateX(4px);
}

.admin-nav-link.active {
    background: var(--secondary-color);
    color: #ffffff;
    font-weight: 700;
}

.admin-main-content {
    margin-left: 260px;
    padding: 40px;
    min-height: 100vh;
    background: hsl(var(--background));
}

@media (max-width: 992px) {
    .admin-sidebar-premium   { transform: translateX(-100%); transition: transform 0.3s ease; }
    .admin-sidebar-premium.show { transform: translateX(0); }
    .admin-main-content      { margin-left: 0; padding: 20px; }
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-content {
    background: #ffffff !important;
    color: hsl(var(--foreground)) !important;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
}

.modal-content .text-white-50 { color: hsl(var(--muted)) !important; }
.modal-header { background: #2c3e50; border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0; }
.modal-header h5, .modal-header h6, .modal-title { color: #ffffff !important; }
.btn-close-white { filter: invert(1) brightness(2); }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: #2c3e50 !important;
    border-top: 2px solid var(--secondary-color) !important;
    color: rgba(255,255,255,0.75);
}

footer .text-white-50 { color: rgba(255,255,255,0.55) !important; }
footer .text-white    { color: #ffffff !important; }
footer h4, footer h6  { color: #ffffff !important; }
footer a { color: rgba(255,255,255,0.65); transition: color 0.2s; }
footer a:hover { color: var(--secondary-color); }

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar          { width: 8px; }
::-webkit-scrollbar-track    { background: hsl(var(--background)); }
::-webkit-scrollbar-thumb    { background: linear-gradient(135deg, #1e3c72, var(--secondary-color)); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary-color); }

/* ============================================================
   BOOTSTRAP OVERRIDES
   ============================================================ */
/* Primary button: blue */
.btn-primary, .btn-primary:focus, .btn-primary:active {
    background: linear-gradient(135deg, var(--accent-color), #1565c0) !important;
    border-color: var(--accent-color) !important;
    color: #fff !important;
    font-weight: 700;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,114,229,0.35) !important; }

/* Secondary button: orange */
.btn-secondary, .btn-secondary:focus, .btn-secondary:active {
    background: linear-gradient(135deg, var(--secondary-color), #d35400) !important;
    border-color: var(--secondary-color) !important;
    color: #fff !important;
    font-weight: 700;
}

/* Table headers: dark navy */
.table thead, .table thead th,
.table-dark thead, .table-dark thead th,
.table.table-dark thead, .table.table-dark thead th {
    background: linear-gradient(90deg, #1e3c72, var(--accent-color)) !important;
    color: #ffffff !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    border: none !important;
}

.table, .table.table-dark, .table-dark {
    background: #ffffff !important;
    border-radius: 10px;
    border: 1px solid hsl(var(--border)) !important;
    table-layout: auto !important;
    width: 100% !important;
}

.table.table-dark tbody td,
.table tbody td,
.table-dark tbody td {
    max-width: none !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.table.table-dark thead,
.table.table-dark thead th {
    background: linear-gradient(90deg, #1e3c72, var(--accent-color)) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

.table.table-dark tbody,
.table.table-dark tbody tr,
.table.table-dark tbody td,
.table-dark tbody,
.table-dark tbody tr,
.table-dark tbody td,
.table-dark td,
.table-dark th {
    background: #ffffff !important;
    color: #2c3e50 !important;
    border-color: #ecf0f1 !important;
}

.table.table-dark td,
.table.table-dark th {
    background: #ffffff !important;
    color: #2c3e50 !important;
}

.table tbody tr:hover { background-color: rgba(0,114,229,0.03); }
.table tbody td { color: hsl(var(--foreground)); vertical-align: middle; }

/* Card overrides */
.card { border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid hsl(var(--border)); }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-header { background: linear-gradient(90deg, #1e3c72, var(--accent-color)); color: #fff; border: none; font-weight: 700; }

/* Nav-link overrides (Bootstrap .nav-link inside styled navbars) */
.navbar-dark .nav-link, .navbar .nav-link { color: rgba(255,255,255,0.85) !important; }
.navbar-dark .nav-link:hover, .navbar .nav-link.active { color: var(--secondary-color) !important; }
.navbar-brand { color: var(--secondary-color) !important; font-weight: 900; }

/* Badge */
.badge { font-size: 0.7rem; font-weight: 700; }

/* Text utilities */
.text-primary   { color: var(--accent-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-success   { color: #27ae60 !important; }
.text-danger    { color: #e74c3c !important; }
.text-warning   { color: #e67e22 !important; }
.text-muted     { color: hsl(var(--muted)) !important; }

/* bg utilities */
.bg-primary { background: linear-gradient(135deg, #1e3c72, var(--accent-color)) !important; }
.bg-secondary { background: linear-gradient(135deg, var(--secondary-color), #d35400) !important; }

/* Alert left-border style */
.alert { border-radius: var(--radius); border-left: 4px solid; font-weight: 600; font-size: 0.88rem; }
.alert-success { background: rgba(46,204,113,0.08); border-left-color: #2ecc71; color: #1a7a3c; }
.alert-danger  { background: rgba(231,76,60,0.08);  border-left-color: #e74c3c; color: #8e1c10; }
.alert-warning { background: rgba(243,156,18,0.08); border-left-color: #f39c12; color: #7a5c00; }
.alert-info    { background: rgba(52,152,219,0.08); border-left-color: #3498db; color: #1565c0; }

/* Progress bar */
.progress { border-radius: 50px; background: rgba(0,0,0,0.06); }
.progress-bar { border-radius: 50px; }

/* ============================================================
   SHARED MODULE CLASSES
   ============================================================ */
.container-main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-title {
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 800;
    font-size: 2.2rem;
}

.module-card, .profile-card, .stat-card, .stage-card, .earning-card, .trip-card, .slot-card, .earnings-card {
    background: #ffffff;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 25px;
    transition: all 0.3s ease;
    border-left: 4px solid var(--secondary-color);
}

.module-card:hover, .profile-card:hover, .stat-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid hsl(var(--border));
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.profile-info h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.stat-badge {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 5px;
    background: #f5f5f5;
    margin-right: 15px;
    margin-top: 10px;
}

.stat-number, .earnings-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.table-container {
    background: #ffffff;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h5 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: bold;
}

/* For elements explicitly asking for hero gradients */
.hero-gradient {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf5 100%);
    pointer-events: none;
    z-index: -1;
}

/* Stage & Slot Specific */
.stage-icon {
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--secondary-color); color: white;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.stage-name { font-size: 1.2rem; font-weight: bold; color: var(--primary-color); }
.slot-header { display: flex; justify-content: space-between; align-items: center; margin-bottom:15px; border-bottom:1px solid #eee; padding-bottom: 15px; }
.slot-stage { font-size: 1.3rem; font-weight: bold; color: var(--primary-color); }
