.events-summary {
    margin-top: 16px;
}

.events-summary .card-head {
    gap: 14px;
}

.events-summary .export {
    white-space: nowrap;
}

.event-list {
    display: grid;
    gap: 0;
}

.event-row {
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 10px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.event-row:last-child {
    border-bottom: 0;
}

.event-row .status {
    margin: 5px 0 0;
}

.event-row span:not(.status) {
    display: grid;
    gap: 3px;
}

.event-row small {
    color: #8790a3;
}

.settings-form {
    display: grid;
    gap: 18px;
}

.settings-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.settings-card {
    display: grid;
    gap: 13px;
}

.settings-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 4px;
}

.settings-card-head h2,
.schedule-section-head h2,
.day-card-head h3 {
    margin: 0;
}

.settings-card-head small,
.day-card-head small {
    display: block;
    margin: 4px 0 0;
    color: #8790a3;
}

.settings-card-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 12px;
    background: #eef3ff;
    color: var(--blue);
    font-size: 1.1rem;
    font-weight: 700;
}

.settings-card label,
.time-range-grid label {
    display: grid;
    gap: 7px;
    font-size: .85rem;
}

.settings-card input,
.time-range-grid input {
    width: 100%;
    height: 44px;
    border: 1px solid #d8dfeb;
    border-radius: 10px;
    padding: 0 12px;
    background: #fff;
    color: #1c2940;
    transition: border-color .2s, box-shadow .2s;
}

.settings-card input:focus,
.time-range-grid input:focus {
    border-color: #8ba9df;
    outline: 0;
    box-shadow: 0 0 0 3px #e9f0fc;
}

.settings-inline-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.trading-schedule-panel {
    display: grid;
    gap: 20px;
    overflow: hidden;
    border: 1px solid #dce5f5;
    background: linear-gradient(145deg, #fff 0%, #f8faff 100%);
}

.schedule-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.schedule-section-head p {
    margin: 6px 0 0;
    color: #6f7a90;
}

.section-kicker {
    display: inline-block;
    margin-bottom: 7px;
    border-radius: 999px;
    padding: 4px 10px;
    background: #edf3ff;
    color: var(--blue);
    font-size: .73rem;
    font-weight: 700;
}

.master-switch {
    display: flex;
    min-width: 270px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #dbe5f5;
    border-radius: 14px;
    padding: 13px 15px;
    background: #fff;
    box-shadow: 0 8px 24px #284b8610;
    cursor: pointer;
}

.master-switch > span:first-child {
    display: grid;
    gap: 3px;
}

.master-switch small {
    color: #8790a3;
}

.toggle-control {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    cursor: pointer;
}

.toggle-control input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.toggle-track {
    position: relative;
    display: block;
    width: 48px;
    height: 27px;
    border-radius: 999px;
    background: #cbd3df;
    transition: background .2s, box-shadow .2s;
}

.toggle-track::after {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px #17233a30;
    content: "";
    transition: transform .2s;
}

.toggle-control input:checked + .toggle-track {
    background: var(--green);
}

.toggle-control input:checked + .toggle-track::after {
    transform: translateX(-21px);
}

.toggle-control input:focus-visible + .toggle-track {
    box-shadow: 0 0 0 4px #dfe9fb;
}

.day-schedule-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
    transition: opacity .2s;
}

.trading-schedule-panel:has(.master-switch input:not(:checked)) .day-schedule-grid {
    opacity: .58;
}

.day-schedule-card {
    display: grid;
    gap: 15px;
    border: 1px solid #e0e6ef;
    border-top: 3px solid #8299bb;
    border-radius: 14px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 8px 25px #1c35500c;
}

.regular-day-card {
    border-top-color: var(--green);
}

.thursday-card {
    border-top-color: var(--blue);
}

.friday-card {
    border-top-color: var(--gold);
}

.day-card-head {
    display: flex;
    min-height: 72px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.day-badge {
    display: inline-block;
    margin-bottom: 8px;
    border-radius: 7px;
    padding: 3px 8px;
    background: #f1f4f8;
    color: #536178;
    font-size: .7rem;
    font-weight: 700;
}

.time-range-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.time-range-grid label span {
    color: #59657a;
}

.holiday-policy-note {
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid #f0dfad;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fffaf0;
    color: #6c5621;
}

.holiday-policy-note > span {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 50%;
    background: #f4d77f;
    color: #4f3b08;
    font-weight: 800;
}

.holiday-policy-note p,
.settings-save-bar p {
    margin: 0;
}

.settings-save-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid #dce4ef;
    border-radius: 13px;
    padding: 13px 16px;
    background: #fff;
}

.settings-save-bar p {
    color: #6f7a90;
    font-size: .82rem;
}

.settings-save-bar .primary {
    min-width: 160px;
}

.read-only-badge {
    display: inline-flex;
    min-width: 110px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d8deea;
    border-radius: 12px;
    background: #f5f7fb;
    color: #68758b;
    font-weight: 700;
}

.holiday-panel {
    grid-column: 1 / -1;
}

.holiday-panel .card-head {
    gap: 16px;
}

.holiday-panel .card-head small {
    color: #8790a3;
}

.holiday-import-form {
    flex: 0 0 auto;
}

.holiday-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    margin-top: 16px;
}

.holiday-form label,
.holiday-edit-form label {
    display: grid;
    gap: 7px;
    font-size: .85rem;
}

.holiday-form input,
.holiday-edit-form input {
    width: 100%;
    height: 42px;
    border: 1px solid #dbe0e8;
    border-radius: 7px;
    padding: 0 10px;
    background: #fff;
}

.holiday-form .primary {
    height: 42px;
    white-space: nowrap;
}

.holiday-list {
    display: grid;
    gap: 0;
    margin-top: 16px;
    border-top: 1px solid var(--line);
}

.holiday-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.holiday-edit-form {
    display: grid;
    grid-template-columns: minmax(145px, .35fr) minmax(220px, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.holiday-summary {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.holiday-row small {
    color: #8790a3;
}

.secondary-button,
.danger-button {
    min-height: 42px;
    border-radius: 7px;
    padding: 8px 14px;
    cursor: pointer;
    white-space: nowrap;
}

.user-unlock-form {
    display: inline-flex;
    margin: 0;
}

.user-unlock-form .secondary-button {
    white-space: nowrap;
}

.secondary-button {
    border: 1px solid #cbd8ef;
    background: #f4f7fd;
    color: var(--blue);
}

.danger-button {
    border: 1px solid #f1c5cb;
    background: #fff5f6;
    color: var(--red);
}

.notice.success {
    background: #e8faf4;
    border-color: #b9eddc;
    color: #087a59;
}

@media (max-width: 900px) {
    .settings-summary-grid,
    .day-schedule-grid {
        grid-template-columns: 1fr;
    }

    .schedule-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .master-switch {
        min-width: 0;
    }

    .holiday-edit-form {
        grid-template-columns: 1fr 1fr;
    }

    .holiday-edit-form .secondary-button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .events-summary .card-head,
    .holiday-panel .card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .holiday-form,
    .holiday-edit-form,
    .holiday-row {
        grid-template-columns: 1fr;
    }

    .settings-inline-fields,
    .time-range-grid {
        grid-template-columns: 1fr;
    }

    .settings-save-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .settings-save-bar .primary {
        width: 100%;
    }

    .holiday-import-form,
    .holiday-import-form .secondary-button,
    .holiday-delete-form,
    .holiday-delete-form .danger-button {
        width: 100%;
    }

    .holiday-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }
}

.bank-card-list { display: grid; gap: 8px; }
.bank-card-row, .settlement-card { display: inline-flex; align-items: center; gap: 10px; }
.bank-card-row { margin: 0; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 10px; }
.bank-card-row img, .settlement-card img { flex: 0 0 auto; object-fit: contain; }
.bank-card-row small { margin-right: auto; color: #7a7f87; }
.settlement-card span { white-space: nowrap; }
.table-empty { padding: 28px 16px; text-align: center; color: #777; }

.price-chart-card {
    padding: 24px;
    border: 0;
    border-radius: 22px;
    background: #f3f4f6;
    transition: opacity .18s ease;
}

.price-chart-card.is-loading {
    opacity: .55;
    cursor: progress;
}

.price-chart-error {
    margin: 16px 0 0;
    color: #c4323d;
    font-size: .78rem;
    text-align: center;
}

.price-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.price-chart-current {
    display: grid;
    gap: 5px;
    min-width: 180px;
}

.price-chart-current > span {
    color: #8f939a;
    font-size: .84rem;
}

.price-chart-current strong {
    color: #25262a;
    font-size: 1.35rem;
    white-space: nowrap;
}

.price-chart-current small,
.price-chart-summary small {
    color: #8f9399;
    font-size: .72rem;
    font-weight: 500;
}

.price-chart-ranges {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
}

.price-chart-ranges a {
    display: grid;
    min-height: 44px;
    padding: 0 18px;
    place-items: center;
    border-radius: 24px;
    background: #fff;
    color: #92959c;
    font-size: .78rem;
    white-space: nowrap;
}

.price-chart-ranges a.is-active {
    background: #242424;
    color: #fff;
    font-weight: 800;
}

.price-chart-plot {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    min-height: 300px;
    margin: 32px 0 22px;
    direction: ltr;
}

.price-chart-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px 0 16px;
    color: #8d929a;
    font-size: .72rem;
}

.chart.price-chart-card .price-chart-plot svg {
    width: 100%;
    height: 300px;
    overflow: visible;
}

.price-chart-line {
    fill: none;
    stroke: #d1a82f;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.8;
    vector-effect: non-scaling-stroke;
}

.price-chart-area {
    stroke: none;
}

.price-chart-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 17px 10px;
    border-radius: 17px;
    background: #fff;
}

.price-chart-summary > div {
    display: grid;
    justify-items: center;
    gap: 9px;
    min-width: 0;
    padding: 0 8px;
    text-align: center;
}

.price-chart-summary > div + div {
    border-right: 1px solid #eceef1;
}

.price-chart-summary span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #8b8f96;
    font-size: .78rem;
    white-space: nowrap;
}

.price-chart-summary strong {
    color: #25262a;
    font-size: .83rem;
    white-space: nowrap;
}

.price-chart-stat-icon {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    font-size: 1.1rem;
    font-style: normal;
    font-weight: 800;
}

.price-chart-stat-icon.is-high {
    background: #d9faec;
    color: #12b878;
}

.price-chart-stat-icon.is-low {
    background: #ffe8e9;
    color: #ed3e49;
}

.price-chart-stat-icon.is-change {
    background: #e7f2ff;
    color: #2386d8;
}

.price-chart-summary strong.positive {
    color: #13976c;
}

.price-chart-summary strong.negative {
    color: #df3945;
}

@media (prefers-reduced-motion: reduce) {
    .price-chart-card { transition: none; }
}

@media (max-width: 900px) {
    .price-chart-header {
        flex-wrap: wrap;
    }

    .price-chart-ranges {
        flex: 1 1 100%;
    }
}

@media (max-width: 560px) {
    .price-chart-card {
        padding: 18px 14px;
    }

    .price-chart-ranges a {
        min-width: 0;
        flex: 1;
        padding-inline: 8px;
    }

    .price-chart-summary {
        padding-inline: 3px;
    }

    .price-chart-summary span {
        gap: 3px;
        font-size: .66rem;
    }

    .price-chart-stat-icon {
        width: 24px;
        height: 24px;
    }

    .price-chart-summary strong {
        font-size: .68rem;
    }
}
