:root {
    --background: #f4f4f6;
    --surface: #ffffff;
    --surface-subtle: #f7f7f9;
    --sidebar: #222629;
    --sidebar-muted: #969c99;
    --text: #202321;
    --muted: #747a76;
    --line: #e3e5e4;
    --primary: #7658bd;
    --primary-dark: #6245a5;
    --primary-soft: #eee9f8;
    --green: #25845b;
    --green-soft: #eaf5ef;
    --red: #bd4f54;
    --red-soft: #fff0f0;
    --shadow: 0 18px 50px rgb(36 29 53 / 8%);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--text);
    background: var(--background);
    font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Login */
.login-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px 20px;
    background:
        radial-gradient(circle at 12% 18%, rgb(118 88 189 / 15%), transparent 30%),
        radial-gradient(circle at 88% 82%, rgb(37 132 91 / 9%), transparent 28%),
        var(--background);
}

.login-shell {
    width: min(100%, 440px);
}

.login-panel {
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 13px;
    background: var(--sidebar);
}

.brand-mark svg {
    width: 29px;
    fill: none;
    stroke: #ffffff;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.brand-text {
    line-height: 1.1;
}

.brand-name {
    display: block;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: .04em;
}

.brand-subtitle {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.login-heading {
    margin: 40px 0 28px;
}

.login-heading p {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.login-heading h1 {
    margin: 0;
    font-size: 30px;
    letter-spacing: -.04em;
}

.login-form {
    display: grid;
    gap: 10px;
}

.login-form label {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.login-form input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--text);
    background: var(--surface-subtle);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-form input:focus {
    border-color: var(--primary);
    outline: 0;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgb(118 88 189 / 12%);
}

.login-form button {
    height: 52px;
    margin-top: 18px;
    border: 0;
    border-radius: 11px;
    color: #ffffff;
    background: var(--primary);
    font-weight: 900;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.login-form button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.form-error {
    margin: -12px 0 18px;
    padding: 12px 14px;
    border-radius: 10px;
    color: #a83e43;
    background: var(--red-soft);
    font-size: 13px;
    font-weight: 800;
}

.login-help {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

/* Error */
.error-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px 20px;
    background:
        radial-gradient(circle at 14% 16%, rgb(118 88 189 / 16%), transparent 31%),
        radial-gradient(circle at 86% 84%, rgb(37 132 91 / 10%), transparent 28%),
        var(--background);
}

.error-shell {
    width: min(100%, 560px);
}

.error-panel {
    padding: 42px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: center;
}

.error-panel .login-brand {
    display: inline-flex;
    margin: 0 auto;
    text-align: left;
}

.error-illustration {
    display: grid;
    width: 92px;
    height: 92px;
    margin: 38px auto 18px;
    place-items: center;
    border-radius: 28px;
    color: var(--primary);
    background: var(--primary-soft);
}

.error-illustration svg {
    width: 54px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.error-code {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .14em;
}

.error-panel h1 {
    margin: 0;
    font-size: clamp(25px, 5vw, 34px);
    letter-spacing: -.04em;
}

.error-description {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.error-actions a,
.error-actions button {
    min-width: 132px;
    justify-content: center;
}

.error-help {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 560px) {
    .error-panel {
        padding: 32px 22px;
    }

    .error-actions {
        flex-direction: column;
    }

    .error-actions a,
    .error-actions button {
        width: 100%;
    }
}

/* Operator dashboard */
.dashboard-page {
    min-width: 320px;
}

.admin-app {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 28px 18px 22px;
    color: #ffffff;
    background: var(--sidebar);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 0 10px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: .055em;
    text-decoration: none;
}

.sidebar-brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 9px;
    background: var(--primary);
}

.sidebar-brand-mark svg {
    width: 22px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.sidebar-label {
    margin: 45px 12px 13px;
    color: var(--sidebar-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}

.admin-nav {
    display: grid;
    gap: 8px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 10px;
    color: #d8dcda;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.admin-nav a:hover,
.admin-nav a:focus-visible,
.admin-nav a.active {
    color: #ffffff;
    background: var(--primary);
    outline: none;
    transform: translateX(2px);
}

.admin-nav svg,
.management-icon svg,
.empty-state-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.admin-nav svg {
    width: 20px;
    height: 20px;
}

.admin-workspace {
    min-width: 0;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 78px;
    padding: 14px clamp(24px, 4vw, 56px);
    border-bottom: 1px solid var(--line);
    background: rgb(255 255 255 / 92%);
    backdrop-filter: blur(12px);
}

.page-eyebrow {
    margin: 0 0 4px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .12em;
}

.admin-header h1 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -.035em;
}

.admin-header-actions,
.header-company {
    display: flex;
    align-items: center;
}

.admin-header-actions { gap: 20px; }

.header-company {
    gap: 9px;
    min-height: 38px;
    padding: 0 4px 0 14px;
    border-left: 1px solid var(--line);
}

.header-company span { color: var(--muted); font-size: 10px; font-weight: 800; }
.header-company strong { max-width: 180px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.header-company a {
    padding: 7px 10px;
    border: 1px solid var(--primary-soft);
    border-radius: 8px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-size: 11px;
    font-weight: 850;
    text-decoration: none;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 11px;
}

.user-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    color: var(--primary-dark);
    background: var(--primary-soft);
    font-size: 14px;
    font-weight: 900;
}

.user-copy {
    display: grid;
    min-width: 96px;
    gap: 2px;
}

.user-copy strong {
    font-size: 13px;
}

.user-copy span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
}

.logout-button {
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--muted);
    background: #ffffff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.logout-button:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

.dashboard-content {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 44px 0 64px;
}

.dashboard-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.dashboard-intro p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.dashboard-intro h2 {
    margin: 0;
    font-size: clamp(24px, 3vw, 32px);
    letter-spacing: -.045em;
}

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

.stat-card {
    display: grid;
    min-height: 132px;
    padding: 22px;
    border-radius: 15px;
}

.stat-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.stat-card strong {
    align-self: end;
    margin-top: 13px;
    font-size: 30px;
    line-height: 1;
}

.stat-card small {
    margin-top: 8px;
    color: var(--muted);
    font-size: 10px;
}

.stat-neutral { background: var(--surface-subtle); }
.stat-green { background: var(--green-soft); }
.stat-purple { background: var(--primary-soft); }
.stat-red { background: var(--red-soft); }

.operations-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(270px, .72fr);
    gap: 16px;
    margin-top: 22px;
}

.dashboard-panel {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 8px 28px rgb(36 29 53 / 4%);
}

.live-map-panel,
.alert-panel,
.recent-operations {
    padding: 24px;
}

.panel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.panel-heading div > span {
    color: var(--primary);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .11em;
}

.panel-heading h3 {
    margin: 5px 0 0;
    font-size: 17px;
    letter-spacing: -.025em;
}

.panel-note {
    color: var(--muted);
    font-size: 10px;
}

.map-canvas {
    position: relative;
    min-height: 330px;
    margin-top: 18px;
    overflow: hidden;
    border-radius: 13px;
    background:
        linear-gradient(90deg, rgb(255 255 255 / 45%) 1px, transparent 1px),
        linear-gradient(rgb(255 255 255 / 45%) 1px, transparent 1px),
        #dfe8e2;
    background-size: 42px 42px;
}

.route-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.map-road {
    fill: none;
    stroke: rgb(255 255 255 / 72%);
    stroke-width: 18;
}

.road-two,
.road-three {
    stroke-width: 12;
}

.route-shadow,
.route-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.route-shadow {
    stroke: rgb(255 255 255 / 92%);
    stroke-width: 13;
}

.route-line {
    stroke: rgb(118 88 189 / 46%);
    stroke-width: 6;
    stroke-dasharray: 9 7;
}

.route-stop {
    fill: #ffffff;
    stroke: rgb(118 88 189 / 55%);
    stroke-width: 4;
}

.map-empty-state {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    justify-items: center;
    width: min(340px, calc(100% - 40px));
    padding: 22px 24px;
    border: 1px solid rgb(255 255 255 / 85%);
    border-radius: 14px;
    background: rgb(255 255 255 / 88%);
    box-shadow: 0 16px 35px rgb(49 64 55 / 12%);
    backdrop-filter: blur(8px);
    text-align: center;
    transform: translate(-50%, -50%);
}

.map-empty-icon {
    display: grid;
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    place-items: center;
    border-radius: 50%;
    color: var(--primary);
    background: var(--primary-soft);
}

.map-empty-icon svg,
.alert-empty-state svg,
.quick-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.map-empty-icon svg {
    width: 21px;
}

.map-empty-state strong,
.alert-empty-state strong {
    font-size: 13px;
}

.map-empty-state p,
.alert-empty-state p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.65;
}

.alert-count {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    color: var(--red);
    background: var(--red-soft);
    font-size: 13px;
}

.alert-empty-state {
    display: grid;
    min-height: 330px;
    place-content: center;
    justify-items: center;
    text-align: center;
}

.alert-empty-state > span {
    display: grid;
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
    place-items: center;
    border-radius: 50%;
    color: var(--green);
    background: var(--green-soft);
}

.alert-empty-state svg {
    width: 23px;
}

.recent-operations {
    margin-top: 16px;
}

.operation-table-wrap {
    overflow-x: auto;
}

.operation-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.operation-table th {
    padding: 15px 16px;
    color: var(--muted);
    background: var(--surface-subtle);
    font-size: 10px;
    font-weight: 800;
    text-align: left;
}

.operation-table th:first-child {
    border-radius: 9px 0 0 9px;
}

.operation-table th:last-child {
    border-radius: 0 9px 9px 0;
}

.table-empty-row td {
    height: 138px;
    text-align: center;
}

.table-empty-row strong,
.table-empty-row span {
    display: block;
}

.table-empty-row strong {
    font-size: 12px;
}

.table-empty-row span {
    margin-top: 7px;
    color: var(--muted);
    font-size: 10px;
}

.quick-management {
    margin-top: 32px;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.section-heading span {
    color: var(--primary);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .11em;
}

.section-heading h3 {
    margin: 5px 0 0;
    font-size: 17px;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 10px;
}

.quick-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
}

.quick-management-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    min-height: 88px;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: inherit;
    text-decoration: none;
    scroll-margin-top: 24px;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.quick-management-card:hover,
.quick-management-card:target {
    border-color: rgb(118 88 189 / 45%);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.quick-icon {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
}

.quick-icon svg {
    width: 21px;
}

.branch-icon { color: var(--primary); background: var(--primary-soft); }
.member-icon { color: var(--green); background: var(--green-soft); }
.vehicle-icon { color: #3e72a8; background: #eaf2fb; }
.operation-icon { color: #bd752c; background: #fff5e6; }
.history-icon { color: #6d6875; background: #f0eef2; }
.boarding-record-icon { color: #237c63; background: #e8f5f0; }

.quick-management-card h4 {
    margin: 0;
    font-size: 13px;
}

.quick-management-card p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.ready-badge {
    position: absolute;
    top: 9px;
    right: 9px;
    padding: 4px 7px;
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface-subtle);
    font-size: 8px;
    font-weight: 800;
}

.ready-badge-open {
    color: var(--primary);
    background: var(--primary-soft);
}

/* Branch management */
.management-content {
    width: 100%;
    margin: 0;
    padding: 44px 32px 64px;
}

.management-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.management-page-heading p,
.management-form-heading p {
    margin: 0 0 7px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .11em;
}

.management-page-heading h2,
.management-form-heading h2 {
    margin: 0;
    font-size: clamp(25px, 3vw, 32px);
    letter-spacing: -.045em;
}

.management-page-heading div > span,
.management-form-heading > span {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
}

.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 17px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.primary-action {
    border: 1px solid var(--primary);
    color: #ffffff;
    background: var(--primary);
}

.primary-action:hover,
.primary-action:focus-visible {
    border-color: var(--primary-dark);
    background: var(--primary-dark);
    outline: none;
}

.secondary-action {
    border: 1px solid var(--line);
    color: var(--muted);
    background: #ffffff;
}

.notice-message {
    margin: 0 0 14px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 750;
}

.notice-message.success {
    color: var(--green);
    background: var(--green-soft);
}

.notice-message.error {
    color: var(--red);
    background: var(--red-soft);
}

.management-board,
.management-form-panel {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 8px 28px rgb(36 29 53 / 4%);
}

.management-board-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 21px 24px;
    border-bottom: 1px solid var(--line);
}

.management-board-heading h3 {
    margin: 0;
    font-size: 15px;
}

.management-board-heading > span {
    color: var(--muted);
    font-size: 11px;
}

.management-board-heading strong {
    color: var(--primary);
}

.heading-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.company-select-page {
    min-width: 320px;
    min-height: 100vh;
    padding: 40px 20px;
    background:
        radial-gradient(circle at 12% 18%, rgb(118 88 189 / 15%), transparent 30%),
        radial-gradient(circle at 88% 82%, rgb(37 132 91 / 9%), transparent 28%),
        var(--background);
}

.company-select-shell { width: min(100%, 920px); margin: 0 auto; }
.company-select-panel { padding: 36px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.company-select-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.company-logout { min-height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.company-select-heading { margin: 36px 0 24px; }
.company-select-heading p { margin: 0 0 7px; color: var(--primary); font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.company-select-heading h1 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.company-select-heading > span { display: block; margin-top: 9px; color: var(--muted); font-size: 13px; }
.company-select-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.company-search { display: flex; flex: 1; gap: 8px; }
.company-search input { width: min(100%, 380px); height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-subtle); }
.company-search input:focus { border-color: var(--primary); outline: 0; box-shadow: 0 0 0 4px rgb(118 88 189 / 12%); }
.company-search button,
.company-search a { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); background: #fff; font-size: 12px; font-weight: 850; text-decoration: none; cursor: pointer; }
.company-select-list { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.company-select-item { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border-top: 1px solid var(--line); }
.company-select-item:first-child { border-top: 0; }
.company-select-copy { display: grid; min-width: 0; gap: 7px; }
.company-select-copy > div { display: flex; align-items: center; gap: 9px; }
.company-select-copy strong { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.company-select-copy small { color: var(--muted); font-size: 10px; }
.company-select-actions { display: flex; align-items: center; gap: 7px; }
.company-select-actions form { margin: 0; }
.company-choice-button { min-height: 34px; padding: 0 13px; border: 1px solid var(--primary); border-radius: 8px; color: #fff; background: var(--primary); font-size: 11px; font-weight: 850; cursor: pointer; }
.current-company-badge { color: var(--green); font-size: 10px; font-weight: 850; }
.company-select-actions button:disabled { opacity: .4; cursor: not-allowed; }
.company-select-actions .table-action.feature { color: var(--green); }
.company-selection-empty { display: grid; gap: 7px; padding: 44px; color: var(--muted); text-align: center; }
.company-selection-empty strong { color: var(--text); }

.company-dialog { width: min(calc(100% - 32px), 460px); padding: 0; border: 0; border-radius: 18px; box-shadow: 0 24px 80px rgb(23 19 34 / 24%); }
.company-dialog::backdrop { background: rgb(26 24 31 / 48%); backdrop-filter: blur(3px); }
.company-dialog-form { display: grid; gap: 11px; padding: 28px; }
.company-dialog-form > div:first-child { margin-bottom: 10px; }
.company-dialog-form p { margin: 0 0 6px; color: var(--primary); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.company-dialog-form h2 { margin: 0; font-size: 22px; }
.company-dialog-form > div:first-child span { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.company-dialog-form label { margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.company-dialog-form input,
.company-dialog-form select { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-subtle); }
.company-dialog-form input:focus,
.company-dialog-form select:focus { border-color: var(--primary); outline: 0; box-shadow: 0 0 0 4px rgb(118 88 189 / 12%); }
.company-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.company-feature-shell { width: min(100%, 820px); }
.company-feature-shell .login-brand { color: inherit; text-decoration: none; }
.company-feature-back {
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--muted);
    background: #fff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}
.company-feature-heading > span strong { color: var(--text); }
.company-feature-form { display: grid; gap: 18px; }
.company-feature-list { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.company-feature-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px;
    border-top: 1px solid var(--line);
    cursor: pointer;
}
.company-feature-item:first-child { border-top: 0; }
.company-feature-item:hover { background: var(--surface-subtle); }
.company-feature-copy { display: grid; min-width: 0; gap: 7px; }
.company-feature-copy strong { font-size: 15px; }
.company-feature-copy small { color: var(--muted); font-size: 12px; line-height: 1.6; }
.company-feature-toggle { display: flex; align-items: center; flex: 0 0 auto; gap: 9px; }
.company-feature-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.company-feature-toggle > span {
    position: relative;
    width: 48px;
    height: 26px;
    border-radius: 999px;
    background: #d7dbd9;
    transition: background .18s ease;
}
.company-feature-toggle > span::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgb(23 19 34 / 20%);
    content: "";
    transition: transform .18s ease;
}
.company-feature-toggle input:checked + span { background: var(--primary); }
.company-feature-toggle input:checked + span::after { transform: translateX(22px); }
.company-feature-toggle input:focus-visible + span { outline: 3px solid rgb(118 88 189 / 18%); outline-offset: 2px; }
.company-feature-toggle b { width: 28px; color: var(--muted); font-size: 10px; }
.company-feature-toggle b::after { content: "OFF"; }
.company-feature-toggle input:checked ~ b { color: var(--primary); }
.company-feature-toggle input:checked ~ b::after { content: "ON"; }
.company-feature-guide { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.company-feature-actions { display: flex; justify-content: flex-end; gap: 9px; }

.management-table-wrap {
    overflow-x: auto;
}

.management-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    table-layout: fixed;
}

.management-table th {
    padding: 14px 16px;
    color: var(--muted);
    background: var(--surface-subtle);
    font-size: 10px;
    font-weight: 800;
    text-align: left;
}

.management-table td {
    padding: 17px 16px;
    border-top: 1px solid var(--line);
    font-size: 12px;
    vertical-align: middle;
}

.management-table tbody tr:first-child td {
    border-top: 0;
}

.management-table tbody tr:not(.management-empty-row):hover {
    background: #fcfbfe;
}

.management-table .number-column,
.management-table .number-cell {
    width: 76px;
    color: var(--muted);
    text-align: center;
}

.management-table th:nth-child(2) { width: 20%; }
.management-table th:nth-child(3) { width: 32%; }
.management-table th:nth-child(4) { width: 110px; }
.management-table th:nth-child(5) { width: 110px; }
.management-table .action-column { width: 130px; }

.member-table { min-width: 1320px; }
.member-table .member-branch-column { width: 180px; }
.member-table .member-login-column { width: 160px; }
.member-table .member-name-column { width: 120px; }
.member-table .member-gender-column { width: 80px; }
.member-table .member-phone-column { width: 145px; }
.member-table .member-email-column { width: 220px; }
.member-table .member-registered-column { width: 120px; white-space: nowrap; }
.member-table .member-valid-until-column { width: 180px; white-space: nowrap; }
.member-table .action-column { width: 140px; white-space: nowrap; }
.member-table .selection-column,
.member-table .selection-cell { width: 48px; text-align: center; }
.member-table .member-email-cell { overflow-wrap: anywhere; }
.member-table.period-enabled { min-width: 1580px; }
.operation-record-table { min-width: 1260px; }
.boarding-record-table { min-width: 1180px; }
.device-table { min-width: 1420px; }
.device-capability-check { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; }
.device-capability-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.complaint-table { min-width: 1080px; }
.complaint-table th:nth-child(2) { width: 150px; }
.complaint-table th:nth-child(3) { width: 15%; }
.complaint-table th:nth-child(4) { width: 110px; }
.complaint-table th:nth-child(5) { width: 30%; }
.complaint-table th:nth-child(6) { width: 150px; }
.complaint-table th:nth-child(7) { width: 100px; }
.complaint-member-id { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.member-registered-cell,
.boarding-pass-period-cell { white-space: nowrap; font-weight: 750; }

.boarding-pass-bulk-form {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--line);
    background: var(--primary-soft);
}

.boarding-pass-bulk-form > div { display: grid; gap: 3px; margin-right: auto; }
.boarding-pass-bulk-form strong { font-size: 12px; }
.boarding-pass-bulk-form span { color: var(--muted); font-size: 10px; }
.boarding-pass-bulk-form label { color: var(--muted); font-size: 11px; font-weight: 800; }
.boarding-pass-bulk-form input {
    width: 100px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.boarding-pass-period-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.boarding-pass-period-fields > div { display: grid; gap: 8px; }
.boarding-pass-period-fields label { margin: 0; }
.form-field-guide { margin: -4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

.vehicle-table { min-width: 900px; }
.vehicle-table th:nth-child(2) { width: 24%; }
.vehicle-table th:nth-child(3) { width: 20%; }
.vehicle-table th:nth-child(4) { width: 110px; }
.vehicle-table th:nth-child(5) { width: 100px; }
.vehicle-table th:nth-child(6) { width: 105px; }
.vehicle-table th:nth-child(7) { width: 120px; }

.driver-table { min-width: 800px; }
.driver-table th:nth-child(2) { width: 25%; }
.driver-table th:nth-child(3) { width: 25%; }
.driver-table th:nth-child(4) { width: 120px; }
.driver-table th:nth-child(5) { width: 105px; }
.driver-table th:nth-child(6) { width: 105px; }

.member-approval-table { min-width: 1380px; }
.member-approval-table th:nth-child(1) { width: 145px; }
.member-approval-table th:nth-child(2) { width: 13%; }
.member-approval-table th:nth-child(3) { width: 120px; }
.member-approval-table th:nth-child(4) { width: 100px; }
.member-approval-table th:nth-child(5) { width: 70px; }
.member-approval-table th:nth-child(6) { width: 135px; }
.member-approval-table th:nth-child(7) { width: 90px; }
.member-approval-table th:nth-child(8) { width: 150px; }
.member-approval-table th:nth-child(9) { width: 330px; }
.reservation-table { min-width: 1500px; }
.reservation-table th:nth-child(1) { width: 145px; }
.reservation-table th:nth-child(2) { width: 100px; }
.reservation-table th:nth-child(3) { width: 130px; }
.reservation-table th:nth-child(4) { width: 135px; }
.reservation-table th:nth-child(5) { width: 110px; }
.reservation-table th:nth-child(6) { width: 125px; }
.reservation-table th:nth-child(7) { width: 13%; }
.reservation-table th:nth-child(8) { width: 18%; }
.reservation-table th:nth-child(9) { width: 17%; }
.reservation-table th:nth-child(10) { width: 85px; }

.approval-status {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 850;
}

.approval-status.pending { color: #9a6500; background: #fff3ce; }
.approval-status.approved { color: var(--green); background: var(--green-soft); }
.approval-status.rejected { color: var(--red); background: #fff0ee; }
.approval-review-cell { display: grid; gap: 4px; }
.approval-review-cell small { color: var(--muted); font-size: 10px; }
.approval-actions { display: flex; align-items: center; gap: 7px; }
.approval-actions form { margin: 0; }
.approval-reject-form { display: flex; align-items: center; gap: 5px; }
.approval-reject-form input {
    width: 180px;
    height: 34px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 11px;
}

.existing-member-panel {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-subtle);
}

.existing-member-panel > div:first-child { display: grid; gap: 4px; }
.existing-member-panel > div:first-child strong { font-size: 14px; }
.existing-member-panel > div:first-child span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.existing-member-selection { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.existing-member-panel > .primary-action { justify-self: end; }
.form-section-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; }
.form-section-divider::before,
.form-section-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.table-action.approve { color: var(--green); }

.vehicle-number-cell {
    font-weight: 750;
    letter-spacing: .02em;
}

.operation-route-table { min-width: 1000px; }
.operation-route-table th:nth-child(1) { width: 65px; }
.operation-route-table th:nth-child(2) { width: 16%; }
.operation-route-table th:nth-child(3) { width: 70px; }
.operation-route-table th:nth-child(4) { width: 30%; }
.operation-route-table th:nth-child(5) { width: 80px; }
.operation-route-table th:nth-child(6) { width: 100px; }
.operation-route-table th:nth-child(7) { width: 170px; }

.dispatch-plan-table { min-width: 1500px; }
.dispatch-plan-table th:nth-child(1) { width: 66px; }
.dispatch-plan-table th:nth-child(2) { width: 12%; }
.dispatch-plan-table th:nth-child(3) { width: 15%; }
.dispatch-plan-table th:nth-child(4) { width: 180px; }
.dispatch-plan-table th:nth-child(5) { width: 110px; }
.dispatch-plan-table th:nth-child(6) { width: 125px; }
.dispatch-plan-table th:nth-child(7) { width: 15%; }
.dispatch-plan-table th:nth-child(8) { width: 100px; }
.dispatch-plan-table th:nth-child(9) { width: 90px; }
.dispatch-plan-table th:nth-child(10) { width: 170px; }

.daily-dispatch-table { min-width: 1300px; }
.daily-dispatch-table th:nth-child(1) { width: 110px; }
.daily-dispatch-table th:nth-child(2) { width: 125px; }
.daily-dispatch-table th:nth-child(3) { width: 13%; }
.daily-dispatch-table th:nth-child(4) { width: 18%; }
.daily-dispatch-table th:nth-child(5) { width: 17%; }
.daily-dispatch-table th:nth-child(6) { width: 100px; }
.daily-dispatch-table th:nth-child(7) { width: 80px; }
.daily-dispatch-table th:nth-child(8) { width: 100px; }
.daily-dispatch-table th:nth-child(9) { width: 120px; }

.day-summary {
    color: var(--primary-dark);
    font-weight: 850;
    letter-spacing: .04em;
}

.daily-dispatch-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--line);
}

.daily-dispatch-summary > div {
    display: grid;
    min-height: 92px;
    align-content: center;
    gap: 8px;
    padding: 18px 20px;
    background: var(--surface);
}

.daily-dispatch-summary span { color: var(--muted); font-size: 11px; font-weight: 750; }
.daily-dispatch-summary strong { font-size: 14px; }
.daily-dispatch-summary strong .branch-status { font-size: 9px; }
.daily-dispatch-detail-content .heading-actions form { margin: 0; }
.daily-dispatch-detail-content .heading-actions .table-action {
    min-height: 42px;
    padding: 0 16px;
    font-size: 11px;
}
.daily-assignment-panel { margin-bottom: 20px; }
.daily-stop-schedule {
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}
.daily-stop-schedule .operation-detail-stop-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    max-height: none;
    padding: 10px 18px 18px;
    border-left: 0;
}
.daily-stop-schedule .operation-detail-stop-list li {
    margin: 0 10px;
}
.daily-stop-schedule .daily-stop-schedule-empty {
    grid-template-columns: 1fr;
    color: var(--muted);
}
.daily-change-history { margin-top: 20px; }
.daily-change-table { min-width: 980px; }
.daily-change-table th:nth-child(1) { width: 145px; }
.daily-change-table th:nth-child(2) { width: 25%; }
.daily-change-table th:nth-child(3) { width: 18%; }
.daily-change-table th:nth-child(5) { width: 110px; }


.entity-title-link {
    color: var(--ink);
    font-weight: 850;
    text-decoration: none;
}

.entity-title-link:hover,
.entity-title-link:focus-visible {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.operation-form-content { max-width: none; }

.operation-form-content .breadcrumb { font-size: 13px; }
.operation-form-content .management-form-heading p { font-size: 12px; }
.operation-form-content .management-form-heading > span { font-size: 14px; }
.operation-form-content .management-form label { font-size: 14px; }
.operation-form-content .management-form label em { font-size: 11px; }
.operation-form-content .management-form input,
.operation-form-content .management-form select { font-size: 14px; }
.operation-form-content .primary-action,
.operation-form-content .secondary-action { font-size: 14px; }

.route-endpoint-guide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #d9d2ec;
    border-radius: 11px;
    background: var(--primary-soft);
}

.route-endpoint-guide strong { color: var(--primary-dark); font-size: 14px; }
.route-endpoint-guide span { color: var(--muted); font-size: 12px; text-align: right; }

.route-type-badge {
    display: inline-flex;
    min-width: 42px;
    min-height: 25px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 850;
}

.route-type-badge.to-work { color: #28659a; background: #eaf2fb; }
.route-type-badge.from-work { color: #a05e1e; background: #fff3e5; }
.operation-detail-stop-list li.branch-endpoint { background: var(--green-soft); }

.operation-detail-content { max-width: none; }

.member-detail-content { max-width: none; }

.member-detail-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.member-detail-heading > div:first-child { display: grid; gap: 7px; }
.member-detail-heading p,
.member-detail-panel-heading p {
    margin: 0;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
}
.member-detail-heading h2 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.member-detail-heading > div:first-child > span { color: var(--muted); font-size: 14px; }

.member-detail-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.member-detail-panel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
}

.member-detail-panel-heading > div { display: grid; gap: 6px; }
.member-detail-panel-heading h3 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.member-detail-panel-heading > span { color: var(--muted); font-size: 12px; font-weight: 800; }

.member-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0;
}

.member-detail-grid > div {
    display: grid;
    grid-template-columns: minmax(120px, 32%) minmax(0, 1fr);
    align-items: center;
    min-height: 70px;
    padding: 16px 22px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.member-detail-grid > div:nth-child(even) { border-right: 0; }
.member-detail-grid dt { color: var(--muted); font-size: 13px; font-weight: 800; }
.member-detail-grid dd { margin: 0; overflow-wrap: anywhere; font-size: 15px; font-weight: 800; }

.complaint-detail-content { max-width: none; }
.complaint-detail-panel { margin-bottom: 20px; }
.complaint-body { padding: 24px 22px; }
.complaint-body h3 { margin: 0 0 12px; font-size: 18px; }
.complaint-body p { margin: 0; color: var(--text); font-size: 14px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.complaint-review-panel { max-width: none; }
.complaint-review-panel .management-form { max-width: 880px; }
.complaint-review-panel textarea { min-height: 180px; resize: vertical; line-height: 1.7; }

.operation-detail-content .breadcrumb { font-size: 13px; }
.operation-detail-content .primary-action,
.operation-detail-content .secondary-action { font-size: 14px; }
.operation-detail-content .branch-status { font-size: 11px; }

.operation-detail-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.operation-detail-heading > div:first-child { display: grid; gap: 7px; }
.operation-detail-heading p { margin: 0; color: var(--primary); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.operation-detail-heading h2 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.operation-detail-heading > div:first-child > span { color: var(--muted); font-size: 14px; }

.operation-detail-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.operation-detail-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--line);
}

.operation-detail-summary article {
    display: grid;
    gap: 7px;
    min-height: 88px;
    padding: 18px;
    background: #fff;
}

.operation-detail-summary span { color: var(--muted); font-size: 12px; font-weight: 750; }
.operation-detail-summary strong { overflow-wrap: anywhere; font-size: 15px; }
.operation-detail-summary b { color: var(--primary); font-size: 20px; }

.operation-detail-map-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
}

.operation-detail-map-layout { min-height: 500px; }
.operation-detail-map { min-height: 500px; }

.operation-detail-stop-list {
    max-height: 500px;
    margin: 0;
    padding: 12px 16px;
    overflow-y: auto;
    border-left: 1px solid var(--line);
    list-style: none;
}

.operation-detail-stop-list li {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.operation-detail-stop-list li:last-child { border-bottom: 0; }
.operation-detail-stop-list li > div { display: grid; gap: 5px; }
.operation-detail-stop-list strong { overflow-wrap: anywhere; font-size: 14px; }
.operation-detail-stop-list li > div span { color: var(--muted); font-size: 14px; }

.operation-detail-stop-order {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.route-map-stop-label {
    padding: 5px 8px;
    border: 1px solid rgba(36, 39, 42, .12);
    border-radius: 7px;
    box-shadow: 0 4px 12px rgba(36, 39, 42, .12);
    color: var(--ink);
    background: rgba(255, 255, 255, .96);
    font-size: 10px;
    font-weight: 850;
    white-space: nowrap;
}

.route-map-stop-label.branch-endpoint-label { color: #fff; background: var(--green); }
.operation-detail-content .route-map-stop-label { font-size: 12px; }

.route-map-editor {
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
}

.route-map-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    background: var(--surface-subtle);
}

.route-map-heading div { display: grid; gap: 5px; }
.route-map-heading strong { font-size: 15px; }
.route-map-heading span { color: var(--muted); font-size: 12px; }
.route-stop-count b { color: var(--primary); font-size: 18px; }

.route-recommendation {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto;
    gap: 10px 18px;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
    background: #fffbf5;
}

.route-recommendation > div:first-child { display: grid; gap: 4px; }
.route-recommendation strong { font-size: 14px; }
.route-recommendation span,
.route-recommendation p { color: var(--muted); font-size: 12px; line-height: 1.5; }
.route-recommendation p { grid-column: 1 / -1; margin: 0; color: #9b6127; font-weight: 750; }
.route-recommendation-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.route-recommendation-actions button { min-height: 36px; padding: 0 12px; border: 1px solid #e6d6c4; border-radius: 8px; color: #875725; background: #fff; font-size: 12px; font-weight: 800; cursor: pointer; }
.route-recommendation-actions button:disabled { opacity: .4; cursor: not-allowed; }

.route-map-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, .8fr);
    min-height: 430px;
}

.kakao-map {
    display: grid;
    min-height: 430px;
    place-items: center;
    color: var(--muted);
    background: #e5ebe7;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

.route-stop-list {
    max-height: 430px;
    padding: 12px;
    overflow-y: auto;
    border-left: 1px solid var(--line);
}

.route-stop-empty {
    display: grid;
    min-height: 380px;
    margin: 0;
    place-items: center;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.route-stop-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.route-stop-row > strong {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--primary);
    font-size: 11px;
}

.route-stop-row input {
    min-width: 0;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    font-size: 12px;
}

.route-stop-fields { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 8px; }
.operation-form-content .route-stop-row .route-stop-time {
    min-width: 140px;
    padding-right: 8px;
    font-size: 15px;
}

.route-stop-duration-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
}

.route-stop-duration-control span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.route-stop-duration-control input:read-only {
    color: var(--primary-dark);
    background: var(--primary-soft);
}

.route-stop-row > span { display: flex; gap: 3px; }
.route-stop-row button { padding: 6px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background: #fff; font-size: 11px; cursor: pointer; }
.route-stop-row button:disabled { opacity: .35; cursor: default; }

.entity-name-cell {
    font-weight: 800;
}

.entity-link {
    color: var(--primary-dark);
    font-weight: 850;
    text-decoration: none;
}

.entity-link:hover,
.entity-link:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.entity-detail-cell,
.date-cell {
    color: var(--muted);
}

.branch-status {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 850;
}

.branch-status.active {
    color: var(--green);
    background: var(--green-soft);
}

.branch-status.inactive {
    color: var(--muted);
    background: var(--surface-subtle);
}

.gender-label {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    color: #3e72a8;
    background: #eaf2fb;
    font-size: 9px;
    font-weight: 850;
}

.board-filter {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 14px 24px;
    border-bottom: 1px solid var(--line);
    background: #fcfcfd;
}

.board-filter label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.board-filter select,
.board-filter .temporal-control,
.board-filter .board-filter-keyword,
.board-filter .branch-picker-name {
    min-width: 190px;
    height: 36px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: #ffffff;
    font-size: 11px;
}

.board-filter .board-filter-date {
    min-width: 154px;
}

.board-filter select:focus,
.board-filter .temporal-control:focus,
.board-filter .board-filter-keyword:focus,
.board-filter .branch-picker-name:focus {
    border-color: var(--primary);
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgb(118 88 189 / 10%);
}

.board-filter button {
    height: 36px;
    padding: 0 13px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: #ffffff;
    background: var(--primary);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
}

.board-filter .branch-picker-button {
    border-color: var(--line);
    color: var(--primary);
    background: #ffffff;
}

.board-filter .branch-clear-button {
    border-color: transparent;
    color: var(--muted);
    background: transparent;
}

.weekday-picker {
    display: grid;
    grid-template-columns: repeat(7, minmax(48px, 1fr));
    gap: 8px;
}

.weekday-picker label {
    margin: 0;
    cursor: pointer;
}

.weekday-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.weekday-picker span {
    display: grid;
    min-height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    background: var(--surface-subtle);
    font-size: 13px;
    font-weight: 850;
    transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.weekday-picker input:checked + span {
    border-color: var(--primary);
    color: #ffffff;
    background: var(--primary);
}

.weekday-picker input:focus-visible + span {
    outline: 3px solid rgb(118 88 189 / 18%);
    outline-offset: 2px;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.row-actions form {
    margin: 0;
}

.table-action {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.table-action.edit {
    color: var(--primary);
}

.table-action.copy {
    color: var(--green);
}

.table-action.delete {
    color: var(--red);
}

.management-empty-row td {
    height: 230px;
    color: var(--muted);
    text-align: center;
}

.management-empty-row strong,
.management-empty-row span {
    display: block;
}

.management-empty-row strong {
    color: var(--text);
    font-size: 13px;
}

.management-empty-row span {
    margin-top: 8px;
    font-size: 11px;
}

.board-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
    padding: 14px 24px;
    border-top: 1px solid var(--line);
    background: #fcfcfd;
}

.pagination-summary {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.pagination-summary strong { color: var(--primary); }

.pagination-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pagination-number,
.pagination-direction {
    display: inline-flex;
    min-width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    background: #ffffff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.pagination-number:hover,
.pagination-number:focus-visible,
.pagination-direction:hover,
.pagination-direction:focus-visible {
    border-color: var(--primary);
    color: var(--primary);
    outline: none;
}

.pagination-number.current {
    border-color: var(--primary);
    color: #ffffff;
    background: var(--primary);
}

.pagination-direction.disabled {
    color: #b8b5c0;
    background: var(--surface-subtle);
    cursor: default;
}

.form-page-content {
    max-width: 820px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 11px;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.management-form-panel {
    padding: clamp(24px, 4vw, 42px);
}

.management-form-heading {
    padding-bottom: 25px;
    border-bottom: 1px solid var(--line);
}

.management-form {
    display: grid;
    gap: 10px;
    padding-top: 24px;
}

.management-form label {
    margin-top: 8px;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}

.management-form label em {
    margin-left: 3px;
    color: var(--primary);
    font-size: 9px;
    font-style: normal;
}

.management-form .form-guide {
    margin-top: -3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

.management-form input,
.management-form select {
    width: 100%;
    height: 50px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    background: var(--surface-subtle);
}

.management-form input:focus,
.management-form select:focus {
    border-color: var(--primary);
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgb(118 88 189 / 10%);
}

.temporal-control {
    color-scheme: light;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.temporal-control::-webkit-date-and-time-value {
    min-height: 1.2em;
    text-align: left;
}

.temporal-control::-webkit-datetime-edit {
    padding: 0;
}

.temporal-control::-webkit-calendar-picker-indicator {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 4px;
    border-radius: 6px;
    background-color: var(--primary-soft);
    cursor: pointer;
    opacity: .78;
    transition: background-color .18s ease, opacity .18s ease;
}

.temporal-control:hover::-webkit-calendar-picker-indicator,
.temporal-control:focus::-webkit-calendar-picker-indicator {
    background-color: #e4dcf5;
    opacity: 1;
}

.form-help {
    margin: 0;
    color: var(--red);
    font-size: 10px;
    line-height: 1.5;
}

.branch-picker-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.branch-picker-button {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--primary);
    border-radius: 10px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}

.management-form .branch-picker-name {
    color: var(--text);
    background: #ffffff;
    cursor: default;
}

.layer-open {
    overflow: hidden;
}

.branch-search-layer {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
}

.branch-search-layer[hidden] {
    display: none;
}

.branch-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(20 22 21 / 58%);
    backdrop-filter: blur(3px);
}

.branch-search-dialog {
    position: relative;
    width: min(100%, 560px);
    max-height: min(720px, calc(100vh - 40px));
    overflow: hidden;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 28px 80px rgb(17 15 23 / 28%);
}

.branch-search-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 24px 18px;
    border-bottom: 1px solid var(--line);
}

.branch-search-header p {
    margin: 0 0 5px;
    color: var(--primary);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .11em;
}

.branch-search-header h2 {
    margin: 0;
    font-size: 20px;
    letter-spacing: -.035em;
}

.layer-close-button {
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 9px;
    color: var(--muted);
    background: var(--surface-subtle);
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

.branch-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 20px 24px 8px;
}

.branch-search-form input {
    min-width: 0;
    height: 44px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-subtle);
}

.branch-search-form input:focus {
    border-color: var(--primary);
    outline: none;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgb(118 88 189 / 10%);
}

.branch-search-form button {
    padding: 0 17px;
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    background: var(--primary);
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}

.branch-search-guide {
    margin: 0;
    padding: 0 24px 12px;
    color: var(--muted);
    font-size: 9px;
}

.branch-search-results {
    min-height: 220px;
    max-height: 390px;
    padding: 0 14px 18px;
    overflow-y: auto;
}

.branch-search-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 14px 12px;
    border: 0;
    border-bottom: 1px solid var(--line);
    color: var(--text);
    background: #ffffff;
    text-align: left;
    cursor: pointer;
}

.branch-search-result:hover,
.branch-search-result:focus-visible {
    border-radius: 10px;
    outline: none;
    background: var(--primary-soft);
}

.branch-result-copy {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.branch-result-copy strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.branch-result-copy small {
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.branch-result-status {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
}

.branch-result-status.active {
    color: var(--green);
    background: var(--green-soft);
}

.branch-result-status.inactive {
    color: var(--muted);
    background: var(--surface-subtle);
}

.branch-search-empty {
    display: grid;
    min-height: 210px;
    margin: 0;
    place-items: center;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
    .admin-app {
        grid-template-columns: 200px minmax(0, 1fr);
    }

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

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

    .quick-management-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .alert-empty-state {
        min-height: 190px;
    }
}

@media (max-width: 720px) {
    .admin-app {
        display: block;
    }

    .admin-sidebar {
        position: static;
        height: auto;
        padding: 16px;
    }

    .sidebar-brand {
        padding: 0 4px;
    }

    .sidebar-label {
        display: none;
    }

    .admin-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        margin-top: 15px;
    }

    .admin-nav a {
        justify-content: center;
        gap: 7px;
        min-height: 42px;
        padding: 0 8px;
        color: #ffffff;
        background: rgb(255 255 255 / 7%);
        font-size: 12px;
    }

    .admin-nav a:hover,
    .admin-nav a:focus-visible {
        transform: none;
    }

    .admin-nav svg {
        width: 17px;
    }

    .admin-header {
        min-height: 68px;
        padding: 12px 18px;
    }

    .admin-header-actions { gap: 8px; }
    .header-company { gap: 7px; padding-left: 8px; }
    .header-company span { display: none; }
    .header-company strong { max-width: 120px; }

    .page-eyebrow,
    .user-copy {
        display: none;
    }

    .admin-header h1 {
        font-size: 18px;
    }

    .user-avatar {
        width: 34px;
        height: 34px;
    }

    .dashboard-content {
        width: min(100% - 32px, 620px);
        padding: 30px 0 44px;
    }

    .management-content {
        width: 100%;
        padding: 30px 16px 44px;
    }

    .dashboard-intro {
        align-items: flex-start;
    }

    .live-map-panel,
    .alert-panel,
    .recent-operations {
        padding: 20px;
    }

    .map-canvas {
        min-height: 290px;
    }

    .section-heading p {
        display: none;
    }

    .route-map-layout { grid-template-columns: 1fr; }
    .operation-detail-heading { align-items: stretch; flex-direction: column; }
    .member-detail-heading { align-items: stretch; flex-direction: column; }
    .member-detail-grid { grid-template-columns: 1fr; }
    .member-detail-grid > div { border-right: 0; }
    .route-endpoint-guide { align-items: flex-start; flex-direction: column; }
    .route-endpoint-guide span { text-align: left; }
    .operation-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .operation-detail-map-layout { min-height: 0; }
    .operation-detail-map { min-height: 360px; }
    .operation-detail-stop-list { max-height: 320px; border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 520px) {
    .login-page {
        padding: 18px;
    }

    .login-panel {
        padding: 30px 24px;
        border-radius: 18px;
    }

    .admin-nav a {
        flex-direction: column;
        gap: 3px;
        min-height: 58px;
        font-size: 11px;
    }

    .admin-header {
        align-items: center;
    }

    .admin-user {
        gap: 7px;
    }

    .logout-button {
        padding: 0 10px;
    }

    .header-company strong { max-width: 86px; }
    .header-company a { padding: 7px 8px; }
    .admin-user .user-avatar { display: none; }

    .stat-grid {
        gap: 10px;
    }

    .stat-card {
        min-height: 116px;
        padding: 17px;
    }

    .dashboard-intro {
        margin-bottom: 20px;
    }

    .management-page-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .management-page-heading .primary-action {
        align-self: flex-start;
    }

    .heading-actions { align-items: stretch; flex-direction: column; }
    .heading-actions .primary-action,
    .heading-actions .secondary-action { width: 100%; }
    .company-select-page { padding: 18px 12px; }
    .company-select-panel { padding: 24px 18px; border-radius: 18px; }
    .company-select-heading h1 { font-size: 23px; }
    .company-select-toolbar,
    .company-select-item { align-items: stretch; flex-direction: column; }
    .company-search { flex-wrap: wrap; }
    .company-search input { width: 100%; }
    .company-select-toolbar > .primary-action { width: 100%; }
    .company-select-actions { flex-wrap: wrap; }
    .company-feature-item { align-items: flex-start; }
    .company-feature-copy small { font-size: 11px; }
    .company-feature-actions > * { flex: 1; justify-content: center; }

    .board-filter {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .board-pagination {
        align-items: stretch;
        flex-direction: column;
        padding: 16px;
    }

    .pagination-summary { text-align: center; }
    .pagination-links { flex-wrap: wrap; }

    .board-filter label {
        align-self: center;
    }

    .branch-search-dialog {
        max-height: calc(100vh - 24px);
    }

    .branch-search-header,
    .branch-search-form {
        padding-right: 18px;
        padding-left: 18px;
    }

    .branch-search-guide {
        padding-left: 18px;
    }

    .branch-picker-control {
        grid-template-columns: 1fr;
    }

    .existing-member-selection { grid-template-columns: 1fr; }
    .existing-member-panel > .primary-action { width: 100%; justify-content: center; }
    .boarding-pass-bulk-form { align-items: stretch; flex-direction: column; }
    .boarding-pass-bulk-form > div { margin-right: 0; }
    .boarding-pass-bulk-form input,
    .boarding-pass-bulk-form .primary-action { width: 100%; }
    .boarding-pass-period-fields { grid-template-columns: 1fr; }

    .operation-detail-summary { grid-template-columns: 1fr; }
    .member-detail-panel-heading { align-items: flex-start; flex-direction: column; }
    .member-detail-grid > div { grid-template-columns: 1fr; gap: 6px; }
    .daily-dispatch-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .route-recommendation { grid-template-columns: 1fr; }
    .route-recommendation p { grid-column: 1; }
    .route-recommendation-actions { justify-content: flex-start; }
    .route-stop-fields { grid-template-columns: 1fr; }
    .weekday-picker { grid-template-columns: repeat(4, minmax(48px, 1fr)); }
    .daily-dispatch-summary { grid-template-columns: 1fr; }
    .operation-form-content .route-stop-row .route-stop-time { min-width: 0; }
    .route-stop-list { max-height: 300px; border-top: 1px solid var(--line); border-left: 0; }
    .route-stop-empty { min-height: 180px; }

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

    .quick-management-card {
        min-height: 80px;
    }

    .operation-table {
        min-width: 520px;
    }

    .map-empty-state {
        width: calc(100% - 28px);
        padding: 18px 15px;
    }
}
