/* =============================================================================
   Velzon-aligned design system
   Primary #405189 | Success #0ab39c | Danger #f06548
   Info #299cdb | Warning #f7b84b | Purple #6559cc
   Body bg #f3f6f9 | Border #e9ebec
   ============================================================================= */

/* ── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
    --vz-primary:      #405189;
    --vz-success:      #0ab39c;
    --vz-danger:       #f06548;
    --vz-info:         #299cdb;
    --vz-warning:      #f7b84b;
    --vz-purple:       #6559cc;
    --vz-body-bg:      #f3f6f9;
    --vz-border:       #e9ebec;
    --vz-card-shadow:  0 1px 2px rgba(56, 65, 74, 0.15);
    --vz-muted:        #878a99;
    --vz-heading:      #343a40;
    --vz-sidebar-dark: #1e2b4a;
}

/* ── Body & Font ───────────────────────────────────────────────────────────── */
body {
    background: var(--vz-body-bg) !important;
    font-family: 'Poppins', 'Inter', sans-serif !important;
    color: #495057;
}
h1, h2, h3, h4, h5, h6 {
    color: var(--vz-heading) !important;
    font-family: 'Poppins', 'Inter', sans-serif !important;
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card-box {
    border: 1px solid var(--vz-border) !important;
    box-shadow: var(--vz-card-shadow) !important;
    border-radius: 0.3rem !important;
    background: #fff !important;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn-primary {
    background-color: var(--vz-primary) !important;
    border-color: var(--vz-primary) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #374776 !important;
    border-color: #374776 !important;
}
.btn-outline-primary {
    color: var(--vz-primary) !important;
    border-color: var(--vz-primary) !important;
    background: transparent !important;
}
.btn-outline-primary:hover {
    background-color: var(--vz-primary) !important;
    color: #fff !important;
}
.btn-outline-secondary {
    color: #6c757d !important;
    border-color: #ced4da !important;
}
.btn-outline-secondary:hover {
    background-color: #6c757d !important;
    color: #fff !important;
    border-color: #6c757d !important;
}
.btn-outline-warning {
    color: #b88b00 !important;
    border-color: var(--vz-warning) !important;
}
.btn-outline-warning:hover {
    background-color: var(--vz-warning) !important;
    color: #fff !important;
}
.btn-outline-danger {
    color: var(--vz-danger) !important;
    border-color: var(--vz-danger) !important;
}
.btn-outline-danger:hover {
    background-color: var(--vz-danger) !important;
    color: #fff !important;
}
.btn-outline-success {
    color: var(--vz-success) !important;
    border-color: var(--vz-success) !important;
}
.btn-outline-success:hover {
    background-color: var(--vz-success) !important;
    color: #fff !important;
}

/* ── Tables ────────────────────────────────────────────────────────────────── */
.table-compact td,
.table-compact th {
    padding: 0.45rem 0.65rem;
    font-size: 0.84rem;
}
.table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--vz-muted);
    border-bottom: 1px solid var(--vz-border);
}
.table td {
    color: #495057;
    vertical-align: middle;
}

/* ── Status Badges ─────────────────────────────────────────────────────────── */
.status-badge {
    display: inline-block;
    padding: 0.25em 0.75em;
    border-radius: 50rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.status-active   { background: rgba(10, 179, 156, 0.10);  color: #0ab39c; }
.status-blocked  { background: rgba(240, 101, 72, 0.10);  color: #f06548; }
.status-pending  { background: rgba(247, 184, 75, 0.18);  color: #b88b00; }
.status-inactive { background: rgba(135, 138, 153, 0.12); color: #6c757d; }
.status-scrapped { background: rgba(52, 58, 64, 0.10);    color: #343a40; }

/* ── Stat Cards ────────────────────────────────────────────────────────────── */
.stat-card {
    border-radius: 0.3rem;
    padding: 20px 24px;
    background: #fff;
    box-shadow: var(--vz-card-shadow);
    margin-bottom: 20px;
    border: 1px solid var(--vz-border);
    border-left: 4px solid;
}
.stat-card .stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}
.stat-card .stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--vz-muted);
    font-weight: 500;
}
.stat-card .stat-icon {
    font-size: 2.2rem;
    opacity: 0.12;
}
.stat-card-blue   { border-left-color: #405189; } .stat-card-blue   .stat-number { color: #405189; }
.stat-card-green  { border-left-color: #0ab39c; } .stat-card-green  .stat-number { color: #0ab39c; }
.stat-card-orange { border-left-color: #f06548; } .stat-card-orange .stat-number { color: #f06548; }
.stat-card-teal   { border-left-color: #299cdb; } .stat-card-teal   .stat-number { color: #299cdb; }
.stat-card-purple { border-left-color: #6559cc; } .stat-card-purple .stat-number { color: #6559cc; }
.stat-card-red    { border-left-color: #f7b84b; } .stat-card-red    .stat-number { color: #b88b00; }
.stat-card-danger { border-left-color: #f06548; background: rgba(240,101,72,0.05); }
.stat-card-danger .stat-number { color: #f06548; }
a:hover .stat-card { box-shadow: 0 2px 8px rgba(56,65,74,0.18) !important; }

/* ── Card Section Headers ──────────────────────────────────────────────────── */
.card-section-title {
    font-weight: 600;
    color: var(--vz-heading);
    font-size: 0.875rem;
}

/* ── Inline action buttons in tables ──────────────────────────────────────── */
.action-col {
    text-align: right;
    white-space: nowrap;
}
.btn-action {
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    line-height: 1.4;
    border-radius: 0.25rem;
}

/* ── Misc Utilities ────────────────────────────────────────────────────────── */
.filter-sticky {
    position: sticky;
    top: 70px;
    z-index: 2;
    background: #fff;
    padding-top: 10px;
    padding-bottom: 10px;
    border-radius: 0.3rem;
    border-bottom: 1px solid var(--vz-border);
}
.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--vz-muted);
}
.empty-state-title {
    font-weight: 600;
    color: var(--vz-heading);
    margin-bottom: 4px;
}
.errorlist {
    color: var(--vz-danger);
    font-size: 0.82rem;
    margin-top: 3px;
}
.text-black      { color: #212529; }
.font-weight-600 { font-weight: 600; }

/* =============================================================================
   DASHBOARD
   ============================================================================= */

/* ── Page header ───────────────────────────────────────────────────────────── */
.dash-header {
    padding: 14px 0 12px;
    border-bottom: 1px solid var(--vz-border);
    margin-bottom: 20px;
}

/* ── Alert banner ──────────────────────────────────────────────────────────── */
.dash-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: rgba(240,101,72,0.07);
    border: 1px solid rgba(240,101,72,0.28);
    border-radius: 0.3rem;
    font-size: 0.84rem;
    color: #b83d21;
}
.dash-alert .dw { font-size: 1.1rem; color: #f06548; }

/* ── Card header row ───────────────────────────────────────────────────────── */
.dash-card-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--vz-border);
    background: #fafbfc;
    border-radius: 0.3rem 0.3rem 0 0;
}
.dash-card-title {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--vz-heading);
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dash-card-subtitle {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--vz-muted);
    letter-spacing: 0;
    margin-left: 4px;
}

/* ── Stat cards: tighter on dashboard ─────────────────────────────────────── */
.stat-card {
    padding: 16px 18px;
}
.stat-card .stat-number {
    font-size: 1.6rem;
}
.stat-card .stat-label {
    font-size: 0.68rem;
}

/* ── Compact variant for long numeric values ───────────────────────────────── */
.stat-number-compact {
    font-size: 0.88rem !important;
    line-height: 1.35;
    word-break: break-word;
    font-weight: 700;
}

/* ── Stat card icon boxes ──────────────────────────────────────────────────── */
.stat-card .stat-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.stat-card-blue   .stat-icon-box { background: rgba(64,  81,  137, 0.12); color: #405189; }
.stat-card-green  .stat-icon-box { background: rgba(10,  179, 156, 0.12); color: #0ab39c; }
.stat-card-orange .stat-icon-box { background: rgba(240, 101, 72,  0.12); color: #f06548; }
.stat-card-teal   .stat-icon-box { background: rgba(41,  156, 219, 0.12); color: #299cdb; }
.stat-card-purple .stat-icon-box { background: rgba(101, 89,  204, 0.12); color: #6559cc; }
.stat-card-red    .stat-icon-box { background: rgba(247, 184, 75,  0.15); color: #b88b00; }
.stat-card-danger .stat-icon-box { background: rgba(240, 101, 72,  0.12); color: #f06548; }

/* ── Activity rows in recent panels ───────────────────────────────────────── */
.dash-activity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 0;
}
.dash-activity-name {
    font-size: 0.83rem;
    font-weight: 600;
    color: #343a40;
}
.dash-activity-name a { color: inherit; }
.dash-activity-name a:hover { color: var(--vz-primary); }
.dash-activity-meta {
    font-size: 0.74rem;
    color: var(--vz-muted);
    margin-top: 1px;
}

/* ── pd-15 utility (used in dashboard cards) ───────────────────────────────── */
.pd-15 { padding: 15px !important; }

/* =============================================================================
   LIGHT SIDEBAR + HEADER
   Replaces the dark #0b132b theme with a clean white chrome that flows with
   the #f3f6f9 body background.
   ============================================================================= */

/* ── Sidebar shell ─────────────────────────────────────────────────────────── */
.left-side-bar {
    background: #fff !important;
    border-right: 1px solid var(--vz-border) !important;
    box-shadow: 2px 0 8px rgba(56, 65, 74, 0.06) !important;
}

/* ── Brand logo area — keep primary colour as visual anchor ────────────────── */
.brand-logo {
    background: var(--vz-primary) !important;
    border-bottom: none !important;
}

/* ── Header — white to match sidebar ──────────────────────────────────────── */
.header {
    background: #fff !important;
    border-bottom: 1px solid var(--vz-border) !important;
    box-shadow: 0 1px 4px rgba(56, 65, 74, 0.07) !important;
}
.header .header-left .menu-icon,
.header .header-left .search-toggle-icon {
    color: #6c757d !important;
}
.header .user-name {
    color: #495057 !important;
}
.header .header-right .dropdown-toggle {
    color: #495057 !important;
}

/* ── Nav link default state ────────────────────────────────────────────────── */
.sidebar-menu .dropdown-toggle {
    color: #495057 !important;
    font-weight: 400 !important;
}
.sidebar-menu .dropdown-toggle .micon,
.micon {
    color: #878a99 !important;
}

/* ── Section labels ────────────────────────────────────────────────────────── */
.sidebar-menu .sidebar-small-cap,
.sidebar-small-cap {
    color: #adb5bd !important;
    font-size: 0.6rem !important;
    letter-spacing: 1.6px !important;
    padding: 10px 20px 3px !important;
}

/* ── Hover state ───────────────────────────────────────────────────────────── */
.sidebar-menu .dropdown-toggle:hover,
.sidebar-menu .show > .dropdown-toggle {
    background: rgba(64, 81, 137, 0.08) !important;
    color: var(--vz-primary) !important;
}
.sidebar-menu .dropdown-toggle:hover .micon,
.sidebar-menu .show > .dropdown-toggle .micon {
    color: var(--vz-primary) !important;
}

/* ── Active top-level item ─────────────────────────────────────────────────── */
.sidebar-menu > ul > li > .dropdown-toggle.active {
    background: rgba(64, 81, 137, 0.1) !important;
    color: var(--vz-primary) !important;
    font-weight: 600 !important;
    border-left: 3px solid var(--vz-primary) !important;
}
.sidebar-menu > ul > li > .dropdown-toggle.active .micon {
    color: var(--vz-primary) !important;
}

/* ── Submenu links ─────────────────────────────────────────────────────────── */
.sidebar-menu .submenu li a,
.submenu li a {
    color: #6c757d !important;
    font-size: 0.865rem !important;
    padding-top: 11px !important;
    padding-bottom: 11px !important;
    font-weight: 400 !important;
}
.sidebar-menu .submenu li a.active,
.sidebar-menu .submenu li a:hover,
.submenu li a.active,
.submenu li a:hover {
    color: var(--vz-primary) !important;
    background: rgba(64, 81, 137, 0.08) !important;
}

/* ── Submenu arrow pseudo-element ──────────────────────────────────────────── */
.sidebar-menu .submenu li > a:before,
.submenu li > a:before {
    color: inherit !important;
}

/* ── Submenu dashed guide line ─────────────────────────────────────────────── */
.sidebar-menu .submenu:before,
.submenu:before {
    border-left-color: rgba(64, 81, 137, 0.25) !important;
}

/* ── Dropdown open state for submenu parent ────────────────────────────────── */
.sidebar-menu .dropdown.show > .dropdown-toggle {
    background: rgba(64, 81, 137, 0.08) !important;
    color: var(--vz-primary) !important;
}
.sidebar-menu .dropdown.show > .dropdown-toggle .micon {
    color: var(--vz-primary) !important;
}
