/*
 * CallOS Design System — global visual upgrade.
 * Loaded on every page via _Layout.cshtml, right after brand.css. Purely additive/refining CSS —
 * targets existing Bootstrap/app classes already used everywhere (.card, .btn, .table, badges,
 * .dashboard__table, sidebar/header) so every page gets the same premium treatment without any
 * page's HTML or JS being touched. Page-specific <style> blocks still load after this and win on
 * anything they explicitly override.
 */

:root {
    --ds-shadow-sm: 0 1px 2px rgba(16, 24, 60, 0.04);
    --ds-shadow-md: 0 4px 16px -4px rgba(16, 24, 60, 0.08);
    --ds-shadow-lg: 0 20px 40px -12px rgba(16, 24, 60, 0.16);
    --ds-shadow-brand: 0 10px 24px -8px var(--brand-shadow, rgba(35, 67, 158, 0.35));
    --ds-radius-sm: 10px;
    --ds-radius-md: 14px;
    --ds-radius-lg: 18px;
    --ds-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --ds-bg: #f6f7fb;
}

/* ---------- Page background ---------- */
.dashboard,
body {
    background:
        radial-gradient(circle at 8% 0%, rgba(35, 67, 158, 0.05) 0%, transparent 42%),
        radial-gradient(circle at 100% 12%, rgba(35, 67, 158, 0.04) 0%, transparent 38%),
        var(--ds-bg);
}

/* ---------- Typography ---------- */
.dashboard__body main h1,
.dashboard__body main h2 {
    letter-spacing: -0.01em;
}
.dashboard__body main h3 {
    letter-spacing: -0.005em;
}

/* ---------- Cards ---------- */
.card,
.dashboard__body main .dashboard__table {
    border: 1px solid #edf0f5 !important;
    border-radius: var(--ds-radius-lg) !important;
    box-shadow: var(--ds-shadow-sm);
    transition: box-shadow 0.25s var(--ds-ease), transform 0.25s var(--ds-ease);
}
.card:hover {
    box-shadow: var(--ds-shadow-md);
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: 10px;
    font-weight: 600;
    transition: transform 0.16s var(--ds-ease), box-shadow 0.16s var(--ds-ease), opacity 0.16s var(--ds-ease), background 0.16s var(--ds-ease);
}
.btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}
.btn-outline-primary,
.btn-outline-secondary {
    transition: all 0.18s var(--ds-ease);
}
.btn-outline-primary:hover {
    transform: translateY(-1px);
}

/* ---------- Badges / pills ---------- */
.badge {
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* ---------- Tables ---------- */
.table thead th {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
    border-bottom-width: 1px !important;
}
.table tbody tr {
    transition: background-color 0.15s ease;
}
.table tbody tr:hover {
    background-color: var(--brand-navy-a05, rgba(35, 67, 158, 0.04));
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
    border-radius: 10px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

/* ---------- Modals ---------- */
.modal-content {
    border: none;
    border-radius: var(--ds-radius-lg);
    box-shadow: var(--ds-shadow-lg);
}

/* ---------- Scrollbars (webkit) ---------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d7dbe6;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b9c0d1;
}

/* ---------- Focus ring ---------- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--brand-navy-a30, rgba(35, 67, 158, 0.35));
    outline-offset: 2px;
}

/* ---------- Reusable premium hero component ---------- */
/* Drop <div class="ds-hero"><div class="ds-hero__icon"><i class="fas ..."></i></div><h2>Title</h2>
   <p>...</p></div> at the top of a page's <main> content for the same gradient banner used on
   Resources / API Integration. */
.ds-hero {
    position: relative;
    border-radius: 20px;
    padding: 34px 36px;
    margin-bottom: 24px;
    background: var(--brand-gradient);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
    box-shadow: var(--ds-shadow-brand);
}
.ds-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(circle at 1.5px 1.5px, rgba(255, 255, 255, 0.18) 1.5px, transparent 0);
    background-size: 22px 22px;
    opacity: 0.5;
}
.ds-hero::after {
    content: '';
    position: absolute;
    top: -70px;
    right: -70px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16) 0%, transparent 70%);
    z-index: -1;
}
.ds-hero__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}
.ds-hero h1,
.ds-hero h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #fff;
    letter-spacing: -0.01em;
}
.ds-hero p {
    font-size: 0.95rem;
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.55;
}

/* ---------- Stat tile (for KPI rows) ---------- */
.ds-stat {
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: var(--ds-radius-md);
    padding: 16px 18px;
    box-shadow: var(--ds-shadow-sm);
    transition: transform 0.2s var(--ds-ease), box-shadow 0.2s var(--ds-ease);
}
.ds-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--ds-shadow-md);
}
.ds-stat__label {
    font-size: 12px;
    color: #8992a3;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.ds-stat__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a2233;
}

/* ---------- Entrance animation (opt-in) ---------- */
@keyframes ds-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.ds-fade-up {
    animation: ds-fade-up 0.45s var(--ds-ease) both;
}

@media (max-width: 576px) {
    .ds-hero {
        padding: 26px 22px;
    }
}
