:root {
    --bg: #09090b;        
    --surface: #18181b;   
    --border: #27272a;    
    --text: #e4e4e7;     
    --muted: #a1a1aa;     
    
    --primary: #004aad;
    --primary-rgb: 0, 74, 173;
    --primary-hover: #0a5fff;
    
    --danger: #ef4444;    
    --danger-hover: #dc2626;
    
    --success: #10b981;   
    --warning: #f59e0b;   

    --sidebar-width: 260px;
    --header-height: 64px;
}

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

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
    user-select: none;
    -webkit-user-select: none;
}

input, select, textarea, .voucher-code, .st-name, .st-code, .line-name {
    user-select: text;
    -webkit-user-select: text;
}

#app {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* --- Layout --- */

/* Sidebar Container */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 10;
}

/* Main Content Area */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--bg);
    min-width: 0;
    position: relative;
}

/* Header Bar */
.header {
    height: var(--header-height);
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

/* Scrollable Content */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.site-footer {
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    text-align: center;
    user-select: text;
    -webkit-user-select: text;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer .version {
    pointer-events: none;
}

.sidebar-faremap {
    padding: 12px;
    border-top: 1px solid var(--border);
}

.sidebar-faremap-title {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 600;
}

.sidebar-faremap-box {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    cursor: pointer;
    max-height: 220px;
}

.sidebar-faremap-canvas {
    overflow: auto;
    max-height: 220px;
}

.sidebar-faremap-canvas svg {
    display: block;
    width: 100%;
    height: auto;
}

/* --- Sidebar Components --- */

.brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.nav-item.active {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 10px 26px rgba(var(--primary-rgb), 0.22);
}

.nav-item.active .nav-icon {
    color: #ffffff;
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--muted);
}

/* --- UI Components --- */

h3, h4 {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--text);
}

h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; margin-bottom: 1rem; }

.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.card:last-child {
    margin-bottom: 0;
}

/* Buttons */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background-color: transparent;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.2;
}

button:hover, .btn:hover {
    background-color: #ffffff0d;
    border-color: var(--muted);
}

button:active, .btn:active {
    transform: translateY(1px);
}

button.primary, .btn.primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

button.primary:hover, .btn.primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

button i, .btn i {
    margin-right: 12px;
}

button i:only-child, .btn i:only-child {
    margin-right: 0;
}

/* Primary Button */
.header button {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}
.header button:hover {
    background-color: var(--primary-hover);
}

/* Danger Button */
button.danger, .btn.danger {
    color: var(--danger);
    border-color: #ef44444d;
}
button.danger:hover, .btn.danger:hover {
    background-color: #ef44441a;
    border-color: var(--danger);
}

/* Inputs & Selects */
input, select {
    background-color: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    min-width: 0;
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

input::placeholder {
    color: #52525b;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #ffffff0d;
}   

/* --- Dashboard --- */

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 8px;
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Flex Utilities */
.flex {
    display: flex;
    align-items: center;
    gap: 12px;
}

.between {
    justify-content: space-between;
}

.mb-4 {
    margin-bottom: 16px;
}

/* Status Dots */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}
.status-green { background-color: var(--success); box-shadow: 0 0 8px #10b9814d; }
.status-red { background-color: var(--danger); box-shadow: 0 0 8px #ef44444d; }

/* File Manager Table */
.file-table td {
    vertical-align: middle;
}
.file-table .btn {
    padding: 6px 10px;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: #3f3f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background-color: #52525b;
}

/* Fare Map */
.fare-map-container {
    background-color: #18181B; 
    border-radius: 6px;
    padding: 16px;
    overflow: auto;
    max-height: 80vh; 
}

.faremap-card {
    background-color: var(--surface);
    max-width: 100%;
}

.faremap-viewport {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: auto;
    max-height: 80vh;
}

.faremap-canvas {
    transform-origin: 0 0;
    display: inline-block;
}

.icon-btn {
    padding: 8px 10px;
    width: 40px;
    height: 40px;
}

.sidebar-overlay {
    display: none;
}

.mobile-only {
    display: none;
}

@media (max-width: 980px) {
    :root { --sidebar-width: 260px; }
    .content { padding: 14px; }
    .header { padding: 0 14px; }

    .mobile-only { display: inline-flex; }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.55);
        z-index: 9;
    }
    .main { z-index: 1; }

    .management-container {
        flex-direction: column;
        overflow: visible;
        height: auto;
    }
    .management-sidebar {
        width: 100%;
    }
    .management-main {
        overflow: visible;
    }
    .visual-line-container svg {
        overflow: visible;
    }
}

/* Loading & Empty States */
.loading {
    padding: 40px;
    text-align: left; /* Changed from center to left */
    color: var(--muted);
    font-style: italic;
}

.empty-state {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Changed from center to flex-start */
    justify-content: center;
    color: var(--muted);
    padding: 60px 20px;
    text-align: left; /* Changed from center to left */
}

.empty-state i {
    display: block;
    margin-bottom: 10px;
}

/* Fare Input Group */
.fare-inputs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: #ffffff0d;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border);
    align-items: center;
}
.fare-inputs select, .fare-inputs input {
    flex: 1;
    min-width: 120px;
}
.fare-inputs button {
    flex: 0 0 auto;
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}
.fare-inputs button:hover {
    background-color: var(--primary-hover);
}

/* Text Colors */
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.text-info { color: #0ea5e9; }
.text-warning { color: var(--warning); }

body.public-search {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
}

main {
    width: 100%;
}

.login-overlay {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 26px 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.login-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 18px;
}

.login-row {
    margin-bottom: 12px;
}

.login-row input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
}

.login-row input:focus {
    outline: none;
    border-color: rgba(var(--primary-rgb), 0.8);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.18);
}

.login-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 16px;
    gap: 10px;
}

.hint {
    color: var(--danger);
    font-weight: 600;
}

/* Station Format Styles */
.st-container {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}
.st-main-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.st-name {
    font-weight: 700;
}
.st-code {
    font-size: 0.7em;
    opacity: 0.6;
    font-weight: normal;
}
.st-en {
    font-size: 0.65em;
    opacity: 0.5;
    text-transform: uppercase;
    margin-top: 1px;
}

/* --- Management View --- */

.management-container {
    display: flex;
    height: 100%;
    overflow: hidden;
    gap: 20px;
}

.management-sidebar {
    width: 320px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.management-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* Line List */
.list-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 4px;
}

.line-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: #ffffff0d;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.line-item:hover {
    background-color: #ffffff0d;
    border-color: var(--muted);
}

.line-item.active {
    background-color: rgba(var(--primary-rgb), 0.12);
    border-color: var(--primary);
}

.line-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.line-info {
    flex: 1;
    overflow: hidden;
}

.line-name {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.line-meta {
    font-size: 0.8rem;
    color: var(--muted);
}

.line-actions {
    opacity: 0;
    transition: opacity 0.2s;
}

.line-item:hover .line-actions {
    opacity: 1;
}

/* Visual Editor */
.visual-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 400px;
}

.visual-line-container {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    background-color: #00000022;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 40px;
}

.visual-line-container svg {
    min-width: 100%;
}

.station-node {
    cursor: grab;
}

.station-node:active {
    cursor: grabbing;
}

.station-node circle {
    transition: all 0.2s;
}

.station-node.fare-source circle:first-child {
    stroke: var(--success);
    stroke-width: 4;
}

.station-node.fare-target circle:first-child {
    stroke: var(--warning);
    stroke-width: 4;
}

/* Switch Toggle */
.switch-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
    user-select: none;
}

.switch-label input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: relative;
    width: 40px;
    height: 20px;
    background-color: #3f3f46;
    border-radius: 20px;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.label-text {
    font-weight: 600;
}

.hint-text {
    font-size: 0.85rem;
    margin-left: 10px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #ffffff1a;
    font-size: 0.8rem;
    color: var(--muted);
    margin-left: 8px;
    font-weight: 600;
}

.badge-success { background: #10b98133; color: #10b981; }
.badge-secondary { background: #6b728033; color: #9ca3af; }
.badge-danger { background: #ef444433; color: #ef4444; }
.badge-warning { background: #f59e0b33; color: #f59e0b; }

/* Small Button */
.btn.sm, button.sm {
    padding: 4px 8px;
    font-size: 0.8rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00000077;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal.show {
    display: flex;
}

.modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 10px 25px #00000055;
}

.modal-title {
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-align: left; /* Changed from center to left */
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

/* --- Logs --- */
.logs-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.log-item {
    display: flex;
    gap: 16px;
    padding: 12px;
    background-color: #ffffff0d;
    border-radius: 8px;
    border-left: 3px solid transparent;
}

.log-item:hover {
    background-color: #ffffff0d;
}

.log-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff0d;
    border-radius: 50%;
    flex-shrink: 0;
}

.log-content {
    flex: 1;
}

.log-title {
    font-weight: 600;
    color: var(--text);
}

.log-time {
    font-size: 0.8rem;
    color: var(--muted);
}

.log-detail {
    margin-top: 4px;
    font-size: 0.9rem;
    color: var(--muted);
    font-family: monospace;
    word-break: break-all;
}

.log-pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: 'SFMono-Regular', Consolas, monospace;
}

/* --- Ticket Styles --- */
.ticket-table tr {
    cursor: pointer;
}
.ticket-table tr:hover td {
    background-color: rgba(var(--primary-rgb), 0.12);
}

.clickable-row {
    transition: background-color 0.2s;
}

.mono {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* Timeline for Ticket Details */
.timeline {
    position: relative;
    padding-left: 20px;
    border-left: 2px solid var(--border);
    margin-top: 16px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
    padding-left: 20px;
}

.timeline-dot {
    position: absolute;
    left: -27px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary);
    border: 2px solid var(--bg);
}

.timeline-content {
    background: rgba(255,255,255,0.02);
    padding: 10px;
    border-radius: 6px;
}

/* --- Public Ticket Order Page --- */

.public-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.cards {
    display: flex;
    gap: 20px;
}

@media (min-width: 769px) {
    .order-cards .order-left {
        flex: 1.65;
        min-width: 640px;
    }
    .order-cards .order-right {
        flex: 0.85;
        min-width: 320px;
    }
    .order-cards .station-map-container {
        min-height: 420px;
    }
}

/* Mobile Adaptations */
@media (max-width: 768px) {
    /* Buttons */
    .btn, button {
        padding: 12px 20px; /* Adjust padding for mobile (approx 44-48px height) */
        height: 46px; /* Explicit height within 44-48px range */
        font-size: 1rem;
        min-width: 44px; /* Ensure accessibility */
    }

    /* Input/Select heights */
    input, select, .input {
        height: 46px;
        font-size: 1rem;
    }

    .search-header h1 {
        font-size: clamp(22px, 6.2vw, 26px) !important;
        font-weight: 800;
        line-height: 1.2;
    }

    .search-header p {
        font-size: clamp(16px, 4.6vw, 18px);
    }

    .card-title {
        font-size: 1.25rem !important;
        margin-bottom: 20px !important;
    }

    /* Spacing */
    .public-container {
        padding: 20px 16px;
    }

    .search-container {
        padding: 20px 16px !important;
    }

    /* Layout */
    .sidebar {
        display: none; /* Hide sidebar on mobile by default */
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 100;
        box-shadow: 2px 0 10px rgba(0,0,0,0.5);
    }

    .sidebar.open {
        display: flex;
    }

    /* Adjust header for mobile */
    .header {
        padding: 0 16px;
    }

    .header h3 {
        font-size: 1.1rem;
    }

    /* Content Area */
    .content {
        padding: 16px;
    }

    /* Grid Layouts */
    .grid {
        grid-template-columns: 1fr; /* Single column for stats */
    }
    
    .portal-grid {
        grid-template-columns: 1fr !important; /* Single column for home portal */
        gap: 16px !important;
        padding: 0 16px !important;
    }

    .portal-card {
        padding: 24px 20px;
    }

    .portal-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
        margin-bottom: 12px;
    }

    .portal-card h3 {
        font-size: 1.25rem;
    }

    .portal-card p {
        font-size: 0.9rem;
    }

    /* Cards */
    .cards {
        flex-direction: column;
    }
    
    .card {
        padding: 16px;
    }

    /* Tables */
    .ticket-table {
        display: block;
        overflow-x: auto;
    }
    
    .ticket-table th, .ticket-table td {
        white-space: nowrap;
        padding: 10px;
    }

    /* Management View */
    .management-container {
        flex-direction: column;
        overflow-y: auto;
    }

    .management-sidebar {
        width: 100%;
        height: auto;
        max-height: 300px;
        flex-shrink: 0;
    }

    .management-main {
        overflow: visible;
        min-height: 500px;
    }

    /* Visual Editor */
    .visual-line-container {
        padding: 20px;
    }

    /* Modals */
    .modal-card {
        width: 95%;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Ticket Order Page specific */
    .train-type-group {
        flex-direction: column;
    }
    
    .type-card {
        padding: 10px;
    }

    .type-title {
        font-size: 0.95rem;
    }

    .type-desc {
        font-size: 0.75rem;
    }

    .list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .list-item .k {
        width: 100%;
        color: var(--muted);
        font-weight: 500;
        font-size: 0.9rem;
    }
    
    .list-item .v {
        width: 100%;
        text-align: left;
    }

    .voucher-code {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    /* Adjust logo size */
    .logo {
        max-width: 120px;
        margin-bottom: 16px;
    }
    
    /* Search box adjustment */
    .search-box {
        flex-direction: column;
        padding: 20px;
    }
    
    .search-box button {
        width: 100%;
        margin-top: 10px;
        padding: 12px 0;
    }
    
    /* Search Header (centered on mobile too) */
    .search-header {
        text-align: center;
        margin-bottom: 30px;
    }

    /* Search Results */
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .popular-grid {
        grid-template-columns: 1fr;
    }

    .ticket-visual-route {
        font-size: 1.2rem !important;
    }

    .ticket-visual-meta {
        grid-template-columns: 1fr !important;
    }

    /* Home Page */
    .home-container {
        padding: 40px 16px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }

    .public-assets {
        gap: 16px;
        padding: 0 16px;
    }
}

/* Public Inputs */
.input {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.input:focus {
    background-color: #ffffff1a;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

/* Custom select arrow */
select.input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a1a1aa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Custom Date Input */
input[type="date"].input {
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a1a1aa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;
}

input[type="date"].input::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

.voucher-code {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--primary);
    display: block;
    width: 100%;
    text-align: left; /* Changed from center to left */
    margin: 10px 0;
}

.list-item .voucher-code {
    text-align: left; /* Changed from center to left */
}

/* Train Type Selection */
.train-type-group {
    display: flex;
    gap: 10px;
}

.train-type-group label {
    flex: 1;
    cursor: pointer;
}

.train-type-group input {
    display: none;
}

.type-card {
    background-color: #ffffff0d;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    text-align: left; /* Changed from center to left */
    transition: all 0.2s;
}

.train-type-group input:checked + .type-card {
    background-color: rgba(var(--primary-rgb), 0.2);
    border-color: var(--primary);
    color: white;
}

.type-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.type-desc {
    font-size: 0.8rem;
    color: var(--muted);
}

.train-type-group input:checked + .type-card .type-desc {
    color: #ffffffcc;
}

/* Station Map */
.station-map-container {
    background: #00000033;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    display: flex;
    justify-content: center;
    min-height: 380px;
    align-items: center;
}

.station-map-container svg {
    min-width: 680px;
    max-width: 100%;
    height: auto;
    transform: scale(1.06);
    transform-origin: center center;
}

.map-station { cursor: pointer; }
.map-station circle { transition: all 0.2s; }
.map-station:hover .node-core { r: 10; }
.map-station.selected .node-core { r: 10; stroke: white; stroke-width: 3; fill: var(--primary); }
.map-station.start .node-core { fill: var(--success) !important; r: 10; stroke: white; stroke-width: 3; }
.map-station.end .node-core { fill: var(--danger) !important; r: 10; stroke: white; stroke-width: 3; }
.map-station text { pointer-events: none; }
.map-station.transfer .node-core { stroke: #ffffffcc; stroke-width: 3; }
.map-station.route .node-core { stroke: var(--primary); stroke-width: 4; }
.map-station.route-transfer .node-core { stroke: #f59e0b; stroke-width: 4; }

.voucher-hint {
    font-size: 0.85rem;
    color: var(--muted);
    text-align: left; /* Changed from center to left */
    margin-top: 16px;
    line-height: 1.4;
    max-width: 100%; /* Changed from 80% to 100% for left alignment */
}

.voucher-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Changed from center to flex-start */
    justify-content: center;
    height: 100%;
    min-height: 200px;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.list-item .k {
    font-weight: 500;
    color: var(--muted);
    width: 80px;
}

.list-item .v {
    font-weight: 600;
    color: var(--text);
    text-align: right;
}

/* Toolbar */
.toolbar {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-start; /* Changed from flex-end to flex-start */
}

.toolbar .btn {
    padding: 10px 20px;
    font-size: 1rem;
}

.section-title {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.section-title strong {
    font-size: 1.5rem;
    font-weight: 700;
}

.section-title .hint {
    font-size: 0.9rem;
    color: var(--muted);
}
