/* Base styles and tokens from the design handoff. Most page styling is inline, ported from the .dc.html prototypes. */
:root {
    --ink: #0F172A;
    --ink-2: #0B1220;
    --text: #334155;
    --text-2: #475569;
    --text-3: #64748B;
    --muted: #94A3B8;
    --line: #E2E8F0;
    --line-2: #E6EAF2;
    --surface: #F1F5F9;
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-light: #EFF6FF;
    --success: #16A34A;
    --danger: #DC2626;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: #F6F8FC;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    color: #0F172A;
    -webkit-font-smoothing: antialiased;
}

a { color: #2563EB; text-decoration: none; }
a:hover { color: #1D4ED8; text-decoration: underline; }
input, select, button, textarea { font-family: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.mono { font-family: var(--mono); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 12px; padding: 12px 18px; font-size: 15px; font-weight: 700; line-height: 1.2;
    border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: #2563EB; color: #fff; box-shadow: 0 8px 20px rgba(37,99,235,.28); }
.btn-primary:hover { background: #1D4ED8; color: #fff; }
.btn-secondary { background: #fff; color: #0F172A; border-color: #D7DEE9; }
.btn-secondary:hover { background: #F8FAFC; border-color: #94A3B8; color: #0F172A; }
.btn-dark { background: #0F172A; color: #fff; }
.btn-dark:hover { background: #1E293B; color: #fff; }
.btn-danger { background: #DC2626; color: #fff; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }

/* Cards & inputs */
.card { background: #fff; border: 1px solid #E6EAF2; border-radius: 20px; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.04); }
.input {
    height: 46px; width: 100%; border: 1px solid #CBD5E1; border-radius: 12px; padding: 0 14px;
    font-size: 15px; background: #fff; color: #0F172A; outline: none;
}
textarea.input { height: auto; padding: 12px 14px; line-height: 1.5; }
.input:focus { border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.label { font-size: 13px; font-weight: 600; letter-spacing: .6px; color: #475569; }
.field-error { font-size: 12px; color: #B91C1C; }

.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.modal { background: #fff; border-radius: 20px; box-shadow: 0 30px 80px rgba(15,23,42,.35); width: 100%; max-width: 420px; padding: 24px; position: relative; }
.modal-close {
    position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 10px; border: 1px solid #E2E8F0;
    background: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #475569; cursor: pointer;
}
.modal-close:hover { background: #F1F5F9; }

/* Toast */
.toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2000;
    background: #0F172A; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600;
    box-shadow: 0 18px 40px rgba(15,23,42,.3); animation: toastIn .2s ease-out;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .6px; color: #64748B; padding: 12px 16px; border-bottom: 1px solid #E2E8F0; background: #F8FAFC; white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid #EEF1F6; vertical-align: middle; }
.table tr.row-link { cursor: pointer; }
.table tr.row-link:hover td { background: #F8FAFC; }

/* Responsive helpers */
@media (max-width: 900px) {
    .hide-md { display: none !important; }
    .stack-md { grid-template-columns: minmax(0, 1fr) !important; }
}
