/* css/admin-crm.css — Airy Precision Light System for Admin & Omnichannel CRM (<= 200 LOC) */
:root {
    --crm-bg: #F8FAFC;
    --crm-card: #FFFFFF;
    --crm-border: #E2E8F0;
    --crm-text: #0F172A;
    --crm-muted: #475569;
    --crm-accent: #047857;
    --crm-accent-soft: #F1F5F9;
    --crm-accent-border: #CBD5E1;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--crm-bg);
    color: var(--crm-text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    margin: 0;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    letter-spacing: -0.02em;
}

h1, h2 {
    line-height: 1.38 !important;
}

/* Sans-serif Tabular Numbers for KPIs; JetBrains Mono exclusively for code tags */
.tnum {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif !important;
    font-variant-numeric: tabular-nums;
}

code, kbd, pre {
    font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
}

/* Keyboard Focus Ring */
:focus-visible {
    outline: 2px solid #047857;
    outline-offset: 2px;
}

/* Floor Typography >= 12px (Zero Tiny Fonts) */
.text-xs, small {
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
}

/* Breathable Elevated Light Surface */
.crm-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

/* Soft Semantic & Editorial Neutral Interactive Buttons (Zero Heavy Dark / Zero Loud Solid Blocks) */
.btn-soft-sky {
    background: #F1F5F9;
    color: #0F172A;
    border: 1.5px solid #94A3B8;
    font-weight: 700;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}
.btn-soft-sky:hover {
    background: #E2E8F0;
    border-color: #64748B;
}

.btn-soft-emerald {
    background: #ECFDF5;
    color: #047857;
    border: 1px solid #A7F3D0;
    font-weight: 700;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}
.btn-soft-emerald:hover {
    background: #D1FAE5;
    border-color: #6EE7B7;
}

.btn-soft-slate {
    background: #FFFFFF;
    color: #1E293B;
    border: 1px solid #CBD5E1;
    font-weight: 600;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}
.btn-soft-slate:hover {
    background: #F8FAFC;
    border-color: #94A3B8;
}

/* Calm Left Sidebar Rail */
.crm-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 9px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.15s ease;
    min-width: 0;
    overflow: hidden;
}
.crm-nav-item:hover {
    background: #F1F5F9;
    color: #0F172A;
}
.crm-nav-item.is-active {
    background: #F1F5F9;
    color: #0F172A;
    border-color: #CBD5E1;
    font-weight: 700;
}

/* Sticky Data Grid Headers */
.crm-grid-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 10px 10px;
    white-space: nowrap;
}
.crm-grid-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #F1F5F9;
    vertical-align: middle;
    font-size: 13px;
    color: #0F172A;
}
.crm-grid-table tr:hover td {
    background: #F8FAFC;
}

/* Slide-Over 360 Drawer & Modal Backdrop */
.crm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(2px);
    z-index: 50;
}
.crm-drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 460px;
    background: #FFFFFF;
    border-left: 1px solid #E2E8F0;
    box-shadow: -12px 0 32px rgba(15, 23, 42, 0.08);
    z-index: 60;
    display: flex;
    flex-direction: column;
}
