/* ===========================================================
   CamperWay - theme_global.css - Brand Edition
   Paleta extraída do logo: Navy #0e2a4f + Verde #1d7a3e
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Nunito+Sans:opsz,wght@6..12,400;6..12,500;6..12,600;6..12,700&display=swap');

/* -- Light Mode -------------------------------------------- */
:root {
    --bg-primary:        #f4f7fc;
    --bg-secondary:      #ffffff;
    --bg-tertiary:       #eaf0f8;
    --text-primary:      #0e2a4f;
    --text-secondary:    #2c4a6e;
    --text-tertiary:     #6b84a0;
    --border-color:      rgba(14, 42, 71, 0.1);
    --border-hover:      rgba(14, 42, 71, 0.22);
    --accent-color:      #1d7a3e;
    --accent-hover:      #155c2e;
    --accent-navy:       #0e2a4f;
    --accent-navy-mid:   #1a3665;
    --accent-navy-light: #4a7ab5;
    --accent-gradient:   linear-gradient(135deg, #0e2a4f, #1d7a3e);
    --accent-glow:       0 0 22px rgba(29, 122, 62, 0.28);
    --shadow:            0 4px 16px rgba(14, 42, 71, 0.08);
    --shadow-lg:         0 8px 32px rgba(14, 42, 71, 0.13);
    --glass-bg:          rgba(255, 255, 255, 0.85);
    --modal-overlay:     rgba(14, 42, 71, 0.55);
    --navbar-bg:         #0b3370;
    --navbar-text:       rgba(255, 255, 255, 0.78);
    --navbar-active:     #27c06a;
    --navbar-border:     rgba(255, 255, 255, 0.08);
}

/* -- Dark Mode --------------------------------------------- */
[data-theme="dark"] {
    --bg-primary:        #040d1a;
    --bg-secondary:      rgba(255, 255, 255, 0.055);
    --bg-tertiary:       rgba(255, 255, 255, 0.1);
    --text-primary:      #e8edf5;
    --text-secondary:    #8fa8c8;
    --text-tertiary:     #5a7a9a;
    --border-color:      rgba(255, 255, 255, 0.09);
    --border-hover:      rgba(255, 255, 255, 0.2);
    --accent-color:      #27c06a;
    --accent-hover:      #1fa058;
    --accent-navy:       #4a7ab5;
    --accent-navy-mid:   #3a6495;
    --accent-navy-light: #6a9fd8;
    --accent-gradient:   linear-gradient(135deg, #4a7ab5, #27c06a);
    --accent-glow:       0 0 26px rgba(39, 192, 106, 0.38);
    --shadow:            0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg:         0 12px 48px rgba(0, 0, 0, 0.65);
    --glass-bg:          rgba(4, 13, 26, 0.75);
    --modal-overlay:     rgba(0, 0, 0, 0.78);
    --navbar-bg:         #050f1e;
    --navbar-text:       rgba(255, 255, 255, 0.72);
    --navbar-active:     #27c06a;
    --navbar-border:     rgba(255, 255, 255, 0.06);
}

/* -- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* -- Body -------------------------------------------------- */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Nunito Sans', 'Montserrat', sans-serif;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
}

[data-theme="dark"] body {
    background-color: #040d1a;
    background-image:
        radial-gradient(ellipse 85% 55% at 5% 0%,  rgba(14, 42, 71, 0.65) 0%, transparent 100%),
        radial-gradient(ellipse 60% 60% at 95% 100%, rgba(29, 122, 62, 0.13) 0%, transparent 100%);
    background-attachment: fixed;
}

/* -- Inputs ------------------------------------------------ */
input, textarea, select {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(29, 122, 62, 0.15);
}
[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    box-shadow: 0 0 0 3px rgba(39, 192, 106, 0.2);
}

/* -- Icon button ------------------------------------------- */
.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 17px;
    padding: 8px;
    border-radius: 9px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); }

/* -- Global dark-mode glass overrides (all pages) ---------- */
[data-theme="dark"] .modal-content,
[data-theme="dark"] .amodal-box {
    background: rgba(5, 15, 30, 0.9) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
[data-theme="dark"] .card-dropdown,
[data-theme="dark"] .route-dropdown,
[data-theme="dark"] #profileDropdownMenu,
[data-theme="dark"] .dropdown-content {
    background: rgba(5, 15, 30, 0.94) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6) !important;
}
[data-theme="dark"] .route-card:hover {
    border-color: rgba(39, 192, 106, 0.4) !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 28px rgba(39,192,106,0.1) !important;
}

/* -- Scrollbar --------------------------------------------- */
::-webkit-scrollbar             { width: 4px; height: 4px; }
::-webkit-scrollbar-track       { background: transparent; }
::-webkit-scrollbar-thumb       { background: var(--border-color); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }
