body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0; padding: 0;
    display: flex; flex-direction: column; height: 100vh;
    background-color: #fafafa;
    color: #18181b;
}

/* Premium Solid Black Top Panel Matrix */
header {
    background: #000000; padding: 0;
    border-bottom: 1px solid #27272a; z-index: 10;
}

.header-controls {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; height: 50px; background: #000000; box-sizing: border-box;
}

/* Symmetrical 50px Grid Block Anchors */
.header-left, .header-right {
    flex: 0 0 50px; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
}
.header-center {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 50px;
}

/* 50px Square Minimalist Menu Trigger Button */
.menu-square-btn {
    width: 50px; height: 50px; background: #000000; color: #ffffff; font-size: 1.3rem;
    border: none; border-radius: 0; padding: 0; display: flex; align-items: center; justify-content: center;
}
.menu-square-btn:hover { background: #18181b; }
.menu-square-btn:disabled { opacity: 0.3; }

/* Dynamic Invisible Native Calendar Input Layer Stack */
.calendar-wrapper {
    position: relative; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; background: #000000;
}
.calendar-icon { font-size: 1.2rem; color: #ffffff; pointer-events: none; }

#datePicker {
    position: absolute; top: 0; left: 0; width: 50px; height: 50px; opacity: 0; cursor: pointer;
    padding: 0; margin: 0; border: none; display: block; font-family: 'Lato', sans-serif;
}

/* Lato Black Typography Specifications */
.brand-title {
    font-size: 1.5rem; font-weight: 900; letter-spacing: 4px; color: #ffffff; line-height: 1; text-transform: uppercase;
}

#headerTripName { 
    color: #a1a1aa; font-weight: 700; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; margin-top: 2px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px;
}

/* Sub-Navbar Day Selectors */
.days-navbar {
    display: flex; gap: 6px; overflow-x: auto; max-width: 800px;
    margin: 0 auto; padding: 8px 15px; width: 100%; background: #000000; box-sizing: border-box;
}
.days-navbar::-webkit-scrollbar { height: 3px; }
.days-navbar::-webkit-scrollbar-thumb { background: #27272a; border-radius: 2px; }

.day-badge {
    background: #18181b; color: #a1a1aa; border: 1px solid #27272a;
    padding: 6px 14px; border-radius: 4px; font-size: 0.8rem; font-weight: 600;
    cursor: pointer; white-space: nowrap; transition: all 0.15s ease;
}
.day-badge:hover { background: #27272a; color: #ffffff; }
.day-badge.active { background: #ffe600; color: #000000; border-color: #eab308; font-weight: 700; }

/* Standard Controls & Overlays */
button {
    padding: 10px 14px; border-radius: 4px; border: none; cursor: pointer; 
    font-weight: 700; font-size: 0.85rem; transition: all 0.1s ease;
    box-sizing: border-box; font-family: 'Lato', sans-serif;
}
button:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary { background: #ffe600; color: #000000; border: 1px solid #eab308; }
.btn-primary:hover { background: #facc15; }

.btn-secondary { background: #ffffff; color: #18181b; border: 1px solid #d4d4d8; }
.btn-secondary:hover { background: #f4f4f5; border-color: #a1a1aa; }

.btn-success { background: #18181b; color: #ffffff; width: 100%; }
.btn-success:hover { background: #27272a; }

.btn-danger { background: #ffffff; color: #dc2626; border: 1px solid #fca5a5; }
.btn-danger:hover { background: #fef2f2; border-color: #ef4444; }

.btn-action { background: #f4f4f5; color: #27272a; border: 1px solid #d4d4d8; font-weight: 600; width: 100%; display: block; margin-top: 2px; padding: 6px;}
.btn-action:hover { background: #e4e4e7; }

.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    display: none; position: absolute; left: 0; background-color: #ffffff; min-width: 160px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2); z-index: 20; border: 1px solid #e4e4e7; border-radius: 4px; padding: 4px 0; margin-top: 0;
}
.dropdown-content button, .dropdown-content a {
    background: none; border: none; color: #18181b; padding: 10px 16px; text-align: left; width: 100%;
    display: block; box-sizing: border-box; font-family: 'Lato', sans-serif; font-size: 0.85rem; text-decoration: none; font-weight: 700;
}
.dropdown-content button:hover, .dropdown-content a:hover { background-color: #f4f4f5; color: #000000; }
.dropdown-content button:disabled { opacity: 0.35; cursor: not-allowed; background: none; }
.dropdown.open .dropdown-content { display: block; }

#planner-container {
    flex: 1; overflow-y: auto; display: flex; flex-direction: column; max-width: 800px; margin: 0 auto; width: 100%; background: #ffffff;
    border-left: 1px solid #e4e4e7; border-right: 1px solid #e4e4e7; scroll-behavior: smooth;
}

.time-block { display: flex; height: 44px; box-sizing: border-box; border-bottom: 1px solid #f4f4f5; position: relative; flex-shrink: 0; }
.time-block:hover { background-color: #fafafa; }
.time-block.drag-over { background-color: #fef08a !important; }

.time-label {
    width: 75px; padding: 0 8px 0 0; font-size: 0.75rem; color: #a1a1aa; border-right: 1px solid #e4e4e7; box-sizing: border-box;
    font-weight: 700; letter-spacing: -0.2px; display: flex; align-items: center; justify-content: flex-end;
}
.event-area { flex: 1; position: relative; cursor: pointer; }
.shaded { background-color: #fafafa; }
.shaded .time-label { color: #d4d4d8; }

.event-item {
    color: #18181b; padding: 0 8px; border-radius: 4px; font-size: 0.8rem;
    position: absolute; top: 0; overflow: hidden; z-index: 5;
    cursor: grab; box-sizing: border-box; border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex; align-items: center;
}
.event-item:active { cursor: grabbing; z-index: 100; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.event-single-line { display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.event-single-line strong { font-weight: 700; color: #000000; }

.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(24, 24, 27, 0.4); backdrop-filter: blur(2px); z-index: 100;
    justify-content: center; align-items: center;
}

.modal-content {
    background: #ffffff; padding: 20px; border-radius: 6px; width: 100%; max-width: 330px; box-sizing: border-box;
    display: flex; flex-direction: column; gap: 14px; border: 1px solid #d4d4d8; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

#stepIndicator { font-size: 0.72rem; font-weight: 900; color: #eab308; background: #fefce8; padding: 2px 6px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.modal-content h2 { margin: 0; font-size: 1.2rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.5px; }
.modal-subtext { font-size: 0.8rem; color: #71717a; margin-top: -8px; margin-bottom: 2px; }

.form-step { display: none; flex-direction: column; gap: 10px; width: 100%; }
.form-step.active { display: flex; }

.modal-content label, .field-label { font-size: 0.7rem; font-weight: 700; color: #71717a; margin-bottom: -4px; text-transform: uppercase; letter-spacing: 0.5px; text-align: left; }
.modal-content input, .modal-content select { 
    padding: 8px 10px; border: 1px solid #d4d4d8; border-radius: 4px; font-size: 0.85rem; 
    background: #fafafa; color: #18181b; outline: none; width: 100%; box-sizing: border-box; display: block; font-family: 'Lato', sans-serif;
}
.modal-content input:focus, .modal-content select:focus { border-color: #18181b; background: #ffffff; }

.time-input-fixed { max-width: 100% !important; width: 100% !important; box-sizing: border-box !important; padding: 8px 10px !important; -webkit-appearance: none; min-width: 0 !important; }
.duration-row { display: flex; gap: 10px; width: 100%; }
.duration-col { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.duration-col small { font-size: 0.65rem; color: #71717a; font-weight: 700; text-transform: uppercase; margin-top: 1px; letter-spacing: 0.3px; }

.modal-actions { display: flex; flex-direction: row; gap: 6px; margin-top: 4px; width: 100%; }
.modal-actions button { flex: 1; }

.text-center { text-align: center; }
.text-center label { text-align: center; display: block; }

.launch-dashboard-layout { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; width: 100%; }
.dashboard-section { display: flex; flex-direction: column; gap: 8px; width: 100%; box-sizing: border-box; }
.dashboard-section h3 { margin: 0; font-size: 0.85rem; text-transform: uppercase; color: #18181b; letter-spacing: 0.5px; font-weight: 800;}
.dashboard-separator { font-size: 0.75rem; font-weight: 700; color: #a1a1aa; letter-spacing: 1px; margin: 2px 0; }

.trip-card { background: #f4f4f5; padding: 12px; border-radius: 4px; border: 1px solid #e4e4e7; text-align: center; }
.trip-card strong { color: #18181b; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.95rem; }
.trip-card small { color: #71717a; font-size: 0.75rem; margin-top: 2px; display: block; }

@media (max-width: 480px) {
    .modal { padding: 8px; box-sizing: border-box; }
    .modal-content { max-width: 100%; margin: 0 auto; }
}