/* Issues-DayCloseRedesign-001 (owner 2026-10-12): one-screen End of Day Close. Standalone light theme,
   same tokens as the rest of the POS back-office pages. Earlier layout: Issues-PosDayClose-001. */

* { box-sizing: border-box; }

body.dc-body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f1f5f9;
    color: #0f172a;
}

.dc-shell { min-height: 100vh; display: flex; flex-direction: column; }

.dc-topbar {
    display: flex; align-items: center; gap: 24px; padding: 12px 24px;
    background: #ffffff; border-bottom: 1px solid #e2e8f0;
}
.dc-brand { font-weight: 800; letter-spacing: 0.5px; font-size: 15px; }
.dc-topnav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.dc-topnav a { color: #64748b; text-decoration: none; font-size: 14px; font-weight: 600; padding: 6px 2px; }
.dc-topnav a.active { color: #0891b2; border-bottom: 2px solid #0891b2; }
.dc-top-right { display: flex; align-items: center; gap: 12px; }
.cashier-name { font-size: 13px; color: #475569; }
.dc-logout { background: transparent; border: 1px solid #cbd5e1; border-radius: 6px; padding: 6px 12px; font-size: 13px; cursor: pointer; color: #334155; }

.dc-restricted { max-width: 480px; margin: 80px auto; text-align: center; padding: 24px; }

.dc-main { padding: 16px 24px 40px; max-width: 1440px; margin: 0 auto; width: 100%; }

.dc-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.dc-title-row h1 { margin: 0; font-size: 26px; font-weight: 800; }
.dc-date { margin: 2px 0 0; color: #64748b; font-size: 13px; }
.dc-title-right { display: flex; align-items: center; gap: 10px; }

.dc-pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; }
.dc-pill-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dc-pill.ready { background: #dcfce7; color: #15803d; }
.dc-pill.closed { background: #dbeafe; color: #1d4ed8; }
.dc-pill.loading { background: #e2e8f0; color: #475569; }

.dc-btn { border-radius: 8px; padding: 9px 16px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.dc-btn.primary { background: #0891b2; color: #fff; }
.dc-btn.primary:disabled { background: #cbd5e1; color: #fff; cursor: not-allowed; }
.dc-btn.secondary { background: #fff; border-color: #cbd5e1; color: #334155; }
.dc-btn.outline { background: #fff; border-color: #0891b2; color: #0891b2; }
.dc-btn.tiny { padding: 4px 10px; font-size: 12px; background: #fff; border-color: #cbd5e1; }

/* KPI tiles */
.dc-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.dc-kpi { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 16px; text-decoration: none; color: inherit; }
.dc-kpi:hover { border-color: #0891b2; }
.dc-kpi-icon { width: 46px; height: 46px; border-radius: 10px; background: #e0f2fe; color: #0369a1; display: flex; align-items: center; justify-content: center; font-size: 22px; flex: 0 0 46px; }
.dc-kpi-label { font-size: 11px; color: #64748b; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
.dc-kpi-value { font-size: 24px; font-weight: 800; line-height: 1.15; }
.dc-kpi-sub { font-size: 12px; color: #64748b; margin-top: 2px; }
.dc-kpi.na .dc-kpi-value { color: #94a3b8; }

.dc-row { display: grid; gap: 12px; margin-bottom: 12px; }
.dc-row-2-1 { grid-template-columns: 1.5fr 1fr; }
.dc-row-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 1100px) {
    .dc-kpis { grid-template-columns: repeat(2, 1fr); }
    .dc-row-2-1, .dc-row-3 { grid-template-columns: 1fr; }
}

.dc-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 18px; }
.dc-card h3 { margin: 0 0 12px; font-size: 15px; }
.dc-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.dc-card-head h3 { margin: 0; }
.dc-subtle-right { font-size: 13px; color: #64748b; }
.dc-subtle-right strong { color: #0f172a; }

/* Revenue categories */
.dc-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-bottom: 1px solid #e2e8f0; padding-bottom: 12px; margin-bottom: 10px; }
.dc-cat { padding: 4px 12px 0 0; border-right: 1px solid #f1f5f9; margin-right: 12px; min-width: 0; }
.dc-cat:last-child { border-right: none; margin-right: 0; }
.dc-cat-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #334155; font-weight: 500; }
.dc-cat-icon { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex: 0 0 28px; }
.dc-cat-amount { font-size: 20px; font-weight: 800; margin: 6px 0 0; }
.dc-cat-pct { font-size: 12px; font-weight: 600; margin-top: 2px; }
.dc-cat-bar { height: 6px; border-radius: 3px; background: #e2e8f0; margin-top: 8px; overflow: hidden; }
.dc-cat-bar span { display: block; height: 100%; border-radius: 3px; }
@media (max-width: 900px) { .dc-cats { grid-template-columns: repeat(2, 1fr); } }

.dc-ministats { display: flex; gap: 18px; flex-wrap: wrap; }
.dc-mini { display: flex; align-items: center; gap: 10px; flex: 1 1 120px; }
.dc-mini-icon { width: 34px; height: 34px; border: 1px solid #e2e8f0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; color: #475569; }
.dc-mini-label { font-size: 12px; color: #64748b; }
.dc-mini-value { font-size: 15px; font-weight: 700; }
.dc-mini-value.neg { color: #b91c1c; }

/* Operations */
.dc-ops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dc-op { border-radius: 10px; padding: 14px 10px; text-align: center; cursor: pointer; border: 1px solid transparent; background: #f8fafc; }
.dc-op:hover, .dc-op.open { border-color: #0891b2; }
.dc-op.blue { background: #e0f2fe; } .dc-op.amber { background: #fef3c7; } .dc-op.red { background: #fee2e2; }
.dc-op-icon { font-size: 18px; }
.dc-op-label { font-size: 13px; color: #334155; margin-top: 4px; }
.dc-op-value { font-size: 26px; font-weight: 800; margin-top: 2px; }
.dc-op.red .dc-op-value { color: #b91c1c; }
.dc-linkbtn { display: block; margin-top: 12px; border: 1px solid #0891b2; color: #0891b2; border-radius: 8px; padding: 9px; text-align: center; font-size: 13px; font-weight: 700; text-decoration: none; }
.dc-linkbtn:hover { background: #ecfeff; }
.dc-detail { margin-top: 12px; max-height: 220px; overflow: auto; border-top: 1px solid #e2e8f0; padding-top: 8px; }

.dc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dc-table th { text-align: left; color: #94a3b8; font-weight: 600; font-size: 11px; text-transform: uppercase; padding: 4px 6px; border-bottom: 1px solid #e2e8f0; }
.dc-table td { padding: 7px 6px; border-bottom: 1px solid #f1f5f9; }
.dc-empty { color: #94a3b8; font-size: 13px; padding: 8px 2px; }

.dc-status { padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.dc-status.ok { background: #dcfce7; color: #15803d; }
.dc-status.warn { background: #fef3c7; color: #92400e; }
.dc-status.late { background: #fee2e2; color: #b91c1c; }

/* Line lists (payments, guest activity) */
.dc-linelist { display: flex; flex-direction: column; font-size: 13px; }
.dc-line { display: grid; grid-template-columns: 24px 1fr auto auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.dc-line:last-child { border-bottom: none; }
.dc-line .dc-line-icon { color: #0891b2; font-size: 15px; text-align: center; }
.dc-line .dc-line-amt { font-weight: 600; min-width: 80px; text-align: right; }
.dc-line .dc-line-pct { color: #64748b; min-width: 46px; text-align: right; font-size: 12px; }
.dc-line.muted { color: #94a3b8; }
.dc-line.muted .dc-line-icon { color: #94a3b8; text-decoration: line-through; }
.dc-line.muted .dc-line-amt { font-weight: 500; }
.dc-line.na .dc-line-amt { color: #94a3b8; font-weight: 500; }
.dc-line a { color: inherit; text-decoration: none; }
.dc-line a:hover { color: #0891b2; }

/* Checklist */
.dc-checklist { display: flex; flex-direction: column; gap: 10px; }
.dc-check-row { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; }
.dc-check-row input { width: 18px; height: 18px; accent-color: #0891b2; }
.dc-check-row .dc-check-hint { color: #94a3b8; font-size: 12px; margin-left: auto; }
.dc-check-row .dc-check-hint.bad { color: #b91c1c; font-weight: 600; }

/* Tips breakdown (POS-TIPS-001 kept): opens under the ministats */
.dc-mini.clickable { cursor: pointer; border-radius: 8px; }
.dc-mini.clickable:hover, .dc-mini.clickable.open { background: #f8fafc; }
.dc-tips-break { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 18px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e2e8f0; }
.dc-tip-row { display: flex; justify-content: space-between; font-size: 12px; color: #334155; }
.dc-tip-row span:last-child { font-weight: 600; }

/* inline svg icons */
.dc-kpi-icon svg { width: 24px; height: 24px; }
.dc-cat-icon svg { width: 16px; height: 16px; }
.dc-mini-icon svg { width: 16px; height: 16px; }
.dc-op-icon svg { width: 22px; height: 22px; }
.dc-op.blue .dc-op-icon { color: #0369a1; } .dc-op.amber .dc-op-icon { color: #b45309; } .dc-op.red .dc-op-icon { color: #b91c1c; }
.dc-line-icon svg { width: 16px; height: 16px; vertical-align: -3px; }
.dc-recap-icon svg { width: 18px; height: 18px; vertical-align: -3px; }

/* MOD recap */
.dc-recap { margin-bottom: 12px; }
.dc-recap h3 { display: flex; align-items: center; gap: 8px; }
.dc-recap-icon { color: #15803d; }
.dc-recap textarea { width: 100%; padding: 10px 12px; font-size: 14px; font-family: inherit; border: 1px solid #cbd5e1; border-radius: 8px; resize: vertical; min-height: 68px; }
.dc-recap-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-size: 12px; color: #64748b; }
.dc-charcount { font-size: 11px; color: #94a3b8; }
.dc-hint { font-size: 12px; color: #64748b; margin: 6px 0 0; }
.dc-error { color: #b91c1c; font-size: 13px; margin: 0 0 10px; }
.dc-notice { font-size: 12px; margin: 8px 0 0; padding: 6px 10px; border-radius: 6px; }
.dc-notice.warn { background: #fef3c7; color: #92400e; }
.dc-legend { font-size: 11px; color: #64748b; margin: 8px 0 0; font-style: italic; }

.dc-bottom-bar { display: flex; justify-content: space-between; align-items: flex-start; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px 18px; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.dc-bottom-left { display: flex; gap: 10px; flex-wrap: wrap; }
.dc-bottom-right { text-align: center; }
.dc-bottom-right .dc-btn { min-width: 260px; }
.dc-bottom-right .dc-hint { margin-top: 4px; }

.dc-history-toggle { background: none; border: none; color: #0891b2; font-weight: 700; font-size: 13px; cursor: pointer; padding: 4px 0; margin-bottom: 6px; }
.dc-history-actions { display: flex; gap: 6px; white-space: nowrap; }

/* Print */
.dc-print-view { display: none; }
.dc-print-view h1 { font-size: 20px; margin-bottom: 4px; }
.dc-print-view h2 { font-size: 14px; margin: 16px 0 6px; border-bottom: 1px solid #000; }
.dc-print-view table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 6px; }
.dc-print-view td { padding: 3px 6px; border-bottom: 1px solid #ddd; }
.dc-print-view th { padding: 3px 6px; border-bottom: 1px solid #000; text-align: left; font-size: 11px; text-transform: uppercase; }
.dc-print-view .dc-legend { font-size: 10px; color: #444; margin: 4px 0 0; }

@media print {
    .dc-body * { visibility: hidden !important; }
    .dc-print-view, .dc-print-view * { visibility: visible !important; }
    .dc-print-view { display: block; position: absolute; top: 0; left: 0; width: 100%; padding: 20px; color: #000; background: #fff; }
}
