/* ----------------------------------------------------------

Estilos para el Login
                
-------------------------------------------------------------*/
.login-page {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0,168,150,0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(37,99,235,0.2) 0%, transparent 55%),
        linear-gradient(160deg, #0a1628 0%, #0d2145 50%, #0e3057 100%);
    padding: 20px;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.035) 1px, transparent 0);
    background-size: 36px 36px;
    pointer-events: none;
}

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

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    animation: loginFadeIn 0.45s ease both;
}

.login-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    gap: 8px;
}

.login-logo {
    width: 270px;
    max-width: 82%;
    height: auto;
    filter: drop-shadow(0 2px 14px rgba(0,0,0,0.28));
}

.login-form-section {
    background: rgba(255,255,255,0.07);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.11);
    border-radius: 18px;
    padding: 36px 32px 28px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.12);
}

.form-wrapper h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.subtitle {
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 26px;
}

.form-group { margin-bottom: 16px; }

.login-page .form-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 7px;
    color: #fff;
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: rgba(255,255,255,0.07);
    padding: 0 14px;
    transition: all 0.2s;
}

.input-wrapper:focus-within {
    border-color: #00a896;
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 0 3px rgba(0,168,150,0.18);
}

.input-icon {
    flex-shrink: 0;
    color: rgba(255,255,255,0.82);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.input-wrapper:focus-within .input-icon { color: #00a896; }

.login-page .input-wrapper input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 13px 0;
    font-size: 0.93rem;
    font-family: inherit;
    color: #fff;
    min-width: 0;
}

.login-page .input-wrapper input::placeholder { color: rgba(255,255,255,0.72); }

.toggle-password {
    flex-shrink: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 5px;
    color: rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.toggle-password:hover { color: rgba(255,255,255,0.75); }

.form-options {
    display: flex;
    justify-content: flex-end;
    margin: 14px 0 22px;
    font-size: 0.82rem;
}

.forgot-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}
.forgot-link:hover { color: #00a896; }

.cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 45px;
    padding: 13px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #2d6be4, #1a50c0);
    color: #fff;
    font-size: 0.97rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 18px rgba(45,107,228,0.4);
}

.cta:hover {
    background: linear-gradient(135deg, #1a50c0, #00a896);
    box-shadow: 0 6px 22px rgba(45,107,228,0.5);
    transform: translateY(-1px);
}

.cta:active { transform: translateY(0); }
.cta:focus  { outline: none; }
.cta .span  { display: block; }
.cta .second { display: none; }
.cta:disabled {
    cursor: wait;
    opacity: 0.88;
    transform: none;
    box-shadow: 0 3px 12px rgba(45,107,228,0.28);
}
.cta:disabled:hover {
    background: linear-gradient(135deg, #2d6be4, #1a50c0);
    transform: none;
}
.login-button-spinner {
    display: none;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    box-sizing: border-box;
    border: 2px solid rgba(255,255,255,.38);
    border-top-color: #fff;
    border-radius: 50%;
    animation: loginButtonSpin .72s linear infinite;
}
.cta.is-loading .login-button-spinner { display: block; }
@keyframes loginButtonSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .login-button-spinner { animation-duration: 1.4s; }
}

.alert-error {
    background: rgba(239,68,68,0.13);
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.84rem;
    margin-bottom: 18px;
    border: 1px solid rgba(239,68,68,0.28);
}

.alert-success {
    background: rgba(16,185,129,0.13);
    color: #6ee7b7;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.84rem;
    margin-bottom: 18px;
    border: 1px solid rgba(16,185,129,0.28);
}

.login-footer {
    margin-top: 22px;
    font-size: 0.7rem;
    color: #fff;
    text-align: center;
}

/* ----------------------------------------------------------

Estilos para el Dashboard 
                
-------------------------------------------------------------*/
:root {
    --primary-blue:    #2d6be4;
    --secondary-teal:  #00a896;
    --dark-sidebar:    #0a1628;
    --sidebar-mid:     #0d2145;
    --light-bg:        #f0f4fa;
    --surface:         #ffffff;
    --text-main:       #1e293b;
    --text-muted:      #64748b;
    --border:          #e2e8f0;
    --danger:          #ef4444;
    --success:         #10b981;
    --white:           #ffffff;
    --radius-sm:       8px;
    --radius-md:       12px;
    --radius-lg:       16px;
    --shadow-sm:       0 1px 4px rgba(0,0,0,0.07);
    --shadow-md:       0 4px 16px rgba(0,0,0,0.10);
    --shadow-lg:       0 12px 40px rgba(0,0,0,0.15);
}

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

/* Restore native dialog centering after the global spacing reset. */
dialog {
    position: fixed;
    inset: 0;
    margin: auto;
    max-height: calc(100dvh - 32px);
    overflow: auto;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Sidebar */
.sidebar {
    width: 255px;
    background: linear-gradient(180deg, var(--dark-sidebar) 0%, var(--sidebar-mid) 100%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow: hidden;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.15);
}

.logo-small {
    width: 180px;
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 1px 6px rgba(0,0,0,0.25));
}

.sidebar-nav {
    flex-grow: 1;
    padding: 20px 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
}

.sidebar-nav ul { list-style: none; }

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 11px 22px;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    font-size: 0.88rem;
    border-left: 3px solid transparent;
    transition: all 0.18s ease;
    gap: 2px;
}

.sidebar-nav li a:hover {
    background: rgba(255,255,255,0.09);
    color: #fff;
    border-left-color: rgba(255,255,255,0.4);
}

.sidebar-nav li.active a {
    background: rgba(0,168,150,0.2);
    color: #fff;
    border-left-color: var(--secondary-teal);
    font-weight: 600;
}

.sidebar-support-card {
    position: relative;
    margin: 14px 20px 18px;
    padding: 16px 14px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 12px;
    background: rgba(2, 16, 37, .38);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 12px 24px rgba(0,0,0,.14);
}
.sidebar-support-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #0b1f3d;
    border-radius: 999px;
    background: #ef233c;
    color: #fff;
    font-size: .76rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(239, 35, 60, .32);
}
.sidebar-support-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.sidebar-support-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    color: #1282ff;
}
.sidebar-support-icon svg {
    width: 100%;
    height: 100%;
}
.sidebar-support-card strong {
    display: block;
    color: #fff;
    font-size: .78rem;
    line-height: 1.15;
}
.sidebar-support-card small {
    display: block;
    color: rgba(255,255,255,.82);
    font-size: .72rem;
    line-height: 1.3;
    margin-top: 2px;
}
.sidebar-support-card button {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, #0968f2, #0757d6);
    box-shadow: 0 8px 18px rgba(10, 103, 242, .28);
}
.sidebar-support-card button:hover {
    filter: brightness(1.06);
}

.icon { 
    margin-right: 12px; 
    width: 20px; 
    height: 20px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    flex-shrink: 0;
}
.icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.75;
}

/* Submenu styles */
.has-submenu .submenu-toggle {
    cursor: pointer;
    justify-content: space-between;
}
.submenu-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.2s;
}
.has-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    background: rgba(0,0,0,0.1);
}
.has-submenu.open .submenu {
    max-height: 600px;
}
.submenu li a {
    padding-left: 45px;
    font-size: 0.9rem;
    border-left: none;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Top Bar */
.top-bar {
    height: 68px;
    background: linear-gradient(90deg, var(--dark-sidebar) 0%, var(--sidebar-mid) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 28px;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    flex-shrink: 0;
}

/* Contador de venta */
#venta-timer-wrapper {
    display: none;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.18);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.02em;
    transition: background .3s;
}
#venta-timer-label {
    opacity: 0.9;
    font-size: 0.82rem;
}
#venta-timer-display {
    font-size: 1.15rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 46px;
    text-align: center;
}
#venta-timer-wrapper.timer-warning {
    background: rgba(234,88,12,0.85);
    animation: timerPulse 1s ease-in-out infinite;
}
#venta-timer-wrapper.timer-expired {
    background: #dc2626;
    animation: timerPulse .5s ease-in-out infinite;
}
@keyframes timerPulse {
    0%,100% { opacity: 1; }
    50%      { opacity: .7; }
}

.user-area {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info { text-align: right; }
.user-name { display: block; font-weight: 600; font-size: 0.9rem; }
.user-branch { font-size: 0.75rem; opacity: 0.9; }

.user-avatar {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Content */
@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.content-area {
    padding: 28px 30px;
    animation: contentFadeIn 0.3s ease both;
    min-height: calc(100vh - 68px);
    background: var(--light-bg);
}

.dashboard-body.view-asientos .main-content {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
}

.dashboard-body.view-asientos .sidebar {
    flex: 0 0 255px;
}

.dashboard-body.view-asientos .content-area {
    height: calc(100vh - 68px);
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

@media (max-width: 1100px) {
    .dashboard-body.view-asientos .main-content,
    .dashboard-body.view-asientos .content-area {
        height: auto;
        min-height: calc(100vh - 68px);
        overflow: visible;
    }
}

/* Welcome Card - Modern Redesign */
.welcome-card {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
    color: white;
    padding: 24px 30px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25), 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.welcome-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.welcome-text p {
    margin: 0;
    font-size: 0.95rem;
    opacity: 0.85;
    font-weight: 400;
}

.quick-stats { 
    display: flex; 
    gap: 32px;
    position: relative;
    z-index: 1;
}

.stat-item { 
    text-align: center;
    position: relative;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    height: 40px;
    width: 1px;
    background: rgba(255,255,255,0.25);
}

.stat-value { 
    display: block; 
    font-size: 1.75rem; 
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label { 
    font-size: 0.75rem; 
    opacity: 0.75;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quick Actions - Horizontal Card Layout */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.action-card {
    background: white;
    padding: 20px 24px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: transparent;
    transition: background 0.25s ease;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -8px rgba(0,0,0,0.12), 0 4px 8px -2px rgba(37, 99, 235, 0.08);
    border-color: #cbd5e1;
}

.action-card:hover::before {
    background: #2563eb;
}

.action-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.action-card:hover .action-icon {
    transform: scale(1.08);
}

.action-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2;
}

/* Icon Background Colors */
.action-card:nth-child(1) .action-icon { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); color: #2563eb; }
.action-card:nth-child(2) .action-icon { background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%); color: #16a34a; }
.action-card:nth-child(3) .action-icon { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); color: #d97706; }
.action-card:nth-child(4) .action-icon { background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%); color: #7c3aed; }

.action-content {
    flex: 1;
    text-align: left;
}

.action-content h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.action-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

.action-arrow {
    color: #94a3b8;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
}

.action-card:hover .action-arrow {
    color: #2563eb;
    transform: translateX(4px);
}

/* ── Próximas Salidas ── */
.proximas-salidas {
    margin-top: 24px;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.section-title svg {
    color: #2563eb;
}

.ver-todas-link {
    font-size: 0.9rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.ver-todas-link:hover {
    color: #1d4ed8;
}

.salidas-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.salida-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 0;
}

.salida-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 0;
}

.salida-main-top {
    display: grid;
    grid-template-columns: 320px 1fr auto;
    align-items: center;
    flex: 1;
}

.salida-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px -4px rgba(0,0,0,0.1);
    border-color: #93c5fd;
    background: #f8faff;
}

.salida-logo {
    height: 36px;
    width: 100px;
    object-fit: contain;
    flex-shrink: 0;
}

.salida-ruta-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.salida-ruta-row .salida-ruta {
    flex: 1;
}

.salida-hora-fecha .badge-hoy {
    margin-left: 4px;
    flex-shrink: 0;
}

.salida-body {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    min-width: 0;
    border-right: 1px solid #f1f5f9;
}

.salida-route-center {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.route-abbrev {
    font-size: 1.05rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: 0.3px;
    line-height: 1.3;
    white-space: nowrap;
    min-width: 130px;
}

.flecha-abbrev {
    color: var(--primary-blue);
    margin: 0 5px;
}

.route-names {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.salida-meta {
    padding: 0 18px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.salida-bus-col {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    background: #f8fafc;
    border-left: 1px solid #f1f5f9;
}

.salida-bus-main {
    height: 70px;
    width: auto;
    object-fit: contain;
    opacity: 0.93;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.12));
}

.salida-ruta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
}

.flecha-ruta {
    color: #94a3b8;
    font-weight: 500;
}

.salida-hora-fecha {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-size: 0.85rem;
    color: #64748b;
    flex: 0 0 90px;
    width: 90px;
}

.salida-hora-fecha .hora {
    font-weight: 700;
    color: #2563eb;
    font-size: 1.15rem;
    line-height: 1;
}

.salida-hora-fecha .separator {
    display: none;
}

.badge-hoy {
    background: #dcfce7;
    color: #16a34a;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: auto;
}

.salida-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px 0 0;
    flex: 0 0 auto;
    justify-content: flex-end;
    border-top: none;
}

.disponibilidad {
    font-size: 0.8rem;
    color: #64748b;
}

.vender-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.2s;
}

.salida-card:hover .vender-btn {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.salidas-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.salidas-empty p {
    font-size: 0.9rem;
    margin: 0;
}

.device-context {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    margin-right: 18px;
    color: #fff;
}
.device-context svg {
    width: 23px;
    height: 23px;
    flex: 0 0 auto;
    color: #60a5fa;
}
.device-context div { min-width: 0; }
.device-context-label {
    display: block;
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 1px;
    color: #94a3b8;
    font-size: .66rem;
    line-height: 1;
    text-transform: uppercase;
}
.device-context strong {
    display: block;
    max-width: 280px;
    overflow: hidden;
    color: #fff;
    font-size: .82rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Headers de módulos */
.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.module-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-sidebar);
    margin: 0;
}

.module-title svg {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    color: var(--primary-blue);
}

/* Grid de cards en sección venta */
/* Inicio administrativo */
.admin-home { display:flex; flex-direction:column; gap:18px; }
.admin-hero { min-height:180px; border-radius:16px; padding:26px 30px; color:#fff; background:linear-gradient(115deg,#071b3d 0%,#082755 58%,#061731 100%); display:grid; grid-template-columns:minmax(220px,.8fr) minmax(470px,1.55fr) minmax(280px,1fr); align-items:center; overflow:hidden; box-shadow:0 8px 24px rgba(4,24,55,.18); }
.admin-hero-greeting { padding-right:26px; border-right:1px solid rgba(255,255,255,.16); }
.admin-hero-greeting h1 { margin:0 0 8px; font-size:1.65rem; letter-spacing:0; }
.admin-hero-greeting p { margin:0; color:#d8e5f8; font-size:.9rem; }
.admin-hero-metrics { display:grid; grid-template-columns:repeat(3,1fr); min-width:0; }
.admin-hero-metric { min-width:0; padding:0 24px; border-right:1px solid rgba(255,255,255,.14); display:flex; flex-direction:column; gap:6px; }
.admin-hero-metric > span:not(.admin-metric-icon) { font-size:.78rem; color:#d5e2f4; white-space:nowrap; }
.admin-hero-metric strong { font-size:1.42rem; line-height:1.1; }
.admin-hero-metric small { color:#a9bdd8; font-size:.72rem; }
.admin-metric-icon,.summary-icon,.notice-icon { display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.admin-metric-icon { width:38px; height:38px; border-radius:50%; margin-bottom:4px; }
.admin-metric-icon svg { width:20px; height:20px; }
.admin-metric-icon.blue,.summary-icon.blue { background:#1264df; color:#fff; }
.admin-metric-icon.green,.summary-icon.green { background:#20a44b; color:#fff; }
.admin-metric-icon.violet,.summary-icon.violet { background:#8755df; color:#fff; }
.admin-hero-bus { align-self:stretch; display:flex; align-items:center; justify-content:flex-end; min-width:0; padding-left:12px; }
.admin-hero-bus svg { width:100%; max-width:390px; height:auto; filter:drop-shadow(0 8px 12px rgba(0,0,0,.34)); }
.admin-hero-loader .apolo-loader { max-width:390px; color:#dbeafe; }
.admin-hero-loader .apolo-loader__scene { width:100%; min-width:260px; }
.admin-hero-loader .al-road { width:128%; opacity:.65; background:#6ea8ff; }
.admin-hero-loader .al-road::before { opacity:.45; }
.admin-actions { grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.admin-actions .action-card { padding:18px; min-width:0; border-radius:12px; }
.admin-actions .action-icon { width:50px; height:50px; border-radius:10px; }
.admin-actions .action-icon svg { width:27px; height:27px; }
.admin-actions .action-content h3 { font-size:.95rem; }
.admin-actions .action-content p { font-size:.76rem; }
.admin-actions .action-arrow { font-size:1.75rem; line-height:1; }
.admin-summary-row { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.admin-summary-card { background:#fff; border:1px solid #e2e8f0; border-radius:12px; min-height:146px; padding:15px 16px; display:flex; align-items:center; gap:12px; box-shadow:0 2px 8px rgba(15,23,42,.04); }
.summary-icon { width:48px; height:48px; border-radius:50%; }
.summary-icon svg { width:23px; height:23px; }
.admin-summary-card > div { display:flex; flex-direction:column; gap:5px; min-width:105px; }
.admin-summary-card > div span { color:#526684; font-size:.78rem; }
.admin-summary-card > div strong { color:#0f1f39; font-size:1.35rem; }
.mini-bar-chart { width:min(270px,55%); height:112px; margin-left:auto; overflow:visible; }
.mini-chart-grid { stroke:#dbe4f0; stroke-width:1; stroke-dasharray:2 2; }
.mini-chart-axis { stroke:#64748b; stroke-width:1.1; }
.mini-chart-y-label { fill:#64748b; font-size:8px; text-anchor:end; font-variant-numeric:tabular-nums; }
.mini-chart-x-label { fill:#64748b; font-size:7.5px; text-anchor:middle; font-variant-numeric:tabular-nums; }
.mini-chart-bar { opacity:.9; transition:opacity .15s ease; }
.mini-chart-bar:hover { opacity:1; }
.admin-bottom-grid { display:grid; grid-template-columns:1.1fr 1fr; gap:14px; }
.admin-bottom-grid--single { grid-template-columns:1fr; }
.admin-panel { background:#fff; border:1px solid #e2e8f0; border-radius:12px; padding:18px 22px; min-height:210px; box-shadow:0 2px 8px rgba(15,23,42,.04); }
.admin-panel h2 { margin:0 0 10px; padding-bottom:10px; border-bottom:1px solid #e9eef5; font-size:1rem; color:#14233c; }
.panel-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid #e9eef5; padding-bottom:10px; }
.panel-heading h2 { border:0; padding:0; margin:0; }
.notice-manage-btn { min-height:32px; display:inline-flex; align-items:center; gap:6px; border:0; border-radius:7px; padding:0 11px; background:#176ce0; color:#fff; font:inherit; font-size:.72rem; font-weight:700; cursor:pointer; }
.notice-manage-btn svg { width:15px; height:15px; }
.activity-row,.notice-row { min-height:51px; display:flex; align-items:center; gap:12px; border-bottom:1px solid #edf1f6; color:inherit; text-decoration:none; }
.activity-row > span:nth-child(2),.notice-row > span:nth-child(2) { display:flex; flex-direction:column; min-width:0; flex:1; }
.activity-row strong,.notice-row strong { font-size:.79rem; color:#17233a; }
.activity-row small,.notice-row small { margin-top:3px; font-size:.7rem; color:#677b9b; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.activity-row time { margin-left:auto; color:#526684; font-size:.7rem; }
.activity-row-new { animation:activityFadeIn .42s ease-out both; }
.activity-icon { width:32px; height:32px; display:flex; align-items:center; justify-content:center; border-radius:7px; background:#e2f7e8; color:#159447; }
.activity-icon svg,.notice-icon svg { width:17px; height:17px; }
.activity-icon.sale,.log-event-icon.sale { background:#dcfce7; color:#159447; }
.activity-icon.session,.log-event-icon.session { background:#e0f2fe; color:#0369a1; }
.activity-icon.session-out,.log-event-icon.session-out { background:#f1f5f9; color:#475569; }
.activity-icon.ticket,.log-event-icon.ticket { background:#efe7ff; color:#7c3aed; }
.activity-icon.lock,.log-event-icon.lock { background:#fee2e2; color:#dc2626; }
.activity-icon.bus,.log-event-icon.bus { background:#dbeafe; color:#1d4ed8; }
.activity-icon.cashbox,.log-event-icon.cashbox { background:#fef3c7; color:#b45309; }
.activity-icon.boarding,.log-event-icon.boarding { background:#ccfbf1; color:#0f766e; }
.activity-icon.support,.log-event-icon.support { background:#e0f2fe; color:#0369a1; }
.activity-icon.default,.log-event-icon.default { background:#eef2ff; color:#4f46e5; }
.notice-icon { width:34px; height:34px; border-radius:8px; }
.notice-icon { flex:0 0 34px; display:flex; align-items:center; justify-content:center; }
.notice-icon.info { color:#176ce0; background:#e5efff; }.notice-icon.warning { color:#e8780c; background:#fff0df; }.notice-icon.urgent { color:#dc2626; background:#fee2e2; }
.panel-link { display:block; margin-top:12px; text-align:center; color:#176ce0; text-decoration:none; font-size:.75rem; font-weight:600; }
.panel-link-button { width:100%; border:0; background:transparent; cursor:pointer; }
.notice-empty { padding:38px 0 22px; }
.notice-modal-backdrop { display:none; position:fixed; inset:0; z-index:3000; background:rgba(7,20,38,.62); padding:24px; align-items:center; justify-content:center; }
.notice-modal-backdrop.open { display:flex; }
.notice-modal { width:min(980px,100%); max-height:calc(100vh - 48px); overflow:auto; background:#fff; border-radius:12px; box-shadow:0 24px 70px rgba(7,20,38,.28); }
.notice-modal-header { position:sticky; top:0; z-index:2; display:flex; justify-content:space-between; gap:18px; align-items:flex-start; padding:20px 22px; background:#fff; border-bottom:1px solid #e2e8f0; }
.notice-modal-header h2 { margin:0; color:#14233c; font-size:1.15rem; }.notice-modal-header p { margin:4px 0 0; color:#64748b; font-size:.78rem; }
.notice-close-btn { width:34px; height:34px; border:0; border-radius:7px; background:#eef2f7; color:#526684; font-size:1.5rem; line-height:1; cursor:pointer; }
.notice-manager-layout { display:grid; grid-template-columns:minmax(300px,.85fr) minmax(380px,1.15fr); }
.notice-form { padding:22px; border-right:1px solid #e2e8f0; }.notice-form label { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; color:#526684; font-size:.76rem; font-weight:700; }
.notice-form input,.notice-form textarea,.notice-form select { width:100%; box-sizing:border-box; border:1px solid #cbd5e1; border-radius:8px; padding:10px 11px; color:#14233c; font:inherit; font-size:.84rem; background:#fff; }.notice-form textarea { min-height:110px; resize:vertical; }
.notice-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 10px; }.notice-form-grid label:first-child { grid-column:1/-1; }
.notice-form-actions { display:flex; justify-content:flex-end; gap:8px; }.notice-primary-btn,.notice-secondary-btn { min-height:38px; border:0; border-radius:8px; padding:0 15px; font:inherit; font-size:.8rem; font-weight:700; cursor:pointer; }.notice-primary-btn { background:#176ce0; color:#fff; }.notice-secondary-btn { background:#eef2f7; color:#526684; }
.notice-manager-list { padding:22px; overflow:auto; }.notice-manager-list > h3 { margin:0 0 12px; color:#14233c; font-size:.9rem; }
.notice-manager-item { display:grid; grid-template-columns:34px minmax(0,1fr) auto; gap:10px; align-items:start; padding:12px 0; border-bottom:1px solid #e2e8f0; }.notice-manager-item.is-inactive { opacity:.58; }.notice-manager-item strong { color:#14233c; font-size:.82rem; }.notice-manager-item p { margin:3px 0; color:#526684; font-size:.74rem; line-height:1.4; }.notice-manager-item small { color:#8291a8; font-size:.68rem; }
.notice-item-actions { display:flex; gap:4px; }.notice-item-actions button { border:0; border-radius:6px; padding:5px 7px; background:#eef4ff; color:#176ce0; font-size:.68rem; font-weight:700; cursor:pointer; }.notice-item-actions button.danger { color:#dc2626; background:#fff0f0; }
.cashier-notices { margin:20px 0; background:#fff; border:1px solid #dbe3ee; border-radius:10px; padding:18px 20px; box-shadow:0 2px 8px rgba(15,23,42,.04); }
.cashier-notices-heading { display:flex; align-items:center; gap:11px; padding-bottom:14px; border-bottom:1px solid #e9eef5; }.cashier-notices-heading h2 { margin:0; color:#14233c; font-size:1rem; }.cashier-notices-heading p { margin:3px 0 0; color:#64748b; font-size:.72rem; }.notice-heading-icon { width:36px; height:36px; display:flex; align-items:center; justify-content:center; border-radius:8px; color:#176ce0; background:#e5efff; }.notice-heading-icon svg { width:19px; height:19px; }
.cashier-notice-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:0 18px; }.cashier-notice-item { display:flex; gap:11px; align-items:flex-start; min-height:62px; padding:14px 2px; border-bottom:1px solid #edf1f6; }.cashier-notice-item > div { min-width:0; }.cashier-notice-item strong { color:#17233a; font-size:.82rem; }.cashier-notice-item p { margin:4px 0; color:#526684; font-size:.76rem; line-height:1.45; }.cashier-notice-item small { color:#8291a8; font-size:.68rem; }
.admin-empty { color:#94a3b8; font-size:.82rem; padding:28px 0; text-align:center; }
@keyframes activityFadeIn { from { opacity:0; transform:translateY(-8px); background:#eff6ff; } to { opacity:1; transform:translateY(0); background:transparent; } }
.logs-page { display:flex; flex-direction:column; gap:18px; min-height:calc(100vh - 120px); }
.logs-filter-card { background:#fff; border:1px solid #dbe3ee; border-radius:12px; padding:16px 18px; display:grid; grid-template-columns:1.2fr 1fr 180px 180px auto auto; gap:14px; align-items:end; box-shadow:0 2px 8px rgba(15,23,42,.04); }
.logs-filter-card label { display:flex; flex-direction:column; gap:6px; color:#526684; font-size:.78rem; font-weight:700; }
.logs-filter-card input,.logs-filter-card select { height:38px; border:1px solid #cbd5e1; border-radius:8px; padding:0 10px; font-size:.88rem; background:#fff; color:#14233c; }
.logs-filter-card button,.logs-filter-card a { height:38px; border-radius:8px; padding:0 16px; display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:.84rem; text-decoration:none; }
.logs-filter-card button { border:0; background:#0b5ed7; color:#fff; cursor:pointer; }
.logs-filter-card a { background:#f1f5f9; color:#526684; }
.logs-table-card { background:#fff; border:1px solid #dbe3ee; border-radius:12px; overflow:auto; flex:1; max-height:calc(100vh - 245px); box-shadow:0 2px 8px rgba(15,23,42,.04); }
.logs-table { width:100%; border-collapse:collapse; min-width:1120px; }
.logs-table th { position:sticky; top:0; z-index:1; background:#071426; color:#fff; text-align:left; padding:14px 16px; font-size:.74rem; text-transform:uppercase; letter-spacing:0; }
.logs-table th:first-child { width:54px; }
.logs-table td { padding:15px 16px; border-bottom:1px solid #e2e8f0; vertical-align:top; font-size:.86rem; color:#1e293b; }
.logs-table td small { display:block; margin-top:3px; color:#64748b; font-size:.72rem; }
.logs-table code { display:block; max-width:420px; white-space:pre-wrap; word-break:break-word; font-size:.72rem; color:#475569; background:#f8fafc; border:1px solid #e2e8f0; border-radius:6px; padding:8px; }
.log-action-pill { display:inline-flex; align-items:center; min-height:24px; padding:3px 9px; border-radius:999px; background:#eaf3ff; color:#0b5ed7; font-weight:800; font-size:.74rem; }
.log-event-icon { width:38px; height:38px; border-radius:9px; display:flex; align-items:center; justify-content:center; }
.log-event-icon svg { width:20px; height:20px; }
.logs-empty { text-align:center; color:#94a3b8; padding:34px !important; }
@media (max-width:1180px) { .logs-filter-card { grid-template-columns:repeat(2,1fr); } }
@media (max-width:700px) { .logs-filter-card { grid-template-columns:1fr; } }
@media (max-width:1450px) { .admin-hero { grid-template-columns:minmax(210px,.8fr) minmax(420px,1.5fr) minmax(220px,.8fr); } .admin-hero-metric { padding:0 16px; } .admin-actions .action-card { padding:16px 14px; gap:12px; } .admin-actions .action-icon { width:44px; height:44px; } }
@media (max-width:1180px) { .admin-hero { grid-template-columns:240px 1fr; } .admin-hero-bus { display:none; } .admin-actions { grid-template-columns:repeat(2,1fr); } .admin-summary-row { grid-template-columns:1fr; } .admin-summary-card { padding:15px; } .mini-bar-chart { width:min(440px,65%); } }
@media (max-width:760px) { .admin-home { gap:12px; } .admin-hero { grid-template-columns:1fr; padding:22px; } .admin-hero-greeting { border-right:0; border-bottom:1px solid rgba(255,255,255,.16); padding:0 0 18px; } .admin-hero-metrics { padding-top:18px; } .admin-hero-metric { padding:0 10px; } .admin-hero-metric:first-child { padding-left:0; } .admin-hero-metric:last-child { border-right:0; padding-right:0; } .admin-hero-metric strong { font-size:1.1rem; } .admin-hero-metric > span:not(.admin-metric-icon) { white-space:normal; } .admin-actions,.admin-summary-row,.admin-bottom-grid { grid-template-columns:1fr; } .admin-actions .action-card { padding:14px; } }
@media (max-width:760px) { .notice-manager-layout { grid-template-columns:1fr; }.notice-form { border-right:0; border-bottom:1px solid #e2e8f0; }.notice-manager-item { grid-template-columns:34px minmax(0,1fr); }.notice-item-actions { grid-column:2; flex-wrap:wrap; }.notice-modal-backdrop { padding:10px; }.panel-heading { align-items:flex-start; }.notice-manage-btn { flex:0 0 auto; } }

.venta-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.venta-precios {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.precio-badge {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.precio-badge.basico    { background: #f1f5f9; color: #475569; }
.precio-badge.ejecutivo { background: #eff6ff; color: #1d4ed8; }
.precio-badge.confort   { background: #f0fdf4; color: #15803d; }

.badge-manana {
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 4px;
}

/* Amenidades en cards del dashboard */
.salida-amenidades {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 6px 18px 10px;
    border-top: 1px solid #f1f5f9;
}

.amenidad-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2px 8px 2px 6px;
    white-space: nowrap;
}

/* Amenidades en formulario de corrida */
.amenidades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.amenidad-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    user-select: none;
    transition: all 0.18s;
    font-size: 0.82rem;
    color: #64748b;
    background: #f8fafc;
}

.amenidad-check:hover {
    border-color: #94a3b8;
    background: #f1f5f9;
}

.amenidad-check.selected {
    border-color: var(--primary-blue);
    background: #eff6ff;
    color: var(--primary-blue);
}

.amenidad-check input[type="checkbox"] {
    display: none;
}

.amenidad-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .salidas-grid {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------------------------

Estilos para el mapa de bus
                
-------------------------------------------------------------*/
.bus-chassis {
    background: #f1f5f9;
    border: 3px solid #cbd5e1;
    border-radius: 20px 50px 20px 20px;
    padding: 20px;
    display: flex;
    gap: 20px;
}

.bus-seats {
    display: grid;
    grid-template-columns: repeat(11, 1fr); /* 11 columnas */
    grid-template-rows: repeat(4, 1fr);   /* 4 filas */
    gap: 8px;
}

/* Crear el pasillo (espacio entre la fila 2 y 3) */
.bus-seats div:nth-child(4n-2) {
    margin-bottom: 25px; /* Simula el pasillo central */
}

.seat {
    width: 45px;
    height: 45px;
    border: 1px solid #94a3b8;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    background: white;
}

.seat.available:hover { background: var(--secondary-teal); color: white; }
.seat.occupied { background: #e2e8f0; color: #94a3b8; cursor: not-allowed; }
.seat.selected { background: var(--primary-blue); color: white; }

/* Tabla de corridas */
.tabla-sivo {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tabla-sivo th {
    background: var(--dark-sidebar);
    color: rgba(255,255,255,0.85);
    padding: 11px 14px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tabla-sivo td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    background: var(--surface);
}

.tabla-sivo tr:last-child td { border-bottom: none; }
.tabla-sivo tbody tr:hover td { background: #f8fafd; }

.btn-seleccionar-sm {
    background: var(--secondary-teal);
    color: white;
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Contenedor del Bus */
.bus-layout {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 50px;
    border: 3px solid #dee2e6;
    display: inline-block;
    position: relative;
    margin-bottom: 30px;
}

/* Recreando el layout de 4 filas con pasillo */
.seats-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr); /* 12 columnas para los 46 asientos */
    grid-template-rows: repeat(5, 45px); /* 5 filas (incluyendo el pasillo) */
    gap: 10px;
}

.asiento {
    width: 45px;
    height: 45px;
    border: 2px solid #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    background: white;
    transition: 0.2s;
}

/* Posicionamiento para dejar el pasillo en la fila 3 */
.asiento:nth-child(4n+1) { grid-row: 1; }
.asiento:nth-child(4n+2) { grid-row: 2; }
.asiento:nth-child(4n+3) { grid-row: 4; }
.asiento:nth-child(4n) { grid-row: 5; }

/* Estados de los asientos */
.asiento.disponible:hover { background: #e7f5ff; border-color: #228be6; }
.asiento.seleccionado { background: #005a8d !important; color: white; border-color: #003f63; }
.asiento.ocupado { background: #adb5bd !important; border-color: #868e96; cursor: not-allowed; color: #495057; }

/* Formulario de pasajeros */
.pasajero-row {
    display: grid;
    grid-template-columns: 80px 1fr 100px 150px 100px;
    gap: 15px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
/* ----------------------------------------------------------

Estilos para la ventana de venta de boletos
                
-------------------------------------------------------------*/

/* Contenedor de la tarjeta de venta */
.card-container-venta {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.btn-regresar {
    background: var(--surface);
    border: 1.5px solid var(--border);
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
}

.btn-regresar:hover {
    background: var(--light-bg);
    border-color: #c0ccdc;
    color: var(--text-main);
}

/* Filtros */
.filtros-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) 150px;
    gap: 16px;
    margin-bottom: 24px;
    background: var(--surface);
    padding: 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.filter-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #64748b;
}

.filter-group input, .filter-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

/* Tabla Estilizada */
.sivo-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.sivo-table th {
    background: var(--dark-sidebar);
    color: rgba(255,255,255,0.85);
    text-align: left;
    padding: 12px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sivo-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    background: var(--surface);
}

.sivo-table tr:last-child td { border-bottom: none; }
.sivo-table tbody tr:hover td { background: #f8fafd; }

.badge-dispo {
    background: #dcfce7;
    color: #166534;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
}

.btn-vender-sm {
    background: var(--secondary-teal);
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.layout-venta { display: flex; gap: 30px; margin-top: 20px; }
.bus-container {
    background: #f1f3f5;
    padding: 30px;
    border-radius: 40px;
    border: 3px solid #dee2e6;
    display: inline-block;
    margin-bottom: 30px;
}

.bus-grid {
    display: grid;
    grid-template-columns: repeat(12, 45px); /* 12 columnas de asientos */
    grid-template-rows: repeat(5, 45px);    /* 5 filas (incluyendo pasillo) */
    gap: 10px;
}

.asiento {
    width: 45px;
    height: 45px;
    background: white;
    border: 2px solid #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

/* Lógica de filas para dejar el pasillo en la fila 3 */
.asiento[data-fila="1"] { grid-row: 1; }
.asiento[data-fila="2"] { grid-row: 2; }
.asiento[data-fila="3"] { grid-row: 4; }
.asiento[data-fila="4"] { grid-row: 5; }

/* Colores de estados */
.asiento.disponible:hover { background: #e7f5ff; }
.asiento.seleccionado { background: #005a8d !important; color: white; border-color: #003f63; }
.asiento.ocupado { background: #adb5bd !important; border-color: #868e96; cursor: not-allowed; color: #495057; }

/* --- FORMULARIO DE PASAJEROS --- */
.pasajero-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
    display: grid;
    grid-template-columns: 70px 1fr 100px 150px;
    gap: 15px;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.asiento-badge {
    background: #005a8d;
    color: white;
    padding: 5px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

/* El pasillo central */
.bus-seats-grid div:nth-child(4n-2) { margin-bottom: 30px; }

.seat-unit {
    width: 40px; height: 40px;
    background: white; border: 1px solid #cbd5e1;
    border-radius: 6px; display: flex;
    align-items: center; justify-content: center;
    font-size: 0.7rem; cursor: pointer;
}

.seat-unit.selected { background: var(--primary-blue); color: white; }
.seat-unit.occupied { background: #94a3b8; cursor: not-allowed; opacity: 0.5; }

.ticket-panel { 
    flex: 1; background: #f8fafc; 
    padding: 20px; border-radius: 12px; 
    border: 1px solid #e2e8f0; 
}

.filter-card {
    background: var(--surface);
    padding: 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 22px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) 150px;
    gap: 20px;
    align-items: flex-end;
}

/* (duplicate sivo-table — kept for specificity) */

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

.badge.disponible { background: #e6fcf5; color: #0ca678; }
.badge.agotado { background: #fff5f5; color: #fa5252; }

.btn-vender {
    background: #20c997;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

.btn-vender:hover { background: #12b886; }

/* ----------------------------------------------------------

Botón Volver

-------------------------------------------------------------*/
.btn-volver {
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  background: linear-gradient(135deg, var(--primary-blue), #1a5dc8);
  font-weight: 600;
  font-size: 0.875rem;
  font-family: inherit;
  transition: all 0.18s;
  box-shadow: 0 2px 8px rgba(45,107,228,0.3);
}

.btn-volver:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(45,107,228,0.4);
}

.btn-volver:active {
  transform: translateY(0);
}

/* ----------------------------------------------------------

Botón intercambiar

-------------------------------------------------------------*/

.btn-intercambiar {
  border: none;
  outline: none;
  background-color: #1e65e9;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  border-radius: 5px;
  transition: all ease 0.1s;
  box-shadow: 0px 5px 0px 0px #3a65c4;
}

.btn-intercambiar:active {
  transform: translateY(5px);
  box-shadow: 0px 0px 0px 0px #3a65c4;
}

/* ----------------------------------------------------------

Menú desplegable de usuario

-------------------------------------------------------------*/

.user-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    min-width: 280px !important;
    display: none !important;
    z-index: 1000 !important;
    margin-top: 8px !important;
}

.user-dropdown.active {
    display: block !important;
}

.dropdown-header {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    margin-right: 12px;
}

.dropdown-user-info {
    flex: 1;
}

.dropdown-user-info strong {
    display: block;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 2px;
}

.dropdown-user-info small {
    color: #7f8c8d;
    font-size: 12px;
}

.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #2c3e50;
    text-decoration: none;
    transition: background-color 0.2s;
    border-radius: 0 0 8px 8px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #e74c3c;
}

.dropdown-icon {
    margin-right: 12px;
    font-size: 16px;
}

.dropdown-arrow {
    font-size: 12px;
    margin-left: 8px;
    transition: transform 0.2s;
}

.top-bar .user-profile {
    position: relative;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.top-bar .user-profile:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.top-bar .user-profile:hover .dropdown-arrow {
    transform: translateY(1px);
}

/* Botón de logout animado */
.btn-logout {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition-duration: .3s;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.199);
  background-color: rgb(255, 65, 65);
  text-decoration: none;
}

/* plus sign */
.sign {
  width: 100%;
  transition-duration: .3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sign svg {
  width: 17px;
}

.sign svg path {
  fill: white;
}
/* text */
.text {
  position: absolute;
  right: 0%;
  width: 0%;
  opacity: 0;
  color: white;
  font-size: 14px;
  font-weight: 600;
  transition-duration: .3s;
}
.btn-logout:hover {
  width: 125px;
  border-radius: 40px;
  transition-duration: .3s;
}

.btn-logout:hover .sign {
  width: 30%;
  transition-duration: .3s;
  padding-left: 20px;
}

.btn-logout:hover .text {
  opacity: 1;
  width: 70%;
  transition-duration: .3s;
  padding-right: 10px;
}
/* button click effect*/
.btn-logout:active {
  transform: translate(2px ,2px);
}

/* Ocultar el footer del sidebar si está vacío */
.sidebar-footer:empty {
    display: none;
}

/* ── Custom checkbox (Uiverse) ── */
.sivo-check,
label.sivo-check {
  --input-focus: #2d8cf0;
  --input-out-of-focus: #ccc;
  --bg-color: #fff;
  --bg-color-alt: #666;
  --main-color: #323232;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  user-select: none;
  margin-left: 4px;
  font-weight: 400;
}
.sivo-check input {
  display: none;
}
.sivo-checkmark {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  position: relative;
  border: 2px solid var(--main-color);
  border-radius: 4px;
  box-shadow: 3px 3px var(--main-color);
  background-color: var(--input-out-of-focus);
  transition: all 0.3s;
}
.sivo-check input:checked ~ .sivo-checkmark {
  background-color: var(--input-focus);
}
.sivo-checkmark:after {
  content: "";
  width: 5px;
  height: 10px;
  position: absolute;
  top: 2px;
  left: 5px;
  display: none;
  border: solid var(--bg-color);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.sivo-check input:checked ~ .sivo-checkmark:after {
  display: block;
}

/* ====== BOTONES DE ACCIÓN (Tablas) ====== */
.btn-action {
    padding: 5px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    margin-right: 5px;
    transition: all 0.15s;
}
.btn-edit {
    background: var(--light-bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-edit:hover {
    background: var(--border);
    color: var(--text-main);
}
.btn-delete {
    background: rgba(239,68,68,0.1);
    color: #b91c1c;
    border: 1px solid rgba(239,68,68,0.2);
}
.btn-delete:hover {
    background: rgba(239,68,68,0.18);
}

/* ====== BOTÓN CREAR NUEVO ====== */
.btn-nueva-corrida {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-blue), #1a5dc8);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s;
    box-shadow: 0 2px 8px rgba(45,107,228,0.3);
}
.btn-nueva-corrida:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(45,107,228,0.4);
}

/* ====== MODALES ====== */
.corrida-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10,22,40,0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.corrida-modal.active {
    display: flex;
}
.corrida-modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: loginFadeIn 0.22s ease both;
}
.corrida-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid var(--border);
}
.corrida-modal-header h3 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.1rem;
}
.corrida-modal-close {
    background: var(--light-bg);
    border: 1px solid var(--border);
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.corrida-modal-close:hover { background: #fee2e2; color: var(--danger); border-color: #fecaca; }

/* ====== FORMULARIOS EN MODALES ====== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-main);
    background: var(--surface);
    transition: all 0.18s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(45,107,228,0.12);
}

/* ====== BOTONES DE MODAL ====== */
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
.modal-btn {
    padding: 10px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s;
}
.modal-btn-cancel {
    background: var(--light-bg);
    color: var(--text-muted);
    border: 1.5px solid var(--border);
}
.modal-btn-cancel:hover { background: var(--border); }
.modal-btn-confirm {
    background: linear-gradient(135deg, var(--secondary-teal), #008a7a);
    color: white;
    box-shadow: 0 2px 8px rgba(0,168,150,0.3);
}
.modal-btn-confirm:hover {
    box-shadow: 0 4px 14px rgba(0,168,150,0.4);
    transform: translateY(-1px);
}
.modal-btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: 0 2px 8px rgba(239,68,68,0.3);
}
.modal-btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Checkboxes selección múltiple en tablas */
.checkbox-corrida,
#checkbox-maestro {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

#checkbox-maestro {
    margin: 0;
}

.checkbox-corrida {
    margin: 0;
}

/* Botón eliminar seleccionados */
#btn-eliminar-seleccionados {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ====== ALERTAS ====== */
.alert-success {
    padding: 11px 16px;
    background: rgba(16,185,129,0.1);
    color: #065f46;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    border: 1px solid rgba(16,185,129,0.3);
    font-size: 0.875rem;
}
.alert-error {
    padding: 11px 16px;
    background: rgba(239,68,68,0.08);
    color: #991b1b;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    border: 1px solid rgba(239,68,68,0.25);
    font-size: 0.875rem;
}

/* ====================================================================
   RESPONSIVE — breakpoints: 1200px | 1024px | 768px | 480px
   ==================================================================== */

/* ── Hamburger button (hidden on desktop) ── */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.hamburger-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: transform .25s, opacity .25s;
}

/* ── Sidebar overlay ── */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 900;
}
#sidebar-overlay.sidebar-overlay-active {
    display: block;
}

/* ── Large desktops (≥1200px) — no changes needed ── */

/* ── Medium desktops / tablets landscape (1025–1199px) ── */
@media (max-width: 1199px) {
    .sidebar { width: 220px; }
    .dashboard-body.view-asientos .sidebar { flex-basis: 220px; }
    .ab-corrida-info { grid-template-columns: 1fr 1fr; }
}

/* ── Tablets portrait / small laptops (769–1024px) ── */
@media (max-width: 1024px) {
    .sidebar { width: 200px; }
    .dashboard-body.view-asientos .sidebar { flex-basis: 200px; }
    .content-area { padding: 20px; }
    .welcome-card { padding: 22px 24px; }
    .welcome-card h1 { font-size: 1.4rem; }
    .quick-actions { grid-template-columns: 1fr; gap: 14px; }
    .action-card { padding: 18px 20px; }
    .filter-grid { grid-template-columns: 1fr 1fr; }
    .filtros-container { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr 1fr; }
    .sivo-table th, .sivo-table td { padding: 10px 12px; font-size: 0.82rem; }
    .tabla-sivo th, .tabla-sivo td { padding: 10px 12px; font-size: 0.82rem; }
    .device-context-label, .device-context strong { max-width: 180px; }
}

/* ── Mobile landscape / tablet portrait (≤768px) ── */
@media (max-width: 768px) {
    /* Body */
    body { overflow: hidden; }

    /* Hamburger visible */
    .hamburger-btn { display: flex; }

    /* Sidebar: off-canvas */
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        width: 260px !important;
        height: 100vh;
        z-index: 1000;
        transition: left .28s ease;
    }
    .sidebar.sidebar-open { left: 0; }

    /* Main content full width */
    .main-content { width: 100%; overflow-y: auto; height: 100vh; }

    /* Top-bar */
    .top-bar { padding: 0 16px; height: 64px; gap: 10px; }
    .device-context { margin-right: 4px; }
    .device-context-label { max-width: 150px; font-size: .65rem; }
    .device-context strong { max-width: 150px; font-size: .75rem; }
    .device-context svg { width: 20px; height: 20px; }
    .user-info { display: none; }
    .user-name, .user-branch { display: none; }
    #venta-timer-wrapper { font-size: 0.78rem; padding: 4px 10px; }
    #venta-timer-display { font-size: 1rem; }

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

    /* Welcome card */
    .welcome-card {
        flex-direction: column;
        gap: 16px;
        padding: 20px 18px;
        text-align: center;
        margin-bottom: 16px;
    }
    .welcome-card h1 { font-size: 1.25rem; }
    .welcome-text p { font-size: 0.9rem; }
    .quick-stats { 
        justify-content: center;
        gap: 24px;
    }
    .stat-item:not(:last-child)::after { display: none; }
    .stat-value { font-size: 1.5rem; }

    /* Action cards */
    .quick-actions { grid-template-columns: 1fr; gap: 12px; }
    .action-card { padding: 16px 18px; }
    .action-icon { width: 48px; height: 48px; border-radius: 12px; }
    .action-icon svg { width: 24px; height: 24px; }
    .action-content h3 { font-size: 1rem; }
    .action-content p { font-size: 0.8rem; }

    /* Filters */
    .filter-grid { grid-template-columns: 1fr; gap: 12px; }
    .filtros-container { grid-template-columns: 1fr; }
    .filter-card { padding: 14px; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 10px; }

    /* Tables: horizontal scroll */
    .sivo-table, .tabla-sivo {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* Modals */
    .corrida-modal { left: 0; width: 100%; }
    .corrida-modal-content { padding: 20px; width: 95%; max-height: 95vh; }
    .form-grid { grid-template-columns: 1fr; }

    /* Login */
    .login-container { padding: 30px; }

    /* Abordaje */
    .ab-corrida-bar { flex-direction: column; gap: 12px; }
    .ab-corrida-info { grid-template-columns: 1fr 1fr; gap: 8px; }
    .ab-step1 { padding: 32px 20px; margin-top: 20px; }
    .ab-step1-icon { font-size: 3rem; }
    .ab-step1-title { font-size: 1.2rem; }
    .ab-step1-form { width: 100%; }
    .ab-step1-select, .ab-step1-btn { width: 100%; max-width: 100%; }

    /* Pasajero cards en abordaje */
    .ab-pax-row { grid-template-columns: 36px 1fr; gap: 8px; padding: 10px 12px; }
    .ab-pax-asiento { font-size: 0.85rem; }
    .ab-pax-folio { display: none; }

    /* Config cards */
    .config-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .config-row-input { align-self: flex-end; }

    /* Salida cards: stack on mobile */
    .salida-card { flex-direction: column; }
    .salida-main-top { grid-template-columns: 1fr; gap: 8px; }
    .salida-body { border-right: none; border-bottom: 1px solid #f1f5f9; padding: 12px 14px; }
    .salida-meta { padding: 8px 14px; }
    .salida-footer { padding: 8px 14px; justify-content: space-between; }
    .salida-bus-col { display: none; }
}

/* ── Small phones (≤480px) ── */
@media (max-width: 480px) {
    .top-bar { height: 56px; padding: 0 12px; }
    .content-area { padding: 12px; }
    .welcome-card { padding: 18px 14px; }
    .welcome-card h1 { font-size: 1.1rem; }

    .ab-corrida-info { grid-template-columns: 1fr; }
    .ab-info-item { padding: 10px 12px; }

    .corrida-modal { left: 0; width: 100%; }
    .corrida-modal-content { padding: 16px; width: 98%; }

    /* Corte / arqueo print buttons */
    .section-header h2 { font-size: 1rem; }
    .btn-volver { padding: 0.6em 1.2em; font-size: 0.85rem; }

    .sivo-table th, .sivo-table td { padding: 8px 10px; font-size: 0.78rem; }
    .tabla-sivo th, .tabla-sivo td { padding: 8px 10px; font-size: 0.78rem; }

    .quick-actions { gap: 10px; }
    .action-card { padding: 16px; }

    .ab-step1 { padding: 24px 14px; }
    .ab-step1-title { font-size: 1rem; }

    .modal-btn { padding: 10px 16px; font-size: 0.9rem; }
}

/* ── Apolo Bus Loader ──────────────────────────────────────────────────── */
.apolo-loader{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;width:100%;color:#4b5563;}
.apolo-loader--overlay{position:fixed;inset:0;z-index:1300;background:rgba(255,255,255,.94);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);}
.apolo-loader--compact{gap:6px;}
.apolo-loader__scene{display:flex;flex-direction:column;align-items:center;}
.apolo-loader--compact .apolo-loader__scene{width:min(230px,74vw);}
.apolo-loader__bus{width:100%;height:auto;overflow:visible;}
.apolo-loader__label{font-size:.86rem;font-weight:600;letter-spacing:.01em;color:#4b5563;text-align:center;}
.apolo-loader--overlay .apolo-loader__label{font-size:.98rem;}
.al-shadow{fill:rgba(15,23,42,.12);}
.al-speed-lines{opacity:.95;}
.al-speed{stroke:rgba(71,85,105,.62);stroke-width:2;stroke-linecap:round;transform-box:fill-box;transform-origin:right center;opacity:0;animation:alSpeedLine 1.24s ease-out infinite;}
.al-sp1{animation-delay:0s;}.al-sp2{animation-delay:.18s;}.al-sp3{animation-delay:.34s;}.al-sp4{animation-delay:.12s;}.al-sp5{animation-delay:.48s;}
.al-float{animation:alFloat 1s ease-in-out infinite;}
.al-wheel-bounce{animation:alFloat 1s ease-in-out infinite;}
.al-shell{fill:#4799d3;stroke:#111827;stroke-width:3.5;stroke-linejoin:round;}
.al-win{fill:#080b12;}
.al-stripe{fill:#4799d3;}
.al-mirror{fill:#6b7280;}
.al-swoosh-cyan{fill:none;stroke:#1fd8e6;stroke-width:20;stroke-linecap:round;stroke-linejoin:round;}
.al-swoosh-white{fill:none;stroke:#fff;stroke-width:10;stroke-linecap:round;}
.al-logo{image-rendering:auto;}
.al-wheel{animation:alWheelSpin 1.1s linear infinite;transform-box:fill-box;transform-origin:center;}
.al-wo{fill:#111827;}.al-wi{fill:#dbe4ec;}.al-wc{fill:#94a3b8;}
.al-road{position:relative;width:172%;height:2px;margin-top:2px;align-self:center;border-radius:999px;background:#111827;overflow:hidden;}
.al-road::before{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-image:repeating-linear-gradient(90deg,transparent 0 74px,#fff 74px 84px,transparent 84px 150px,#fff 150px 154px,transparent 154px 228px);background-size:228px 100%;background-repeat:repeat-x;animation:alRoadPattern 1.4s linear infinite;will-change:background-position;}
@keyframes alFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(3px)}}
@keyframes alSpeedLine{0%{opacity:0;transform:translateX(14px) scaleX(.18)}16%{opacity:.18}42%{opacity:.62;transform:translateX(0) scaleX(1)}100%{opacity:0;transform:translateX(-26px) scaleX(1.06)}}
@keyframes alWheelSpin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}
@keyframes alRoadPattern{from{background-position-x:0}to{background-position-x:-228px}}
@media(prefers-reduced-motion:reduce){.al-speed,.al-float,.al-wheel-bounce,.al-wheel,.al-road::before{animation:none!important;}}

/* Soporte tecnico */
.support-chat-dock {
    position: fixed;
    inset: 0;
    padding: 16px;
    z-index: 2200;
    display: none;
    align-items: flex-end;
    justify-content: flex-end;
    pointer-events: none;
}
.support-chat-dock.active {
    display: flex;
}
.support-floating-window {
    width: 380px;
    max-width: calc(100vw - 28px);
    max-height: calc(100dvh - 32px);
    overflow: auto;
    background: #eef4fb;
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(0,0,0,.28);
    pointer-events: auto;
}
.support-floating-window-admin {
    width: min(860px, calc(100vw - 32px));
    overflow: auto;
}
.support-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.support-page [hidden],
.support-global-notice[hidden],
.sidebar-support-badge[hidden] {
    display: none !important;
}
.support-page-embedded {
    position: relative;
    gap: 0;
    padding: 0;
}
.support-page-embedded > .section-header {
    margin: 0;
    padding: 12px 14px;
    color: #fff;
    background: linear-gradient(135deg, #0a2c67, #075fe4);
    border-radius: 14px 14px 0 0;
}
.support-page-embedded .section-header h2 {
    color: #fff;
    font-size: .96rem;
}
.support-modal-close {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.support-modal-close:hover {
    background: rgba(255,255,255,.24);
}
.support-shell {
    display: grid;
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
}
.support-page-embedded .support-shell {
    display: block;
    gap: 0;
}
.support-page-embedded[data-support-mode="admin"] {
    height: min(650px, calc(100vh - 24px));
}
.support-page-embedded[data-support-mode="admin"] .support-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    flex: 1;
    min-height: 0;
}
.support-inbox,
.support-start-card,
.support-chat-panel {
    background: #fff;
    border: 1px solid #d8e2ef;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}
.support-inbox,
.support-start-card {
    min-height: 610px;
}
.support-page-embedded .support-inbox,
.support-page-embedded .support-start-card {
    min-height: 0;
}
.support-page-embedded .support-inbox {
    border: 0;
    border-bottom: 1px solid #dbe6f2;
    border-radius: 0;
    box-shadow: none;
}
.support-page-embedded[data-support-mode="admin"] .support-inbox {
    display: flex;
    min-height: 0;
    flex-direction: column;
    border-right: 1px solid #dbe6f2;
    border-bottom: 0;
}
.support-page-embedded .support-start-card {
    border: 0;
    border-radius: 0 0 14px 14px;
    box-shadow: none;
}
.support-page-embedded[data-support-mode="requester"] .support-start-card {
    padding: 20px;
}
.support-start-intro {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5edf6;
}
.support-start-icon {
    display: inline-flex;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, #1764e8, #0ea5a4);
    box-shadow: 0 8px 18px rgba(23, 100, 232, .2);
}
.support-start-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.support-start-intro h3 {
    font-size: 1rem;
}
.support-start-intro p {
    margin: 4px 0 0;
    font-size: .78rem;
    line-height: 1.4;
}
.support-inbox-head,
.support-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #e5edf6;
}
.support-page-embedded .support-inbox-head {
    padding: 10px 12px;
}
.support-page-embedded .support-inbox-head h3 {
    font-size: .9rem;
}
.support-inbox-head small {
    display: block;
    margin-top: 3px;
    color: #7a8ba3;
    font-size: .72rem;
}
.support-inbox-head h3,
.support-chat-head h3,
.support-start-card h3 {
    margin: 0;
    color: #0f2442;
    font-size: 1.1rem;
}
.support-inbox-head span {
    display: inline-flex;
    min-width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e8f1ff;
    color: #1d5ce5;
    font-weight: 800;
}
.support-chat-list {
    max-height: 560px;
    overflow: auto;
    padding: 10px;
}
.support-page-embedded .support-chat-list {
    max-height: 145px;
    padding: 8px;
}
.support-page-embedded[data-support-mode="admin"] .support-chat-list {
    flex: 1;
    min-height: 0;
    max-height: none;
}
.support-inbox-tools {
    position: relative;
    padding: 9px 10px 3px;
}
.support-inbox-tools svg {
    position: absolute;
    top: 19px;
    left: 21px;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #7890ad;
    stroke-width: 2;
    stroke-linecap: round;
}
.support-inbox-tools input {
    width: 100%;
    height: 38px;
    border: 1px solid #d9e3ef;
    border-radius: 8px;
    padding: 0 10px 0 34px;
    color: #15263f;
    background: #f7faff;
    outline: none;
}
.support-inbox-tools input:focus {
    border-color: #2d6be4;
    box-shadow: 0 0 0 3px rgba(45, 107, 228, .1);
}
.support-ticket {
    width: 100%;
    border: 1px solid #e0e8f2;
    background: #f8fbff;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    text-align: left;
    cursor: pointer;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.support-ticket:hover,
.support-ticket.active {
    border-color: #2d6be4;
    box-shadow: 0 8px 18px rgba(45, 107, 228, .14);
    transform: translateY(-1px);
}
.support-ticket.unread {
    border-color: #91b9ff;
    background: #edf5ff;
}
.support-ticket.unread::before {
    content: "";
    position: absolute;
    left: 3px;
    width: 4px;
    height: 32px;
    align-self: center;
    border-radius: 99px;
    background: #1764e8;
}
.support-ticket {
    position: relative;
}
.support-ticket strong,
.support-ticket b {
    display: block;
    color: #0f2442;
    font-size: .92rem;
}
.support-ticket-avatar {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #0ea5a4);
    font-weight: 900;
    box-shadow: 0 6px 14px rgba(37, 99, 235, .18);
}
.support-ticket-body {
    min-width: 0;
}
.support-ticket-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.support-ticket-title i {
    display: inline-flex;
    min-width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0 6px;
    color: #fff;
    background: #ef4444;
    font-size: .69rem;
    font-style: normal;
    font-weight: 900;
}
.support-ticket small,
.support-ticket em {
    display: block;
    color: #64748b;
    font-style: normal;
    font-size: .78rem;
}
.support-ticket em {
    margin: 4px 0 3px;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.support-ticket b {
    margin-top: 8px;
    color: #12315f;
}
.support-ticket-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.support-start-card {
    padding: 20px;
}
.support-page-embedded .support-start-card {
    padding: 14px;
}
.support-start-card p {
    margin: 8px 0 18px;
    color: #64748b;
    font-size: .92rem;
}
.support-start-card label {
    display: block;
    margin: 14px 0 6px;
    color: #475569;
    font-weight: 700;
    font-size: .85rem;
}
.support-start-card select,
.support-start-card textarea,
.support-message-form textarea {
    width: 100%;
    border: 1px solid #d7e0eb;
    border-radius: 10px;
    padding: 11px 12px;
    font: inherit;
    color: #0f172a;
    background: #fff;
    resize: vertical;
}
.support-page-embedded .support-start-card textarea {
    min-height: 110px;
}
.support-page-embedded[data-support-mode="requester"] #support-create-btn {
    width: 100%;
    min-height: 42px;
}
.support-start-card select:focus,
.support-start-card textarea:focus,
.support-message-form textarea:focus {
    outline: none;
    border-color: #2d6be4;
    box-shadow: 0 0 0 3px rgba(45, 107, 228, .12);
}
.support-primary,
.support-resolve {
    border: none;
    border-radius: 10px;
    padding: 11px 18px;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}
.support-primary {
    background: linear-gradient(135deg, #2563eb, #0ea5a4);
    margin-top: 14px;
}
.support-resolve {
    background: #16a34a;
}
.support-primary:disabled,
.support-resolve:disabled {
    cursor: not-allowed;
    opacity: .55;
}
.support-chat-panel {
    display: flex;
    min-height: 610px;
    flex-direction: column;
}
.support-page-embedded .support-chat-panel {
    min-height: 0;
    border: 0;
    border-radius: 0 0 14px 14px;
    box-shadow: none;
}
.support-page-embedded[data-support-mode="requester"] .support-chat-panel {
    min-height: min(460px, calc(100vh - 90px));
}
.support-page-embedded[data-support-mode="admin"] .support-chat-panel {
    min-width: 0;
    min-height: 0;
    border-radius: 0 0 14px 0;
}
.support-page-embedded .support-chat-head {
    padding: 10px 12px;
}
.support-page-embedded .support-chat-head h3 {
    font-size: .9rem;
}
.support-page-embedded .support-chat-head p {
    font-size: .74rem;
}
.support-chat-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: .9rem;
}
.support-ended {
    margin: 14px 18px 0;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 10px;
    padding: 12px 14px;
    font-weight: 700;
}
.support-messages {
    flex: 1;
    min-height: 360px;
    max-height: 520px;
    overflow: auto;
    padding: 18px;
    background: linear-gradient(180deg, #f8fbff, #eef4fb);
}
.support-page-embedded .support-messages {
    min-height: 215px;
    max-height: 270px;
    padding: 12px;
}
.support-page-embedded[data-support-mode="admin"] .support-messages {
    min-height: 0;
    max-height: none;
}
.support-message {
    width: fit-content;
    max-width: min(70%, 640px);
    margin: 0 0 12px;
    padding: 11px 13px;
    border-radius: 13px;
    color: #0f172a;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .05);
}
.support-message.mine {
    margin-left: auto;
    color: #fff;
    background: #1764e8;
    border-color: #1764e8;
}
.support-message.theirs {
    margin-right: auto;
}
.support-message.system {
    margin-left: auto;
    margin-right: auto;
    background: #fef3c7;
    border-color: #fde68a;
    color: #92400e;
}
.support-message-meta {
    margin-bottom: 4px;
    font-size: .72rem;
    font-weight: 800;
    opacity: .74;
}
.support-message-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 16px 18px;
    border-top: 1px solid #e5edf6;
    background: #fff;
}
.support-page-embedded .support-message-form {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px 12px;
}
.support-page-embedded .support-message-form textarea {
    min-height: 56px;
    max-height: 92px;
}
.support-page-embedded .support-message-form .support-primary {
    min-height: 38px;
}
.support-message-form .support-primary {
    align-self: stretch;
    margin: 0;
    min-width: 110px;
}
.support-empty {
    padding: 22px;
    color: #94a3b8;
    text-align: center;
}
.support-admin-notice {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    color: #fff;
    background: #0f172a;
    box-shadow: 0 14px 34px rgba(15,23,42,.32);
    animation: supportNoticeIn .22s ease-out both;
}
.support-global-notice {
    position: fixed;
    top: 82px;
    left: 50%;
    z-index: 2600;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 28px;
    gap: 12px;
    align-items: center;
    width: 410px;
    max-width: calc(100vw - 28px);
    padding: 14px;
    border: 1px solid #b8d2ff;
    border-radius: 12px;
    color: #102440;
    text-align: left;
    cursor: pointer;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 35, 70, .24);
    animation: supportNoticeIn .22s ease-out both;
}
.support-global-notice::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    border-radius: 12px 0 0 12px;
    background: #1764e8;
}
.support-notice-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #fff;
    background: #1764e8;
}
.support-notice-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.support-notice-copy,
.support-notice-copy strong,
.support-notice-copy span,
.support-notice-copy small {
    display: block;
}
.support-notice-copy {
    min-width: 0;
}
.support-notice-copy small {
    margin-bottom: 2px;
    color: #1764e8;
    font-size: .69rem;
    font-weight: 900;
    text-transform: uppercase;
}
.support-notice-copy strong {
    color: #102440;
    font-size: .88rem;
}
.support-notice-copy > span {
    margin-top: 3px;
    color: #52647d;
    font-size: .76rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.support-notice-close {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 7px;
    color: #64748b;
    background: #edf2f8;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}
.support-notice-close:hover {
    color: #0f2442;
    background: #dfe8f3;
}
.sidebar-support-card.has-unread-support {
    border-color: rgba(96, 165, 250, .62);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12), 0 10px 28px rgba(23, 100, 232, .18);
    animation: supportCardAttention 1.8s ease-in-out infinite;
}
@keyframes supportCardAttention {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
.support-admin-notice strong,
.support-admin-notice span {
    display: block;
}
.support-admin-notice strong {
    font-size: .82rem;
}
.support-admin-notice span {
    margin-top: 3px;
    font-size: .75rem;
    opacity: .9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@keyframes supportNoticeIn {
    from { opacity: 0; transform: translate(-50%, -8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 1024px) {
    .support-shell {
        grid-template-columns: 1fr;
    }
    .support-inbox,
    .support-start-card,
    .support-chat-panel {
        min-height: auto;
    }
    .support-chat-list,
    .support-messages {
        max-height: 420px;
    }
}

@media (max-width: 520px) {
    .support-chat-dock {
        padding: 8px;
    }
    .support-global-notice {
        top: 70px;
        right: 8px;
        left: 8px;
        width: auto;
        transform: none;
        animation-name: supportNoticeInMobile;
    }
    .support-floating-window {
        width: 100%;
        max-width: none;
    }
}
@keyframes supportNoticeInMobile {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.th-shell { margin-top:22px;padding-top:18px;border-top:1px solid #e2e8f0;text-align:left; }
.th-heading { display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:14px; }
.th-heading h4 { margin:0;color:#0f172a;font-size:1rem; }
.th-heading span { color:#64748b;font-size:.76rem; }
.th-warning,.th-error { padding:10px 12px;border-radius:8px;font-size:.8rem;margin-bottom:12px; }
.th-warning { background:#fff7ed;border:1px solid #fdba74;color:#9a3412; }
.th-error { background:#fef2f2;border:1px solid #fecaca;color:#b91c1c; }
.th-loading,.th-empty { color:#64748b;font-size:.85rem;padding:14px 0; }
.th-event { position:relative;display:grid;grid-template-columns:18px 1fr;gap:8px;padding-bottom:15px; }
.th-event:not(:last-child)::before { content:'';position:absolute;left:5px;top:12px;bottom:0;width:2px;background:#dbeafe; }
.th-dot { width:12px;height:12px;margin-top:4px;border-radius:50%;background:#2563eb;border:3px solid #dbeafe;box-sizing:border-box;z-index:1; }
.th-title { color:#0f172a;font-size:.86rem;font-weight:700; }
.th-meta { color:#64748b;font-size:.72rem;margin-top:2px; }
.th-change { margin-top:5px;color:#475569;font-size:.76rem;overflow-wrap:anywhere; }
.th-change span { color:#2563eb;padding:0 3px; }
.th-inferred { display:inline-block;margin-left:5px;padding:2px 6px;border-radius:10px;background:#f1f5f9;color:#64748b;font-size:.62rem;text-transform:uppercase;letter-spacing:.04em; }

/* SITAP: the supplied navy logo needs a light brand surface. */
.sidebar-header.sitap-sidebar-brand { background: #eaf8ff; }
.sitap-sidebar-brand .logo-small { width: 190px; filter: none; }

/* Shared navigation SVG sizing; administrative appearance lives in admin.css. */
.submenu-arrow svg { width:15px; height:15px; display:block; }
.sidebar-support-chevron { display:none; }
/* Support keeps its actions and composer reachable inside short windows. */
.support-page #support-workflow {
    min-height: 0;
    max-height: min(320px, 38dvh);
    overflow: auto;
    padding: 12px 20px;
    flex: 0 1 auto;
    scrollbar-gutter: stable;
}
.support-page .support-inbox-tools,
.support-page .support-chat-head,
.support-page .support-message-form,
.support-page .support-inbox-head { flex-shrink: 0; min-width: 0; }
.support-page .support-print-actions { border-top: 1px solid #d8e2ef; padding-top: 10px; }
.support-page .support-print-actions button { min-height: 44px; white-space: normal; }
.support-page-embedded[data-support-mode="admin"] { height: min(720px, calc(100dvh - 32px)); }
.support-page-embedded[data-support-mode="admin"] .support-shell,
.support-page-embedded[data-support-mode="admin"] .support-chat-panel { overflow: hidden; min-height: 0; }
.support-page-embedded[data-support-mode="admin"] .support-messages { flex: 1 1 80px; min-height: 64px; }
.support-page .support-chat-list,
.support-page .support-messages { overscroll-behavior: contain; }
.support-page :is(#support-workflow, .support-chat-list, .support-messages):focus-visible { outline: 3px solid #2563eb; outline-offset: -3px; }
@media (max-width: 700px) {
    .support-page-embedded[data-support-mode="admin"] .support-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(120px, 28%) minmax(0, 1fr);
    }
    .support-page-embedded[data-support-mode="admin"] .support-inbox { border-right: 0; border-bottom: 1px solid #d8e2ef; }
    .support-page-embedded[data-support-mode="admin"] .support-chat-panel { border-radius: 0 0 14px 14px; }
    .support-page-embedded #support-workflow { padding: 10px 12px; max-height: 25dvh; }
    .support-page-embedded[data-support-mode="requester"] #support-workflow { max-height: min(360px, 44dvh); }
    .support-page .support-print-actions button { width: 100%; margin-right: 0; }
}

/* Ticket workflow actions share the SITAP navy control style in every shell. */
.support-page #support-workflow .support-print-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:stretch; }
.support-page #support-workflow .support-print-actions > p { flex-basis:100%; margin:0 0 4px; }
.support-page #support-workflow button {
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
    min-height:44px; max-width:100%; padding:10px 14px; margin:4px 0;
    font:600 .875rem/1.35 'Inter',sans-serif; border-radius:9px;
    color:#08285f; background:#fff; border:1px solid #b8cee6; box-shadow:none;
    text-decoration:none; white-space:normal; cursor:pointer;
}
.support-page #support-workflow .support-print-actions > button { flex:1 1 190px; margin:0; }
.support-page #support-workflow button.support-primary { background:#08285f; border-color:#08285f; color:#fff; }
.support-page #support-workflow button:hover:not(:disabled) { background:#f0f7ff; border-color:#0054bc; }
.support-page #support-workflow button.support-primary:hover:not(:disabled) { background:#103d7c; color:#fff; }
.support-page #support-workflow button:focus-visible { outline:3px solid #0054ff; outline-offset:3px; }
.support-page #support-workflow button:disabled { opacity:.55; cursor:wait; }
