: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: linear-gradient(180deg, #0b6b3a 0, #095b31 100%);
    border-color: #0b6b3a;
    color: #ffffff;
}

button.primary:hover, .btn.primary:hover {
    background: linear-gradient(180deg, #0d7a43 0, #096334 100%);
    border-color: #0d7a43;
}

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);
}

/* --- JR Style Order Page --- */

body.jr-order-page,
body.jr-public-page {
    --jr-font-sans: "Segoe UI Variable Text", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --jr-font-heading: "Segoe UI Variable Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --jr-accent: #0b6b3a;
    --jr-accent-strong: #08582f;
    --jr-accent-hover: #0d7641;
    --jr-accent-soft: #e8f3ea;
    --jr-accent-border: #cfe0d2;
    --jr-accent-shadow: rgba(11, 107, 58, 0.16);
    --jr-border: #d7e0d3;
    --jr-border-soft: #dfe8dd;
}

body.jr-order-page {
    margin: 0;
    background-color: #0b6b3a;
    background:
        linear-gradient(180deg, #eef4ee 0, #eef4ee 146px, #f7f8f4 146px, #f7f8f4 100%);
    color: #1e293b;
    font-family: var(--jr-font-sans);
}

body.jr-order-page .site-footer,
body.jr-order-page .site-footer a,
body.jr-order-page .site-footer .version {
    color: #5f6b5f;
}

.jr-order-shell {
    min-height: 100vh;
    margin: 0;
    padding-top: 0;
}

.jr-public-shell,
.jr-order-shell {
    background:
        radial-gradient(circle at top left, rgba(233, 241, 230, 0.9) 0, rgba(233, 241, 230, 0) 28%),
        linear-gradient(180deg, #f5f8f2 0, #edf3ea 100%);
}

.jr-topbar {
    background: #0b6b3a;
    color: #ffffff;
    margin-top: 0;
    position: relative;
    z-index: 3;
}

.jr-topbar-inner,
.jr-brandbar-inner,
.jr-main {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
}

.jr-topbar-inner {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.jr-top-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.jr-top-link:hover {
    opacity: 0.92;
}

.jr-top-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.jr-top-status-label {
    opacity: 0.78;
    letter-spacing: 0.04em;
}

.jr-top-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a6e3ac;
    box-shadow: 0 0 0 4px rgba(166, 227, 172, 0.18);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.jr-top-status-value {
    font-weight: 700;
}

.jr-top-status.is-checking {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.jr-top-status.is-checking .jr-top-status-dot {
    background: #f4d27a;
    box-shadow: 0 0 0 4px rgba(244, 210, 122, 0.2);
}

.jr-top-status.is-online {
    border-color: rgba(166, 227, 172, 0.22);
}

.jr-top-status.is-offline {
    border-color: rgba(245, 160, 160, 0.26);
    background: rgba(122, 22, 22, 0.14);
}

.jr-top-status.is-offline .jr-top-status-dot {
    background: #f2a1a1;
    box-shadow: 0 0 0 4px rgba(242, 161, 161, 0.16);
}

.jr-brandbar {
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
}

.jr-brandbar-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 0 6px;
}

.jr-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #183525;
}

.jr-brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 10px;
    background: #f4f7f1;
    border: 1px solid #d7e0d3;
    padding: 6px;
}

.jr-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.jr-brand-copy strong {
    font-size: 1.1rem;
    letter-spacing: 0.03em;
    font-family: var(--jr-font-heading);
    font-weight: 750;
}

.jr-brand-copy span {
    color: #58705f;
    font-size: 0.85rem;
}

.jr-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    justify-content: flex-end;
    overflow-x: auto;
    scrollbar-width: none;
}

.jr-nav::-webkit-scrollbar {
    display: none;
}

.jr-nav a {
    min-width: 104px;
    padding: 10px 16px;
    border-radius: 999px;
    text-decoration: none;
    color: #385042;
    font-weight: 700;
    text-align: center;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.jr-nav a:hover,
.jr-nav a.is-active {
    background: var(--jr-accent-soft);
    border-color: var(--jr-accent-border);
    color: var(--jr-accent);
}

.jr-nav a.is-active {
    box-shadow: 0 10px 22px rgba(11, 107, 58, 0.1);
}

.jr-main {
    padding: 28px 0 40px;
}

.jr-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.82fr);
    gap: 26px;
    align-items: stretch;
    margin-bottom: 24px;
}

.jr-hero-copy,
.jr-hero-panel,
.jr-section-card {
    background: #ffffff;
    border: 1px solid #d7e0d3;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.jr-hero-copy {
    padding: 34px 36px;
    border-top: 5px solid #0b6b3a;
}

.jr-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: #0b6b3a;
}

.jr-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 3.8vw, 3.25rem);
    line-height: 1.14;
    letter-spacing: -0.04em;
    color: #13231a;
}

.jr-hero-text {
    max-width: 760px;
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.8;
    color: #526256;
}

.jr-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.jr-cta-primary,
.jr-cta-secondary {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.jr-cta-primary {
    border: 1px solid var(--jr-accent);
    background: linear-gradient(180deg, var(--jr-accent) 0, var(--jr-accent-strong) 100%);
    color: #ffffff;
    box-shadow: 0 12px 24px var(--jr-accent-shadow);
}

.jr-cta-primary:hover {
    background: linear-gradient(180deg, var(--jr-accent-hover) 0, #096334 100%);
    border-color: var(--jr-accent-hover);
    transform: translateY(-1px);
}

.jr-cta-secondary {
    border: 1px solid var(--jr-accent-border);
    color: #264433;
    background: rgba(255, 255, 255, 0.94);
}

.jr-cta-secondary:hover {
    background: #f2f7f3;
    border-color: #b9cfbe;
}

.jr-hero-panel {
    padding: 28px 28px 24px;
    background:
        linear-gradient(180deg, #f8fbf7 0, #ffffff 58%),
        #ffffff;
}

.jr-panel-head {
    margin-bottom: 18px;
}

.jr-panel-kicker {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #0b6b3a;
}

.jr-panel-head h2 {
    margin: 0;
    font-size: 1.45rem;
    color: #15251b;
}

.jr-process-list {
    margin: 0;
    padding-left: 18px;
    color: #4a5a4d;
    line-height: 1.8;
}

.jr-process-list li + li {
    margin-top: 8px;
}

.jr-service-strip {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #dfe8dd;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.jr-service-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.78rem;
    color: #68806d;
    letter-spacing: 0.08em;
}

.jr-service-strip strong {
    font-size: 1rem;
    color: #183525;
}

.jr-alert-band {
    margin-bottom: 24px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border: 1px solid #d7e0d3;
    border-left: 5px solid #0b6b3a;
    color: #31463a;
}

.jr-alert-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #0b6b3a;
    white-space: nowrap;
}

.jr-alert-band p {
    margin: 0;
    line-height: 1.7;
}

.jr-quick-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.jr-quick-link {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1px solid #d7e0d3;
    text-decoration: none;
    color: #1f2f25;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jr-quick-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.jr-quick-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8f1e8;
    color: #0b6b3a;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.jr-quick-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jr-quick-text strong {
    font-size: 1rem;
}

.jr-quick-text span {
    color: #607064;
    line-height: 1.55;
}

.jr-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.82fr);
    gap: 24px;
    align-items: start;
}

.jr-column-main,
.jr-column-side {
    min-width: 0;
}

.jr-column-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.jr-section-card {
    padding: 28px;
}

.jr-side-card {
    padding-bottom: 24px;
}

.jr-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.jr-section-label {
    margin: 0 0 4px;
    font-size: 0.78rem;
    font-weight: 800;
    color: #0b6b3a;
    letter-spacing: 0.12em;
}

.jr-section-head h2 {
    margin: 0;
    font-size: 1.65rem;
    color: #15251b;
}

.jr-section-note {
    max-width: 280px;
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.65;
    color: #6a786d;
}

.jr-station-map {
    margin-bottom: 20px;
    background:
        linear-gradient(180deg, #f7faf7 0, #edf4ed 100%);
    border: 1px solid #d7e0d3;
    padding: 22px;
}

body.jr-order-page .station-map-container svg text {
    fill: #33463b;
}

.jr-selection-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
    margin-bottom: 22px;
}

.jr-selection-card {
    padding: 18px 20px;
    border: 1px solid #d7e0d3;
    background: #f9fbf8;
}

.jr-selection-start {
    border-top: 4px solid #169b62;
}

.jr-selection-end {
    border-top: 4px solid #d25757;
}

.jr-selection-tag {
    display: inline-block;
    margin-bottom: 8px;
    color: #6a786d;
    font-size: 0.84rem;
    letter-spacing: 0.08em;
}

.jr-selection-card strong {
    display: block;
    font-size: 1.15rem;
    line-height: 1.5;
    color: #1b3123;
    word-break: break-word;
}

.jr-selection-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5a6a5f;
    font-size: 1.2rem;
}

.jr-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(180px, 0.65fr);
    gap: 18px;
    align-items: start;
}

.jr-form-block {
    padding: 18px 20px;
    border: 1px solid #d7e0d3;
    background: #ffffff;
}

.jr-field-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.jr-field-label {
    font-size: 0.96rem;
    font-weight: 800;
    color: #223529;
}

.jr-field-note {
    color: #7a867d;
    font-size: 0.84rem;
}

.jr-train-type-group {
    gap: 12px;
}

body.jr-order-page .jr-train-type-group input {
    display: none;
}

.jr-type-card {
    min-height: 96px;
    background: #f7faf7;
    border: 1px solid #d3ddd1;
    border-radius: 0;
    padding: 16px;
    box-shadow: none;
}

body.jr-order-page .jr-train-type-group input:checked + .jr-type-card {
    background: #e8f1e8;
    border-color: #0b6b3a;
    color: #173321;
}

body.jr-order-page .jr-train-type-group input:checked + .jr-type-card .type-desc {
    color: #365041;
}

.jr-quantity-input,
body.jr-order-page .jr-quantity-input {
    width: 100%;
    min-height: 52px;
    background: #f7faf7;
    border: 1px solid #d3ddd1;
    border-radius: 0;
    color: #213128;
    font-size: 1.2rem;
    font-weight: 700;
}

.jr-quantity-input:focus,
body.jr-order-page .jr-quantity-input:focus {
    border-color: #0b6b3a;
    box-shadow: 0 0 0 3px rgba(11, 107, 58, 0.14);
    background: #ffffff;
}

.jr-toolbar {
    margin-top: 22px;
}

.jr-submit-btn,
body.jr-order-page .jr-submit-btn {
    width: 100%;
    min-height: 56px;
    border-radius: 0;
    border-color: var(--jr-accent);
    background: linear-gradient(180deg, var(--jr-accent) 0, var(--jr-accent-strong) 100%);
    box-shadow: 0 16px 28px rgba(11, 107, 58, 0.22);
    font-size: 1rem;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.jr-submit-btn:hover,
body.jr-order-page .jr-submit-btn:hover {
    background: linear-gradient(180deg, var(--jr-accent-hover) 0, #096334 100%);
    border-color: var(--jr-accent-hover);
}

.jr-price-list,
.jr-voucher-list {
    min-height: 180px;
}

body.jr-order-page .jr-price-list .list-item,
body.jr-order-page .jr-voucher-list .list-item,
body.jr-order-page .jr-price-list .list-item .k,
body.jr-order-page .jr-voucher-list .list-item .k,
body.jr-order-page .jr-price-list .list-item .v,
body.jr-order-page .jr-voucher-list .list-item .v {
    color: #24352a;
}

body.jr-order-page .jr-price-list .list-item,
body.jr-order-page .jr-voucher-list .list-item {
    border-bottom-color: #e4ece2;
    padding: 13px 0;
}

body.jr-order-page .jr-price-list .list-item .k,
body.jr-order-page .jr-voucher-list .list-item .k {
    color: #667569;
}

.jr-empty-state,
body.jr-order-page .jr-empty-state {
    min-height: 140px;
    padding: 22px 0;
    align-items: flex-start;
    justify-content: center;
    color: #758178;
}

.jr-voucher-empty {
    min-height: 150px;
}

body.jr-order-page .voucher-container {
    align-items: flex-start;
    min-height: 160px;
    padding: 4px 0;
}

body.jr-order-page .voucher-code {
    color: #0b6b3a;
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: 0.18em;
}

body.jr-order-page .voucher-hint {
    color: #637268;
}

body.jr-order-page .badge-secondary {
    background: #edf2ec;
    color: #45614e;
}

.jr-guide-list {
    margin: 0;
    padding-left: 18px;
    color: #536355;
    line-height: 1.8;
}

.jr-guide-list li + li {
    margin-top: 8px;
}

.jr-result-row.jr-result-multiline {
    align-items: flex-start;
}

.jr-route-text {
    white-space: normal;
    text-align: right;
    line-height: 1.55;
}

.jr-transfer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.jr-total-row {
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px solid #dfe8dd;
    font-size: 1.14rem;
}

.jr-total-amount {
    color: #0b6b3a !important;
    font-size: 1.3rem;
}

.jr-voucher-meta {
    margin-bottom: 10px;
    color: #6c7c71;
    font-size: 0.9rem;
    letter-spacing: 0.08em;
}

.jr-voucher-panel {
    width: 100%;
}

.jr-voucher-actions {
    width: 100%;
    justify-content: center;
    margin-top: 20px;
}

.jr-detail-btn,
body.jr-order-page .jr-detail-btn {
    min-width: 138px;
    min-height: 48px;
    border: 1px solid #0f6d58;
    background: linear-gradient(180deg, #11785f 0, #0d634f 100%);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(13, 99, 79, 0.2);
}

.jr-detail-btn:hover,
body.jr-order-page .jr-detail-btn:hover {
    background: linear-gradient(180deg, #14866a 0, #0f7059 100%);
    border-color: #14866a;
}

.jr-site-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top-color: #d7e0d3;
}

body.jr-order-page .map-station:hover .node-core {
    r: 10;
}

body.jr-order-page .map-station .node-core {
    stroke: #1d3326;
}

body.jr-order-page .map-station.start .node-core {
    fill: #169b62 !important;
}

body.jr-order-page .map-station.end .node-core {
    fill: #d25757 !important;
}

body.jr-order-page .map-station.route .node-core {
    stroke: #0b6b3a;
}

body.jr-order-page .map-station.route-transfer .node-core {
    stroke: #d69a0f;
}

@media (max-width: 1080px) {
    .jr-hero,
    .jr-content-grid {
        grid-template-columns: 1fr;
    }

    .jr-section-head {
        flex-direction: column;
    }

    .jr-section-note {
        max-width: none;
    }

    .jr-quick-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .jr-topbar-inner,
    .jr-brandbar-inner,
    .jr-main {
        width: min(100%, calc(100% - 24px));
    }

    .jr-topbar-inner {
        min-height: 52px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 8px 0;
    }

    .jr-brandbar-inner {
        min-height: auto;
        padding: 16px 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .jr-nav {
        width: 100%;
        justify-content: flex-start;
    }

    .jr-nav a {
        padding: 9px 12px;
    }

    .jr-main {
        padding-top: 16px;
    }

    .jr-hero-copy,
    .jr-hero-panel,
    .jr-section-card {
        padding: 20px 18px;
    }

    .jr-hero h1 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
    }

    .jr-selection-summary {
        grid-template-columns: 1fr;
    }

    .jr-selection-arrow {
        min-height: 20px;
        transform: rotate(90deg);
    }

    .jr-form-grid,
    .jr-service-strip {
        grid-template-columns: 1fr;
    }

    .jr-alert-band {
        flex-direction: column;
        align-items: flex-start;
    }

    .jr-station-map {
        padding: 14px;
    }

    body.jr-order-page .station-map-container svg {
        min-width: 620px;
        transform: none;
    }

    .jr-submit-btn,
    body.jr-order-page .jr-submit-btn {
        min-height: 50px;
    }

    .jr-route-text,
    .jr-transfer-chips {
        text-align: left;
        justify-content: flex-start;
    }
}

/* --- JR Public Pages --- */

body.jr-public-page {
    margin: 0;
    background-color: #0b6b3a;
    background:
        linear-gradient(180deg, #eef4ee 0, #eef4ee 146px, #f7f8f4 146px, #f7f8f4 100%);
    color: #1f2f25;
    font-family: var(--jr-font-sans);
}

.jr-public-shell {
    min-height: 100vh;
    margin: 0;
    padding-top: 0;
}

.jr-public-main {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 40px;
}

.jr-page-intro {
    margin-bottom: 24px;
    padding: 28px 30px;
    background: #ffffff;
    border: 1px solid #d7e0d3;
    border-top: 5px solid #0b6b3a;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.jr-page-intro h1 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 3.4vw, 3rem);
    line-height: 1.15;
    color: #13231a;
    letter-spacing: -0.04em;
    font-family: var(--jr-font-heading);
    font-weight: 760;
}

.jr-page-intro p {
    margin: 0;
    max-width: 880px;
    color: #58685c;
    line-height: 1.8;
}

.jr-kicker {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #0b6b3a;
    letter-spacing: 0.14em;
}

.jr-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 24px;
    margin-bottom: 24px;
}

.jr-service-card,
.jr-white-card {
    background: #ffffff;
    border: 1px solid #d7e0d3;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.jr-service-card {
    padding: 28px 30px;
}

.jr-service-card h2,
.jr-white-card h2,
.jr-white-card h3 {
    margin: 0;
    color: #16261b;
    font-family: var(--jr-font-heading);
    font-weight: 740;
}

.jr-service-card p,
.jr-white-card p {
    color: #607064;
    line-height: 1.75;
}

.jr-hero-statlist {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.jr-hero-stat {
    padding: 14px 16px;
    background: #f7faf7;
    border: 1px solid #dfe8dd;
}

.jr-hero-stat strong {
    display: block;
    color: #173321;
    font-size: 1.15rem;
}

.jr-hero-stat span {
    display: block;
    margin-top: 4px;
    color: #667569;
    font-size: 0.86rem;
}

.jr-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.jr-grid-three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.jr-feature-link {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #d7e0d3;
    color: #1d2f24;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jr-feature-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.jr-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8f1e8;
    color: #0b6b3a;
}

.jr-feature-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jr-feature-copy strong {
    font-size: 1rem;
}

.jr-feature-copy span {
    color: #647266;
    line-height: 1.6;
}

.jr-panel-card {
    padding: 24px;
    background: #ffffff;
    border: 1px solid #d7e0d3;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.jr-panel-headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.jr-panel-headline h2,
.jr-panel-headline h3 {
    font-size: 1.45rem;
    font-family: var(--jr-font-heading);
    font-weight: 740;
}

.jr-panel-note {
    color: #69766c;
    font-size: 0.9rem;
}

.jr-asset-frame {
    background: #f7faf7;
    border: 1px solid #dfe8dd;
    padding: 12px;
}

.jr-asset-frame img,
.jr-asset-frame svg {
    display: block;
    width: 100%;
    height: auto;
}

.jr-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: stretch;
}

.jr-search-input,
body.jr-public-page .jr-search-input {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    background: #f7faf7;
    border: 1px solid #d3ddd1;
    border-radius: 0;
    color: #213128;
    font-size: 1rem;
}

.jr-search-input:focus,
body.jr-public-page .jr-search-input:focus {
    border-color: #0b6b3a;
    box-shadow: 0 0 0 3px rgba(11, 107, 58, 0.14);
    background: #ffffff;
}

.jr-search-button,
body.jr-public-page .jr-search-button {
    min-width: 170px;
    min-height: 54px;
    padding: 0 22px;
    border-radius: 0;
    border-color: var(--jr-accent);
    background: linear-gradient(180deg, var(--jr-accent) 0, var(--jr-accent-strong) 100%);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 12px 24px var(--jr-accent-shadow);
}

.jr-search-button:hover,
body.jr-public-page .jr-search-button:hover {
    background: linear-gradient(180deg, var(--jr-accent-hover) 0, #096334 100%);
}

.jr-search-results {
    display: grid;
    grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
    gap: 24px;
    align-items: start;
}

.jr-scroll-box {
    min-height: 420px;
    max-height: 680px;
    overflow: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.jr-scroll-box::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.jr-ticket-row {
    padding: 18px 0;
    border-bottom: 1px solid #e4ece2;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.jr-ticket-row:hover {
    background: #f7faf7;
}

.jr-ticket-row:last-child {
    border-bottom: none;
}

.jr-ticket-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.jr-ticket-route {
    color: #4f5d52;
    line-height: 1.7;
}

.jr-ticket-id {
    color: #1b3022;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.jr-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.jr-status-valid {
    background: #e8f5eb;
    color: #0b6b3a;
}

.jr-status-used {
    background: #edf1ee;
    color: #5e6b63;
}

.jr-status-expired {
    background: #faecec;
    color: #b84b4b;
}

.jr-ticket-preview {
    padding: 24px;
    background: linear-gradient(180deg, #f7faf7 0, #ffffff 100%);
    border: 1px solid #dfe8dd;
}

.jr-route-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    margin: 18px 0 20px;
}

.jr-station-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jr-station-block.is-end {
    align-items: flex-end;
    text-align: right;
}

.jr-station-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.jr-station-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #13231a;
}

.jr-station-code {
    color: #67806d;
    font-size: 0.84rem;
    letter-spacing: 0.06em;
}

.jr-station-en {
    color: #809187;
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.jr-route-track {
    position: relative;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jr-route-track::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: #c8d7c7;
    transform: translateY(-50%);
}

.jr-route-track i {
    position: relative;
    z-index: 1;
    padding: 0 10px;
    background: #f7faf7;
    color: #0b6b3a;
}

.jr-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.jr-meta-item {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dfe8dd;
}

.jr-meta-item span {
    display: block;
    color: #718076;
    font-size: 0.8rem;
    margin-bottom: 6px;
    letter-spacing: 0.08em;
}

.jr-meta-item strong {
    color: #183525;
    font-size: 1rem;
}

.jr-popular-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jr-popular-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: #f7faf7;
    border: 1px solid #dfe8dd;
}

.jr-popular-item strong {
    color: #213227;
}

.jr-popular-item span {
    color: #6d7a70;
}

.jr-voucher-layout,
.jr-board-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
    gap: 24px;
    align-items: start;
}

.jr-voucher-card,
.jr-board-card {
    padding: 26px;
    background: #ffffff;
    border: 1px solid #d7e0d3;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    position: relative;
    overflow: hidden;
}

.jr-board-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--jr-accent) 0, #76b58a 100%);
}

.jr-board-card > * {
    position: relative;
    z-index: 1;
}

.jr-board-card:first-child {
    background:
        linear-gradient(135deg, rgba(11, 107, 58, 0.05) 0, rgba(11, 107, 58, 0.018) 24%, #ffffff 24%, #ffffff 100%);
}

.jr-board-card .jr-panel-headline {
    align-items: flex-start;
}

.jr-board-card .jr-panel-headline h2.mono {
    margin: 0;
    font-size: clamp(1.45rem, 2.6vw, 2.15rem);
    letter-spacing: 0.08em;
    word-break: break-all;
}

.jr-voucher-band {
    padding: 22px 24px;
    background: linear-gradient(180deg, #f7faf7 0, #ffffff 100%);
    border: 1px solid #dfe8dd;
    margin-bottom: 18px;
}

.jr-voucher-code {
    margin: 10px 0 0;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #0b6b3a;
    letter-spacing: 0.16em;
    word-break: break-all;
}

.jr-action-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.jr-redeem-card {
    display: flex;
    flex-direction: column;
}

.jr-redeem-summary {
    padding: 22px 24px;
    background: linear-gradient(180deg, #f9fbf9 0, #ffffff 100%);
    border: 1px solid #dfe8dd;
}

.jr-redeem-code-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding: 14px 16px;
    background: #f3f8f4;
    border: 1px solid #d9e5dc;
}

.jr-redeem-code-label {
    color: #6a786d;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.jr-redeem-code-value {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: clamp(1.4rem, 2.8vw, 2rem);
    font-weight: 800;
    color: #0b6b3a;
    letter-spacing: 0.12em;
    word-break: break-all;
}

.jr-redeem-copy {
    margin: 14px 0 0;
    color: #59685d;
    line-height: 1.8;
}

.jr-card-order-result {
    border: 1px solid #d8e2d4;
    background: linear-gradient(180deg, #f7faf7 0, #ffffff 100%);
    padding: 22px 24px;
}

.jr-order-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.jr-order-info-item {
    padding: 12px 14px;
    border: 1px solid #d9e4d6;
    background: #ffffff;
}

.jr-order-info-item span {
    display: block;
    color: #6b786e;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.jr-order-info-item strong {
    display: block;
    margin-top: 6px;
    color: #123a22;
    font-size: 1.15rem;
    font-weight: 800;
}

.jr-code-accent-secondary {
    color: #004aad;
}

.jr-code-accent-status {
    color: #0b6b3a;
}

.jr-card-pass-band {
    position: relative;
}

.jr-card-pass-band::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 18px;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 74, 173, 0.12) 0, rgba(11, 107, 58, 0.08) 58%, rgba(255, 255, 255, 0) 60%);
}

.jr-card-info-grid strong {
    color: #183223;
}

.jr-redeem-steps {
    margin-top: 18px;
}

.jr-secondary-btn,
body.jr-public-page .jr-secondary-btn {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 0;
    border: 1px solid var(--jr-accent-border);
    background: #ffffff;
    color: #264433;
}

.jr-secondary-btn:hover,
body.jr-public-page .jr-secondary-btn:hover {
    background: #f2f7f3;
    border-color: #b9cfbe;
}

.jr-history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.jr-history-item {
    padding: 16px 18px;
    background: #f7faf7;
    border: 1px solid #dfe8dd;
    border-left: 4px solid #cfe0d2;
}

.jr-history-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.jr-history-title {
    font-weight: 800;
    color: #203126;
}

.jr-history-time {
    color: #748278;
    font-size: 0.84rem;
    white-space: nowrap;
}

.jr-history-desc {
    margin-top: 8px;
    color: #607064;
    line-height: 1.7;
}

body.jr-ticket-board-page,
body.jr-ticket-board-page #app,
body.jr-ticket-board-page .jr-public-shell {
    width: 100%;
    min-width: 0;
}

body.jr-ticket-board-page .jr-topbar,
body.jr-ticket-board-page .jr-brandbar,
body.jr-ticket-board-page .jr-public-main {
    width: 100%;
}

body.jr-ticket-board-page .jr-brandbar-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

body.jr-ticket-board-page .jr-brand {
    min-width: 0;
}

body.jr-ticket-board-page .jr-board-card:last-child {
    min-width: 0;
}

.jr-center-empty {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 20px 0;
    color: #748278;
}

.jr-footer-space {
    margin-top: 28px;
}

.jr-home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.8fr);
    gap: 24px;
    margin-bottom: 24px;
}

.jr-home-hero-main,
.jr-home-hero-side,
.jr-home-mini-card {
    background: #ffffff;
    border: 1px solid #d7e0d3;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.jr-home-hero-main {
    padding: 34px 36px;
    border-top: 5px solid #0b6b3a;
    background:
        linear-gradient(135deg, rgba(11, 107, 58, 0.03) 0, rgba(11, 107, 58, 0.015) 28%, #ffffff 28%, #ffffff 100%);
}

.jr-home-hero-main h1 {
    margin: 0 0 14px;
    font-size: clamp(2.3rem, 4.2vw, 4rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
    color: #102118;
    font-family: var(--jr-font-heading);
    font-weight: 780;
}

.jr-home-hero-text {
    max-width: 760px;
    margin: 0;
    color: #5b6a5f;
    line-height: 1.9;
    font-size: 1.02rem;
}

.jr-home-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.jr-home-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 26px;
}

.jr-home-stat {
    padding: 15px 16px;
    background: #f7faf7;
    border: 1px solid #dfe8dd;
}

.jr-home-stat strong {
    display: block;
    font-size: 1.06rem;
    color: #183325;
}

.jr-home-stat span {
    display: block;
    margin-top: 4px;
    color: #6a786d;
    line-height: 1.55;
    font-size: 0.86rem;
}

.jr-home-hero-side {
    padding: 28px;
    background: linear-gradient(180deg, #f7faf7 0, #ffffff 100%);
}

.jr-home-side-head {
    margin-bottom: 16px;
}

.jr-home-side-head h2 {
    margin: 0;
    font-size: 1.5rem;
}

.jr-home-process {
    margin-top: 0;
}

.jr-home-side-strip {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #dfe8dd;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.jr-home-side-strip span {
    display: block;
    margin-bottom: 5px;
    color: #6f7d72;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.jr-home-side-strip strong {
    color: #183325;
}

.jr-home-alert {
    margin-bottom: 24px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border: 1px solid #d7e0d3;
    border-left: 5px solid #0b6b3a;
}

.jr-home-alert p {
    margin: 0;
    color: #4f5f53;
    line-height: 1.7;
}

.jr-home-service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(240px, 0.9fr);
    gap: 16px;
    margin-bottom: 24px;
    align-items: stretch;
}

.jr-home-service-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 22px 20px;
    background: #ffffff;
    border: 1px solid #d7e0d3;
    color: #1d2f24;
    text-decoration: none;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jr-home-service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.jr-home-service-primary {
    border-top: 4px solid #0b6b3a;
}

.jr-home-mini-card {
    padding: 22px 20px;
}

.jr-home-mini-card h3 {
    margin: 0 0 12px;
    color: #16261b;
}

.jr-home-assets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.ic-admin-layout {
    align-items: start;
}

.ic-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ic-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ic-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ic-field span {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.ic-field input,
.ic-field select,
.ic-field textarea,
.jr-card-textarea {
    width: 100%;
    background-color: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
}

.ic-field textarea,
.jr-card-textarea {
    resize: vertical;
}

.ic-field-full {
    grid-column: 1 / -1;
}

.ic-inline-meta {
    margin-top: 16px;
}

.ic-card-item {
    align-items: flex-start;
}

.jr-card-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.jr-card-plan {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border: 1px solid #d7e0d3;
    background: #ffffff;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.jr-card-plan:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.jr-card-plan input {
    display: none;
}

.jr-card-plan.is-active {
    border-color: #0b6b3a;
    box-shadow: 0 12px 28px rgba(11, 107, 58, 0.12);
    background: linear-gradient(180deg, #f7faf7 0, #ffffff 100%);
}

.jr-card-plan-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #183525;
}

.jr-card-plan-desc {
    color: #647266;
    line-height: 1.7;
}

.jr-card-plan-compact {
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 6px;
    min-height: 88px;
}

.jr-card-plan-custom-box {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #d7e0d3;
    background: #f7faf7;
}

.jr-card-plan-custom-box.is-active {
    border-color: #0b6b3a;
    box-shadow: 0 10px 24px rgba(11, 107, 58, 0.08);
}

.jr-card-plan-custom-box .jr-search-input:disabled {
    background: #eef3ee;
    color: #6c786e;
    cursor: not-allowed;
}

.jr-card-plan-meta {
    color: #0b6b3a;
    font-size: 0.88rem;
    font-weight: 700;
}

@media (max-width: 1080px) {
    .jr-hero-grid,
    .jr-search-results,
    .jr-voucher-layout,
    .jr-board-layout,
    .jr-home-hero,
    .jr-home-assets,
    .jr-card-plan-grid {
        grid-template-columns: 1fr;
    }

    .jr-grid-three,
    .jr-home-service-grid {
        grid-template-columns: 1fr;
    }

    body.jr-ticket-board-page .jr-brandbar-inner {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .jr-public-main {
        width: min(100%, calc(100% - 24px));
        padding-top: 16px;
    }

    .jr-page-intro,
    .jr-service-card,
    .jr-panel-card,
    .jr-voucher-card,
    .jr-board-card,
    .jr-home-hero-main,
    .jr-home-hero-side,
    .jr-home-mini-card {
        padding: 20px 18px;
    }

    .jr-grid-two,
    .jr-meta-grid,
    .jr-hero-statlist,
    .jr-search-form,
    .jr-home-hero-stats,
    .ic-form-grid,
    .ic-detail-grid {
        grid-template-columns: 1fr;
    }

    .jr-search-button,
    body.jr-public-page .jr-search-button {
        width: 100%;
        min-width: 0;
    }

    .jr-order-info-grid {
        grid-template-columns: 1fr;
    }

    .jr-route-board {
        grid-template-columns: 1fr;
    }

    .jr-route-track {
        transform: rotate(90deg);
        margin: 12px 0;
    }

    .jr-station-block.is-end {
        align-items: flex-start;
        text-align: left;
    }

    .jr-history-row {
        flex-direction: column;
    }

    .jr-voucher-code {
        letter-spacing: 0.08em;
    }

    .jr-home-alert {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- JR Style Admin Pages --- */

body.jr-admin-page,
body.jr-admin-login-page {
    background:
        linear-gradient(180deg, #eef4ee 0, #eef4ee 140px, #f6f8f2 140px, #f6f8f2 100%);
    color: #163024;
    overflow: auto;
}

body.jr-admin-page #app,
body.jr-admin-login-page {
    color: #163024;
}

.jr-admin-page {
    --bg: #f6f8f2;
    --surface: #ffffff;
    --border: #d7dfd2;
    --text: #163024;
    --muted: #5c7065;
    --primary: #0b6b3a;
    --primary-rgb: 11, 107, 58;
    --primary-hover: #0e7b45;
}

.jr-admin-app {
    min-height: 720px;
    display: flex;
    width: 100%;
    background: #ffffff;
    border: 1px solid #d7e0d3;
    box-shadow: 0 18px 40px rgba(18, 50, 33, 0.08);
}

.jr-admin-main-shell {
    width: min(1480px, calc(100% - 32px));
    padding: 18px 0 32px;
}

.jr-admin-page .sidebar {
    background: #fbfdf9;
    border-right: 1px solid #d7e0d3;
    box-shadow: none;
}

.jr-admin-sidebar-head {
    padding: 18px 18px 16px;
    border-bottom: 1px solid #e0e8dc;
}

.jr-admin-page .brand {
    height: auto;
    padding: 0;
    border-bottom: none;
    color: #123222;
    line-height: 1.35;
}

.jr-admin-sidebar-copy {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.7;
    color: #6a7c70;
}

.jr-admin-page .nav {
    padding: 16px 12px;
    gap: 6px;
}

.jr-admin-page .nav-item {
    border: 1px solid #fbfdf9;
    border-radius: 0;
    color: #375848;
}

.jr-admin-page .nav-item:hover {
    background: #f4f8f3;
    border-color: #d8e2d3;
    color: #123222;
}

.jr-admin-page .nav-item.active {
    background: #0b6b3a;
    border-color: #0b6b3a;
    box-shadow: none;
}

.jr-admin-sidebar-status {
    margin: 14px 14px 16px;
    padding: 14px 16px;
    border: 1px solid #d8e2d4;
    border-radius: 0;
    background: #ffffff;
    color: #345445;
    font-size: 12px;
}

.jr-admin-sidebar-status-label {
    margin-bottom: 6px;
    font-weight: 700;
    color: #153724;
}

.jr-admin-page .sidebar-footer {
    border-top: none;
}

.jr-admin-page .main {
    background: transparent;
}

.jr-admin-page .header {
    height: auto;
    min-height: 74px;
    padding: 16px 24px;
    background: #ffffff;
    border-bottom: 1px solid #dce4d9;
}

.jr-admin-header-copy .jr-kicker {
    margin-bottom: 4px;
}

.jr-admin-header-side {
    display: flex;
    align-items: center;
    gap: 10px;
}

.jr-admin-header-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #d6e0d3;
    background: #ffffff;
    color: #355244;
    font-size: 12px;
    font-weight: 700;
}

.jr-admin-header-pill.is-online {
    color: #0b6b3a;
}

.jr-admin-header-pill.is-offline {
    color: #b34a35;
}

.jr-admin-page .content {
    padding: 20px 24px 24px;
}

.jr-admin-intro {
    margin-bottom: 16px;
}

.jr-admin-alert {
    margin-bottom: 20px;
}

.jr-admin-page .card {
    background: #ffffff;
    border: 1px solid #d7e0d3;
    border-radius: 0;
    box-shadow: 0 10px 24px rgba(18, 50, 33, 0.04);
}

.jr-admin-page .stat-label {
    color: #607466;
    font-weight: 700;
}

.jr-admin-page .stat-value {
    color: #153724;
}

.jr-admin-page .header button,
.jr-admin-page button.primary,
.jr-admin-page .btn.primary,
.jr-admin-login-page button.primary,
.jr-admin-login-page .btn.primary {
    background: linear-gradient(180deg, #0b6b3a 0, #095b31 100%);
    border-color: #0b6b3a;
    color: #ffffff;
}

.jr-admin-page .header button:hover,
.jr-admin-page button.primary:hover,
.jr-admin-page .btn.primary:hover,
.jr-admin-login-page button.primary:hover,
.jr-admin-login-page .btn.primary:hover {
    background: linear-gradient(180deg, #0d7a43 0, #096334 100%);
    border-color: #0d7a43;
}

.jr-admin-page button,
.jr-admin-page .btn {
    border-radius: 10px;
}

.jr-admin-page button:not(.primary):not(.danger),
.jr-admin-page .btn:not(.primary):not(.danger) {
    background: #f8fbf7;
    color: #2d4c3d;
    border-color: #d6e0d3;
}

.jr-admin-page button:not(.primary):not(.danger):hover,
.jr-admin-page .btn:not(.primary):not(.danger):hover {
    background: #edf5ec;
    border-color: #bfd1c6;
}

.jr-admin-page input,
.jr-admin-page select {
    background: #fbfdf9;
    color: #183225;
    border-color: #d4ddd0;
    border-radius: 10px;
}

.jr-admin-page input::placeholder {
    color: #8ca092;
}

.jr-admin-page th {
    color: #6a7d72;
    border-bottom-color: #dde5d9;
}

.jr-admin-page td {
    color: #183225;
    border-bottom-color: #e6ede2;
}

.jr-admin-page tr:hover td {
    background: #f3f8f2;
}

.jr-admin-page .site-footer {
    border-top-color: #dbe3d8;
    color: #6b7d72;
}

.jr-admin-page .sidebar-faremap {
    border-top-color: #d7dfd3;
}

.jr-admin-page .sidebar-faremap-title {
    color: #607466;
}

.jr-admin-page .sidebar-faremap-box {
    border-color: #d9e1d5;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.jr-admin-page .management-container {
    gap: 20px;
}

.jr-admin-page .grid {
    gap: 16px;
}

.jr-admin-login-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.jr-admin-login-main {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 30px 0 42px;
}

.jr-admin-login-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 430px);
    gap: 26px;
    align-items: stretch;
}

.jr-admin-login-copy,
.jr-admin-login-card {
    border: 1px solid #dce5d8;
    border-top: 4px solid #0b6b3a;
    border-radius: 0;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(19, 53, 35, 0.06);
}

.jr-admin-login-copy {
    padding: 34px 34px 32px;
}

.jr-admin-login-copy h1 {
    margin: 10px 0 12px;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: #123222;
}

.jr-admin-login-copy p {
    color: #607466;
    line-height: 1.85;
}

.jr-admin-login-points {
    margin-top: 22px;
    padding-left: 18px;
    color: #274434;
}

.jr-admin-login-points li + li {
    margin-top: 10px;
}

.jr-admin-login-card {
    padding: 30px;
}

.jr-admin-login-copy,
.jr-admin-login-card {
    min-height: 100%;
}

.jr-page-intro-compact {
    margin-bottom: 20px;
}

.jr-admin-login-card .login-row + .login-row {
    margin-top: 12px;
}

.jr-admin-login-card .login-row input {
    width: 100%;
    padding: 14px 15px;
    border-radius: 12px;
    border: 1px solid #d4ddd0;
    background: #fbfdf9;
    color: #163024;
}

.jr-admin-login-card .login-actions {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.jr-admin-login-card .hint {
    color: #6b7f73;
    font-size: 13px;
}

@media (max-width: 1080px) {
    .jr-admin-login-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body.jr-admin-page {
        overflow: auto;
    }

    .jr-admin-page .header,
    .jr-admin-page .content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .jr-admin-login-main {
        width: min(100%, calc(100% - 24px));
        padding-top: 20px;
    }


/* --- Custom Dialog --- */

.tm-dialog-root {
    position: fixed;
    inset: 0;
    z-index: 5000;
}

.tm-dialog-root[hidden] {
    display: none;
}

.tm-dialog-root [hidden] {
    display: none !important;
}

.tm-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 20, 13, 0.46);
    backdrop-filter: blur(6px);
}

.tm-dialog-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(520px, calc(100vw - 32px));
    box-sizing: border-box;
    padding: 24px;
    border: 1px solid #d7e0d3;
    border-top: 4px solid #0b6b3a;
    background: #ffffff;
    color: #163024;
    box-shadow: 0 28px 56px rgba(18, 50, 33, 0.18);
    transform: translate(-50%, -48%);
    opacity: 0;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.tm-dialog-root.is-open .tm-dialog-panel {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.tm-dialog-kicker {
    margin-bottom: 8px;
    color: #0b6b3a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.tm-dialog-title {
    margin: 0 0 10px;
    font-size: 1.3rem;
    font-weight: 700;
}

.tm-dialog-message {
    color: #4b6254;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.tm-dialog-field {
    display: block;
    margin-top: 18px;
}

.tm-dialog-field-label {
    display: block;
    margin-bottom: 8px;
    color: #426050;
    font-size: 12px;
    font-weight: 600;
}

.tm-dialog-input {
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    padding: 0 14px;
    border: 1px solid #cfd8ca;
    border-radius: 0;
    background: #f8fbf6;
    color: #163024;
    outline: none;
}

.tm-dialog-input:focus {
    border-color: #0b6b3a;
    box-shadow: 0 0 0 3px rgba(11, 107, 58, 0.14);
}

.tm-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.tm-dialog-actions .btn {
    min-width: 96px;
}

@media (max-width: 640px) {
    .tm-dialog-panel {
        width: min(100vw - 20px, 520px);
        padding: 20px;
    }

    .tm-dialog-actions {
        flex-direction: column-reverse;
    }

    .tm-dialog-actions .btn {
        width: 100%;
    }
}

    .jr-admin-login-copy,
    .jr-admin-login-card {
        padding: 22px;
        border-radius: 20px;
    }
}
