.library-schedule-admin { max-width:1100px; margin:18px auto 32px; padding:0 14px; color:#172c40; font:15px/1.5 Arial,sans-serif; box-sizing:border-box; }
.library-schedule-admin * { box-sizing:border-box; }
.library-schedule-admin label { display:block; margin:16px 0 7px; font-weight:600; color:#20364a; }
.library-schedule-admin input:not([type=checkbox]):not([type=hidden]), .library-schedule-admin select { width:100% !important; min-height:44px; margin:0 !important; padding:9px 12px; border:1px solid #a7bdc8 !important; border-radius:8px; background:#fff !important; color:#172c40 !important; font:16px/1.4 Arial,sans-serif; }
.library-schedule-admin .ui-input-text { margin:0; border:0; box-shadow:none; background:transparent; }
.library-schedule-admin .library-schedule-action { display:inline-flex; justify-content:center; align-items:center; min-height:44px; margin:6px 3px; padding:10px 14px !important; border:1px solid #b6cdd3; border-radius:8px !important; background:#fff !important; color:#175e6b !important; font:600 14px/1.4 Arial,sans-serif !important; text-shadow:none; cursor:pointer; text-decoration:none; }
.library-schedule-admin .library-schedule-delete { color:#973b30 !important; border-color:#dfbbb5; }
.library-schedule-table { width:100%; overflow-x:auto; margin:12px 0 20px; border:1px solid #dce4e8; border-radius:10px; background:white; }
.library-schedule-table table { width:100%; border-collapse:collapse; }
.library-schedule-table th { background:#e6f0f2; padding:12px; color:#174d5a; text-align:left; }
.library-schedule-table td { padding:10px 12px; border-bottom:1px solid #e0e8eb; vertical-align:middle; }
.library-schedule-table tr:last-child td { border-bottom:0; }
.library-schedule-table tbody tr:nth-child(even) { background:#f4f8f9; }
.library-schedule-day { margin:20px 0 28px; }
.library-schedule-day h2 { margin:0 0 10px; font-size:19px; color:#174d5a; }
.library-schedule-admin .spaceItem { display:flex; align-items:center; gap:10px; min-height:46px; padding:10px 12px; margin:8px 0; border:1px solid #dce4e8; border-radius:9px; background:#fff; }
.library-schedule-admin [data-schedule-move] { min-width:44px; min-height:44px; border:1px solid #b6cdd3; border-radius:7px; background:white; color:#175e6b; cursor:pointer; }
.library-schedule-admin :is(input,select,button,[role=button]):focus-visible { outline:3px solid #227482; outline-offset:2px; }
@media(max-width:600px){.library-schedule-admin{padding:0 6px}.library-schedule-table td,.library-schedule-table th{padding:8px}.library-schedule-day table{min-width:650px}}
/* Standalone special schedules: retain the existing form/API and use the same palette. */
body.library-special-schedules { background:#f5f7f9; color:#172c40; font-family:Arial,sans-serif; }
.library-special-schedules .page { max-width:1100px; padding:24px 16px; margin:auto; }
.library-special-schedules .card { border:1px solid #dce4e8; border-radius:12px; padding:22px; margin:20px 0; background:#fff; box-shadow:none; }
.library-special-schedules h1 { font-size:26px; color:#172c40; }
.library-special-schedules h2 { font-size:19px; color:#174d5a; }
.library-special-schedules input,.library-special-schedules select { min-height:44px; border:1px solid #a7bdc8; border-radius:8px; background:#fbfcfd; color:#172c40; }
.library-special-schedules button { min-height:44px; border-radius:8px; font-weight:600; }
.library-special-schedules .btn-primary { background:#227482; border-color:#227482; color:#fff; }
.library-special-schedules .btn-secondary { background:#fff; color:#175e6b; border:1px solid #b6cdd3; }
.library-special-schedules .btn-danger { background:#fff3f1; color:#973b30; border:1px solid #dfbbb5; }
.library-special-schedules th { background:#e6f0f2; color:#174d5a; }
.library-special-schedules :is(input,select,button):focus-visible { outline:3px solid #227482; outline-offset:2px; }
@media(max-width:600px){.library-special-schedules .page{padding:12px}.library-special-schedules .card{padding:16px 12px}.library-special-schedules .form-grid{grid-template-columns:1fr}}

@media(max-width:600px){
 .library-schedule-day table { min-width:0; }
 .library-schedule-day thead { display:none; }
 .library-schedule-day tbody { display:block; }
 .library-schedule-day tbody tr { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; padding:14px; border-bottom:1px solid #dce4e8; }
 .library-schedule-day tbody td { display:block; width:auto !important; padding:0; border:0; }
 .library-schedule-day tbody td:first-child { grid-column:1/-1; font-weight:600; }
 .library-schedule-day tbody td:nth-child(2)::before { content:'Tuloaika'; display:block; margin-bottom:6px; font-size:13px; }
 .library-schedule-day tbody td:nth-child(3)::before { content:'Lähtöaika'; display:block; margin-bottom:6px; font-size:13px; }
 .library-schedule-day tbody td:last-child { grid-column:1/-1; display:flex; align-items:center; gap:8px; }
}
@media(min-width:601px){ .library-schedule-day tbody td:last-child { white-space:nowrap; } .library-schedule-day tbody td:last-child .library-schedule-action { margin:0 0 0 6px; } .library-schedule-day tbody td:last-child button { vertical-align:middle; } }
.library-schedule-admin [data-schedule-move] { display:none !important; }

#libraryBusTable .library-schedule-list-actions { text-align:right; white-space:nowrap; width:1%; }
#libraryBusTable .library-schedule-list-actions .library-schedule-action { margin:0 0 0 6px; }

.library-special-schedules tr.schedule-row-editing, .library-special-schedules tr.schedule-row-editing td { background:#e7f3f5; }
.library-special-schedules tr.schedule-row-editing td:first-child { box-shadow:inset 3px 0 #227482; }
.schedule-edit-badge { display:inline-block; margin:5px 0 5px 10px; padding:3px 8px; border-radius:6px; background:#227482; color:#fff; font:600 12px/1.4 Arial,sans-serif; }

.library-special-schedules .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.library-special-schedules .form-grid>div:last-child{align-self:end}
@media(max-width:600px){.library-special-schedules .form-grid{grid-template-columns:1fr}}

.library-special-schedules #scheduleBody tr.schedule-stop-tone-0:not(.schedule-row-editing),.library-special-schedules #scheduleBody tr.schedule-stop-tone-0:not(.schedule-row-editing) td{background:#fff}
.library-special-schedules #scheduleBody tr.schedule-stop-tone-1:not(.schedule-row-editing),.library-special-schedules #scheduleBody tr.schedule-stop-tone-1:not(.schedule-row-editing) td{background:#eaf3f5}
@media(min-width:761px){.library-special-schedules #scheduleBody tr.schedule-stop-start>td{border-top:3px solid #8bb2bb}}
@media(max-width:760px){.library-special-schedules #scheduleBody tr.schedule-stop-start{border-top:3px solid #8bb2bb}}

.library-special-schedules .schedule-info-field{grid-column:1/-1;min-width:0}
.library-special-schedules #info2{box-sizing:border-box;width:100%;min-height:90px;padding:12px;border:1px solid #9bbcc4;border-radius:8px;background:#f9fbfc;color:#172c40;font:16px/1.5 Arial,sans-serif;resize:vertical}
.library-special-schedules .schedule-info-field small{display:block;margin-top:5px;color:#405f70}
.library-special-schedules .schedule-visit-info{margin-top:7px;font-size:14px;line-height:1.5;color:#624d13;white-space:pre-wrap;overflow-wrap:anywhere}
.schedule-visit-info strong,.schedule-visit-info span{display:block}
