/* ===================== 加班费计算器 ===================== */

.btn-block { width: 100%; margin-top: 8px; }

.ot-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.ot-title { font-size: 20px; font-weight: 800; margin: 0; }
.ot-download-btn { flex-shrink: 0; margin: 0; }

.ot-layout { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
.ot-card {
    background: var(--c-surface, #fff);
    border: 1px solid var(--c-border, #e2e8f0);
    border-radius: 16px;
    padding: 22px;
}
.ot-block-title { font-size: 15px; font-weight: 800; color: var(--c-text, #0f172a); margin: 0 0 14px; }

.ot-field { margin-bottom: 16px; }
.ot-field > label { display: block; font-size: 13px; font-weight: 700; color: var(--c-text-sub, #334155); margin-bottom: 7px; }
.ot-field .rate { font-size: 11px; font-weight: 800; color: #fff; background: #f97316; border-radius: 99px; padding: 1px 7px; margin-left: 6px; }
.ot-field .rate.r2 { background: #2563eb; }
.ot-field .rate.r3 { background: #dc2626; }
.ot-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--c-border, #e2e8f0);
    border-radius: 10px;
    background: var(--c-surface, #fff);
    color: var(--c-text, #0f172a);
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ot-input:focus { border-color: var(--c-primary, #0066ff); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary, #0066ff) 15%, transparent); }
.ot-help { font-size: 12px; color: var(--c-text-muted, #94a3b8); margin: 6px 0 0; line-height: 1.7; }

.ot-radios { display: flex; gap: 10px; }
.ot-radio { position: relative; }
.ot-radio input { position: absolute; opacity: 0; pointer-events: none; }
.ot-radio span {
    display: inline-block;
    padding: 9px 16px;
    border: 1px solid var(--c-border, #e2e8f0);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--c-text-sub, #334155);
    cursor: pointer;
    background: var(--c-surface, #fff);
    transition: all .15s;
}
.ot-radio input:checked + span { border-color: #10b981; background: #ecfdf5; color: #047857; }

.ot-result-empty { text-align: center; padding: 60px 20px; color: var(--c-text-muted, #94a3b8); }
.ot-result-empty .emoji { font-size: 40px; margin-bottom: 10px; }
.ot-result-empty p { font-size: 14px; margin: 0; }

.ot-total {
    text-align: center;
    padding: 18px;
    border-radius: 14px;
    background: color-mix(in srgb, #f97316 10%, var(--c-surface, #fff));
    border: 1px solid color-mix(in srgb, #f97316 30%, var(--c-border, #e2e8f0));
    margin-bottom: 16px;
}
.ot-total .k { font-size: 12px; color: var(--c-text-muted, #64748b); }
.ot-total .v { font-size: 32px; font-weight: 900; color: #ea580c; font-variant-numeric: tabular-nums; display: block; margin-top: 4px; }
.ot-total .u { font-size: 12px; color: var(--c-text-muted, #94a3b8); }

.ot-base-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.ot-base-item { padding: 12px; background: var(--c-surface-soft, #f8fafc); border-radius: 10px; text-align: center; }
.ot-base-item .k { display: block; font-size: 11px; color: var(--c-text-muted, #64748b); }
.ot-base-item .v { display: block; font-size: 17px; font-weight: 800; color: var(--c-text, #0f172a); margin-top: 4px; font-variant-numeric: tabular-nums; }

.ot-sub-title { font-size: 14px; font-weight: 800; color: var(--c-text, #0f172a); margin: 18px 0 10px; }
.ot-table-wrap { overflow-x: auto; border: 1px solid var(--c-border, #e2e8f0); border-radius: 10px; }
.ot-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 420px; }
.ot-table th, .ot-table td { padding: 9px 12px; text-align: right; border-bottom: 1px solid var(--c-border, #e2e8f0); }
.ot-table th { background: var(--c-surface-soft, #f8fafc); font-weight: 800; color: var(--c-text-sub, #334155); font-size: 12px; }
.ot-table th:first-child, .ot-table td:first-child { text-align: left; }
.ot-table tr:last-child td { border-bottom: none; }
.ot-table td { color: var(--c-text-sub, #334155); font-variant-numeric: tabular-nums; }
.ot-table tr.sum td { font-weight: 800; color: #ea580c; }

.ot-note { font-size: 12px; color: var(--c-text-muted, #94a3b8); line-height: 1.8; margin-top: 14px; }

/* ---- 加班费构成可视化 ---- */
.ot-bars { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ot-bar-row { display: grid; grid-template-columns: 112px 1fr 96px; align-items: center; gap: 10px; }
.ot-bar-label { font-size: 12px; font-weight: 700; }
.ot-bar-label.r1 { color: #ea580c; }
.ot-bar-label.r2 { color: #2563eb; }
.ot-bar-label.r3 { color: #dc2626; }
.ot-bar { height: 14px; border-radius: 99px; background: var(--c-surface-soft, #f1f5f9); overflow: hidden; }
.ot-bar > span { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .45s ease; }
.ot-bar-row.r1 .ot-bar > span { background: linear-gradient(90deg, #f97316, #fb923c); }
.ot-bar-row.r2 .ot-bar > span { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.ot-bar-row.r3 .ot-bar > span { background: linear-gradient(90deg, #dc2626, #f87171); }
.ot-bar-val { text-align: right; font-size: 12px; font-weight: 800; color: var(--c-text, #0f172a); font-variant-numeric: tabular-nums; }

/* ---- 调休 vs 加班费 ---- */
.ot-vs { margin-top: 16px; border: 1px dashed var(--c-border, #e2e8f0); border-radius: 12px; padding: 14px 16px; }
.ot-vs-title { font-size: 13px; font-weight: 800; color: var(--c-text, #0f172a); margin-bottom: 6px; }
.ot-vs-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--c-text-sub, #334155); padding: 5px 0; }
.ot-vs-row .v { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--c-text, #0f172a); }
.ot-vs-hint { font-size: 12px; line-height: 1.75; color: var(--c-text-muted, #94a3b8); margin-top: 8px; }

/* ---- 暗色模式补全 ---- */
[data-theme="dark"] .ot-radio input:checked + span { background: color-mix(in srgb, #10b981 18%, #131c31); color: #34d399; }
[data-theme="dark"] .ot-table tr.sum td { color: #fb923c; }
[data-theme="dark"] .ot-total .v { color: #fb923c; }
[data-theme="dark"] .ot-bar { background: #1e293b; }

@media (max-width: 900px) { .ot-layout { grid-template-columns: 1fr; } }
