/* Main stylesheet for Hike planner - Glass Morphism Theme */

:root {
    --primary-color: #2d3436;
    --secondary-color: #636e72;
    --accent-color: #0984e3;
    --accent-light: #74b9ff;
    --success-color: #00b894;
    --danger-color: #d63031;
    --warning-color: #fdcb6e;
    --background-light: #f8f9fa;
    --background-glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', sans-serif;
    font-size: 14px;
    color: #2d3436;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    line-height: 1.6;
    padding-top: 25px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.login-page {
    padding-top: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

html:has(body.login-page) {
    padding-top: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 30px auto 15px auto;
    padding: 24px;
    background: var(--background-glass);
    min-height: calc(100vh - 50px);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: calc(100% - 30px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.top-nav {
    background: rgba(45, 52, 54, 0.85);
    color: white;
    box-shadow: var(--shadow-md);
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 15px 0 15px;
    min-height: 40px;
    border-radius: 12px;
    max-width: 1200px;
    width: calc(100% - 30px);
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.nav-menu {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    flex: 1;
}

.nav-menu:empty {
    display: none;
}

.nav-menu a {
    color: #ffffff;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    letter-spacing: 0.3px;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.15);
    border-bottom: 3px solid var(--accent-light);
}

.nav-menu a.active {
    background: rgba(255,255,255,0.2);
    border-bottom: 3px solid var(--accent-light);
    border-radius: 6px;
}

.admin-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.admin-menu-btn {
    background: transparent;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    letter-spacing: 0.3px;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-menu-btn:hover {
    background: rgba(255,255,255,0.15);
    border-bottom: 3px solid var(--accent-light);
}

.admin-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--background-glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    display: none;
    z-index: 1000;
    margin-top: 5px;
    backdrop-filter: blur(10px);
}

.admin-dropdown.show {
    display: block;
}

.admin-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #2d3436;
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: none;
    font-size: 13px;
    margin: 6px 8px;
    border-radius: 6px;
}

.admin-dropdown a:hover {
    background: var(--accent-light);
    color: white;
}

/* Hamburger Menu Styles */
.hamburger-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.hamburger-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger-menu-dropdown {
    display: none;
    position: fixed;
    top: 55px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(45, 52, 54, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    flex-direction: column;
    gap: 0;
    z-index: 200;
    min-width: 200px;
    max-width: calc(100% - 30px);
    width: calc(1200px - 30px);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.hamburger-menu-dropdown.show {
    display: flex;
}

.hamburger-menu-dropdown a {
    color: white;
    text-decoration: none;
    padding: 12px 16px;
    border-bottom: none;
    transition: background 0.2s;
    font-size: 13px;
    white-space: nowrap;
}

.hamburger-menu-dropdown a:hover {
    background: rgba(255,255,255,0.1);
}

.hamburger-menu-dropdown a.active {
    background: rgba(255,255,255,0.2);
    border-left: 3px solid var(--accent-light);
    padding-left: 13px;
}

.hamburger-menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.2);
    margin: 8px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hamburger-menu-btn {
        display: flex;
    }

    .nav-menu {
        display: none;
    }

    .nav-right {
        display: none !important;
    }

    .top-nav {
        gap: 10px;
    }
}

.nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    padding-right: 0;
    gap: 8px;
}

.nav-home-btn {
    display: none;
    color: white;
    text-decoration: none;
    font-size: 20px;
    padding: 6px 10px;
    transition: opacity 0.2s;
    cursor: pointer;
    line-height: 1;
}

.nav-home-btn:hover {
    opacity: 0.8;
}

body.page-overview .nav-home-btn {
    display: none !important;
}

.nav-home-btn:hover {
    opacity: 0.8;
}

.user-menu {
    position: relative;
}

.user-menu-btn {
    background: rgba(255,255,255,0.15);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    font-family: inherit;
}

.user-menu-btn:hover {
    background: rgba(255,255,255,0.25);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--background-glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    min-width: 200px;
    display: none;
    z-index: 1000;
    margin-top: 5px;
    backdrop-filter: blur(10px);
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #2d3436;
    text-decoration: none;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 13px;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--accent-light);
    color: white;
}

.user-info {
    font-size: 13px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.15);
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    height: 100vh;
    position: relative;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
}

.back-home-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.back-home-btn a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.back-home-btn a:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(-2px);
}

.login-container {
    background: var(--background-glass);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.login-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2d3436;
    font-size: 24px;
}

.login-form {
    margin-bottom: 20px;
    text-align: center;
}

.demo-info {
    text-align: center;
    font-size: 12px;
    color: #636e72;
    background: rgba(255, 255, 255, 0.6);
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    border-left: 3px solid var(--accent-color);
    backdrop-filter: blur(5px);
}

.alert {
    padding: 12px 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    border-left: 4px solid;
    backdrop-filter: blur(5px);
}

.alert-info {
    background: rgba(9, 132, 227, 0.15);
    border-color: var(--accent-color);
    color: #0657b8;
}

.alert-success {
    background: rgba(0, 184, 148, 0.15);
    border-color: var(--success-color);
    color: #007c5a;
}

.alert-error {
    background: rgba(214, 48, 49, 0.15);
    border-color: var(--danger-color);
    color: #b8221e;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2d3436;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.2s;
    backdrop-filter: blur(5px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-row.three {
    grid-template-columns: 1fr 1fr 1fr;
}

/* Buttons */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background: #066bcb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(9, 132, 227, 0.3);
}

.btn-large {
    padding: 14px 24px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    box-shadow: var(--shadow-md);
}

.btn-large:hover {
    box-shadow: var(--shadow-lg) !important;
    transform: translateY(-2px) !important;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    border-color: #556b7a;
}

.btn-secondary:hover {
    background: #556b7a;
}

.btn-success {
    background: var(--success-color);
    color: white;
    border-color: #008a6f;
}

.btn-success:hover {
    background: #008a6f;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    border-color: #b8221e;
}

.btn-danger:hover {
    background: #b8221e;
}

.btn-small {
    padding: 6px 10px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 6px !important;
    display: inline-block !important;
    vertical-align: baseline !important;
    margin-right: 8px;
    line-height: 1.4 !important;
}

/* Messages */
.error-message {
    background: rgba(214, 48, 49, 0.15);
    color: #b8221e;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--danger-color);
}

.success-message {
    background: rgba(0, 184, 148, 0.15);
    color: #007c5a;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--success-color);
}

.info-message {
    background: rgba(9, 132, 227, 0.15);
    color: #0657b8;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-color);
}

.tab-help-message {
    background: rgba(0, 184, 148, 0.15);
    border-left: 4px solid var(--success-color);
    padding: 12px 40px 12px 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    position: relative;
}

.tab-help-message p {
    margin: 0;
    font-size: 13px;
    color: #007c5a;
}

.tab-help-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #007c5a;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tab-help-close:hover {
    color: #005946;
    transform: translateY(-50%) scale(1.2);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

table thead {
    background: rgba(45, 52, 54, 0.08);
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #2d3436;
}

table th.text-right {
    text-align: right;
}

table td {
    padding: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: transparent;
}

table tbody tr {
    background: transparent;
    transition: background 0.2s;
}

table tr:hover {
    background: rgba(9, 132, 227, 0.05);
}

/* Headings */
h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2d3436;
}

h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #2d3436;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    vertical-align: middle;
}

.badge-private {
    background: rgba(0, 0, 0, 0.1);
    color: #636e72;
    border: 1px solid #99a3aa;
    cursor: default;
    padding: 6px 10px !important;
    border-radius: 12px !important;
    font-weight: 500 !important;
    font-size: 12px !important;
    display: inline-block !important;
    vertical-align: baseline !important;
    line-height: 1.4 !important;
    margin-right: 8px;
    opacity: 0.7;
}

.badge-shared {
    background: var(--accent-color);
    color: white;
    border: 1px solid #066bcb;
    cursor: pointer;
    transition: all 0.2s;
    padding: 6px 10px !important;
    border-radius: 12px !important;
    font-weight: 500 !important;
    font-size: 12px !important;
    display: inline-block !important;
    vertical-align: baseline !important;
    line-height: 1.4 !important;
    margin-right: 8px;
}

.badge-shared:hover {
    background: #066bcb;
    border-color: #054a9e;
    box-shadow: 0 2px 8px rgba(9, 132, 227, 0.3);
}

h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2d3436;
}

h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #2d3436;
}

/* Hide legacy itinerary-nav (merged into top-nav) */
.itinerary-nav {
    display: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--background-glass);
    margin: 20px auto;
    padding: 20px;
    border-radius: 16px;
    width: 95%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.close {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Compact modal form styling */
.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
}

.modal-content .form-group {
    margin-bottom: 10px;
}

.modal-content .form-group label {
    margin-bottom: 3px;
    font-size: 13px;
}

.modal-content .form-group input,
.modal-content .form-group select,
.modal-content .form-group textarea {
    padding: 8px;
    font-size: 13px;
}

.modal-content .form-row {
    gap: 10px;
}

.modal-content textarea {
    resize: vertical;
    min-height: 60px;
    max-height: 100px;
}

.modal-content button {
    margin-top: 10px;
}

/* Payment Options Group */
.payment-group {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    backdrop-filter: blur(5px);
}

/* General Info Group */
.info-group {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    backdrop-filter: blur(5px);
}

.payment-group .form-group {
    margin-bottom: 12px;
}

.payment-group .form-group:last-child {
    margin-bottom: 0;
}

.info-group .form-group {
    margin-bottom: 12px;
}

.info-group .form-group:last-child {
    margin-bottom: 0;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.6);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-option input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.payment-option label {
    margin-bottom: 0;
    cursor: pointer;
    display: inline;
    width: auto;
    font-weight: 400;
}

/* Inline form row for payment group */
.form-row-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.form-row-inline .form-group {
    margin-bottom: 0;
}

/* Cards */
.card {
    background: var(--background-glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #99a3aa;
    font-size: 15px;
}

/* Projects Section */
.itineraries-section {
    margin-bottom: 20px;
}

.itineraries-table {
    margin-top: 20px;
}

.itineraries-table tbody tr {
    background: white !important;
}

.itineraries-table tbody tr:nth-child(odd) {
    background: white !important;
}

.itineraries-table tbody tr:nth-child(even) {
    background: white !important;
}

.itineraries-table td {
    text-align: left;
    background: transparent !important;
}

.itinerary-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.itinerary-link:hover {
    text-decoration: underline;
}

/* Sections */
.section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

.section-actions {
    display: flex;
    gap: 10px;
}

/* Hike Planner Specific */
#hike-items {
    position: relative;
    padding-left: 0px;
}

#hike-items::before {
    content: '';
    display: none;
}

.hike-item {
    background: rgba(255, 255, 255, 0.5);
    padding: 15px 15px 15px 60px;
    margin-bottom: 35px;
    border-radius: 12px;
    position: relative;
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
}

.travel-section {
    background: rgba(9, 132, 227, 0.1);
    border-left: 4px solid var(--accent-color);
    border-right: 4px solid var(--accent-color);
    padding: 15px 15px 15px 60px;
    border-radius: 12px;
    margin-bottom: 15px;
    backdrop-filter: blur(5px);
}

.travel-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    min-height: 32px;
}

.travel-section-title {
    font-weight: 600;
    font-size: 15px;
}

.travel-section-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.travel-section-controls button {
    padding: 6px 14px;
    font-size: 13px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.travel-section-controls button:hover {
    background: #066bcb;
    transform: translateY(-1px);
}

.hike-item.accommodation {
    border-left: 4px solid #f39c12;
    border-right: 4px solid #f39c12;
    background: rgba(243, 156, 18, 0.1);
    margin-bottom: 15px;
}

.hike-item.day {
    padding-top: 15px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    background: rgba(0, 184, 148, 0.08);
    border-left: 4px solid var(--success-color);
    border-right: 4px solid var(--success-color);
}

/* Colored lines from accommodation through day to next accommodation */
.hike-item.day::before {
    content: '';
    position: absolute;
    left: 24px;
    top: -65px;
    bottom: -65px;
    width: 8px;
    border-radius: 4px;
    z-index: 1;
}

/* Color the lines and corresponding accommodations */
/* Using nth-child to count within hike-items container */
#hike-items > .hike-item.day:nth-of-type(1)::before {
    background: #e74c3c;
}

#hike-items > .hike-item.day:nth-of-type(2)::before {
    background: #3498db;
}

#hike-items > .hike-item.day:nth-of-type(3)::before {
    background: #9b59b6;
}

#hike-items > .hike-item.day:nth-of-type(4)::before {
    background: #f39c12;
}

#hike-items > .hike-item.day:nth-of-type(5)::before {
    background: #1abc9c;
}

#hike-items > .hike-item.day:nth-of-type(6)::before {
    background: #e67e22;
}

#hike-items > .hike-item.day:nth-of-type(7)::before {
    background: #34495e;
}

#hike-items > .hike-item.day:nth-of-type(8)::before {
    background: #16a085;
}

#hike-items > .hike-item.day:nth-of-type(9)::before {
    background: #c0392b;
}

#hike-items > .hike-item.day:nth-of-type(10)::before {
    background: #8e44ad;
}

#hike-items > .hike-item.day:nth-of-type(11)::before {
    background: #2980b9;
}

#hike-items > .hike-item.day:nth-of-type(12)::before {
    background: #27ae60;
}

#hike-items > .hike-item.day:nth-of-type(13)::before {
    background: #d35400;
}

#hike-items > .hike-item.day:nth-of-type(14)::before {
    background: #2c3e50;
}

#hike-items > .hike-item.day:nth-of-type(15)::before {
    background: #e91e63;
}

#hike-items > .hike-item.day:nth-of-type(16)::before {
    background: #009688;
}

#hike-items > .hike-item.day:nth-of-type(17)::before {
    background: #ff5722;
}

#hike-items > .hike-item.day:nth-of-type(18)::before {
    background: #673ab7;
}

#hike-items > .hike-item.day:nth-of-type(19)::before {
    background: #00bcd4;
}

#hike-items > .hike-item.day:nth-of-type(20)::before {
    background: #ffc107;
}

#hike-items > .hike-item.day:nth-of-type(21)::before {
    background: #4caf50;
}

#hike-items > .hike-item.day:nth-of-type(22)::before {
    background: #9c27b0;
}

#hike-items > .hike-item.day:nth-of-type(23)::before {
    background: #03a9f4;
}

#hike-items > .hike-item.day:nth-of-type(24)::before {
    background: #ff9800;
}

#hike-items > .hike-item.day:nth-of-type(25)::before {
    background: #795548;
}

.hike-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.hike-item-title {
    font-weight: 600;
    font-size: 15px;
}

.hike-item-controls {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: center;
}

.hike-item-controls button {
    padding: 6px 14px;
    font-size: 13px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.hike-item-controls button:hover {
    background: #066bcb;
    transform: translateY(-1px);
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.grid.two {
    grid-template-columns: repeat(2, 1fr);
}

.grid.three {
    grid-template-columns: repeat(3, 1fr);
}

/* Financial Overview */
.financial-summary {
    background: rgba(0, 184, 148, 0.1);
    border: 1px solid rgba(0, 184, 148, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
}

.financial-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.financial-row.total {
    border-top: 2px solid rgba(0, 0, 0, 0.15);
    padding-top: 10px;
    font-weight: 600;
}

.financial-label {
    font-weight: 500;
}

.financial-value {
    text-align: right;
    font-family: 'Courier New', monospace;
}

/* Print Styles */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }

    body {
        margin: 0;
        padding: 0;
    }

    .top-nav,
    .itinerary-nav,
    .no-print,
    .btn,
    form input[type="submit"],
    form button {
        display: none !important;
    }

    .container {
        max-width: 100%;
        margin: 0;
        padding: 0;
        min-height: auto;
    }

    /* A4 Format (210mm × 297mm) */
    @page {
        size: A4;
        margin: 15mm;
    }

    /* Page Break */
    .page-break {
        page-break-after: always;
        margin-bottom: 0;
    }

    /* Preserve widths */
    table {
        width: 100%;
    }

    h1, h2, h3, h4 {
        page-break-after: avoid;
    }

    .card, .section {
        page-break-inside: avoid;
    }
}

/* A5 Booklet Format (148mm × 210mm) */
@media print and (max-width: 600px) {
    @page {
        size: A5;
        margin: 10mm;
    }

    .container {
        padding: 0;
    }

    h1 {
        font-size: 18px;
    }

    h2 {
        font-size: 15px;
    }

    table {
        font-size: 11px;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row.three {
        grid-template-columns: 1fr;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .grid.two {
        grid-template-columns: 1fr;
    }

    .grid.three {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        display: none;
    }

    .nav-home-btn {
        display: inline-block;
    }

    .nav-container {
        flex-direction: column;
        gap: 10px;
    }

    .nav-right {
        width: 100%;
        justify-content: space-around;
    }

    .nav-menu {
        flex-wrap: wrap;
    }

    .nav-menu a {
        font-size: 12px;
        padding: 6px 8px;
    }

    table {
        font-size: 12px;
    }

    table th,
    table td {
        padding: 8px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: #99a3aa;
}

.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }

.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }

.p-2 { padding: 10px; }
.p-3 { padding: 15px; }
.p-4 { padding: 20px; }
/* Time Picker */
/* Time Picker */
.time-picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.time-picker-overlay.active {
    display: flex !important;
}

.time-picker-container {
    background: var(--background-glass);
    border-radius: 12px;
    padding: 12px;
    box-shadow: var(--shadow-md);
    max-width: 280px;
    animation: slideUp 0.3s ease-out;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

@keyframes slideUp {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.time-picker-title {
    font-size: 12px;
    font-weight: 600;
    color: #636e72;
    margin-bottom: 8px;
    text-align: center;
}

.time-picker-display {
    background: rgba(0, 0, 0, 0.05);
    color: #2d3436;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    font-family: 'Monaco', 'Courier', monospace;
}

.time-picker-row {
    margin-bottom: 10px;
}

.time-picker-row-label {
    font-size: 10px;
    font-weight: 600;
    color: #99a3aa;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 0.3px;
}

.time-picker-controls {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.time-picker-btn-inc {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.7);
    color: #636e72;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.time-picker-btn-inc:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.15);
}

.time-picker-btn-inc:active {
    transform: scale(0.95);
}

.time-picker-value {
    min-width: 60px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #2d3436;
    font-family: 'Monaco', 'Courier', monospace;
}

.time-picker-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.time-picker-btn-action {
    flex: 1;
    padding: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.6);
    color: #636e72;
}

.time-picker-btn-cancel {
    background: rgba(255, 255, 255, 0.6);
    color: #636e72;
}

.time-picker-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.15);
}

.time-picker-btn-ok {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.time-picker-btn-ok:hover {
    background: #066bcb;
    border-color: #066bcb;
}

/* Materials Page Styles */
.materials-button-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.materials-button-row .btn {
    white-space: nowrap;
}

.materials-search-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.materials-search-input {
    padding: 8px 12px 8px 36px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 14px;
    width: 200px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

.materials-search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(9, 132, 227, 0.1);
    width: 250px;
    background: rgba(255, 255, 255, 0.95);
}

.materials-search-icon {
    position: absolute;
    left: 10px;
    color: #99a3aa;
    font-size: 16px;
    pointer-events: none;
}

/* Search Icon Input */
.search-icon-input {
    position: relative;
    display: flex;
    align-items: center;
    height: 36px;
}

.search-icon-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    z-index: 10;
}

.search-input {
    position: absolute;
    left: 0;
    width: 0;
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 14px;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease, padding-left 0.3s ease;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

.search-input.active {
    position: static;
    width: 100%;
    opacity: 1;
    pointer-events: auto;
    margin-left: 0;
}

.materials-checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.material-item {
    display: flex;
    align-items: stretch;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.6);
    overflow: hidden;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.material-item.packed {
    background: rgba(0, 0, 0, 0.05);
    opacity: 0.7;
}

.material-item.packed .material-name {
    text-decoration: line-through;
    color: #99a3aa;
}

.material-item:hover {
    box-shadow: var(--shadow-md);
}

.material-item-content {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 15px;
    padding: 12px;
}

.material-checkbox-section {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.material-checkbox-section input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.material-info {
    flex: 1;
    min-width: 0;
}

.material-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
    color: #2d3436;
}

.material-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 12px;
}

.detail {
    color: #636e72;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.badge {
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 500;
    font-size: 11px;
    color: white;
}

.badge-hike {
    background: #FF6B6B;
}

.badge-hotel {
    background: #4ECDC4;
}

.badge-travel {
    background: #95E1D3;
    color: #333;
}

.badge-purchase {
    background: #FFB84D;
    color: #333;
}

.material-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .material-item-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .material-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Bags Section */
.bags-section {
    padding-top: 30px;
    border-top: 2px solid rgba(0, 0, 0, 0.08);
}

.bags-section h3 {
    margin-bottom: 20px;
    color: #2d3436;
}

.bags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.bag-card {
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.bag-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-light);
}

.bag-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.bag-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2d3436;
}

.compartments-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.compartment-item {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.6);
    border-left: 3px solid var(--accent-color);
    border-radius: 2px;
    font-size: 13px;
    color: #2d3436;
}

/* Form Styles */
.compartment-input {
    padding: 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

#extra-compartments {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

#extra-compartments .btn {
    align-self: flex-start;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

@media (max-width: 600px) {
    .materials-controls {
        flex-direction: column;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .filters-box {
        width: 100%;
        flex-direction: column;
    }
    
    .filters-box select {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
.bags-grid {
        grid-template-columns: 1fr;
    }
}

.expenses-button-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.expenses-button-row .btn {
    white-space: nowrap;
}

.expenses-search-container {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.expenses-search-input {
    padding: 8px 12px 8px 36px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 14px;
    width: 200px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
}

.expenses-search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(9, 132, 227, 0.1);
    width: 250px;
    background: rgba(255, 255, 255, 0.95);
}

.expenses-search-input::placeholder {
    color: #ccc;
}

.expenses-search-icon {
    position: absolute;
    left: 10px;
    color: #99a3aa;
    font-size: 16px;
    pointer-events: none;
}

/* ============================================
   MOBILE OPTIMIZATION & RESPONSIVE ENHANCEMENTS
   ============================================ */

/* Mobile First: Small devices (< 600px) */
@media (max-width: 600px) {
    html, body {
        font-size: 13px;
        padding-top: 20px;
    }

    .container {
        margin: 15px auto 10px;
        padding: 16px;
        width: calc(100% - 16px);
        border-radius: 12px;
        min-height: auto;
    }

    .top-nav {
        top: 10px;
        width: calc(100% - 20px);
        min-height: 36px;
        gap: 10px;
        padding: 0 10px;
        border-radius: 8px;
    }

    .nav-menu {
        display: none;
    }

    .hamburger-menu-btn {
        display: flex !important;
        gap: 4px;
    }

    .hamburger-menu-btn span {
        width: 20px;
        height: 2px;
    }

    .hamburger-menu-dropdown {
        width: calc(100% - 20px);
        max-width: calc(100vw - 20px);
    }

    /* Form optimizations for touch */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
        font-size: 16px;
        min-height: 44px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .form-row.three {
        grid-template-columns: 1fr;
    }

    /* Button optimizations for touch */
    .btn {
        padding: 12px 16px;
        min-height: 44px;
        font-size: 15px;
        border-radius: 8px;
    }

    /* Tables - horizontal scroll on small screens */
    table {
        font-size: 12px;
        overflow-x: auto;
        display: block;
    }

    table thead {
        display: none;
    }

    table tbody {
        display: block;
    }

    table tr {
        display: block;
        margin-bottom: 12px;
        background: rgba(255, 255, 255, 0.6);
        border: 1px solid var(--glass-border);
        border-radius: 8px;
        padding: 8px;
    }

    table td {
        display: block;
        padding: 8px 0;
        border-bottom: none;
        text-align: right;
    }

    table td:before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: #2d3436;
    }

    /* Card optimizations */
    .card {
        padding: 12px;
        margin-bottom: 12px;
        border-radius: 8px;
    }

    .card-title {
        font-size: 14px;
    }

    /* Hike items - adjust padding */
    .hike-item {
        padding: 12px 12px 12px 48px;
        margin-bottom: 20px;
        border-radius: 8px;
        position: relative;
    }

    .hike-item-controls {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        display: flex;
        gap: 6px;
        margin-top: 8px;
        justify-content: flex-start;
    }

    .hike-item-controls button {
        padding: 6px 12px;
        font-size: 12px;
        flex: 1;
    }

    /* Material list adjustments */
    .material-item-content {
        flex-direction: column;
        gap: 8px;
    }

    .material-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 4px;
    }

    .material-details {
        flex-wrap: wrap;
        gap: 4px;
    }

    /* Bag grid for mobile */
    .bags-grid {
        grid-template-columns: 1fr;
    }

    /* Search inputs - reduce width */
    .materials-search-input,
    .expenses-search-input {
        width: 100%;
        max-width: 200px;
        padding: 10px 12px 10px 32px;
    }

    .materials-search-input:focus,
    .expenses-search-input:focus {
        width: 100%;
    }

    /* Grid layouts */
    .grid,
    .grid.two,
    .grid.three {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Modal adjustments */
    .modal-content {
        width: 95%;
        max-width: 100%;
        margin: 40px auto;
        padding: 16px;
        border-radius: 12px;
    }

    .modal-content h3 {
        margin-top: 0;
        font-size: 16px;
    }

    .modal-content .form-group {
        margin-bottom: 12px;
    }

    /* Login container */
    .login-container {
        width: 95%;
        max-width: 100%;
        padding: 20px;
        margin: 0 auto;
        border-radius: 12px;
    }

    .login-container h1 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    /* Headings */
    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 18px;
    }

    h3 {
        font-size: 16px;
    }

    /* Financial summary */
    .financial-summary {
        padding: 12px;
    }

    .financial-row {
        font-size: 13px;
        margin-bottom: 8px;
    }

    /* Utilities */
    .text-center {
        text-align: center;
    }

    .mt-1 { margin-top: 4px; }
    .mt-2 { margin-top: 8px; }
    .mt-3 { margin-top: 12px; }
    .mt-4 { margin-top: 16px; }

    .mb-1 { margin-bottom: 4px; }
    .mb-2 { margin-bottom: 8px; }
    .mb-3 { margin-bottom: 12px; }
    .mb-4 { margin-bottom: 16px; }

    /* Time picker adjustments */
    .time-picker-container {
        max-width: 90vw;
        padding: 10px;
    }

    .time-picker-display {
        font-size: 24px;
        padding: 8px;
    }

    .time-picker-btn-inc {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .time-picker-value {
        min-width: 50px;
        font-size: 18px;
    }
}

/* Tablets & Medium devices (600px - 1024px) */
@media (max-width: 1024px) {
    .container {
        margin: 25px auto 12px;
        padding: 18px;
        width: calc(100% - 24px);
    }

    .top-nav {
        top: 12px;
        width: calc(100% - 24px);
        gap: 15px;
    }

    .nav-menu {
        flex-wrap: wrap;
        gap: 0;
    }

    .nav-menu a {
        font-size: 13px;
        padding: 6px 10px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
        font-size: 14px;
    }

    .btn {
        padding: 10px 14px;
        font-size: 13px;
        min-height: auto;
    }

    table {
        font-size: 13px;
    }

    table th,
    table td {
        padding: 10px;
    }

    .grid.two,
    .grid.three {
        grid-template-columns: 1fr;
    }

    .hike-item {
        padding: 12px 12px 12px 50px;
    }

    .bags-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .materials-search-input,
    .expenses-search-input {
        width: 180px;
    }

    .materials-search-input:focus,
    .expenses-search-input:focus {
        width: 220px;
    }
}

/* Large devices (1024px+) - already optimized above */
@media (min-width: 1025px) {
    .grid.two {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid.three {
        grid-template-columns: repeat(3, 1fr);
    }

    .bags-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn,
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }

    .btn:active {
        transform: scale(0.98);
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 44px;
    }
}

/* Landscape mode optimizations */
@media (max-height: 600px) {
    html, body {
        padding-top: 15px;
    }

    .top-nav {
        top: 8px;
        min-height: 34px;
    }

    .container {
        margin: 15px auto 8px;
        padding: 12px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 16px;
    }
}