.panel {
    background: var(--white);
    border: 1px solid var(--g-200);
    border-radius: 10px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--g-150);
}

.panel-head h2 {
    font-size: 14px;
    font-weight: 600;
}

.panel-head .count {
    color: var(--g-400);
    font-weight: 500;
    margin-left: 6px;
    font-variant-numeric: tabular-nums;
}

.panel-body {
    padding: 18px;
}

.panel-foot {
    padding: 12px 18px;
    border-top: 1px solid var(--g-150);
}

.rows > * {
    border-bottom: 1px solid var(--g-150);
}

.rows > :last-child {
    border-bottom: 0;
}

.row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 18px;
    min-height: 54px;
}

.row.clickable {
    cursor: pointer;
    transition: background-color 0.1s;
}

.row.clickable:hover {
    background: var(--g-25);
}

.row-main {
    flex: 1;
    min-width: 0;
}

.row-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-sub {
    font-size: 12.5px;
    color: var(--g-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-time {
    flex: none;
    width: 54px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 13px;
}

.row-time small {
    display: block;
    font-weight: 450;
    color: var(--g-500);
    font-size: 11.5px;
}

.empty {
    padding: 22px 18px;
    color: var(--g-500);
    font-size: 13.5px;
}

.empty .btn {
    margin-top: 12px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--g-600);
    white-space: nowrap;
}

.status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    flex: none;
}

.status.confirmed {
    color: var(--ok);
}

.status.pending {
    color: var(--warn);
}

.status.done,
.status.cancelled,
.status.declined {
    color: var(--g-500);
}

.status.no_show {
    color: var(--bad);
}

.label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 7px;
    border: 1px solid var(--g-200);
    border-radius: var(--r-sm);
    font-size: 12px;
    font-weight: 500;
    color: var(--g-600);
    background: var(--white);
    white-space: nowrap;
}

.label svg {
    width: 12px;
    height: 12px;
}

.notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--g-200);
    border-left: 3px solid var(--ink);
    border-radius: var(--r-sm);
    background: var(--g-25);
    font-size: 14px;
}

.notice.warn {
    border-left-color: var(--warn);
    background: var(--warn-soft);
    border-color: #f3dfb5;
}

.notice .notice-body {
    flex: 1;
    min-width: 0;
}

.notice strong {
    font-weight: 600;
}

.seg {
    display: inline-flex;
    padding: 2px;
    gap: 2px;
    border: 1px solid var(--g-300);
    border-radius: var(--r);
    background: var(--white);
}

.seg button {
    height: 30px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: transparent;
    font-size: 13px;
    font-weight: 550;
    color: var(--g-600);
}

.seg button:hover {
    color: var(--ink);
}

.seg button[aria-pressed='true'] {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--white);
}

.journey {
    display: inline-flex;
    align-items: center;
    gap: 0;
    font-size: 12px;
    color: var(--g-400);
}

.journey .step {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.journey .step::before {
    content: '';
    width: 9px;
    height: 9px;
    border: 1.5px solid var(--g-300);
    border-radius: 2px;
    background: var(--white);
}

.journey .step.on {
    color: var(--g-800);
    font-weight: 550;
}

.journey .step.on::before {
    background: var(--ink);
    border-color: var(--ink);
}

.journey .link {
    width: 14px;
    height: 1.5px;
    margin: 0 6px;
    background: var(--g-200);
}

.journey .link.on {
    background: var(--ink);
}

.journey-note {
    font-size: 12px;
    color: var(--g-500);
}

.journey-note.bad {
    color: var(--bad);
}

.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(11, 11, 13, 0.28);
    opacity: 0;
    transition: opacity 0.18s var(--ease);
}

.sheet-backdrop.open {
    opacity: 1;
}

.sheet {
    position: fixed;
    z-index: 61;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(480px, 100%);
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-left: 1px solid var(--g-200);
    box-shadow: -8px 0 40px rgba(11, 11, 13, 0.08);
    transform: translateX(24px);
    opacity: 0;
    transition: transform 0.22s var(--ease), opacity 0.18s var(--ease);
}

.sheet.open {
    transform: none;
    opacity: 1;
}

.sheet-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 60px;
    padding: 12px 12px 12px 24px;
    border-bottom: 1px solid var(--g-200);
}

.sheet-head h2 {
    flex: 1;
    font-family: var(--display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px 24px;
    overscroll-behavior: contain;
}

.sheet-foot {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--g-200);
    background: var(--white);
}

.sheet-foot .spacer {
    flex: 1;
}

.sheet-handle {
    display: none;
}

@media (max-width: 720px) {
    .sheet {
        top: auto;
        left: 0;
        width: 100%;
        max-height: 92vh;
        max-height: 92dvh;
        border-left: 0;
        border-top: 1px solid var(--g-200);
        border-radius: var(--r-xl) var(--r-xl) 0 0;
        transform: translateY(32px);
    }

    .sheet-handle {
        display: block;
        width: 36px;
        height: 4px;
        margin: 8px auto 0;
        border-radius: 2px;
        background: var(--g-300);
    }

    .sheet-head {
        min-height: 52px;
        padding: 6px 8px 10px 20px;
    }

    .sheet-body {
        padding: 16px 20px;
    }

    .sheet-foot {
        padding-left: 20px;
        padding-right: 20px;
    }

    .sheet-foot .btn {
        flex: 1;
    }

    .sheet-foot .spacer {
        display: none;
    }
}

.dialog {
    position: fixed;
    z-index: 71;
    left: 50%;
    top: 50%;
    width: min(400px, calc(100% - 32px));
    transform: translate(-50%, -46%);
    opacity: 0;
    background: var(--white);
    border: 1px solid var(--g-200);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    padding: 22px;
    transition: transform 0.18s var(--ease), opacity 0.15s;
}

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

.dialog h2 {
    font-family: var(--display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.dialog p {
    color: var(--g-600);
    font-size: 14px;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.dialog-backdrop {
    z-index: 70;
}

.toast-host {
    position: fixed;
    z-index: 90;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    display: grid;
    gap: 8px;
    justify-items: center;
    pointer-events: none;
    width: max-content;
    max-width: calc(100% - 32px);
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--r);
    background: var(--ink);
    color: var(--white);
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.18s, transform 0.18s var(--ease);
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: none;
}

.toast svg {
    color: #8fd9b0;
}

.dl {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 10px 16px;
    font-size: 14px;
}

.dl dt {
    color: var(--g-500);
}

.dl dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.code-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--g-300);
    border-radius: var(--r);
    background: var(--white);
}

.code-box code {
    flex: 1;
    min-width: 0;
    font-family: var(--mono);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--g-200);
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.loading {
    display: grid;
    place-items: center;
    padding: 48px 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--g-500);
    padding: 9px 16px;
    border-bottom: 1px solid var(--g-150);
    background: var(--g-25);
    white-space: nowrap;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--g-200);
    vertical-align: middle;
}

.table tr.clickable {
    cursor: pointer;
}

.bubble {
    position: relative;
    max-width: 290px;
    padding: 10px 12px;
    border-radius: 16px 16px 16px 4px;
    background: var(--g-100);
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.bubble a {
    color: #1d5fd1;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

.row-sub strong {
    color: var(--ink);
    font-weight: 600;
}

.tag-vm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--g-600);
    white-space: nowrap;
}

.tag-vm svg {
    flex: none;
}
