/* /var/www/keminfo.space/public/css/style.css */

:root {
    --deep-ocean: #061423;
    --navy-blue: #0b2239;
    --emerald-neon: #00ff7f;
    --glass-bg: rgba(11, 34, 57, 0.6);
    --glass-border: rgba(0, 255, 127, 0.2);
    --text-main: #e0f2fe;
    --text-muted: #7dd3fc;
	--primary: #00ff7f; --secondary: #00d4ff; --danger: #ff3860;
    --bg-deep: #050a14; --bg-panel: rgba(6,20,35,0.85);
    --border: rgba(0,255,127,0.3); --text: #e0f2fe; --text-muted: #7dd3fc;
    --glass: blur(12px) saturate(1.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

body {
    background-color: var(--deep-ocean);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Glassmorphism Panel Reusable Class */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
}

/* Neon Glow Effects */
.neon-text {
    color: var(--emerald-neon);
    text-shadow: 0 0 8px rgba(0, 255, 127, 0.6);
}

.neon-btn {
    background: transparent;
    border: 1px solid var(--emerald-neon);
    color: var(--emerald-neon);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

.neon-btn:hover {
    background: var(--emerald-neon);
    color: var(--deep-ocean);
    box-shadow: 0 0 15px var(--emerald-neon);
}

/* Layout Structure */
.sidebar {
    width: 280px;
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    border-right: 1px solid var(--glass-border);
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
}

.sidebar .brand img {
    width: 45px;
    height: 45px;
}

.sidebar .nav-links {
    list-style: none;
    flex-grow: 1;
}

.sidebar .nav-links li {
    margin-bottom: 15px;
}

.sidebar .nav-links a {
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar .nav-links a:hover, .sidebar .nav-links a.active {
    background: rgba(0, 255, 127, 0.1);
    color: var(--emerald-neon);
    border-left: 3px solid var(--emerald-neon);
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.header {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 999;
    border-bottom: 1px solid var(--glass-border);
}

.time-indicator {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.time-indicator span {
    background: rgba(0,0,0,0.3);
    padding: 5px 12px;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
}

.content-area {
    flex-grow: 1;
    position: relative;
    overflow-y: auto;
    padding: 20px;
}

/* Leaflet Map Customization */
#keminfo-map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Hide Leaflet Attribution */
.leaflet-control-attribution {
    display: none !important;
}

/* Custom KEMINFO Watermark on Map */
.map-watermark {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 400;
    pointer-events: none;
    opacity: 0.5;
}

        
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Inter', sans-serif; background: var(--bg-deep); color: var(--text); overflow: hidden; }
        #map { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; background: #02050a; }

        .glass-panel { background: var(--bg-panel); backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.6); }

        .topbar { position: fixed; top: 15px; left: 15px; right: 15px; z-index: 1000; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
        .topbar > * { pointer-events: auto; }
        .brand-box { display: flex; align-items: center; gap: 10px; padding: 10px 15px; font-weight: 800; font-size: 1rem; }
        .brand-box img { width: 24px; height: 24px; }
        .brand-box span { color: var(--primary); }

        .nav-menus { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
        .dropdown { position: relative; }
        .dropdown-btn { background: rgba(0,0,0,0.6); border: 1px solid var(--border); color: var(--text); padding: 8px 12px; border-radius: 6px; cursor: pointer; font-size: 0.8rem; font-weight: 600; display: flex; align-items: center; gap: 6px; transition: all 0.2s; backdrop-filter: var(--glass); }
        .dropdown-btn:hover, .dropdown-btn.active { border-color: var(--primary); background: rgba(0,255,127,0.15); color: var(--primary); }
        .dropdown-content { position: absolute; top: calc(100% + 8px); right: 0; display: none; flex-direction: column; width: 300px; max-height: 60vh; border-radius: 8px; overflow: hidden; }
        .dropdown:hover .dropdown-content, .dropdown.active .dropdown-content { display: flex; }

        .vessel-list-container { overflow-y: auto; max-height: 50vh; padding: 10px; }
        .vessel-list-container::-webkit-scrollbar { width: 4px; }
        .vessel-list-container::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
        .vessel-card { background: rgba(255,255,255,0.03); border: 1px solid transparent; padding: 10px; margin-bottom: 5px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: 0.2s; }
        .vessel-card:hover { background: rgba(0,255,127,0.1); border-color: var(--primary); }
        .v-card-info { flex: 1; overflow: hidden; }
        .v-card-info h4 { font-size: 0.8rem; color: #fff; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .v-card-info p { font-size: 0.7rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

        .chip-group { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px; }
        .chip { padding: 4px 8px; font-size: 0.7rem; border: 1px solid var(--border); border-radius: 20px; cursor: pointer; color: var(--text-muted); transition: 0.2s; }
        .chip.active { background: var(--primary); color: #000; font-weight: bold; border-color: var(--primary); }

        .tools-bar { position: fixed; top: 80px; right: 15px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
        .tool-btn { width: 42px; height: 42px; background: var(--bg-panel); border: 1px solid var(--border); color: var(--text); border-radius: 8px; display: flex; justify-content: center; align-items: center; cursor: pointer; transition: 0.2s; backdrop-filter: var(--glass); box-shadow: 0 4px 10px rgba(0,0,0,0.5); }
        .tool-btn:hover, .tool-btn.active { background: rgba(0,255,127,0.2); color: var(--primary); border-color: var(--primary); }

        .search-panel { position: fixed; top: 80px; right: 65px; z-index: 1000; width: 300px; padding: 12px; display: none; }
        .search-panel.visible { display: block; }
        .search-input-wrap { display: flex; gap: 6px; }
        .search-input-wrap input { flex: 1; background: rgba(0,0,0,0.5); border: 1px solid var(--border); border-radius: 6px; color: #fff; padding: 8px 12px; font-size: 12px; outline: none; }
        .search-input-wrap button { background: var(--primary); border: none; color: #000; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 12px; }
        .search-results { margin-top: 8px; max-height: 200px; overflow-y: auto; }
        .search-result-item { padding: 8px 10px; font-size: 11px; cursor: pointer; border-radius: 6px; border-bottom: 1px solid rgba(255,255,255,0.05); }
        .search-result-item:hover { background: rgba(0,255,127,0.1); }
        
        .measure-info { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 1001; padding: 10px 20px; font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--primary); display: none; text-align: center;}
        .measure-info.visible { display: block; }

        .ai-panel { position: fixed; top: 130px; right: 65px; z-index: 1000; width: 340px; padding: 15px; display: none; border-left: 3px solid var(--primary); }
        .ai-panel.visible { display: block; }
        .ai-panel h4 { font-size: 13px; color: var(--primary); margin-bottom: 10px; border-bottom: 1px solid rgba(0,255,127,0.2); padding-bottom: 5px; display: flex; justify-content: space-between;}

        .hud-compass { position: absolute; top: 80px; left: 15px; z-index: 1000; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0,0,0,0.4); border: 2px solid var(--border); box-shadow: 0 0 15px rgba(0,255,127,0.2); backdrop-filter: var(--glass); pointer-events: none; }
        .hud-compass svg { width: 45px; height: 45px; fill: none; stroke: var(--primary); stroke-width: 1.5; }
        .leaflet-custom-logo { position: absolute; bottom: 15px; right: 15px; z-index: 1000; width: 45px; opacity: 0.8; filter: drop-shadow(0 0 5px rgba(0,0,0,0.8)); pointer-events: none; }

        .vessel-icon-wrapper { position: relative; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
        .vessel-arrow { transition: transform 1s ease-out; font-size: 15px; display: block; z-index: 2; position: relative; }
        .radar-ping { position: absolute; width: 100%; height: 100%; border-radius: 50%; z-index: 1; background: radial-gradient(circle, var(--primary) 0%, transparent 60%); animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite; opacity: 0.6; }
        @keyframes ping { 75%, 100% { transform: scale(3); opacity: 0; } }

        .vessel-name-label { position: absolute; top: 20px; left: 15px; background: rgba(0,0,0,0.8); color: #fff; border: 1px solid var(--border); padding: 2px 6px; font-size: 10px; border-radius: 4px; white-space: nowrap; font-family: 'JetBrains Mono', monospace; display: none; z-index: 3; box-shadow: 0 2px 5px rgba(0,0,0,0.8); }
        #map.zoom-close .vessel-name-label { display: block; }
        
        .infra-marker svg { filter: drop-shadow(0 0 5px rgba(255,255,255,0.5)); }
        .range-ring { fill: transparent; stroke: var(--danger); stroke-width: 1; stroke-dasharray: 4 6; opacity: 0.8; }
        
        .marker-cluster-custom { background: rgba(6,20,35,0.85); border: 2px solid var(--primary); color: white; font-weight: bold; text-align: center; border-radius: 50%; box-shadow: 0 0 10px var(--primary); }
        .marker-cluster-custom div { line-height: 36px; font-size: 13px; font-family: 'JetBrains Mono', monospace;}
        .leaflet-popup-content-wrapper { background: var(--bg-panel); backdrop-filter: var(--glass); border: 1px solid var(--border); color: #fff; border-radius: 8px; }
        .leaflet-popup-tip { background: var(--bg-panel); border: 1px solid var(--border); }
        .leaflet-control-scale-line { background: rgba(0,0,0,0.6) !important; color: #fff !important; border: 1px solid var(--primary) !important; border-top: none !important; font-family: 'JetBrains Mono', monospace; font-size: 10px !important; }
        .leaflet-control-zoom { border: none !important; margin-left: 15px !important; margin-top: 150px !important; }
        .leaflet-control-zoom a { background: rgba(0,0,0,0.6) !important; color: #fff !important; border: 1px solid var(--border) !important; backdrop-filter: var(--glass); }

        .popup-action-btn { background:var(--primary); color:#000; border:none; padding:6px; border-radius:4px; cursor:pointer; font-weight:bold; font-size:10px; flex: 1; text-align: center; }
        .popup-action-btn:hover { background: #00d4ff; }
        .popup-ai-btn { background:var(--bg-deep); color:var(--primary); border:1px solid var(--primary); padding:6px; border-radius:4px; cursor:pointer; font-weight:bold; font-size:10px; flex: 1; text-align: center;}
        .popup-ai-btn:hover { background: var(--primary); color:#000; }

/* ====================================================
   TACTICAL MARINE NAVIGATIONAL TOOLS STYLING
   ==================================================== */

.marine-tools-wrapper {
    padding: 20px;
    animation: fadeInContainer 0.4s ease-out;
}

.tools-header-block {
    margin-bottom: 25px;
}

.tools-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

.tools-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
}

/* Form Layout Modifiers */
.tool-form-flex {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row-split {
    display: flex;
    gap: 15px;
}

.split-child {
    flex: 1;
}

.input-field-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.required-asterisk {
    color: var(--danger);
    font-weight: bold;
}

/* Custom Tactical Form Control Components */
.tactical-input, .tactical-select {
    width: 100%;
    background: rgba(5, 10, 20, 0.7);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    outline: none;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.tactical-input:focus, .tactical-select:focus {
    border-color: var(--emerald-neon);
    box-shadow: 0 0 8px rgba(0, 255, 127, 0.25);
}

.input-date-picker {
    color-scheme: dark; /* Sinkronisasi ikon kalender browser dengan dark mode */
}

/* Premium Element Accent */
.premium-feature-block {
    border-top: 1px dashed rgba(0, 212, 255, 0.2);
    padding-top: 10px;
}

.premium-input {
    border-color: rgba(0, 212, 255, 0.3);
}

.premium-input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.25);
}

/* Action Button Alignments & Colors */
.tactical-btn-group {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.btn-pdf-export {
    flex: 1;
    border-color: var(--danger) !important;
    color: var(--danger) !important;
}

.btn-pdf-export:hover {
    background: var(--danger) !important;
    color: #fff !important;
    box-shadow: 0 0 12px rgba(255, 56, 96, 0.4);
}

.btn-excel-export {
    flex: 1;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.btn-excel-export:hover {
    background: var(--primary) !important;
    color: #050a14 !important;
    box-shadow: 0 0 12px rgba(0, 255, 127, 0.4);
}

.btn-submit-calculator {
    margin-top: 10px;
    width: 100%;
    border-color: var(--secondary) !important;
    color: var(--secondary) !important;
    letter-spacing: 0.5px;
}

.btn-submit-calculator:hover {
    background: var(--secondary) !important;
    color: #050a14 !important;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}

/* Tactical Result Presentation Panel */
.tactical-result-box {
    display: none;
    margin-top: 20px;
    padding: 18px;
    background: rgba(0, 255, 127, 0.04);
    border: 1px solid var(--border);
    border-left: 4px solid var(--emerald-neon);
    border-radius: 6px;
    opacity: 0;
    transform: translateY(8px);
}

.tactical-result-box.active {
    display: block !important;
    animation: slideUpResult 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.result-header {
    color: var(--emerald-neon);
    margin-bottom: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-data-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9rem;
}

.result-item, .result-item-full, .result-item-coord {
    line-height: 1.5;
}

.result-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-right: 6px;
}

.result-value-highlight {
    font-size: 1.25rem;
    color: #fff;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
}

.result-value-sub {
    font-weight: 600;
    color: #fff;
}

.coordinate-text {
    font-family: 'JetBrains Mono', monospace;
    color: #fff;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Micro Animations & Keyframes */
.tool-card-animate {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tool-card-animate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 0 12px rgba(0, 255, 127, 0.05);
}

.blink-animation {
    animation: tacticalRadarBlink 1.8s infinite ease-in-out;
}

@keyframes fadeInContainer {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUpResult {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes tacticalRadarBlink {
    0%, 100% { opacity: 1; text-shadow: 0 0 4px var(--emerald-neon); }
    50% { opacity: 0.4; text-shadow: none; }
}

/* ====================================================
   TOOLS PAGE ENHANCEMENTS - ADD TO END OF style.css
   ==================================================== */

/* Stats Overview Bar */
.tools-stats-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.stat-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-panel);
    backdrop-filter: var(--glass);
    border: 1px solid var(--border);
    border-radius: 8px;
    animation: slideInStat 0.4s ease-out backwards;
    flex: 1;
    min-width: 150px;
}

.stat-chip:nth-child(1) { animation-delay: 0.1s; }
.stat-chip:nth-child(2) { animation-delay: 0.2s; }
.stat-chip:nth-child(3) { animation-delay: 0.3s; }

.stat-chip-secondary { border-color: rgba(0, 212, 255, 0.3); }
.stat-chip-secondary i { color: var(--secondary); }
.stat-chip-accent { border-color: rgba(245, 158, 11, 0.3); }
.stat-chip-accent i { color: #f59e0b; }

.stat-chip i {
    font-size: 1.2rem;
    color: var(--primary);
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Vessel Preview Box */
.vessel-preview-box {
    background: rgba(0, 255, 127, 0.03);
    border: 1px solid rgba(0, 255, 127, 0.15);
    border-radius: 6px;
    overflow: hidden;
    animation: fadeInContainer 0.3s ease-out;
}

.preview-header {
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(0, 255, 127, 0.08);
    border-bottom: 1px solid rgba(0, 255, 127, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-content {
    padding: 10px 12px;
}

.preview-loading {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.preview-item {
    font-size: 0.8rem;
}

.preview-label {
    color: var(--text-muted);
}

.preview-item strong {
    color: #fff;
}

/* Time Preset Buttons */
.time-preset-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.preset-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-right: 4px;
}

.preset-btn {
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.25);
    color: var(--secondary);
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: var(--secondary);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

.preset-btn:active {
    transform: scale(0.95);
}

/* Result Row Split */
.result-row-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Text Danger Color */
.text-danger {
    color: var(--danger) !important;
}

/* ====================================================
   VESSEL INTELLIGENCE PANEL STYLING
   ==================================================== */

.lookup-input-group {
    display: flex;
    gap: 8px;
}

.lookup-input-group .tactical-input {
    flex: 1;
}

.btn-lookup-action {
    padding: 12px 16px !important;
    flex-shrink: 0;
}

.vessel-intel-panel {
    margin-top: 15px;
    background: rgba(5, 10, 20, 0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.vessel-intel-panel.intel-visible {
    opacity: 1;
    transform: translateY(0);
}

.intel-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 18px;
    background: linear-gradient(135deg, rgba(0, 255, 127, 0.1) 0%, rgba(0, 212, 255, 0.1) 100%);
    border-bottom: 1px solid var(--border);
}

.intel-vessel-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.intel-mmsi-badge {
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
    padding: 4px 10px;
    background: rgba(0, 255, 127, 0.15);
    border: 1px solid rgba(0, 255, 127, 0.3);
    border-radius: 4px;
    color: var(--primary);
}

.intel-grid {
    padding: 15px 18px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.intel-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 12px;
}

.intel-section-full {
    grid-column: 1 / -1;
}

.intel-section-title {
    font-size: 0.8rem;
    color: var(--secondary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
}

.intel-data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.intel-data-row:last-child {
    border-bottom: none;
}

.intel-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.intel-value {
    font-size: 0.85rem;
    color: #fff;
    font-weight: 500;
    text-align: right;
}

.intel-nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

/* Dimension Visualization */
.intel-dimension-visual {
    margin-bottom: 12px;
}

.dim-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.dim-ship {
    height: 20px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8px;
    min-width: 60px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(0, 255, 127, 0.3);
}

.dim-bow, .dim-stern {
    font-size: 0.65rem;
    font-family: 'JetBrains Mono', monospace;
    color: #000;
    font-weight: 700;
}

.dim-width-label {
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
}

/* Intel Not Found */
.intel-not-found {
    margin-top: 15px;
    padding: 30px;
    text-align: center;
    background: rgba(255, 56, 96, 0.05);
    border: 1px solid rgba(255, 56, 96, 0.2);
    border-radius: 8px;
    animation: fadeInContainer 0.3s ease-out;
}

.intel-not-found i {
    font-size: 2rem;
    color: var(--danger);
    margin-bottom: 10px;
    display: block;
}

.intel-not-found p {
    color: #fff;
    margin-bottom: 5px;
}

.intel-not-found small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ====================================================
   EXPORT HISTORY TABLE STYLING
   ==================================================== */

.export-history-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 10px;
}

.history-filter-group {
    flex: 1;
    max-width: 180px;
}

.tactical-select-sm {
    padding: 8px 10px !important;
    font-size: 0.8rem !important;
}

.btn-refresh-history {
    padding: 8px 14px !important;
    font-size: 0.8rem !important;
}

.btn-refresh-history i {
    transition: transform 0.3s ease;
}

.export-history-table-wrap {
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.export-history-table-wrap::-webkit-scrollbar {
    height: 4px;
}

.export-history-table-wrap::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.export-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.export-history-table thead th {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.export-history-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
}

.export-history-table tbody tr:hover {
    background: rgba(0, 255, 127, 0.03);
}

.export-history-table td {
    padding: 10px 15px;
    vertical-align: middle;
}

.history-time-col {
    white-space: nowrap;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.history-vessel-col {
    font-weight: 500;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-mmsi-col code {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
    color: var(--primary);
}

.history-action-col {
    width: 50px;
}

.history-re-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.history-re-btn:hover {
    background: rgba(0, 255, 127, 0.15);
    border-color: var(--primary);
    color: var(--primary);
    transform: rotate(180deg);
}

/* Type Badges */
.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.type-badge-pdf {
    background: rgba(255, 56, 96, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 56, 96, 0.3);
}

.type-badge-excel {
    background: rgba(0, 255, 127, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 255, 127, 0.3);
}

/* Empty & Loading States */
.history-empty-row td {
    padding: 30px !important;
}

.history-loading, .history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.history-loading i, .history-empty i {
    font-size: 1.5rem;
    opacity: 0.5;
}

.history-footer-info {
    margin-top: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: right;
}

/* History Row Animation */
.history-row-animate {
    animation: fadeInRow 0.3s ease-out backwards;
}

/* ====================================================
   ADDITIONAL ANIMATIONS & KEYFRAMES
   ==================================================== */

@keyframes slideInStat {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRow {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* AI Toast System (Fallback Styling) */
.ai-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    padding: 14px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    animation: slideInToast 0.3s ease-out;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    max-width: 400px;
}

.ai-toast.info {
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.4);
    color: var(--secondary);
}

.ai-toast.error {
    background: rgba(255, 56, 96, 0.15);
    border: 1px solid rgba(255, 56, 96, 0.4);
    color: var(--danger);
}

.ai-toast.success {
    background: rgba(0, 255, 127, 0.15);
    border: 1px solid rgba(0, 255, 127, 0.4);
    color: var(--primary);
}

@keyframes slideInToast {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ====================================================
   RESPONSIVE DESIGN - TOOLS PAGE
   ==================================================== */

@media screen and (max-width: 1200px) {
    .tools-grid-layout {
        grid-template-columns: 1fr;
    }
    
    .intel-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .marine-tools-wrapper {
        padding: 15px;
    }
    
    .tools-stats-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-chip {
        min-width: 100%;
    }
    
    .tools-header-block h2 {
        font-size: 1.3rem;
    }
    
    .tools-subtitle {
        font-size: 0.8rem;
    }
    
    .form-row-split {
        flex-direction: column;
        gap: 12px;
    }
    
    .result-row-split {
        grid-template-columns: 1fr;
    }
    
    .tactical-btn-group {
        flex-direction: column;
    }
    
    .neon-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    
    .time-preset-group {
        justify-content: flex-start;
    }
    
    .preset-btn {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    
    /* Intel Panel Responsive */
    .intel-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .intel-nav-grid {
        grid-template-columns: 1fr;
    }
    
    .intel-data-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .intel-value {
        text-align: left;
    }
    
    /* Export History Responsive */
    .export-history-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .history-filter-group {
        max-width: 100%;
    }
    
    .export-history-table {
        font-size: 0.8rem;
    }
    
    .export-history-table thead th,
    .export-history-table td {
        padding: 8px 10px;
    }
    
    /* Hide less important columns on mobile */
    .history-time-col {
        font-size: 0.7rem;
    }
}

@media screen and (max-width: 480px) {
    .marine-tools-wrapper {
        padding: 10px;
    }
    
    .tools-header-block {
        margin-bottom: 15px;
    }
    
    .tools-header-block h2 {
        font-size: 1.1rem;
    }
    
    .glass-panel {
        border-radius: 10px;
    }
    
    .tool-form-flex {
        gap: 12px;
    }
    
    .tactical-input, .tactical-select {
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .vessel-intel-panel {
        margin-top: 10px;
    }
    
    .intel-section {
        padding: 10px;
    }
    
    .lookup-input-group {
        flex-direction: column;
    }
    
    .btn-lookup-action {
        width: 100%;
    }
    
    .stat-chip {
        padding: 10px 15px;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
}

/* ====================================================
   DISABLED BUTTON STATE
   ==================================================== */

.neon-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ====================================================
   SCROLLBAR STYLING FOR CONTENT AREA
   ==================================================== */

.content-area::-webkit-scrollbar {
    width: 6px;
}

.content-area::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.content-area::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.content-area::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ====================================================
   PRINT STYLES (FOR PDF EXPORT PAGE)
   ==================================================== */

@media print {
    .sidebar, .header, .tools-stats-bar, .tactical-btn-group, 
    .export-history-controls, .history-footer-info {
        display: none !important;
    }
    
    .marine-tools-wrapper {
        padding: 0;
    }
    
    .glass-panel {
        background: #fff;
        color: #000;
        border: 1px solid #ccc;
        box-shadow: none;
        break-inside: avoid;
    }
}



/* ====================================================
   ATW-AI CHAT INTERFACE - PREMIUM STYLING
   ==================================================== */

/* Main Container */
.ai-chat-universe {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    gap: 0;
    animation: fadeInContainer 0.4s ease-out;
}

/* Header Bar */
.ai-header-bar {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.ai-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ai-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* AI Logo with Pulse Animation */
.ai-logo-pulse {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-logo-core {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 1.1rem;
    position: relative;
    z-index: 2;
    animation: logoPulse 3s ease-in-out infinite;
}

.ai-logo-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 12px;
    animation: ringPulse 2s ease-out infinite;
}

.ai-logo-ring.ring-2 {
    animation-delay: 0.5s;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes ringPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.5); opacity: 0; }
}

.ai-header-info h3 {
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.ai-engine-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.online {
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
    animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Status & Quota Chips */
.ai-status-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-status-chip.premium {
    background: rgba(0, 255, 127, 0.15);
    border: 1px solid rgba(0, 255, 127, 0.3);
    color: var(--primary);
}

.ai-status-chip.free {
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.ai-quota-display {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-quota-display strong {
    color: #fff;
}

/* Chat Area */
.ai-chat-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 0 0 12px 12px;
    border-top: none;
}

.chat-messages-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scroll-behavior: smooth;
}

.chat-messages-container::-webkit-scrollbar {
    width: 6px;
}

.chat-messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.chat-messages-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Date Separator */
.date-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}

.date-separator span {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Message Wrapper */
.chat-message-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 85%;
}

.user-wrapper {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.system-wrapper {
    align-self: flex-start;
}

/* Avatar Styling */
.chat-avatar {
    flex-shrink: 0;
    position: relative;
    width: 42px;
    height: 42px;
}

.chat-avatar.small {
    width: 32px;
    height: 32px;
}

.avatar-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 127, 0.3) 0%, transparent 70%);
    animation: avatarGlow 2s ease-in-out infinite;
}

.avatar-glow.user-glow {
    background: radial-gradient(circle, rgba(0, 212, 255, 0.3) 0%, transparent 70%);
}

@keyframes avatarGlow {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
}

.avatar-icon {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 255, 127, 0.2), rgba(0, 212, 255, 0.2));
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.9rem;
    z-index: 1;
}

.avatar-icon.user-icon {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(255, 255, 255, 0.1));
    border-color: var(--secondary);
    color: var(--secondary);
}

/* Chat Bubble */
.chat-bubble-container {
    max-width: 100%;
}

.chat-bubble {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.user-bubble {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(0, 212, 255, 0.06));
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 12px 4px 12px 12px;
}

.ai-bubble {
    background: linear-gradient(135deg, rgba(0, 255, 127, 0.06), rgba(0, 255, 127, 0.02));
    border: 1px solid rgba(0, 255, 127, 0.15);
    border-radius: 4px 12px 12px 12px;
}

.bubble-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.sender-name {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-name {
    color: var(--primary);
}

.user-name {
    color: var(--secondary);
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.bubble-content {
    padding: 14px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.user-content {
    color: var(--text);
}

.ai-content {
    color: var(--text);
}

.ai-content p {
    margin-bottom: 10px;
}

.ai-content p:last-child {
    margin-bottom: 0;
}

/* Typewriter Cursor */
.typewriter-cursor {
    display: inline;
    color: var(--primary);
    animation: cursorBlink 0.8s ease-in-out infinite;
    font-weight: 300;
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* AI Formatted Content Styles */
.ai-h2 {
    font-size: 1.2rem;
    color: #fff;
    margin: 15px 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 255, 127, 0.2);
}

.ai-h3 {
    font-size: 1.05rem;
    color: var(--secondary);
    margin: 12px 0 8px 0;
}

.ai-h4 {
    font-size: 0.95rem;
    color: var(--primary);
    margin: 10px 0 6px 0;
}

.ai-list-item {
    display: flex;
    gap: 10px;
    padding: 6px 0;
    align-items: flex-start;
}

.ai-list-item.numbered {
    margin-left: 5px;
}

.list-num {
    color: var(--primary);
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    min-width: 24px;
}

.list-bullet {
    color: var(--primary);
    font-size: 1.2rem;
    line-height: 1.4;
}

.list-text {
    flex: 1;
}

.ai-hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 15px 0;
}

.inline-code {
    background: rgba(0, 0, 0, 0.4);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    color: var(--secondary);
}

.code-block {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 10px 0;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.code-lang {
    font-size: 0.7rem;
    color: var(--primary);
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
}

.code-copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.code-copy-btn:hover {
    background: rgba(0, 255, 127, 0.2);
    color: var(--primary);
}

.code-block pre {
    padding: 12px;
    overflow-x: auto;
    margin: 0;
}

.code-block code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #e0f2fe;
    line-height: 1.5;
}

/* Capability List */
.ai-capability-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.cap-item {
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 2px solid var(--primary);
    font-size: 0.85rem;
}

/* Error Message */
.error-message {
    color: var(--danger);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 56, 96, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(255, 56, 96, 0.2);
}

.error-message i {
    margin-top: 2px;
}

/* Typing Indicator */
.typing-indicator-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 10px 20px;
    animation: fadeInContainer 0.3s ease-out;
}

.typing-bubble {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 255, 127, 0.06);
    border: 1px solid rgba(0, 255, 127, 0.15);
    border-radius: 4px 12px 12px 12px;
    padding: 10px 16px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

.typing-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Input Area */
.chat-input-area {
    padding: 15px 20px;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.chat-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-wrapper {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.chat-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 14px 45px 14px 40px;
    border-radius: 8px;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 255, 127, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.chat-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.input-action-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.input-action-btn:hover {
    color: var(--danger);
    background: rgba(255, 56, 96, 0.15);
}

.send-button {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: #000;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.send-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 127, 0.4);
}

.send-button:active:not(:disabled) {
    transform: translateY(0);
}

.send-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.send-button.loading {
    background: linear-gradient(135deg, rgba(0, 255, 127, 0.5), rgba(0, 212, 255, 0.5));
}

.input-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.char-count {
    font-family: 'JetBrains Mono', monospace;
    transition: color 0.3s ease;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.3s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    padding: 40px;
    text-align: center;
    width: 400px;
    max-width: 90vw;
    border-radius: 16px;
    animation: slideUpModal 0.3s ease-out;
}

@keyframes slideUpModal {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
}

.warning-icon {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 2px solid rgba(251, 191, 36, 0.3);
    animation: warningPulse 1.5s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.3); }
    50% { box-shadow: 0 0 20px 5px rgba(251, 191, 36, 0.2); }
}

.modal-content h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.modal-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-upgrade-btn {
    display: block;
    width: 100%;
    text-decoration: none;
    text-align: center;
    padding: 14px;
    margin-bottom: 15px;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 8px 16px;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #fff;
}

/* Message Animations */
@keyframes slideInRight {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ====================================================
   RESPONSIVE - AI CHAT
   ==================================================== */

@media screen and (max-width: 768px) {
    .ai-chat-universe {
        height: calc(100vh - 80px);
    }
    
    .ai-header-bar {
        padding: 12px 15px;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .ai-header-left {
        gap: 10px;
    }
    
    .ai-logo-pulse {
        width: 40px;
        height: 40px;
    }
    
    .ai-logo-core {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .ai-header-info h3 {
        font-size: 0.95rem;
    }
    
    .ai-header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .ai-quota-display {
        font-size: 0.75rem;
    }
    
    .chat-messages-container {
        padding: 15px;
        gap: 15px;
    }
    
    .chat-message-wrapper {
        max-width: 92%;
    }
    
    .chat-avatar {
        width: 34px;
        height: 34px;
    }
    
    .chat-avatar.small {
        width: 28px;
        height: 28px;
    }
    
    .avatar-icon {
        font-size: 0.75rem;
    }
    
    .bubble-content {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .ai-capability-list {
        grid-template-columns: 1fr;
    }
    
    .chat-input-area {
        padding: 12px 15px;
    }
    
    .chat-form {
        gap: 8px;
    }
    
    .chat-input {
        padding: 12px 40px 12px 36px;
        font-size: 0.85rem;
    }
    
    .send-button {
        padding: 12px 16px;
    }
    
    .btn-text {
        display: none;
    }
    
    .send-button i {
        font-size: 1.1rem;
    }
    
    .input-footer {
        font-size: 0.65rem;
    }
    
    .typing-indicator-wrapper {
        padding: 0 15px 8px 15px;
    }
    
    .modal-content {
        padding: 30px 20px;
        margin: 15px;
    }
}

@media screen and (max-width: 480px) {
    .ai-header-bar {
        padding: 10px 12px;
    }
    
    .ai-logo-pulse {
        width: 36px;
        height: 36px;
    }
    
    .ai-logo-core {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        border-radius: 8px;
    }
    
    .ai-header-info h3 {
        font-size: 0.9rem;
    }
    
    .ai-engine-label {
        font-size: 0.7rem;
    }
    
    .ai-status-chip {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .ai-status-chip i {
        display: none;
    }
    
    .chat-messages-container {
        padding: 12px;
        gap: 12px;
    }
    
    .chat-message-wrapper {
        max-width: 95%;
        gap: 8px;
    }
    
    .chat-avatar {
        width: 30px;
        height: 30px;
    }
    
    .avatar-icon {
        font-size: 0.7rem;
        border-width: 1.5px;
    }
    
    .bubble-header {
        padding: 6px 10px;
    }
    
    .sender-name {
        font-size: 0.7rem;
    }
    
    .message-time {
        font-size: 0.65rem;
    }
    
    .bubble-content {
        padding: 8px 10px;
        font-size: 0.82rem;
    }
    
    .chat-input {
        padding: 10px 36px 10px 32px;
        font-size: 0.82rem;
    }
    
    .input-icon {
        left: 10px;
        font-size: 0.8rem;
    }
    
    .input-action-btn {
        right: 6px;
        padding: 6px;
        font-size: 0.75rem;
    }
    
    .send-button {
        padding: 10px 14px;
        border-radius: 6px;
    }
    
    .ai-capability-list {
        gap: 6px;
    }
    
    .cap-item {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .code-block code {
        font-size: 0.75rem;
    }
}


/* ====================================================
   RAINBOW SPINNING BORDER - AI LOGO
   ==================================================== */

.rainbow-border-spin {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.rainbow-border-spin::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(
        from 0deg,
        #ff0000, #ff7700, #ffff00, #00ff00, 
        #00ffff, #0000ff, #8b00ff, #ff00ff, #ff0000
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: rainbowSpin 3s linear infinite;
}

.rainbow-border-spin.small {
    width: 42px;
    height: 42px;
}

.rainbow-border-spin.xsmall {
    width: 34px;
    height: 34px;
}

.rainbow-border-spin.small::before {
    padding: 2.5px;
}

.rainbow-border-spin.xsmall::before {
    padding: 2px;
}

.rainbow-border-inner {
    width: calc(100% - 6px);
    height: calc(100% - 6px);
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-deep);
    display: flex;
    align-items: center;
    justify-content: center;
}

.rainbow-border-inner.small {
    width: calc(100% - 5px);
    height: calc(100% - 5px);
}

.rainbow-border-inner.xsmall {
    width: calc(100% - 4px);
    height: calc(100% - 4px);
}

.ai-logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    padding: 4px;
}

.rainbow-border-spin.small .ai-logo-img,
.avatar-logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    padding: 3px;
}

.rainbow-border-spin.xsmall .avatar-logo {
    width: 24px;
    height: 24px;
    padding: 2px;
}

@keyframes rainbowSpin {
    to { transform: rotate(360deg); }
}

/* AI Header Logo */
.ai-logo-pulse .rainbow-border-spin {
    width: 52px;
    height: 52px;
}

.ai-logo-pulse .ai-logo-img {
    width: 40px;
    height: 40px;
}

/* ====================================================
   BLINK BORDER - USER AVATAR
   ==================================================== */

.blink-border-container {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.blink-border-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid var(--secondary);
    animation: blinkBorder 2s ease-in-out infinite;
}

.blink-border-ring.ring-2 {
    animation-delay: 0.5s;
}

@keyframes blinkBorder {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
    }
    50% { 
        opacity: 0.3; 
        transform: scale(1.05);
        box-shadow: 0 0 0px rgba(0, 212, 255, 0);
    }
}

.user-avatar-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    position: relative;
    z-index: 1;
    background: var(--bg-deep);
}

/* ====================================================
   USER ATTACHED IMAGE IN CHAT
   ==================================================== */

.user-attached-image {
    margin: 0 14px 10px 14px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(0, 212, 255, 0.3);
    position: relative;
}

.user-attached-image img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.attached-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.7);
    font-size: 0.7rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ====================================================
   INPUT TOOLS BAR
   ==================================================== */

.input-tools-bar {
    display: flex;
    gap: 4px;
    padding: 12px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px 8px 0 0;
    border: 1px solid var(--glass-border);
    border-bottom: none;
}

.tool-icon-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-color: var(--glass-border);
}

.tool-icon-btn.active {
    background: rgba(0, 212, 255, 0.15);
    color: var(--secondary);
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

/* ====================================================
   MODE INDICATOR
   ==================================================== */

.mode-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: var(--secondary);
    animation: fadeInContainer 0.2s ease-out;
}

.mode-cancel-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.mode-cancel-btn:hover {
    color: var(--danger);
    background: rgba(255, 56, 96, 0.15);
}

/* ====================================================
   IMAGE PREVIEW BAR
   ==================================================== */

.image-preview-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--glass-border);
    animation: slideUpPreview 0.3s ease-out;
}

@keyframes slideUpPreview {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.image-preview-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    overflow: hidden;
}

.image-preview-content img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.image-preview-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.image-preview-info span:first-child {
    font-size: 0.85rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-preview-info span:last-child {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.remove-preview-btn {
    background: rgba(255, 56, 96, 0.15);
    border: 1px solid rgba(255, 56, 96, 0.3);
    color: var(--danger);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.remove-preview-btn:hover {
    background: rgba(255, 56, 96, 0.3);
    transform: scale(1.1);
}

/* ====================================================
   RESPONSIVE - CHAT ADDITIONS
   ==================================================== */

@media screen and (max-width: 768px) {
    .rainbow-border-spin {
        width: 36px;
        height: 36px;
    }
    
    .rainbow-border-spin::before {
        padding: 2px;
    }
    
    .rainbow-border-inner {
        width: calc(100% - 4px);
        height: calc(100% - 4px);
    }
    
    .ai-logo-img {
        width: 28px;
        height: 28px;
        padding: 3px;
    }
    
    .rainbow-border-spin.small {
        width: 32px;
        height: 32px;
    }
    
    .avatar-logo {
        width: 24px;
        height: 24px;
        padding: 2px;
    }
    
    .blink-border-container {
        width: 34px;
        height: 34px;
    }
    
    .user-avatar-img {
        width: 30px;
        height: 30px;
    }
    
    .ai-logo-pulse .rainbow-border-spin {
        width: 42px;
        height: 42px;
    }
    
    .ai-logo-pulse .ai-logo-img {
        width: 32px;
        height: 32px;
    }
    
    .input-tools-bar {
        padding: 6px 10px;
    }
    
    .tool-icon-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .image-preview-content img {
        width: 40px;
        height: 40px;
    }
    
    .user-attached-image img {
        max-height: 150px;
    }
}

@media screen and (max-width: 480px) {
    .rainbow-border-spin {
        width: 32px;
        height: 32px;
    }
    
    .rainbow-border-spin::before {
        padding: 1.5px;
    }
    
    .ai-logo-img {
        width: 24px;
        height: 24px;
        padding: 2px;
    }
    
    .rainbow-border-spin.small {
        width: 28px;
        height: 28px;
    }
    
    .avatar-logo {
        width: 20px;
        height: 20px;
        padding: 2px;
    }
    
    .rainbow-border-spin.xsmall {
        width: 24px;
        height: 24px;
    }
    
    .rainbow-border-spin.xsmall .avatar-logo {
        width: 18px;
        height: 18px;
    }
    
    .blink-border-container {
        width: 30px;
        height: 30px;
    }
    
    .user-avatar-img {
        width: 26px;
        height: 26px;
    }
    
    .ai-logo-pulse .rainbow-border-spin {
        width: 38px;
        height: 38px;
    }
    
    .ai-logo-pulse .ai-logo-img {
        width: 28px;
        height: 28px;
    }
    
    .input-tools-bar {
        padding: 5px 8px;
        gap: 2px;
    }
    
    .tool-icon-btn {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    
    .tool-icon-btn span {
        display: none;
    }
    
    .image-preview-bar {
        padding: 8px 12px;
    }
    
    .image-preview-content img {
        width: 36px;
        height: 36px;
    }
    
    .user-attached-image img {
        max-height: 120px;
    }
    
    .mode-indicator {
        font-size: 0.75rem;
        padding: 6px 10px;
    }
}


/* ====================================================
   DASHBOARD STYLING
   ==================================================== */

.dashboard-universe {
    padding: 20px;
    max-width: 1400px;
    margin: auto;
    animation: fadeInContainer 0.4s ease-out;
}

/* Welcome Card */
.dashboard-welcome-card {
    padding: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
    gap: 20px;
}

.welcome-glow {
    position: absolute;
    top: -50px;
    right: 10px;
    width: 150px;
    height: 150px;
    background: var(--emerald-neon);
    filter: blur(90px);
    opacity: 0.15;
    border-radius: 50%;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 0.15; }
    50% { transform: scale(1.2); opacity: 0.25; }
}

.welcome-content {
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 1;
}

.welcome-avatar-section {
    position: relative;
}

.welcome-avatar-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(var(--emerald-neon), var(--secondary), var(--emerald-neon));
    animation: rainbowSpin 4s linear infinite;
}

.welcome-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-deep);
}

.welcome-status-dot {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 14px;
    height: 14px;
    background: var(--emerald-neon);
    border-radius: 50%;
    border: 3px solid var(--bg-deep);
    animation: statusBlink 2s ease-in-out infinite;
}

.welcome-title {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    margin-bottom: 5px;
}

.welcome-subtitle {
    color: var(--text-muted);
    font-size: clamp(0.8rem, 2vw, 0.95rem);
}

.welcome-status-card {
    text-align: right;
    z-index: 1;
    background: rgba(0, 0, 0, 0.4);
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    flex-grow: 1;
    max-width: 300px;
}

.status-card-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.status-card-tier {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.status-card-tier.premium {
    color: var(--emerald-neon);
    text-shadow: 0 0 10px rgba(0, 255, 127, 0.3);
}

.status-card-tier.free {
    color: #fbbf24;
}

.status-card-quota {
    font-size: 0.85rem;
    color: #fff;
}

/* Stats Grid */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.stat-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--accent-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    color: var(--accent);
    border: 1px solid var(--accent-border);
    flex-shrink: 0;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2rem;
    color: white;
    margin: 0;
}

.stat-unit {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: normal;
}

.stat-online {
    font-size: 1.4rem;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Section Header */
.dashboard-section-header {
    margin-bottom: 15px;
}

.dashboard-section-header h3 {
    color: var(--text-main);
    font-size: 1.1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Quick Actions */
.dashboard-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 35px;
}

.quick-action-btn {
    text-align: center;
    text-decoration: none;
    padding: 25px 15px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.quick-action-btn:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(0, 255, 127, 0.15);
}

.qa-icon {
    font-size: 2rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.quick-action-btn:hover .qa-icon {
    transform: scale(1.2);
}

.qa-label {
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
}

/* History Grid */
.dashboard-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.history-card {
    padding: 20px;
    overflow: hidden;
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.history-card-header h3 {
    color: var(--emerald-neon);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.history-view-all {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.history-view-all:hover {
    color: var(--primary);
}

/* Chat Session List */
.chat-session-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-session-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: fadeInRow 0.3s ease-out backwards;
    border: 1px solid transparent;
}

.chat-session-item:hover {
    background: rgba(0, 255, 127, 0.08);
    border-color: rgba(0, 255, 127, 0.2);
}

.session-avatar-mini {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--primary);
}

.session-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: var(--bg-deep);
}

.session-info {
    flex: 1;
    overflow: hidden;
}

.session-preview {
    font-size: 0.85rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.session-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.session-msg-count {
    display: flex;
    align-items: center;
    gap: 4px;
}

.session-arrow {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.chat-session-item:hover .session-arrow {
    transform: translateX(3px);
    color: var(--primary);
}

/* Map Analysis List */
.map-analysis-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-analysis-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: fadeInRow 0.3s ease-out backwards;
    border: 1px solid transparent;
}

.map-analysis-item:hover {
    background: rgba(168, 85, 247, 0.08);
    border-color: rgba(168, 85, 247, 0.2);
}

.analysis-vessel-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a855f7;
    flex-shrink: 0;
}

.analysis-info {
    flex: 1;
    overflow: hidden;
}

.analysis-vessel-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.analysis-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.analysis-mmsi {
    font-family: 'JetBrains Mono', monospace;
}

.analysis-coords {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-family: 'JetBrains Mono', monospace;
}

.analysis-arrow {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.map-analysis-item:hover .analysis-arrow {
    transform: translateX(3px);
    color: #a855f7;
}

/* Invoice List */
.invoice-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.invoice-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    animation: fadeInRow 0.3s ease-out backwards;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.invoice-status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.invoice-status-badge.paid {
    background: rgba(0, 255, 127, 0.15);
    color: var(--emerald-neon);
    border: 1px solid rgba(0, 255, 127, 0.3);
}

.invoice-status-badge.pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.invoice-info {
    flex: 1;
}

.invoice-amount {
    font-weight: 600;
    color: #fff;
}

.invoice-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.invoice-id code {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 3px;
}

/* Empty State */
.history-empty-state {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
}

.history-empty-state i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.5;
    display: block;
}

.history-empty-state p {
    margin-bottom: 10px;
}

/* Modal Session Content */
.modal-session-content {
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    animation: slideUpModal 0.3s ease-out;
}

.modal-session-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-session-header h3 {
    margin: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close-x {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close-x:hover {
    color: var(--danger);
    background: rgba(255, 56, 96, 0.15);
}

.modal-session-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.modal-session-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
}

.modal-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Modal Chat Messages */
.modal-chat-msg {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.modal-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.modal-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-msg-bubble {
    flex: 1;
    max-width: 85%;
}

.modal-msg-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.modal-msg-text {
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.modal-msg-user .modal-msg-text {
    background: rgba(0, 212, 255, 0.12);
    border: 1px solid rgba(0, 212, 255, 0.2);
    margin-left: auto;
}

.modal-msg-ai .modal-msg-text {
    background: rgba(0, 255, 127, 0.06);
    border: 1px solid rgba(0, 255, 127, 0.15);
}

/* Map Analysis Detail Modal */
.map-detail-header {
    margin-bottom: 15px;
}

.map-detail-vessel {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-detail-vessel i {
    color: #a855f7;
}

.map-detail-mmsi {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.map-detail-coords {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--secondary);
    background: rgba(0, 212, 255, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.map-detail-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-detail-result {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 15px;
    font-size: 0.9rem;
    line-height: 1.6;
    max-height: 400px;
    overflow-y: auto;
}

/* ====================================================
   MOBILE SIDEBAR HIDDEN - RESPONSIVE
   ==================================================== */

.sidebar {
    /* Default: visible */
    transition: transform 0.3s ease;
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px !important; /* Paksa ke kanan */
    left: auto !important;  /* Matikan tarikan dari kiri */
    z-index: 2000;
    width: 44px;
    height: 44px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    backdrop-filter: var(--glass);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.2s;
}

.mobile-menu-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    backdrop-filter: blur(3px);
}

.mobile-overlay.active {
    display: block;
}

/* ====================================================
   RESPONSIVE - DASHBOARD
   ==================================================== */

@media screen and (max-width: 1024px) {
    .dashboard-history-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    /* HIDE SIDEBAR */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100%;
        transform: translateX(-100%);
        z-index: 999;
        background: var(--deep-ocean) !important;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    /* SHOW MOBILE MENU BUTTON */
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Dashboard Adjustments */
    .dashboard-universe {
        padding: 15px;
        padding-top: 70px; /* Space for mobile menu button */
    }
    
    .dashboard-welcome-card {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .welcome-content {
        width: 100%;
    }
    
    .welcome-avatar-ring {
        width: 60px;
        height: 60px;
    }
    
    .welcome-status-card {
        width: 100%;
        max-width: 100%;
        text-align: left;
    }
    
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .stat-icon-box {
        width: 45px;
        height: 45px;
        font-size: 1.4rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .dashboard-quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .quick-action-btn {
        padding: 18px 10px;
    }
    
    .qa-icon {
        font-size: 1.6rem;
    }
    
    .qa-label {
        font-size: 0.8rem;
    }
    
    .history-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .session-preview {
        font-size: 0.8rem;
    }
    
    .modal-session-content {
        width: 95%;
        max-height: 85vh;
    }
}

@media screen and (max-width: 480px) {
    .dashboard-universe {
        padding: 10px;
        padding-top: 65px;
    }
    
    .dashboard-welcome-card {
        padding: 15px;
    }
    
    .welcome-avatar-ring {
        width: 50px;
        height: 50px;
    }
    
    .welcome-title {
        font-size: 1.1rem;
    }
    
    .welcome-subtitle {
        font-size: 0.75rem;
    }
    
    .welcome-status-card {
        padding: 12px 15px;
    }
    
    .status-card-tier {
        font-size: 1rem;
    }
    
    .dashboard-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-icon-box {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        border-radius: 8px;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .dashboard-quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .quick-action-btn {
        padding: 15px 8px;
    }
    
    .qa-icon {
        font-size: 1.4rem;
    }
    
    .qa-label {
        font-size: 0.75rem;
    }
    
    .chat-session-item,
    .map-analysis-item {
        padding: 10px;
    }
    
    .session-avatar-mini,
    .analysis-vessel-icon {
        width: 32px;
        height: 32px;
    }
    
    .session-preview,
    .analysis-vessel-name {
        font-size: 0.8rem;
    }
    
    .modal-session-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-session-header {
        padding: 15px;
    }
    
    .modal-session-body {
        padding: 15px;
    }
}


/* ====================================================
   HIDE HEADER ON MOBILE - HAMBURGER FRIENDLY
   ==================================================== */

.header {
    /* Default: visible di desktop */
    display: flex;
}

/* Mobile: sembunyikan header */
@media screen and (max-width: 768px) {
    .header {
        display: none !important;
    }
    
    /* Tambahkan padding top untuk content agar tidak tertutup hamburger */
    .content-area {
        padding-top: 70px !important;
    }
}

@media screen and (max-width: 480px) {
    .content-area {
        padding-top: 65px !important;
    }
}


/* ====================================================
   FLEET MANAGEMENT STYLING
   ==================================================== */

.fleet-universe {
    padding: 20px;
    animation: fadeInContainer 0.4s ease-out;
}

/* Header */
.fleet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.fleet-header-info h2 {
    margin-bottom: 5px;
}

.fleet-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-add-fleet {
    white-space: nowrap;
}

/* Stats Bar */
.fleet-stats-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.fleet-stat-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    animation: slideInStat 0.4s ease-out backwards;
}

.fleet-stat-chip:nth-child(2) { animation-delay: 0.1s; }

.fleet-stat-chip i {
    font-size: 1.1rem;
    color: var(--primary);
}

.fleet-stat-chip.stat-online i {
    color: var(--secondary);
}

.fleet-stat-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
}

.fleet-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Search Bar */
.fleet-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
}

.search-icon {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.fleet-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.fleet-search-input::placeholder {
    color: var(--text-muted);
}

.view-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.view-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 255, 127, 0.1);
}

/* Table Container */
.fleet-table-container {
    overflow-x: auto;
    padding: 0;
}

.fleet-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.fleet-table thead th {
    padding: 14px 15px;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--primary);
    white-space: nowrap;
}

.fleet-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
    animation: fadeInRow 0.3s ease-out backwards;
}

.fleet-table tbody tr:hover {
    background: rgba(0, 255, 127, 0.05);
}

.fleet-table td {
    padding: 14px 15px;
    font-size: 0.9rem;
}

.fleet-empty-cell {
    padding: 0 !important;
}

/* Table Cells */
.vessel-name-cell {
    font-weight: 600;
    color: #fff;
}

.mmsi-cell {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
}

.mmsi-cell i {
    margin-right: 6px;
    font-size: 0.8rem;
}

.mmsi-cell code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.imo-cell {
    color: var(--text-muted);
}

.type-cell {
    white-space: nowrap;
}

.vessel-type-badge {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.25);
    color: var(--secondary);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.flag-cell {
    color: var(--text-muted);
}

.status-cell {
    white-space: nowrap;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.online {
    background: rgba(0, 255, 127, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 255, 127, 0.3);
}

.status-badge.offline {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-badge.unknown {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.action-col {
    text-align: right;
}

.action-cell {
    white-space: nowrap;
}

.action-btn-group {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.action-btn {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.action-btn.btn-track:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 255, 127, 0.1);
}

.action-btn.btn-export:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: rgba(0, 212, 255, 0.1);
}

.action-btn.btn-delete:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(255, 56, 96, 0.1);
}

/* Card View */
.fleet-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.fleet-card {
    padding: 18px;
    animation: fadeInRow 0.4s ease-out backwards;
    transition: transform 0.2s, box-shadow 0.2s;
}

.fleet-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.fleet-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.fleet-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(0, 255, 127, 0.1);
    border: 1px solid rgba(0, 255, 127, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.fleet-card-title {
    flex: 1;
    overflow: hidden;
}

.fleet-card-title h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fleet-card-mmsi {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.fleet-card-mmsi i {
    margin-right: 4px;
    font-size: 0.7rem;
}

.fleet-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 0.85rem;
    color: #fff;
}

.fleet-card-actions {
    display: flex;
    gap: 8px;
}

.card-action-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.card-action-btn.btn-track-card:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 255, 127, 0.1);
}

.card-action-btn.btn-export-card:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: rgba(0, 212, 255, 0.1);
}

.card-action-btn.btn-delete-card:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(255, 56, 96, 0.1);
}

/* Empty State */
.fleet-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.fleet-empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.4;
    display: block;
}

.fleet-card-empty {
    grid-column: 1 / -1;
}

/* Modal Fleet Content */
.modal-fleet-content {
    width: 90%;
    max-width: 500px;
    border-radius: 16px;
    overflow: hidden;
    animation: slideUpModal 0.3s ease-out;
}

.modal-fleet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-fleet-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-fleet-form {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-half {
    flex: 1;
}

.form-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.required {
    color: var(--danger);
}

.fleet-input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 10px 12px;
    border-radius: 6px;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.fleet-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(0, 255, 127, 0.2);
}

.fleet-select {
    appearance: none;
    cursor: pointer;
}

.btn-save-fleet {
    margin-top: 10px;
    width: 100%;
}

/* Delete Modal */
.modal-delete-content {
    width: 90%;
    max-width: 400px;
    padding: 30px;
    text-align: center;
    border-radius: 16px;
    animation: slideUpModal 0.3s ease-out;
}

.delete-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 56, 96, 0.15);
    border: 2px solid rgba(255, 56, 96, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--danger);
}

.modal-delete-content h3 {
    margin-bottom: 10px;
}

.modal-delete-content p {
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.5;
}

.delete-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-cancel-delete {
    padding: 10px 25px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-cancel-delete:hover {
    border-color: #fff;
    color: #fff;
}

.btn-execute-delete {
    padding: 10px 25px;
    border-radius: 8px;
    border: 1px solid var(--danger);
    background: var(--danger);
    color: #fff;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-execute-delete:hover {
    background: #e11d48;
    box-shadow: 0 0 15px rgba(255, 56, 96, 0.4);
}

/* Export Modal */
.modal-export-content {
    width: 90%;
    max-width: 450px;
    border-radius: 16px;
    overflow: hidden;
    animation: slideUpModal 0.3s ease-out;
}

.export-options {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.export-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px 15px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.export-option-btn i {
    font-size: 2rem;
}

.export-option-btn span {
    font-weight: 600;
    font-size: 0.95rem;
}

.export-option-btn small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.export-option-btn:first-child {
    color: var(--danger);
    border-color: rgba(255, 56, 96, 0.3);
}

.export-option-btn:first-child:hover {
    background: rgba(255, 56, 96, 0.1);
    border-color: var(--danger);
}

.export-option-btn:last-child {
    color: var(--primary);
    border-color: rgba(0, 255, 127, 0.3);
}

.export-option-btn:last-child:hover {
    background: rgba(0, 255, 127, 0.1);
    border-color: var(--primary);
}

/* ====================================================
   RESPONSIVE - FLEET
   ==================================================== */

@media screen and (max-width: 768px) {
    .fleet-universe {
        padding: 15px;
        padding-top: 70px;
    }
    
    .fleet-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .btn-add-text {
        display: none;
    }
    
    .btn-add-fleet {
        padding: 12px 16px !important;
    }
    
    .fleet-stats-bar {
        gap: 10px;
    }
    
    .fleet-stat-chip {
        flex: 1;
        padding: 10px 14px;
        justify-content: center;
    }
    
    .fleet-stat-value {
        font-size: 1.1rem;
    }
    
    .fleet-card-container {
        grid-template-columns: 1fr;
    }
    
    .fleet-card-details {
        grid-template-columns: 1fr 1fr;
    }
    
    .modal-fleet-content {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .export-options {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .fleet-universe {
        padding: 10px;
        padding-top: 65px;
    }
    
    .fleet-stat-chip {
        padding: 8px 10px;
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }
    
    .fleet-stat-value {
        font-size: 1rem;
    }
    
    .fleet-stat-label {
        font-size: 0.65rem;
    }
    
    .fleet-search-bar {
        padding: 8px 12px;
    }
    
    .fleet-card {
        padding: 14px;
    }
    
    .fleet-card-header {
        gap: 10px;
    }
    
    .fleet-card-icon {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }
    
    .fleet-card-title h4 {
        font-size: 0.9rem;
    }
    
    .fleet-card-details {
        padding: 10px;
        gap: 8px;
    }
    
    .card-action-btn {
        padding: 8px 8px;
        font-size: 0.75rem;
    }
    
    .card-action-btn span {
        display: none;
    }
    
    .modal-fleet-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-delete-content {
        width: 100%;
        padding: 25px 20px;
    }
    
    .modal-export-content {
        width: 100%;
        border-radius: 0;
    }
}


/* ====================================================
   BILLING PAGE STYLING
   ==================================================== */

.billing-universe {
    padding: 20px;
    max-width: 1000px;
    margin: auto;
    animation: fadeInContainer 0.4s ease-out;
}

/* Profile Section */
.billing-profile-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.billing-profile-card {
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.profile-glow {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    background: var(--primary);
    filter: blur(80px);
    opacity: 0.2;
    border-radius: 50%;
}

.profile-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar-ring {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-ring.premium {
    background: conic-gradient(var(--primary), var(--secondary), var(--primary));
    animation: rainbowSpin 4s linear infinite;
}

.profile-avatar-ring.free {
    border: 3px solid var(--text-muted);
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg-deep);
}

.profile-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid var(--bg-panel);
}

.profile-status-dot.premium {
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
    animation: statusBlink 2s ease-in-out infinite;
}

.profile-status-dot.free {
    background: var(--text-muted);
}

.profile-info h3 {
    color: #fff;
    margin-bottom: 5px;
}

.profile-email {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Status Card */
.billing-status-card {
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.status-card-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    align-self: flex-start;
}

.status-tier-badge.premium {
    background: rgba(0, 255, 127, 0.15);
    border: 1px solid rgba(0, 255, 127, 0.4);
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 255, 127, 0.3);
}

.status-tier-badge.free {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* Quota Section */
.status-quota-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
}

.quota-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.quota-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
}

.quota-value.unlimited {
    color: var(--primary);
}

.quota-unit {
    font-size: 0.85rem;
    font-weight: normal;
    color: var(--text-muted);
}

.quota-bar-wrap {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.quota-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
    transition: width 0.5s ease;
}

.unlimited-bar {
    width: 100% !important;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.quota-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Expiry Section */
.expiry-section {
    background: rgba(0, 0, 0, 0.15);
    padding: 12px;
    border-radius: 6px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.expiry-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.expiry-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2px;
}

.expiry-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Upgrade Section */
.billing-upgrade-section {
    margin-bottom: 30px;
}

.upgrade-header {
    text-align: center;
    margin-bottom: 25px;
}

.upgrade-header h2 {
    margin-bottom: 8px;
}

.upgrade-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Pricing Cards */
.pricing-comparison {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.pricing-card {
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.pricing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.premium-popular {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #000;
    text-align: center;
    padding: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.premium-card {
    border-color: rgba(0, 255, 127, 0.3);
}

.pricing-header {
    text-align: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.premium-card .pricing-header {
    padding-top: 25px;
}

.pricing-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.free-badge {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.premium-badge {
    background: rgba(0, 255, 127, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 255, 127, 0.4);
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
}

.price-amount {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.price-period {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Feature List */
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-item {
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item.included {
    color: var(--text);
}

.feature-item.excluded {
    color: var(--text-muted);
    opacity: 0.5;
}

.feature-item.highlight {
    color: var(--primary);
    font-weight: 600;
}

.feature-item i {
    width: 20px;
    text-align: center;
}

.feature-item.included i {
    color: var(--primary);
}

.feature-item.excluded i {
    color: var(--text-muted);
}

.pricing-current {
    margin-top: 20px;
    padding: 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-upgrade-premium {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-size: 1.05rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: #000;
    font-weight: 700;
}

.btn-upgrade-premium:hover {
    box-shadow: 0 0 20px rgba(0, 255, 127, 0.4);
    transform: translateY(-2px);
}

/* FAQ Section */
.billing-faq-section {
    padding: 25px;
}

.faq-title {
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: var(--text);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    text-align: left;
    transition: background 0.2s;
}

.faq-question:hover,
.faq-question.active {
    background: rgba(255, 255, 255, 0.03);
}

.faq-question i {
    color: var(--text-muted);
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 15px;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding: 0 15px 15px;
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
}

/* Premium Active Section */
.billing-premium-active {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.premium-active-card {
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.premium-active-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary);
}

.premium-check-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--primary);
    animation: pingRing 2s ease-out infinite;
}

@keyframes pingRing {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.5); opacity: 0; }
}

.premium-active-card h2 {
    margin-bottom: 8px;
}

.premium-active-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.premium-features-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.premium-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: rgba(0, 255, 127, 0.08);
    border: 1px solid rgba(0, 255, 127, 0.2);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #fff;
}

.premium-feature-item i {
    color: var(--primary);
}

/* Invoice History */
.billing-history-section {
    padding: 20px;
}

.billing-history-section h3 {
    color: var(--text);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.invoice-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.invoice-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.15);
    animation: fadeInRow 0.3s ease-out backwards;
}

.invoice-status-badge {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.invoice-status-badge.paid {
    background: rgba(0, 255, 127, 0.15);
    color: var(--primary);
    border: 1px solid rgba(0, 255, 127, 0.3);
}

.invoice-status-badge.pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.invoice-info {
    flex: 1;
}

.invoice-amount {
    font-weight: 600;
    color: #fff;
}

.invoice-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.invoice-id code {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 8px;
    border-radius: 4px;
}

.history-loading,
.invoice-empty {
    text-align: center;
    padding: 30px;
    color: var(--text-muted);
}

.invoice-empty i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
    opacity: 0.5;
}

/* ====================================================
   RESPONSIVE - BILLING
   ==================================================== */

@media screen and (max-width: 768px) {
    .billing-universe {
        padding: 15px;
        padding-top: 70px;
    }
    
    .billing-profile-section {
        grid-template-columns: 1fr;
    }
    
    .billing-profile-card {
        justify-content: center;
    }
    
    .profile-avatar-ring {
        width: 60px;
        height: 60px;
    }
    
    .pricing-comparison {
        grid-template-columns: 1fr;
    }
    
    .premium-features-grid {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .invoice-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .invoice-id {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .billing-universe {
        padding: 10px;
        padding-top: 65px;
    }
    
    .billing-profile-card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .profile-info h3 {
        font-size: 1rem;
    }
    
    .billing-status-card {
        padding: 15px;
    }
    
    .status-tier-badge {
        font-size: 1rem;
        padding: 6px 15px;
    }
    
    .quota-value {
        font-size: 1.2rem;
    }
    
    .pricing-card {
        padding: 18px;
    }
    
    .price-amount {
        font-size: 1.6rem;
    }
    
    .feature-item {
        font-size: 0.85rem;
        padding: 8px 0;
    }
    
    .btn-upgrade-premium {
        font-size: 0.95rem;
        padding: 12px;
    }
    
    .premium-active-card {
        padding: 25px;
    }
    
    .premium-active-icon {
        width: 65px;
        height: 65px;
        font-size: 2rem;
    }
    
    .premium-feature-item {
        justify-content: center;
    }
    
    .billing-faq-section {
        padding: 15px;
    }
    
    .faq-question {
        padding: 12px;
        font-size: 0.85rem;
    }
    
    .faq-answer p {
        font-size: 0.8rem;
    }
}


/* ====================================================
   ATW-AI MODAL STYLING (TAMBAHKAN INI)
   ==================================================== */

/* Modal Overlay */
.ai-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ai-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Modal Box */
.ai-modal-box {
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from { transform: translateY(30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Modal Header */
.ai-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.ai-modal-title {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-modal-title i {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.loading {
    background: #fbbf24;
    animation: statusPulse 1s ease-in-out infinite;
}

.status-dot.active {
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

.status-dot.error {
    background: var(--danger);
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
}

.ai-modal-close {
    background: none;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
}

.ai-modal-close:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(255, 56, 96, 0.15);
}

/* Modal Body */
.ai-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    line-height: 1.6;
}

.ai-modal-body::-webkit-scrollbar {
    width: 6px;
}

.ai-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.ai-modal-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* Modal Footer */
.ai-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.pdf-btn, .download-img-btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.pdf-btn:hover {
    background: rgba(0, 255, 127, 0.15);
    box-shadow: 0 0 10px rgba(0, 255, 127, 0.3);
}

.download-img-btn {
    border-color: var(--secondary);
    color: var(--secondary);
}

.download-img-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* ====================================================
   AI IMAGE CONTAINER
   ==================================================== */

.ai-image-container {
    position: relative;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.ai-image-container:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.ai-image-container img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.ai-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    pointer-events: none;
}

.ai-image-corner-tr,
.ai-image-corner-bl {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--primary);
    pointer-events: none;
}

.ai-image-corner-tr {
    top: 10px;
    right: 10px;
    border-top: 2px solid;
    border-right: 2px solid;
}

.ai-image-corner-bl {
    bottom: 40px;
    left: 10px;
    border-bottom: 2px solid;
    border-left: 2px solid;
}

.ai-image-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    display: flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
}

.ai-image-badge.generated {
    background: rgba(0, 255, 127, 0.2);
    border: 1px solid rgba(0, 255, 127, 0.5);
    color: var(--primary);
}

.ai-image-badge.real {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid rgba(0, 212, 255, 0.5);
    color: var(--secondary);
}

.ai-image-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
}

.ai-image-info-left {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 5px;
}

.ai-image-info-right {
    display: flex;
    gap: 6px;
}

.ai-image-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.ai-image-action-btn:hover {
    background: rgba(0, 255, 127, 0.3);
    border-color: var(--primary);
}

/* ====================================================
   AI LOADING STATE
   ==================================================== */

.ai-image-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 20px;
}

.loading-pulse {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--primary);
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0% { transform: scale(0.8); opacity: 1; border-color: var(--primary); }
    50% { transform: scale(1.2); opacity: 0.5; border-color: var(--secondary); }
    100% { transform: scale(0.8); opacity: 1; border-color: var(--primary); }
}

.loading-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--primary);
    letter-spacing: 2px;
}

.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    overflow: hidden;
}

.glitch-text::before {
    animation: glitch-1 2s infinite linear alternate-reverse;
    clip-path: inset(0 0 100% 0);
}

.glitch-text::after {
    animation: glitch-2 2s infinite linear alternate-reverse;
    clip-path: inset(0 0 0 100%);
}

@keyframes glitch-1 {
    0% { transform: translateX(0); }
    20% { transform: translateX(-3px); }
    40% { transform: translateX(3px); }
    60% { transform: translateX(-1px); }
    80% { transform: translateX(2px); }
    100% { transform: translateX(0); }
}

@keyframes glitch-2 {
    0% { transform: translateX(0); }
    20% { transform: translateX(2px); }
    40% { transform: translateX(-2px); }
    60% { transform: translateX(3px); }
    80% { transform: translateX(-1px); }
    100% { transform: translateX(0); }
}

.loading-progress {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress::after {
    content: '';
    display: block;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    animation: loadingBar 1.5s ease-in-out infinite;
}

@keyframes loadingBar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

.ai-neon-loading {
    text-align: center;
    color: var(--text-muted);
}

.ai-neon-loading i {
    display: block;
    font-size: 32px;
    margin-bottom: 15px;
}

#aiProgressText {
    font-size: 0.9rem;
    margin-bottom: 5px;
}

#aiTimer {
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: 8px;
}

.neon-scanner {
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    margin: 15px auto 0;
    animation: scannerMove 2s ease-in-out infinite;
}

@keyframes scannerMove {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

/* ====================================================
   AI ANALYSIS TEXT
   ==================================================== */

.ai-analysis-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text);
}

.ai-analysis-text strong {
    color: #fff;
}

.ai-analysis-text br {
    display: block;
    margin: 8px 0;
    content: '';
}

.highlight-warning {
    color: #fbbf24;
    font-weight: 600;
    background: rgba(251, 191, 36, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

.highlight-danger {
    color: var(--danger);
    font-weight: 600;
    background: rgba(255, 56, 96, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
}

/* ====================================================
   AI ERROR STATE
   ==================================================== */

.ai-neon-error {
    text-align: center;
    padding: 40px 20px;
    color: var(--danger);
    font-size: 0.95rem;
}

.ai-neon-error i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
    animation: errorPulse 1.5s ease-in-out infinite;
}

@keyframes errorPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ====================================================
   LIGHTBOX
   ==================================================== */

.ai-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.ai-lightbox-overlay.active {
    display: flex;
    animation: lightboxFadeIn 0.2s ease;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ai-lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.ai-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 1;
}

.ai-lightbox-close:hover {
    background: var(--danger);
    border-color: var(--danger);
}

.ai-lightbox-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    pointer-events: none;
}

/* ====================================================
   PDF EXPORT WRAPPER (HIDDEN)
   ==================================================== */

.pdf-export-wrapper {
    font-family: 'Inter', sans-serif;
    color: #fff;
    padding: 30px;
    width: 210mm;
    background: #061423;
}

/* ====================================================
   AI TOAST CONTAINER (TAMBAHKAN JIKA BELUM ADA)
   ==================================================== */

.ai-toast-container {
    position: fixed;
    top: 80px;
    right: 15px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.ai-toast {
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    animation: toastSlideIn 0.3s ease-out;
    pointer-events: auto;
}

.ai-toast.success {
    background: rgba(0, 255, 127, 0.15);
    border: 1px solid rgba(0, 255, 127, 0.4);
    color: var(--primary);
}

.ai-toast.error {
    background: rgba(255, 56, 96, 0.15);
    border: 1px solid rgba(255, 56, 96, 0.4);
    color: var(--danger);
}

.ai-toast.info {
    background: rgba(0, 212, 255, 0.15);
    border: 1px solid rgba(0, 212, 255, 0.4);
    color: var(--secondary);
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ====================================================
   RESPONSIVE - AI MODAL
   ==================================================== */

@media screen and (max-width: 768px) {
    .ai-modal-box {
        width: 95%;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .ai-modal-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        padding: 15px;
    }
    
    .ai-modal-title {
        font-size: 0.9rem;
    }
    
    .ai-modal-body {
        padding: 15px;
    }
    
    .ai-image-container img {
        max-height: 250px;
    }
    
    .ai-modal-footer {
        padding: 12px 15px;
    }
    
    .pdf-btn, .download-img-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .ai-lightbox-image {
        max-width: 95vw;
    }
    
    .ai-lightbox-close {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
    }
}

@media screen and (max-width: 480px) {
    .ai-modal-box {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .ai-modal-header {
        padding: 12px 15px;
    }
    
    .ai-modal-title {
        font-size: 0.85rem;
    }
    
    .ai-modal-body {
        padding: 12px;
    }
    
    .ai-image-container {
        border-radius: 8px;
        margin-bottom: 15px;
    }
    
    .ai-image-container img {
        max-height: 200px;
    }
    
    .ai-image-info-left {
        font-size: 0.65rem;
    }
    
    .ai-image-action-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .ai-image-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    
    .ai-analysis-text {
        font-size: 0.85rem;
    }
    
    .ai-modal-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .pdf-btn, .download-img-btn {
        width: 100%;
        justify-content: center;
    }
    
    .ai-lightbox-overlay {
        padding: 10px;
    }
    
    .ai-lightbox-image {
        max-width: 100%;
        max-height: 80vh;
        border-radius: 6px;
    }
    
    .ai-lightbox-close {
        top: 8px;
        right: 8px;
        width: 34px;
        height: 34px;
    }
    
    .ai-lightbox-info {
        bottom: 15px;
        font-size: 0.7rem;
        padding: 6px 12px;
    }
    
    .ai-toast-container {
        right: 10px;
        left: 10px;
        top: auto;
        bottom: 70px;
    }
    
    .ai-toast {
        font-size: 0.8rem;
        padding: 10px 14px;
    }
}


/* ====================================================
   TOOLS PAGE STYLING (TAMBAHKAN DI BAWAH KODE STYLE.CSS)
   ==================================================== */

/* ====================================================
   TOS & PRIVACY PAGE STYLING (STANDALONE - TANPA DI STYLE.CSS)
   ==================================================== */

/* ====================================================
   RESPONSIVE - TOSS & PRIVACY
   ==================================================== */

@media screen and (max-width: 768px) {
    .tos-container {
        padding: 25px 15px;
    }
    
    .tos-header {
        margin-bottom: 25px;
        padding-bottom: 20px;
    }
    
    .tos-title {
        font-size: 1.5rem;
    }
    
    .glass-panel {
        padding: 20px;
        border-radius: 10px;
    }
    
    .section-content {
        font-size: 0.9rem;
        line-height: 1.7;
    }
    
    .content-list li {
        padding: 6px 0 6px 20px;
    }
    
    .ordered-list li {
        padding: 6px 0 6px 25px;
    }
    
    .ordered-list::before {
        margin-right: 5px;
    }
    
    .highlight-box {
        padding: 12px;
    }
    
    .info-box {
        padding: 12px;
    }
    
    .contact-section {
        padding: 15px;
        margin-top: 20px;
    }
    
    .contact-item {
        font-size: 0.8rem;
    }
    
    .contact-item i {
        width: 18px;
    }
}

@media screen and (max-width: 480px) {
    .tos-container {
        padding: 20px 12px;
    }
    
    .tos-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .tos-title {
        font-size: 1.3rem;
    }
    
    .glass-panel {
        padding: 15px;
        border-radius: 10px;
    }
    
    .section-title {
        font-size: 1.05rem;
        margin-bottom: 12px;
        gap: 8px;
    }
    
    .section-content p:last-child {
        margin-bottom: 0;
    }
    
    .content-list li {
        padding: 5px 0 5px 15px;
    }
    
    .ordered-list::before {
        margin-right: 5px;
    }
    
    .highlight-box {
        padding: 10px;
    }
    
    .info-box {
        padding: 10px;
    }
    
    .contact-item {
        font-size: 0.75rem;
    }
    
    .contact-item i {
        width: 16px;
    }
    
    .tos-footer {
        margin-top: 25px;
        padding: 15px;
    }
    
    .tos-footer a {
        font-size: 0.75rem;
    }
}


/* ====================================================
   CUSTOM MODIFICATIONS & FIXES
   ==================================================== */

/* Menurunkan Tools Bar 1 ikon ke bawah */
.tools-bar {
    top: 130px !important;
}

/* Memperbaiki visibilitas gambar AI di Mobile agar tidak ter-squish */
@media screen and (max-width: 768px) {
    .ai-image-container {
        display: block !important;
        width: 100% !important;
        min-height: 150px;
    }
    .ai-image-container img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-height: none !important; 
    }
}

/* ================================================================
   KEMINFO WEATHER INTELLIGENCE
   ================================================================ */

/* ================================================================
   KEMINFO WEATHER INTELLIGENCE — LAYOUT RESET
   ================================================================ */

/* Override apapun yang ada di global CSS */
html:has(.wx-body) {
    overflow: hidden !important;
    height: 100% !important;
}
/* ===== KEMINFO WEATHER INTELLIGENCE INTEGRATED FIX ===== */

/* Pastikan parent utama berorientasi horizontal di desktop */
.wx-body {
    display: flex !important;
    flex-direction: row !important; /* Panel kiri, peta kanan */
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    overflow: hidden;
    background: #060d1f;
    color: #e8f0fe;
    box-sizing: border-box !important;
}

/* Perbaikan Map Wrap Desktop agar memaksa mengambil sisa ruang visual */
.wx-map-wrap {
    flex: 1 !important;
    align-self: stretch !important;
    position: relative !important;
    height: 100% !important; /* Memastikan tinggi penuh di desktop */
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* Pastikan element Leaflet Map mengisi seluruh area pembungkusnya */
#wxMap {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1;
}

/* ================================================================ 
   MOBILE — BOTTOM SHEET & SCROLL FIX
   ================================================================ */
@media (max-width: 768px) {
    .wx-body {
        flex-direction: column !important;
        height: 100dvh !important;   /* Menggunakan dynamic viewport height */
        overflow-y: auto !important; /* MENGIZINKAN SCROLL KE BAWAH DI MOBILE */
        overflow-x: hidden !important;
        display: flex !important;
    }
    
    .wx-map-wrap {
        height: 45vh !important;     /* Sedikit dikurangi agar bagian atas panel cuaca langsung terlihat */
        width: 100% !important;
        flex: none !important;
        position: relative !important;
        z-index: 10;                 /* Memastikan peta tidak tertimpa elemen lain */
    }

    /* Pastikan panel data cuaca di bawah peta menyesuaikan sisa ruang dan tidak tertahan */
    .wx-body > div:not(.wx-map-wrap) {
        flex: 1 !important;
        height: auto !important;
        overflow: visible !important; 
    }
}

/* ===== HOME BUTTON ===== */
.wx-home-btn {
    position: absolute;
    top: 12px; right: 12px;
    z-index: 1000;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(6, 20, 35, 0.82);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e8f0fe;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.wx-home-btn:hover {
    border-color: #00d4ff;
    color: #00d4ff;
    box-shadow: 0 0 18px rgba(0,212,255,0.25);
    transform: scale(1.08);
}

/* ===== MAP HINT ===== */
.wx-hint {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 700;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 13px;
    pointer-events: none;
    animation: wxHintPulse 3s ease-in-out infinite;
}
.wx-hint i { display: block; font-size: 28px; margin-bottom: 10px; }
@keyframes wxHintPulse {
    0%,100% { opacity: 0.35; transform: translate(-50%,-50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%,-50%) scale(1.04); }
}

/* ===== LAYER CHIPS (ON MAP) ===== */
.wx-layers {
    position: absolute;
    top: 12px; left: 12px;
    z-index: 800;
    display: flex; gap: 5px;
}
.wx-lc {
    width: 36px; height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(6, 20, 35, 0.78);
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.wx-lc:hover { border-color: rgba(0,212,255,0.3); color: #e8f0fe; }
.wx-lc.active {
    background: rgba(0,212,255,0.12);
    border-color: rgba(0,212,255,0.45);
    color: #00d4ff;
    box-shadow: 0 0 14px rgba(0,212,255,0.15);
}

/* ===== MINI CARDS (ON MAP) ===== */
.wx-minis {
    position: absolute;
    bottom: 40px; left: 10px;
    z-index: 800;
    display: flex; gap: 6px;
}
.wx-mi {
    background: rgba(6, 20, 35, 0.84);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0,212,255,0.14);
    border-radius: 12px;
    padding: 10px 14px;
    min-width: 82px;
    text-align: center;
    animation: wxMiIn 0.4s ease backwards;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.wx-mi:nth-child(2) { animation-delay: 0.08s; }
.wx-mi:nth-child(3) { animation-delay: 0.16s; }
@keyframes wxMiIn {
    from { opacity: 0; transform: translateY(14px) scale(0.92); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.wx-mi-ic { font-size: 16px; margin-bottom: 4px; }
.wx-mi-v { font-size: 18px; font-weight: 800; color: #fff; font-family: 'JetBrains Mono', monospace; line-height: 1.2; }
.wx-mi-l { font-size: 9px; color: rgba(255,255,255,0.3); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ===== CLICK RIPPLE ===== */
.wx-rp {
    width: 40px; height: 40px; border-radius: 50%;
    border: 2px solid #00d4ff;
    animation: wxRp 1.2s ease-out forwards;
}
@keyframes wxRp {
    0% { transform: scale(0.3); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

/* ===== DATA PANEL ===== */
.wx-panel {
    width: 400px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: rgba(6, 20, 35, 0.96);
    border-left: 1px solid rgba(0,212,255,0.08);
    z-index: 10;
}
.wx-handle { display: none; }
.wx-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,212,255,0.15) transparent;
}
.wx-scroll::-webkit-scrollbar { width: 4px; }
.wx-scroll::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.15); border-radius: 4px; }

/* ===== PANEL: HEAD ===== */
.wx-head {
    display: flex; align-items: center; gap: 14px;
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(0,212,255,0.06);
}
.wx-head-icon {
    width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(0,212,255,0.14), rgba(139,92,246,0.14));
    border: 1px solid rgba(0,212,255,0.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; color: #00d4ff;
}
.wx-head h1 {
    font-size: 15px; font-weight: 800; letter-spacing: 2.5px;
    color: #e8f0fe; margin: 0; line-height: 1.2;
}
.wx-head p {
    font-size: 10px; color: rgba(255,255,255,0.28);
    letter-spacing: 0.8px; margin: 4px 0 0;
    font-family: 'JetBrains Mono', monospace;
}

/* ===== PANEL: LOCATION ===== */
.wx-loc {
    display: flex; gap: 16px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.wx-loc-item { display: flex; align-items: center; gap: 8px; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.wx-loc-k {
    font-size: 9px; font-weight: 700; color: #00d4ff;
    background: rgba(0,212,255,0.08); padding: 2px 7px; border-radius: 4px;
    letter-spacing: 1px;
}

/* ===== PANEL: SECTIONS ===== */
.wx-sec { padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.wx-sec-t {
    font-size: 10px; font-weight: 700; letter-spacing: 2px;
    color: #00d4ff; margin-bottom: 12px;
    display: flex; align-items: center; gap: 6px;
    text-transform: uppercase;
}
.wx-sec-t i { font-size: 11px; }

/* ===== GRID CARDS ===== */
.wx-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.wx-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    animation: wxCardIn 0.4s ease backwards;
    animation-delay: calc(var(--d, 0) * 0.06s);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.wx-card:hover {
    border-color: rgba(0,212,255,0.15);
    box-shadow: 0 0 18px rgba(0,212,255,0.05);
}
@keyframes wxCardIn {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.wx-card-ic { font-size: 18px; margin-bottom: 6px; }
.wx-card-v {
    font-size: 20px; font-weight: 800; color: #fff; line-height: 1;
    font-family: 'JetBrains Mono', monospace;
}
.wx-card-v small { font-size: 10px; font-weight: 400; color: rgba(255,255,255,0.35); }
.wx-card-l { font-size: 9px; color: rgba(255,255,255,0.3); margin-top: 5px; line-height: 1.3; }

/* ===== SKELETON ===== */
.wx-sk {
    background: linear-gradient(90deg, rgba(255,255,255,0.025) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.025) 75%);
    background-size: 200% 100%;
    animation: wxShim 1.5s ease infinite;
    min-height: 80px;
    border: none !important;
}
@keyframes wxShim {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== FORECAST ===== */
.wx-fc { display: flex; flex-direction: column; gap: 3px; }
.wx-fc-r {
    display: grid;
    grid-template-columns: 64px 34px 22px 1fr 68px 52px 42px;
    align-items: center; gap: 5px;
    padding: 9px 10px; border-radius: 8px;
    font-size: 11px;
    background: rgba(255,255,255,0.012);
    animation: wxFcIn 0.3s ease backwards;
    transition: background 0.2s;
}
.wx-fc-r:hover { background: rgba(255,255,255,0.035); }
@keyframes wxFcIn {
    from { opacity: 0; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
}
.wx-fc-d { font-weight: 700; color: #e8f0fe; }
.wx-fc-dt { color: rgba(255,255,255,0.25); font-size: 10px; font-family: 'JetBrains Mono', monospace; }
.wx-fc-ic { font-size: 13px; text-align: center; }
.wx-fc-tx { color: rgba(255,255,255,0.45); font-size: 10px; }
.wx-fc-tp { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: #fff; font-size: 11px; text-align: right; }
.wx-fc-w, .wx-fc-wv { color: rgba(255,255,255,0.3); font-size: 10px; text-align: center; }
.wx-fc-w i, .wx-fc-wv i { margin-right: 2px; }
.wx-fc-pp {
    font-size: 9px; font-weight: 700; text-align: center;
    color: #3b82f6; background: rgba(59,130,246,0.1);
    padding: 2px 6px; border-radius: 10px;
}

/* ===== AI CHAT ===== */
.wx-ai-sec { border-bottom: none !important; }
.wx-qb { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.wx-qb-btn {
    padding: 5px 11px; border-radius: 16px; font-size: 10px;
    background: rgba(139,92,246,0.07); border: 1px solid rgba(139,92,246,0.18);
    color: #a78bfa; cursor: pointer; font-family: 'Inter', sans-serif;
    transition: all 0.2s; white-space: nowrap;
}
.wx-qb-btn:hover { background: rgba(139,92,246,0.14); border-color: rgba(139,92,246,0.35); }

.wx-msgs {
    max-height: 240px; overflow-y: auto; margin-bottom: 10px;
    display: flex; flex-direction: column; gap: 8px;
    scrollbar-width: thin; scrollbar-color: rgba(139,92,246,0.15) transparent;
}
.wx-msgs::-webkit-scrollbar { width: 3px; }
.wx-msgs::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.15); border-radius: 3px; }

.wx-m { display: flex; }
.wx-m-user { justify-content: flex-end; }
.wx-m-bot { justify-content: flex-start; }
.wx-b {
    max-width: 88%; padding: 10px 14px; border-radius: 14px;
    font-size: 12px; line-height: 1.55;
    animation: wxBubIn 0.3s ease;
}
@keyframes wxBubIn {
    from { opacity: 0; transform: translateY(6px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.wx-m-user .wx-b {
    background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.18);
    border-bottom-right-radius: 4px; color: #e8f0fe;
}
.wx-m-bot .wx-b {
    background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.05);
    border-bottom-left-radius: 4px; color: rgba(255,255,255,0.75);
}
.wx-tp {
    display: flex; gap: 4px; padding: 12px 16px;
    background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px; border-bottom-left-radius: 4px;
}
.wx-tp span {
    width: 7px; height: 7px; border-radius: 50%;
    background: #8b5cf6; animation: wxDot 1.2s ease-in-out infinite;
}
.wx-tp span:nth-child(2) { animation-delay: 0.15s; }
.wx-tp span:nth-child(3) { animation-delay: 0.3s; }
@keyframes wxDot {
    0%,80%,100% { transform: scale(0.4); opacity: 0.25; }
    40% { transform: scale(1); opacity: 1; }
}

.wx-ai-in { display: flex; gap: 6px; }
.wx-ai-in input {
    flex: 1; padding: 10px 14px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.03);
    color: #e8f0fe; font-size: 12px; font-family: 'Inter', sans-serif;
    outline: none; transition: border-color 0.2s;
}
.wx-ai-in input::placeholder { color: rgba(255,255,255,0.18); }
.wx-ai-in input:focus { border-color: rgba(139,92,246,0.35); }
.wx-ai-in button {
    width: 40px; height: 40px; border-radius: 10px;
    background: rgba(139,92,246,0.12); border: 1px solid rgba(139,92,246,0.25);
    color: #a78bfa; cursor: pointer; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.wx-ai-in button:hover:not(:disabled) {
    background: rgba(139,92,246,0.22); border-color: #8b5cf6;
    box-shadow: 0 0 14px rgba(139,92,246,0.18);
}
.wx-ai-in button:disabled { opacity: 0.25; cursor: not-allowed; }

/* ===== TOAST ===== */
.wx-toasts {
    position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
    z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.wx-t {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 10px;
    font-size: 12px; white-space: nowrap;
    background: rgba(6,20,35,0.92); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    animation: wxIn 0.3s ease;
    box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}
@keyframes wxIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes wxOut { to { opacity: 0; transform: translateY(-12px); } }
.wx-t-success { border-color: rgba(0,255,127,0.25); }
.wx-t-success i { color: #00ff7f; }
.wx-t-error { border-color: rgba(239,68,68,0.25); }
.wx-t-error i { color: #ef4444; }
.wx-t-info i { color: #00d4ff; }

/* ===== UTILITY ===== */
.hidden { display: none !important; }

/* ================================================================
   MOBILE — BOTTOM SHEET
   ================================================================ */
@media (max-width: 768px) {
    .wx-body {
        flex-direction: column;
    }

    .wx-map-wrap {
        flex: none;
        height: 52vh;
        min-height: 30vh;
    }

    .wx-panel {
        flex: 1;
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(0,212,255,0.1);
        border-radius: 22px 22px 0 0;
        background: rgba(6,20,35,0.98);
        box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
        min-height: 0;
    }

    .wx-handle {
        display: flex;
        justify-content: center;
        padding: 10px 0 2px;
        cursor: grab;
        flex-shrink: 0;
    }
    .wx-handle-bar {
        width: 38px; height: 4px; border-radius: 4px;
        background: rgba(255,255,255,0.18);
    }

    .wx-head { padding: 16px 18px 14px; }
    .wx-head-icon { width: 40px; height: 40px; font-size: 16px; border-radius: 11px; }
    .wx-head h1 { font-size: 13px; letter-spacing: 2px; }
    .wx-head p { font-size: 9px; }

    .wx-sec { padding: 14px 18px; }

    .wx-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .wx-card { padding: 12px 8px; }
    .wx-card-v { font-size: 17px; }
    .wx-card-l { font-size: 8px; }

    .wx-fc-r {
        grid-template-columns: 56px 30px 20px 1fr 60px 46px;
        padding: 8px 8px; font-size: 10px; gap: 3px;
    }
    .wx-fc-tx { display: none; }

    .wx-msgs { max-height: 180px; }

    .wx-qb-btn { font-size: 9px; padding: 4px 9px; }

    .wx-minis { bottom: 35px; left: 8px; gap: 4px; }
    .wx-mi { padding: 8px 10px; min-width: 72px; border-radius: 10px; }
    .wx-mi-v { font-size: 15px; }
    .wx-mi-l { font-size: 8px; }

    .wx-layers { top: 10px; left: 10px; gap: 4px; }
    .wx-lc { width: 32px; height: 32px; font-size: 12px; border-radius: 8px; }

    .wx-home-btn { width: 36px; height: 36px; font-size: 13px; top: 10px; right: 10px; }

    .wx-hint { font-size: 12px; }
    .wx-hint i { font-size: 22px; }
}

@media (max-width: 380px) {
    .wx-fc-r {
        grid-template-columns: 50px 18px 1fr 56px 38px;
    }
    .wx-fc-dt, .wx-fc-wv { display: none; }
}


/* ================================================================
   KEMINFO FLEET COMMAND — fl- prefixed
   ================================================================ */

html:has(.fl-body) {
    overflow: hidden !important;
    height: 100% !important;
}

body.fl-body {
    position: fixed !important;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    margin: 0 !important; padding: 0 !important;
    width: 100% !important; height: 100% !important;
    overflow: hidden !important;
    font-family: 'Inter', sans-serif;
    background: #060d1f;
    color: #e8f0fe;
}

body.fl-body *, body.fl-body *::before, body.fl-body *::after {
    box-sizing: border-box !important;
}

/* ===== HOME ===== */
.fl-home {
    position: absolute; top: 12px; right: 12px; z-index: 2000;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(6,20,35,0.85); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e8f2fe; display: flex; align-items: center; justify-content: center;
    font-size: 15px; text-decoration: none;
    transition: all 0.25s; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.fl-home:hover { border-color: #00d4ff; color: #00d4ff; box-shadow: 0 0 18px rgba(0,212,255,0.25); transform: scale(1.08); }

/* ===== LAYOUT ===== */
.fl-wrap {
    position: absolute; inset: 0;
    display: flex;
}

/* ===== SIDEBAR ===== */
.fl-side {
    width: 320px; flex-shrink: 0;
    background: rgba(6,20,35,0.97);
    border-right: 1px solid rgba(0,212,255,0.07);
    display: flex; flex-direction: column;
    overflow: hidden; z-index: 10;
}

.fl-side-head {
    display: flex; align-items: center; gap: 14px;
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(0,212,255,0.06);
    flex-shrink: 0;
}
.fl-side-icon {
    width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
    background: linear-gradient(135deg, rgba(0,212,255,0.14), rgba(0,255,127,0.14));
    border: 1px solid rgba(0,212,255,0.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 19px; color: #00d4ff;
}
.fl-side-head h1 { font-size: 15px; font-weight: 800; letter-spacing: 2.5px; margin: 0; line-height: 1.2; }
.fl-side-head p { font-size: 10px; color: rgba(255,255,255,0.28); letter-spacing: 0.8px; margin: 4px 0 0; font-family: 'JetBrains Mono', monospace; }

/* Stats */
.fl-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 6px; padding: 14px 16px; flex-shrink: 0;
}
.fl-stat {
    text-align: center; padding: 10px 4px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
}
.fl-stat-v { font-size: 20px; font-weight: 800; color: #fff; font-family: 'JetBrains Mono', monospace; }
.fl-stat-l { font-size: 8px; color: rgba(255,255,255,0.3); margin-top: 2px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Section Title */
.fl-side-title {
    font-size: 10px; font-weight: 700; letter-spacing: 2px;
    color: #00d4ff; padding: 14px 16px 8px;
    display: flex; align-items: center; gap: 6px;
    text-transform: uppercase; flex-shrink: 0;
}
.fl-side-title i { font-size: 11px; }

.fl-add-btn {
    margin-left: auto; width: 26px; height: 26px; border-radius: 7px;
    background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.25);
    color: #00d4ff; cursor: pointer; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.fl-add-btn:hover { background: rgba(0,212,255,0.2); border-color: #00d4ff; }

/* Vessel List */
.fl-vlist {
    flex: 1; overflow-y: auto; padding: 0 10px 10px;
    scrollbar-width: thin; scrollbar-color: rgba(0,212,255,0.12) transparent;
}
.fl-vlist::-webkit-scrollbar { width: 3px; }
.fl-vlist::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.12); border-radius: 3px; }

.fl-vitem {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 10px; border-radius: 10px;
    cursor: pointer; transition: background 0.2s;
    animation: flSlideIn 0.3s ease backwards;
    margin-bottom: 2px;
}
.fl-vitem:hover { background: rgba(255,255,255,0.03); }
@keyframes flSlideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

.fl-vitem-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    box-shadow: 0 0 8px currentColor;
    animation: flPulse 2.5s ease-in-out infinite;
}
@keyframes flPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.fl-vitem-info { flex: 1; min-width: 0; }
.fl-vitem-name { font-size: 12px; font-weight: 600; color: #e8f0fe; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl-vitem-meta { font-size: 10px; color: rgba(255,255,255,0.3); margin-top: 1px; }

.fl-vitem-actions { display: flex; gap: 4px; opacity: 0; transition: opacity 0.2s; }
.fl-vitem:hover .fl-vitem-actions { opacity: 1; }
.fl-vitem-actions button {
    width: 26px; height: 26px; border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.4); cursor: pointer; font-size: 10px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.fl-vitem-actions button:hover { border-color: rgba(0,212,255,0.3); color: #00d4ff; }

/* Summary */
.fl-summary { padding: 0 16px 16px; flex-shrink: 0; }
.fl-sum-row {
    display: flex; justify-content: space-between;
    padding: 6px 0; font-size: 11px;
    border-bottom: 1px solid rgba(255,255,255,0.025);
}
.fl-sum-row span:last-child { color: #fff; font-family: 'JetBrains Mono', monospace; font-weight: 600; }
.fl-sum-row span:first-child { color: rgba(255,255,255,0.35); }

/* ===== MAIN ===== */
.fl-main {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
    overflow: hidden;
}

.fl-main-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px 28px 16px; flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.fl-main-head h2 { font-size: 16px; font-weight: 800; letter-spacing: 2px; margin: 0; }
.fl-main-head p { font-size: 10px; color: rgba(255,255,255,0.28); margin: 4px 0 0; font-family: 'JetBrains Mono', monospace; }

.fl-new-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: 10px;
    background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.3);
    color: #00d4ff; cursor: pointer; font-size: 12px; font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s;
}
.fl-new-btn:hover { background: rgba(0,212,255,0.18); border-color: #00d4ff; box-shadow: 0 0 18px rgba(0,212,255,0.15); }

/* Filter */
.fl-filter {
    display: flex; gap: 6px; padding: 12px 28px; flex-shrink: 0;
    overflow-x: auto; scrollbar-width: none;
}
.fl-filter::-webkit-scrollbar { display: none; }

.fl-fc {
    padding: 6px 14px; border-radius: 18px; font-size: 11px; font-weight: 600;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.4); cursor: pointer; white-space: nowrap;
    font-family: 'Inter', sans-serif; transition: all 0.2s;
}
.fl-fc:hover { border-color: rgba(0,212,255,0.2); color: #e8f0fe; }
.fl-fc.active { background: rgba(0,212,255,0.1); border-color: rgba(0,212,255,0.4); color: #00d4ff; }

/* Logbook List */
.fl-loglist {
    flex: 1; overflow-y: auto; padding: 4px 28px 28px;
    scrollbar-width: thin; scrollbar-color: rgba(0,212,255,0.12) transparent;
}
.fl-loglist::-webkit-scrollbar { width: 4px; }
.fl-loglist::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.12); border-radius: 4px; }

.fl-logcard {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 18px; border-radius: 12px;
    background: rgba(255,255,255,0.018);
    border: 1px solid rgba(255,255,255,0.04);
    margin-bottom: 8px; cursor: pointer;
    transition: all 0.25s;
    animation: flCardIn 0.35s ease backwards;
}
.fl-logcard:hover { background: rgba(255,255,255,0.035); border-color: rgba(0,212,255,0.12); transform: translateX(4px); }
@keyframes flCardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.fl-logcard-left { min-width: 0; flex-shrink: 0; }
.fl-logcard-voy { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; color: #00d4ff; }
.fl-logcard-route { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 2px; display: flex; align-items: center; gap: 6px; }
.fl-logcard-route i { font-size: 9px; color: rgba(255,255,255,0.2); }

.fl-logcard-mid { flex: 1; min-width: 0; }
.fl-logcard-ship { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.fl-logcard-dates { font-size: 10px; color: rgba(255,255,255,0.25); font-family: 'JetBrains Mono', monospace; }

.fl-logcard-right { text-align: right; flex-shrink: 0; }
.fl-logcard-stat { font-size: 11px; color: rgba(255,255,255,0.5); font-family: 'JetBrains Mono', monospace; margin-bottom: 2px; }
.fl-logcard-stat i { width: 14px; color: rgba(255,255,255,0.2); }

.fl-logcard-arrow { color: rgba(255,255,255,0.12); font-size: 12px; flex-shrink: 0; transition: color 0.2s; }
.fl-logcard:hover .fl-logcard-arrow { color: #00d4ff; }

/* Empty States */
.fl-empty { text-align: center; padding: 60px 20px; color: rgba(255,255,255,0.2); }
.fl-empty i { font-size: 40px; margin-bottom: 16px; display: block; }
.fl-empty p { font-size: 14px; color: rgba(255,255,255,0.35); margin-bottom: 4px; }
.fl-empty span { font-size: 11px; }
.fl-empty-sm { text-align: center; padding: 30px 10px; color: rgba(255,255,255,0.2); font-size: 12px; }
.fl-empty-sm i { display: block; font-size: 24px; margin-bottom: 8px; }

/* Skeleton */
.fl-sk {
    background: linear-gradient(90deg, rgba(255,255,255,0.025) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.025) 75%);
    background-size: 200% 100%; animation: flShim 1.5s ease infinite;
    border-radius: 10px; margin-bottom: 8px;
}
@keyframes flShim { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ===== MODALS ===== */
.fl-modal-bg {
    position: fixed; inset: 0; z-index: 5000;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: all 0.25s;
    padding: 20px;
}
.fl-modal-bg.active { opacity: 1; visibility: visible; }

.fl-modal {
    background: #0a1628;
    border: 1px solid rgba(0,212,255,0.1);
    border-radius: 16px;
    width: 100%; max-width: 520px; max-height: 85vh;
    display: flex; flex-direction: column;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.fl-modal-bg.active .fl-modal { transform: translateY(0) scale(1); }

.fl-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}
.fl-modal-head h3 { font-size: 14px; font-weight: 700; letter-spacing: 1px; }
.fl-modal-head button {
    width: 32px; height: 32px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: transparent; color: rgba(255,255,255,0.4);
    cursor: pointer; font-size: 13px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.fl-modal-head button:hover { border-color: #ef4444; color: #ef4444; }

.fl-modal-body, .fl-detail-body {
    flex: 1; overflow-y: auto; padding: 20px;
    scrollbar-width: thin; scrollbar-color: rgba(0,212,255,0.12) transparent;
}
.fl-modal-body::-webkit-scrollbar, .fl-detail-body::-webkit-scrollbar { width: 3px; }
.fl-modal-body::-webkit-scrollbar-thumb, .fl-detail-body::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.12); border-radius: 3px; }

/* Form */
.fl-fg { margin-bottom: 14px; }
.fl-fg label { display: block; font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.4); letter-spacing: 0.5px; margin-bottom: 5px; text-transform: uppercase; }
.fl-fg input, .fl-fg select, .fl-fg textarea {
    width: 100%; padding: 10px 12px; border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.03);
    color: #e8f0fe; font-size: 13px; font-family: 'Inter', sans-serif;
    outline: none; transition: border-color 0.2s;
}
.fl-fg input:focus, .fl-fg select:focus, .fl-fg textarea:focus { border-color: rgba(0,212,255,0.35); }
.fl-fg input::placeholder, .fl-fg textarea::placeholder { color: rgba(255,255,255,0.15); }
.fl-fg select option { background: #0a1628; }
.fl-fg textarea { resize: vertical; min-height: 50px; }

.fl-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fl-f3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.fl-divider {
    display: flex; align-items: center; gap: 8px;
    font-size: 10px; font-weight: 700; color: #00d4ff;
    letter-spacing: 1.5px; margin: 18px 0 12px; text-transform: uppercase;
}
.fl-divider::after { content: ''; flex: 1; height: 1px; background: rgba(0,212,255,0.1); }

.fl-modal-foot {
    display: flex; gap: 8px; justify-content: flex-end;
    padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.fl-btn-pri {
    padding: 10px 24px; border-radius: 8px;
    background: rgba(0,212,255,0.15); border: 1px solid rgba(0,212,255,0.35);
    color: #00d4ff; cursor: pointer; font-size: 12px; font-weight: 600;
    font-family: 'Inter', sans-serif; transition: all 0.2s;
}
.fl-btn-pri:hover { background: rgba(0,212,255,0.25); border-color: #00d4ff; box-shadow: 0 0 14px rgba(0,212,255,0.15); }

.fl-btn-sec {
    padding: 10px 20px; border-radius: 8px;
    background: transparent; border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.5); cursor: pointer; font-size: 12px;
    font-family: 'Inter', sans-serif; transition: all 0.2s;
}
.fl-btn-sec:hover { border-color: rgba(255,255,255,0.2); color: #e8f0fe; }

.fl-btn-del {
    margin-left: auto; padding: 10px 18px; border-radius: 8px;
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25);
    color: #ef4444; cursor: pointer; font-size: 12px; font-weight: 600;
    font-family: 'Inter', sans-serif; transition: all 0.2s;
    display: flex; align-items: center; gap: 6px;
}
.fl-btn-del:hover { background: rgba(239,68,68,0.2); border-color: #ef4444; }

/* Detail */
.fl-det-route {
    display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px;
    align-items: start; margin-bottom: 20px;
}
.fl-det-port { display: flex; flex-direction: column; gap: 3px; }
.fl-det-port-label { font-size: 9px; font-weight: 700; color: #00d4ff; letter-spacing: 1px; }
.fl-det-port strong { font-size: 14px; }
.fl-det-port span { font-size: 11px; color: rgba(255,255,255,0.35); }
.fl-det-coord { font-family: 'JetBrains Mono', monospace; font-size: 10px !important; color: rgba(255,255,255,0.25) !important; }
.fl-det-arrow { font-size: 20px; color: rgba(0,212,255,0.3); padding-top: 20px; text-align: center; }

.fl-det-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 20px;
}
.fl-det-card {
    text-align: center; padding: 14px 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
}
.fl-det-card i { font-size: 16px; color: #00d4ff; margin-bottom: 6px; }
.fl-det-val { font-size: 15px; font-weight: 800; color: #fff; font-family: 'JetBrains Mono', monospace; }
.fl-det-lab { font-size: 9px; color: rgba(255,255,255,0.3); margin-top: 2px; }

.fl-det-section { margin-bottom: 16px; }
.fl-det-sec-title { font-size: 10px; font-weight: 700; color: #00d4ff; letter-spacing: 1.5px; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.fl-det-section p { font-size: 12px; color: rgba(255,255,255,0.6); line-height: 1.6; }

/* ===== TOAST ===== */
.fl-toasts {
    position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
    z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.fl-t {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 10px; font-size: 12px; white-space: nowrap;
    background: rgba(6,20,35,0.92); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.08);
    animation: flIn 0.3s ease; box-shadow: 0 8px 28px rgba(0,0,0,0.35);
}
@keyframes flIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes flOut { to { opacity: 0; transform: translateY(-12px); } }
.fl-t-success { border-color: rgba(0,255,127,0.25); }
.fl-t-success i { color: #00ff7f; }
.fl-t-error { border-color: rgba(239,68,68,0.25); }
.fl-t-error i { color: #ef4444; }
.fl-t-info i { color: #00d4ff; }

.hidden { display: none !important; }

/* ================================================================
   MOBILE
   ================================================================ */
@media (max-width: 768px) {
    .fl-wrap { flex-direction: column; }

    .fl-side {
        width: 100%; border-right: none;
        border-bottom: 1px solid rgba(0,212,255,0.08);
        max-height: 42vh; flex-shrink: 0;
    }

    .fl-side-head { padding: 14px 16px 12px; }
    .fl-side-icon { width: 38px; height: 38px; font-size: 16px; border-radius: 10px; }
    .fl-side-head h1 { font-size: 13px; letter-spacing: 2px; }
    .fl-side-head p { font-size: 9px; }

    .fl-stats { padding: 10px 12px; gap: 4px; }
    .fl-stat { padding: 8px 2px; border-radius: 8px; }
    .fl-stat-v { font-size: 17px; }

    .fl-side-title { padding: 10px 12px 6px; }
    .fl-vlist { padding: 0 6px 6px; }

    .fl-summary { padding: 0 12px 12px; }

    .fl-main { flex: 1; min-height: 0; }
    .fl-main-head { padding: 14px 16px 10px; flex-direction: column; align-items: flex-start; gap: 10px; }
    .fl-main-head h2 { font-size: 13px; letter-spacing: 1.5px; }
    .fl-new-btn { width: 100%; justify-content: center; padding: 10px; }

    .fl-filter { padding: 8px 16px; }

    .fl-loglist { padding: 4px 16px 16px; }

    .fl-logcard { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
    .fl-logcard-mid { flex: 1 1 100%; }
    .fl-logcard-right { flex: 1; }
    .fl-logcard-arrow { display: none; }

    .fl-det-grid { grid-template-columns: repeat(2, 1fr); }
    .fl-det-route { grid-template-columns: 1fr; gap: 10px; }
    .fl-det-arrow { padding: 0; text-align: center; transform: rotate(90deg); }

    .fl-f2 { grid-template-columns: 1fr; }
    .fl-f3 { grid-template-columns: 1fr 1fr; }

    .fl-modal { max-height: 90vh; }
    .fl-home { width: 36px; height: 36px; font-size: 13px; top: 10px; right: 10px; }
}

@media (max-width: 380px) {
    .fl-f3 { grid-template-columns: 1fr; }
    .fl-det-grid { grid-template-columns: 1fr 1fr; }
}


/* ================================================================
   KEMINFO ROUTE PLANNER — rp- prefixed
   ================================================================ */

html:has(.rp-body) { overflow: hidden !important; height: 100% !important; }

body.rp-body {
    position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    margin: 0 !important; padding: 0 !important; width: 100% !important; height: 100% !important;
    overflow: hidden !important; font-family: 'Inter', sans-serif; background: #060d1f; color: #e8f0fe;
}
body.rp-body *, body.rp-body *::before, body.rp-body *::after { box-sizing: border-box !important; }

/* ===== HOME ===== */
.rp-home {
    position: absolute; top: 12px; right: 12px; z-index: 1000;
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(6,20,35,0.85); backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1); color: #e8f0fe;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; text-decoration: none; transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.rp-home:hover { border-color: #00d4ff; color: #00d4ff; box-shadow: 0 0 18px rgba(0,212,255,0.25); transform: scale(1.08); }

/* ===== MAP ===== */
.rp-map-wrap { position: absolute !important; top: 0 !important; left: 0 !important; right: 380px !important; bottom: 0 !important; margin: 0 !important; padding: 0 !important; border: none !important; overflow: hidden !important; }
#rpMap { position: absolute !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; z-index: 1; }

.rp-hint {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 700;
    text-align: center; color: rgba(255,255,255,0.3); font-size: 13px; pointer-events: none;
    animation: rpHintPulse 3s ease-in-out infinite;
}
.rp-hint i { display: block; font-size: 28px; margin-bottom: 10px; }
@keyframes rpHintPulse { 0%,100%{opacity:.35;transform:translate(-50%,-50%) scale(1)} 50%{opacity:.6;transform:translate(-50%,-50%) scale(1.04)} }

/* Map Stats Bar */
.rp-map-stats {
    position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%); z-index: 800;
    display: flex; gap: 20px; padding: 8px 20px; border-radius: 24px;
    background: rgba(6,20,35,0.88); backdrop-filter: blur(12px);
    border: 1px solid rgba(0,212,255,0.12);
    font-size: 12px; font-family: 'JetBrains Mono', monospace; color: rgba(255,255,255,0.6);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: rpBarIn 0.4s ease;
}
.rp-map-stats b { color: #00d4ff; font-weight: 700; }
.rp-map-stats i { color: rgba(255,255,255,0.25); margin-right: 4px; font-size: 10px; }
@keyframes rpBarIn { from{opacity:0;transform:translateX(-50%) translateY(12px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }

/* Waypoint Marker */
.rp-wp-mk {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(6,20,35,0.92); border: 2px solid #00d4ff;
    display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 700; color: #00d4ff;
    box-shadow: 0 0 14px rgba(0,212,255,0.45);
    transition: all 0.2s;
}
.leaflet-dragging .rp-wp-mk { transform: scale(1.2); box-shadow: 0 0 24px rgba(0,212,255,0.7); }

/* Tooltip */
.rp-tooltip {
    background: rgba(6,20,35,0.92) !important; border: 1px solid rgba(0,212,255,0.2) !important;
    color: #e8f0fe !important; font-family: 'JetBrains Mono', monospace !important;
    font-size: 11px !important; padding: 4px 10px !important; border-radius: 6px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}
.rp-tooltip::before { border-top-color: rgba(0,212,255,0.2) !important; }

/* ===== PANEL ===== */
.rp-panel {
    position: absolute !important; top: 0 !important; right: 0 !important; bottom: 0 !important;
    width: 380px !important; margin: 0 !important; padding: 0 !important; z-index: 10;
    background: rgba(6,20,35,0.97); border-left: 1px solid rgba(0,212,255,0.07);
    display: flex; flex-direction: column;
}
.rp-handle { display: none; }
.rp-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(0,212,255,0.12) transparent; }
.rp-scroll::-webkit-scrollbar { width: 4px; }
.rp-scroll::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.12); border-radius: 4px; }

/* Head */
.rp-head { display: flex; align-items: center; gap: 14px; padding: 22px 20px 18px; border-bottom: 1px solid rgba(0,212,255,0.06); flex-shrink: 0; }
.rp-head-icon { width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0; background: linear-gradient(135deg, rgba(0,212,255,0.14), rgba(251,191,36,0.14)); border: 1px solid rgba(0,212,255,0.18); display: flex; align-items: center; justify-content: center; font-size: 19px; color: #00d4ff; }
.rp-head h1 { font-size: 15px; font-weight: 800; letter-spacing: 2.5px; margin: 0; line-height: 1.2; }
.rp-head p { font-size: 10px; color: rgba(255,255,255,0.28); letter-spacing: 0.8px; margin: 4px 0 0; font-family: 'JetBrains Mono', monospace; }

/* Sections */
.rp-sec { padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.rp-sec-t { font-size: 10px; font-weight: 700; letter-spacing: 2px; color: #00d4ff; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; text-transform: uppercase; }
.rp-sec-t i { font-size: 11px; }
.rp-chevron { margin-left: auto; font-size: 9px; transition: transform 0.25s; }

/* Route Name */
.rp-name-row { display: flex; gap: 8px; }
.rp-name-row input { flex: 1; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.03); color: #e8f0fe; font-size: 13px; font-family: 'Inter', sans-serif; outline: none; transition: border-color 0.2s; }
.rp-name-row input:focus { border-color: rgba(0,212,255,0.35); }
.rp-save-btn { width: 42px; height: 42px; border-radius: 10px; background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.25); color: #00d4ff; cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }
.rp-save-btn:hover { background: rgba(0,212,255,0.2); border-color: #00d4ff; box-shadow: 0 0 14px rgba(0,212,255,0.15); }

/* Settings */
.rp-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rp-fg { margin-bottom: 0; }
.rp-fg label { display: block; font-size: 9px; font-weight: 600; color: rgba(255,255,255,0.35); letter-spacing: 0.5px; margin-bottom: 4px; text-transform: uppercase; }
.rp-fg input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.03); color: #e8f0fe; font-size: 12px; font-family: 'JetBrains Mono', monospace; outline: none; transition: border-color 0.2s; }
.rp-fg input:focus { border-color: rgba(0,212,255,0.3); }

/* WP List */
.rp-wp-count { font-family: 'JetBrains Mono', monospace; background: rgba(0,212,255,0.1); padding: 1px 8px; border-radius: 10px; margin-left: auto; }
.rp-wplist { display: flex; flex-direction: column; gap: 4px; }

.rp-wp-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
    background: rgba(255,255,255,0.015); border: 1px solid rgba(255,255,255,0.03);
    transition: all 0.2s; animation: rpWpIn 0.3s ease backwards;
}
.rp-wp-item:hover { background: rgba(255,255,255,0.03); border-color: rgba(0,212,255,0.1); }
@keyframes rpWpIn { from{opacity:0;transform:translateX(-8px)} to{opacity:1;transform:translateX(0)} }

.rp-wp-num { width: 26px; height: 26px; border-radius: 50%; background: rgba(0,212,255,0.1); border: 1px solid rgba(0,212,255,0.3); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #00d4ff; font-family: 'JetBrains Mono', monospace; flex-shrink: 0; }
.rp-wp-info { flex: 1; min-width: 0; }
.rp-wp-name { width: 100%; background: transparent; border: none; color: #e8f0fe; font-size: 12px; font-weight: 600; font-family: 'Inter', sans-serif; outline: none; padding: 0; margin: 0; }
.rp-wp-coord { font-size: 10px; color: rgba(255,255,255,0.25); font-family: 'JetBrains Mono', monospace; margin-top: 1px; }
.rp-wp-acts { display: flex; gap: 3px; flex-shrink: 0; }
.rp-wp-acts button { width: 24px; height: 24px; border-radius: 5px; border: 1px solid rgba(255,255,255,0.05); background: rgba(255,255,255,0.02); color: rgba(255,255,255,0.3); cursor: pointer; font-size: 9px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.rp-wp-acts button:hover:not(:disabled) { border-color: rgba(0,212,255,0.25); color: #00d4ff; }
.rp-wp-acts button:disabled { opacity: 0.15; cursor: not-allowed; }
.rp-wp-del { color: rgba(239,68,68,0.5) !important; }
.rp-wp-del:hover { border-color: rgba(239,68,68,0.3) !important; color: #ef4444 !important; }

/* Legs */
.rp-legs { display: flex; flex-direction: column; gap: 6px; }
.rp-leg { padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,0.012); border: 1px solid rgba(255,255,255,0.03); transition: all 0.25s; }
.rp-leg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.rp-leg-n { font-size: 10px; font-weight: 700; color: #00d4ff; letter-spacing: 1px; }
.rp-leg-dist { font-size: 13px; font-weight: 800; color: #fff; font-family: 'JetBrains Mono', monospace; }
.rp-leg-route { font-size: 11px; color: rgba(255,255,255,0.4); margin-bottom: 4px; }
.rp-leg-route i { font-size: 9px; color: rgba(255,255,255,0.2); margin: 0 4px; }
.rp-leg-meta { display: flex; gap: 14px; font-size: 10px; color: rgba(255,255,255,0.3); font-family: 'JetBrains Mono', monospace; }
.rp-leg-meta i { margin-right: 3px; }

/* Total */
.rp-total { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.rp-total-item { text-align: center; padding: 10px 6px; background: rgba(0,212,255,0.04); border: 1px solid rgba(0,212,255,0.08); border-radius: 10px; }
.rp-total-item span { display: block; font-size: 8px; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.rp-total-item b { font-size: 14px; color: #00d4ff; font-family: 'JetBrains Mono', monospace; }

/* Actions */
.rp-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.03); }
.rp-act-btn { display: flex; align-items: center; justify-content: center; gap: 5px; padding: 9px 6px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.06); background: rgba(255,255,255,0.02); color: rgba(255,255,255,0.5); cursor: pointer; font-size: 10px; font-family: 'Inter', sans-serif; transition: all 0.2s; }
.rp-act-btn:hover { border-color: rgba(0,212,255,0.25); color: #00d4ff; background: rgba(0,212,255,0.06); }
.rp-act-del { color: rgba(239,68,68,0.5) !important; }
.rp-act-del:hover { border-color: rgba(239,68,68,0.3) !important; color: #ef4444 !important; background: rgba(239,68,68,0.06) !important; }

/* Saved Routes */
.rp-saved-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,0.015); border: 1px solid rgba(255,255,255,0.03); margin-bottom: 6px; transition: background 0.2s; }
.rp-saved-item:hover { background: rgba(255,255,255,0.03); }
.rp-saved-info { flex: 1; min-width: 0; }
.rp-saved-name { font-size: 12px; font-weight: 600; color: #e8f0fe; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-saved-meta { font-size: 10px; color: rgba(255,255,255,0.25); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }
.rp-saved-acts { display: flex; gap: 5px; flex-shrink: 0; }
.rp-saved-acts button { width: 30px; height: 30px; border-radius: 7px; border: 1px solid rgba(0,212,255,0.15); background: rgba(0,212,255,0.06); color: #00d4ff; cursor: pointer; font-size: 11px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.rp-saved-acts button:hover { background: rgba(0,212,255,0.15); border-color: #00d4ff; }
.rp-saved-dl { width: 30px; height: 30px; border-radius: 7px; border: 1px solid rgba(0,212,255,0.15); background: rgba(0,212,255,0.06); color: #00d4ff; display: flex; align-items: center; justify-content: center; font-size: 11px; text-decoration: none; transition: all 0.2s; }
.rp-saved-dl:hover { background: rgba(0,212,255,0.15); border-color: #00d4ff; }
.rp-saved-sm { padding: 8px 10px; }
.rp-saved-sm .rp-saved-name { font-size: 11px; }
.rp-saved-sm .rp-saved-meta { font-size: 9px; }

/* Empty / Skeleton */
.rp-empty-sm { text-align: center; padding: 24px 10px; color: rgba(255,255,255,0.2); font-size: 12px; }
.rp-empty-sm i { display: block; font-size: 22px; margin-bottom: 8px; }
.rp-sk { background: linear-gradient(90deg, rgba(255,255,255,0.025) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.025) 75%); background-size: 200% 100%; animation: rpShim 1.5s ease infinite; border-radius: 10px; margin-bottom: 6px; }
@keyframes rpShim { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* Modal */
.rp-modal-bg { position: fixed; inset: 0; z-index: 5000; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.25s; padding: 20px; }
.rp-modal-bg.active { opacity: 1; visibility: visible; }
.rp-modal { background: #0a1628; border: 1px solid rgba(0,212,255,0.1); border-radius: 16px; width: 100%; max-width: 480px; max-height: 80vh; display: flex; flex-direction: column; transform: translateY(20px) scale(0.97); transition: transform 0.3s cubic-bezier(0.16,1,0.3,1); box-shadow: 0 24px 64px rgba(0,0,0,0.5); }
.rp-modal-bg.active .rp-modal { transform: translateY(0) scale(1); }
.rp-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.05); flex-shrink: 0; }
.rp-modal-head h3 { font-size: 14px; font-weight: 700; letter-spacing: 1px; }
.rp-modal-head button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.08); background: transparent; color: rgba(255,255,255,0.4); cursor: pointer; font-size: 13px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.rp-modal-head button:hover { border-color: #ef4444; color: #ef4444; }
.rp-modal-body { flex: 1; overflow-y: auto; padding: 16px 20px; scrollbar-width: thin; scrollbar-color: rgba(0,212,255,0.12) transparent; }
.rp-modal-body::-webkit-scrollbar { width: 3px; }
.rp-modal-body::-webkit-scrollbar-thumb { background: rgba(0,212,255,0.12); border-radius: 3px; }

/* Toast */
.rp-toasts { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rp-t { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; font-size: 12px; white-space: nowrap; background: rgba(6,20,35,0.92); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.08); animation: rpIn 0.3s ease; box-shadow: 0 8px 28px rgba(0,0,0,0.35); }
@keyframes rpIn { from{opacity:0;transform:translateY(-12px)} to{opacity:1;transform:translateY(0)} }
@keyframes rpOut { to{opacity:0;transform:translateY(-12px)} }
.rp-t-success { border-color: rgba(0,255,127,0.25); } .rp-t-success i { color: #00ff7f; }
.rp-t-error { border-color: rgba(239,68,68,0.25); } .rp-t-error i { color: #ef4444; }
.rp-t-info i { color: #00d4ff; }

.hidden { display: none !important; }

/* ================================================================
   MOBILE
   ================================================================ */
@media (max-width: 768px) {
    .rp-map-wrap { right: 0 !important; bottom: auto !important; height: 52vh !important; }
    .rp-panel { top: auto !important; left: 0 !important; right: 0 !important; width: 100% !important; bottom: 0 !important; border-left: none; border-top: 1px solid rgba(0,212,255,0.1); border-radius: 22px 22px 0 0; background: rgba(6,20,35,0.98); box-shadow: 0 -8px 32px rgba(0,0,0,0.3); min-height: 0; }
    .rp-handle { display: flex; justify-content: center; padding: 10px 0 2px; cursor: grab; flex-shrink: 0; }
    .rp-handle-bar { width: 38px; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.18); }
    .rp-head { padding: 14px 18px 12px; }
    .rp-head-icon { width: 38px; height: 38px; font-size: 16px; border-radius: 10px; }
    .rp-head h1 { font-size: 13px; letter-spacing: 2px; }
    .rp-sec { padding: 12px 18px; }
    .rp-total { grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 12px 18px; }
    .rp-total-item b { font-size: 12px; }
    .rp-actions { grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 12px 18px; }
    .rp-act-btn { padding: 8px 4px; font-size: 9px; }
    .rp-map-stats { font-size: 10px; gap: 12px; padding: 6px 14px; bottom: 30px; }
    .rp-map-stats b { font-size: 10px; }
    .rp-wp-acts button { width: 22px; height: 22px; font-size: 8px; }
    .rp-home { width: 36px; height: 36px; font-size: 13px; top: 10px; right: 10px; }
    .rp-hint { font-size: 12px; }
    .rp-hint i { font-size: 22px; }
}


/* ================================================================
   DASHBOARD — FLEET CARD
   ================================================================ */

.fleet-dashboard-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fleet-dash-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: all 0.25s ease;
    animation: fleetDashIn 0.35s ease backwards;
}
.fleet-dash-item:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(0, 212, 255, 0.1);
    transform: translateX(4px);
}
@keyframes fleetDashIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.fleet-dash-icon {
    width: 36px; height: 36px; border-radius: 10px;
    border: 1px solid;
    background: rgba(255, 255, 255, 0.02);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
    transition: all 0.25s;
}
.fleet-dash-item:hover .fleet-dash-icon {
    box-shadow: 0 0 12px currentColor;
}

.fleet-dash-info {
    flex: 1; min-width: 0;
}

.fleet-dash-name {
    font-size: 13px; font-weight: 600; color: #e8f0fe;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.fleet-dash-meta {
    display: flex; align-items: center; gap: 8px; margin-top: 2px;
}

.fleet-dash-type {
    font-size: 10px; font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.fleet-dash-mmsi {
    font-size: 10px; color: rgba(255, 255, 255, 0.25);
    font-family: 'JetBrains Mono', monospace;
}

.fleet-dash-right {
    flex-shrink: 0;
}

.fleet-dash-status {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 10px; font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    border: 1px solid;
    white-space: nowrap;
}

.fleet-dash-dot {
    width: 6px; height: 6px; border-radius: 50%;
    animation: fleetDotPulse 2s ease-in-out infinite;
}
@keyframes fleetDotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}

/* Responsive */
@media (max-width: 768px) {
    .fleet-dash-item { padding: 8px 10px; gap: 10px; }
    .fleet-dash-icon { width: 32px; height: 32px; font-size: 12px; }
    .fleet-dash-name { font-size: 12px; }
    .fleet-dash-status { padding: 3px 8px; font-size: 9px; }
    .fleet-dash-mmsi { display: none; }
}


