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

:root {
    --primary-color: #5548E1;
    --primary-light: #8E84F3;
    --accent-color: #00D2D3;
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --bg-login: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-color: #2D3436;
    --text-muted: #636e72;
    --sidebar-width: 380px;
    --radius-m: 16px;
    --radius-s: 12px;
}

/* Base Reset */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
}

/* =========================================
   LOGIN / SIGNUP LAYOUT
   Only applies to body.login-layout
   ========================================= */
body.login-layout {
    background: var(--bg-login);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Decorative Circles */
body.login-layout::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -50px;
    left: -50px;
}

body.login-layout::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(0, 210, 211, 0.2);
    bottom: -50px;
    right: -50px;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    text-align: center;
    z-index: 10;
    backdrop-filter: blur(10px);
}

/* =========================================
   PLANNER APP LAYOUT
   Only applies to body.app-layout
   ========================================= */
body.app-layout {
    background-color: #f0f2f5;
    background-image: none;
    /* Explicitly remove gradient */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Prevent body scroll */
}

.app-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    z-index: 20;
    padding: 24px;
    box-sizing: border-box;
    height: 100%;
}

.sidebar-header h2 {
    margin: 0 0 20px 0;
    font-size: 1.6rem;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Map Area */
.map-container {
    flex: 1;
    position: relative;
    height: 100%;
    width: 100%;
}

#map {
    width: 100%;
    height: 100%;
}

.map-search-box {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    padding: 12px 20px;
    border-radius: 30px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 5;
    outline: none;
}

/* =========================================
   COMMON COMPONENTS
   ========================================= */
/* Buttons */
.btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius-s);
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary {
    background: #eee;
    color: #333;
}

/* Forms */
input,
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-s);
    box-sizing: border-box;
    margin-bottom: 15px;
}

input:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Trip Cards and Lists */
.trip-card {
    position: relative;
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    border: 1px solid #eee;
    cursor: pointer;
    transition: all 0.2s;
}

.trip-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Day Panels */
.day-container {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

.day-header {
    font-weight: 800;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.trip-places-list {
    list-style: none;
    padding: 0;
    min-height: 20px;
    /* Dropzone area */
}

.place-item {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: grab;
}

/* Modals */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}


/* TRIP DETAIL VIEW - FIXED LAYOUT */
.trip-detail-view {
    display: flex;
    flex-direction: column;
    /* Force Stacked Layout (Rows) */
    height: 100%;
}

.detail-header {
    flex-shrink: 0;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 15px;
}