/**
 * public/css/style.css
 * -----------------------------------------------------------------------
 * App theme: clean light content area, sleek light sidebar, brand orange accent.
 * Built on top of Bootstrap 5 utilities — only custom CSS where
 * Bootstrap has no equivalent (layout grid, sidebar theme, brand colors).
 * -----------------------------------------------------------------------
 */

/* =========================================================================
   1. Design Tokens
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap');

* {
    font-family: 'Google Sans', sans-serif;
}

:root {
    --brand-orange: #feda0a;        /* Bootstrap primary, kept as single source of truth */
    --brand-orange-dark: #ecca09;

    --sidebar-bg: #f8f9fc;
    --sidebar-bg-hover: #eef2f7;
    --sidebar-text: #505d6f;
    --sidebar-text-active: #111827;
    --sidebar-width: 260px;
    --sidebar-width-collapsed: 76px;

    --topbar-height: 64px;
    --content-bg: #f3f4f6;

    --radius-sm: 6px;
    --radius-md: 10px;

    --transition-fast: 0.2s ease;
}

.text-primary {
    color: var(--brand-orange) !important;
}

.text-secondary {
    color: #5654d4 !important;
}

.text-success {
    color: #0f5132 !important;
}

.text-danger {
    color: #842029 !important;
}

.badge-orange {
    background-color: #ee8b2f !important;
    color: #ffffff !important;
}

.badge-blue {
    background-color: #2f6bee !important;
    color: #ffffff !important;
}

.badge-gray {
    background-color: #505050 !important;
    color: #ffffff !important;
}

.badge-green {
    background-color: #248d65 !important;
    color: #ffffff !important;
}

.badge-red {
    background-color: #ee1c1c !important;
    color: #ffffff !important;
}

.bg-orange {
    background-color: rgb(247, 146, 4) !important;
}

.text-muted {
    color: #6b7280 !important;
}

.btn-primary {
    background-color: var(--brand-orange) !important;
    color: rgb(17, 17, 17);
    padding: 0.5em 1em;
    border: none;
}

.btn-success {
    background-color: #262626 !important;
    color: #f5f5f5 !important;
    font-weight: 500;
    border: none;
}

.btn-primary:hover {
    background-color: #f18a1c !important;
    color: white;
    border: none;
}

.btn-outline-custom-primary {
    border: 1px solid rgb(255, 123, 0) !important;
    color: rgb(255, 123, 0) !important;
}

.btn-outline-custom-primary:hover {
    background-color: rgb(255, 123, 0) !important;
    color: white !important;
}

body.role-operator [data-confirm-delete],
body.role-operator a.btn-icon.text-danger,
body.role-operator button.btn-icon.text-danger,
body.role-operator a.btn-sm.btn-icon.text-danger,
body.role-operator button.btn-sm.btn-icon.text-danger {
    display: none !important;
}

input:not([type="checkbox"]):not([type="radio"]) {
    background-color: #fff !important;
    border: 1px solid #d1d5db !important;
    color: #1f2937 !important;
}

input:not([type="checkbox"]):not([type="radio"]):focus {
    background-color: #fff !important;
    border: 1px solid #d1d5db !important;
    color: #1f2937 !important;
}

input::placeholder {
    color: #9ca3af !important;
}

textarea {
    background-color: #ffffff !important;
    border: 1px solid #d1d5db !important;
    color: #1f2937 !important;
}

/* =========================================================================
   2. Base
   ========================================================================= */
body {
    background-color: var(--content-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #111827;
}

body.login-body.d-flex.align-items-center {
    background-image: url("../images/login_bg.jpg") !important;
    background-size: cover;
    padding-inline: 8em;
}

.login-body .login-card {
    background-color: white;
    border-radius: 2em;
    border-top: 5px solid var(--brand-orange); 
    box-shadow: 0 0 20px rgba(42, 41, 41, 0.527);
    width: 420px;
}

a {
    text-decoration: none;
}

/* =========================================================================
   3. App Shell / Layout Grid
   ========================================================================= */
.app-wrapper {
    min-height: 100vh;
    width: 100%;
}

.main-content {
    flex: 1 1 auto;
    min-width: 0; /* prevents flex children from overflowing on small screens */
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-fast);
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-width-collapsed);
}

.page-content {
    padding: 24px;
    flex: 1 1 auto;
}

/* =========================================================================
   4. Sidebar
   ========================================================================= */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1030;
    transition: width var(--transition-fast);
    overflow-x: hidden;
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-width-collapsed);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--topbar-height);
    padding: 0 20px;
    color: #111827;
    font-weight: 600;
    font-size: 1.05rem;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.sidebar-brand i {
    font-size: 1.4rem;
    color: var(--brand-orange);
    flex-shrink: 0;
}

body.sidebar-collapsed .sidebar-brand-text {
    display: none;
}

.sidebar-nav {
    padding: 12px 0;
    overflow-y: auto;
    flex: 1 1 auto;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: var(--sidebar-text);
    font-size: 0.92rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    white-space: nowrap;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.sidebar-nav .nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav .nav-link:hover {
    background-color: var(--sidebar-bg-hover);
    color: var(--sidebar-text-active);
}

.sidebar-nav .nav-link.active {
    background-color: var(--sidebar-bg-hover);
    color: var(--sidebar-text-active);
    border-left-color: var(--brand-orange);
}

.submenu-caret {
    font-size: 0.75rem;
    transition: transform var(--transition-fast);
}

.sidebar-nav a[aria-expanded="true"] .submenu-caret {
    transform: rotate(180deg);
}

.sidebar-submenu .nav-link {
    padding-left: 52px;
    font-size: 0.87rem;
}

.sidebar-divider {
    border-top: 1px solid #e5e7eb;
    margin: 8px 20px;
}

body.sidebar-collapsed .sidebar-nav span,
body.sidebar-collapsed .sidebar-nav .submenu-caret {
    display: none;
}

/* =========================================================================
   5. Topbar
   ========================================================================= */
.topbar {
    height: var(--topbar-height);
    background-color: var(--sidebar-bg);
    border-bottom: 1px solid #e5e7eb;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.topbar-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0 16px;
    color: #374151;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: #4b5563;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: background-color var(--transition-fast);
}

.btn-icon:hover {
    background-color: var(--content-bg);
}

.btn-user-menu {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: var(--radius-md);
}

.btn-user-menu:hover {
    background-color: var(--content-bg);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: var(--brand-orange);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.user-menu-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
}

/* =========================================================================
   6. Dashboard Cards
   ========================================================================= */
.stat-card {
    background-color: #ffffff;
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid #e5e7eb;
    height: 100%;
}

.stat-card-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #ffffff;
}

.stat-card-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    margin: 10px 0 2px;
}

.stat-card-label {
    font-size: 0.85rem;
    color: #4b5563;
}

/* =========================================================================
   7. Cards / Tables (shared across CRUD modules)
   ========================================================================= */
.content-card {
    background-color: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid #e5e7eb;
}

.content-card input {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    color: #1f2937;
}

.content-card input:focus {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    color: #1f2937;
}

.content-card input::placeholder {
    color: #9ca3af;
}

.content-card-header {
    padding: 18px 22px;
    border-bottom: 1px solid #e5e7eb;
    /* background-color: #ffca2c !important; */
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.content-card-body {
    padding: 22px;
}

.content-card select {
    background-color: #ffffff;
    color: #1f2937;
}

.content-card select::highlight {
    background-color: #4b5563;
}

.card .card-header {
    background-color: #ffffff;
    color: #4b5563 !important;
}

.table {
    border: 1px solid #e5e7eb;
}

.content-card .content-card-header, .content-card .content-card-body {
    border: 1px solid #e5e7eb;
}

.table > :not(caption) > * > * {
    vertical-align: middle;
}

.table thead th {
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #4b5563;
    border-bottom-width: 1px;
    white-space: nowrap;
    background-color: #ffffff;
}

.content-card .content-card-body .table tbody tr td {
    background-color: #ffffff !important;
    color: #111827 !important;
}

.content-card .content-card-body .table tbody tr td .text-muted {
    color: #6b7280 !important;
}

.card-body {
    background-color: #ffffff;
    color: #111827;
}

.card-body select {
    background-color: #ffffff;
    color: #1f2937;
}

.card-body select::highlight {
    background-color: #4b5563;
}

/*============================================================================
   9. Transportation Type Styles
=============================================================================*/

/* Base Layout Wrapper */
.modern-form {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    max-width: 950px;
    margin: 2rem auto;
}

/* Header Text Labels */
.modern-label {
    color: #475569;
    font-size: 0.85rem;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

/* Custom Styled Controls (Inputs / Dropdowns) */
.modern-input {
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    padding: 0.75rem 1rem !important;
    font-size: 0.95rem !important;
    color: #334155 !important;
    background-color: #f8fafc !important;
    transition: all 0.2s ease-in-out !important;
}

.modern-input:focus {
    background-color: #ffffff !important;
    border-color: #6366f1 !important; /* Premium Violet Accent */
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12) !important;
    outline: none !important;
}

/* Large Card Radio Boxes (Left Side Column) */
.form-card-radio {
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem 1.25rem 1.25rem 3rem !important;
    margin-bottom: 0px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.form-card-radio:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

/* Custom Highlight Selection Hook */
.form-card-radio:has(.custom-radio-input:checked) {
    background-color: #f5f3ff;
    border-color: #8b5cf6;
}

.custom-radio-input {
    width: 1.35rem !important;
    height: 1.35rem !important;
    margin-left: -2rem !important;
    margin-top: 0.2rem !important;
    border: 2px solid #cbd5e1 !important;
    cursor: pointer;
}

.custom-radio-input:checked {
    background-color: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
}

/* Radio Text Structure */
.custom-radio-label {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    width: 100%;
}

.radio-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
}

.radio-desc {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.15rem;
}

/* Modernized Primary Action Button */
.btn-modern {
    background-color: var(--brand-orange) !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.85rem 2.5rem !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 14px rgba(241, 168, 99, 0.3) !important;
    transition: all 0.2s ease !important;
}

.btn-modern:hover {
    background-color: #ffab52 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(241, 168, 99, 0.4) !important;
}

.btn-modern:active {
    transform: translateY(1px);
}

/* Dynamic Entrance Micro-animations */
.dynamic-fade-in {
    animation: slideUpFade 0.25s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================================================================== 
    Dashboard custom styles
====================================================================== */

/* =========================================================
   Sandeep Sound AMS - Dashboard Styles
   Scoped only to dashboard components
   ========================================================= */

.ss-dashboard-wrapper {
    background-color: #f5f7fb;
    min-height: 100vh;
}

.ss-dashboard-card {
    border-radius: 1.15em !important;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ss-card-body {
    border-radius: 1.15em !important;
    background: #ffffff;
}

.ss-dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.08) !important;
}

.ss-dashboard-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.ss-dashboard-icon--primary {
    background: #eef2ff;
    color: #4f46e5;
}

.ss-dashboard-icon--success {
    background: #edfdec;
    color: #58a316;
}

.ss-dashboard-icon--warning {
    background: #ffebff;
    color: #c406d9;
}

.ss-dashboard-icon--orange {
    background: #fef5ea;
    color: #ea6613;
}

.ss-dashboard-icon--danger {
    background: #fef2f2;
    color: #dc2626;
}

.ss-dashboard-icon--info {
    background: #eff6ff;
    color: #2563eb;
}

.ss-dashboard-icon--purple {
    background: #faefff;
    color: #9525eb;
}

.ss-dashboard-icon--seagreen {
    background: #edfff7;
    color: #09564d;
}

.ss-card-body--primary {
    background: #eef2ff;
}

.ss-card-body--success {
    background: #edfdec;
}

.ss-card-body--warning {
    background: #ffebff;
}

.ss-card-body--orange {
    background: #fef5ea;
}

.ss-card-body--danger {
    background: #fef2f2;
}

.ss-card-body--info {
    background: #eff6ff;
}

.ss-card-body--purple {
    background: #faefff;
}

.ss-card-body--seagreen {
    background: #edfff7;
}

.ss-dashboard-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.25rem;
    color: #0f172a;
}

.ss-dashboard-label {
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: #334155;
}

.ss-dashboard-meta {
    font-size: 0.85rem;
    color: #64748b;
}

.ss-dashboard-action-btn {
    padding: 1rem 1.25rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0f172a;
    font-weight: 600;
    box-shadow: 0 0.125rem 0.25rem rgba(15, 23, 42, 0.04);
    transition: all 0.2s ease;
}

.ss-dashboard-action-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.ss-dashboard-action-btn--warning {
    background-color: #5aadff;
    color: #fff;
}

.ss-dashboard-action-btn--warning:hover {
    background-color: #4fa4f9;
    color: #fff;
}
.ss-dashboard-action-btn--orange {
    background-color: #f28f33;
    color: #fff;
}

.ss-dashboard-action-btn--orange:hover {
    background-color: #f28f33;
    color: #fff;
}

.ss-dashboard-action-btn--danger {
    background-color: #f77ebb;
    color: #fff;
}

.ss-dashboard-action-btn--danger:hover {
    background-color: #f072b1;
    color: #fff;
}

.ss-dashboard-chart {
    position: relative;
    height: 360px;
    width: 100%;
}

.ss-dashboard-section-title {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.ss-dashboard-section-subtitle {
    color: #64748b;
    font-size: 0.9rem;
}

/* Total Event Card */
.total-events-card {
    padding-left: 2em;
    box-shadow: none !important;
}

.total-events-card .card-body {
    border-radius: 1em;
}

/*  Golden Yellow */

.bg-golden-yellow {
    background-color: var(--brand-orange) !important;
}

.bg-golden-yellow .text-muted, .bg-golden-yellow .small {
    color: black !important; 
}

.bg-golden-yellow .btn-secondary {
    background-color: black !important;
    color: white;
    border: none;
}

.bg-golden-yellow .btn-outline-custom-primary {
    border-color: black;
    color: black;
}

.bg-golden-yellow .btn-outline-custom-primary:hover {
    background-color: rgb(36, 36, 36);
    color: white;
}

.bg-golden-yellow .btn-primary {
    background-color: black !important;
    color: white;
    border: none;
}

.bg-golden-yellow .btn-outline-secondary {
    border-color: black;
    color: black;
}

.bg-golden-yellow .btn-outline-secondary:hover {
    background-color: rgb(36, 36, 36);
    color: white;
}

/* =========================================================================
   10. Custom Form Controls
   ========================================================================= */

.ss-checkbox {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.ss-checkbox-input {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-orange);
    cursor: pointer;
}

.ss-checkbox-label {
    cursor: pointer;
    user-select: none;
}

@media (max-width: 768px) {
    .ss-dashboard-value {
        font-size: 1.5rem;
    }

    .ss-dashboard-chart {
        height: 260px;
    }
}

/* =========================================================================
   8. Responsive Behavior
   ========================================================================= */
@media (max-width: 991.98px) {
    .sidebar {
        width: var(--sidebar-width-collapsed);
    }

    .sidebar .sidebar-nav span,
    .sidebar .submenu-caret,
    .sidebar-brand-text {
        display: none;
    }

    .main-content {
        margin-left: var(--sidebar-width-collapsed);
    }

    /* On mobile, "expanded" state slides the full sidebar over content */
    body.sidebar-mobile-open .sidebar {
        width: var(--sidebar-width);
    }

    body.sidebar-mobile-open .sidebar .sidebar-nav span,
    body.sidebar-mobile-open .sidebar .submenu-caret,
    body.sidebar-mobile-open .sidebar-brand-text {
        display: inline;
    }
}

@media (max-width: 575.98px) {
    .page-content {
        padding: 16px;
    }
}