/* =====================================================================
   DSP Software Solutions - Modern Hi-Tech Theme
   Primary : Black (#000000)
   Accents : White, #f2bf20, #82b033, #606060, #8f8f8f, #d0e888
   ===================================================================== */

:root {
    --dsp-black:      #000000;
    --dsp-white:      #ffffff;
    --dsp-gold:       #f2bf20;
    --dsp-green:      #82b033;
    --dsp-gray1:      #606060;
    --dsp-gray2:      #8f8f8f;
    --dsp-lime:       #d0e888;
    --dsp-bg:         #0d0d0d;
    --dsp-card:       #161616;
    --dsp-card2:      #1f1f1f;
    --dsp-border:     #2a2a2a;
    --dsp-text:       #e6e6e6;
    --dsp-muted:      #9aa0a6;
    --dsp-success:    #82b033;
    --dsp-warning:    #f2bf20;
    --dsp-danger:     #e74c3c;
    --dsp-info:       #3498db;
    --sidebar-w:      260px;
    --header-h:       64px;
    --radius:         12px;
    --shadow:         0 8px 30px rgba(0,0,0,.45);
    --shadow-sm:      0 2px 10px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--dsp-bg);
    color: var(--dsp-text);
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    min-height: 100vh;
}

a { color: var(--dsp-gold); text-decoration: none; }
a:hover { color: var(--dsp-lime); }

/* ===================== LAYOUT ===================== */
.dsp-app {
    display: flex;
    min-height: 100vh;
}

.dsp-sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #000 0%, #0a0a0a 100%);
    color: #fff;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    border-right: 1px solid var(--dsp-border);
    z-index: 1000;
    overflow-y: auto;
    transition: all .3s ease;
}

.dsp-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 18px;
    border-bottom: 1px solid var(--dsp-border);
    background: #000;
}
.dsp-brand img {
    width: 38px; height: 38px;
    border-radius: 8px;
    background: #fff;
    padding: 4px;
    object-fit: contain;
}
.dsp-brand .name {
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    line-height: 1.1;
}
.dsp-brand .name small {
    display: block;
    color: var(--dsp-gold);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: .5px;
    margin-top: 2px;
}

.dsp-nav {
    padding: 12px 0;
    list-style: none;
    margin: 0;
}
.dsp-nav li > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    color: #c9c9c9;
    font-size: 13.5px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all .2s ease;
}
.dsp-nav li > a i {
    width: 18px; text-align: center; color: var(--dsp-gold);
}
.dsp-nav li > a:hover {
    background: #141414;
    color: #fff;
    border-left-color: var(--dsp-gold);
}
.dsp-nav li.active > a {
    background: linear-gradient(90deg, rgba(242,191,32,.10), transparent);
    color: #fff;
    border-left-color: var(--dsp-gold);
}
.dsp-nav .nav-section {
    padding: 14px 18px 6px;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--dsp-gray2);
    font-weight: 700;
}

.dsp-main {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    background: var(--dsp-bg);
}

.dsp-header {
    height: var(--header-h);
    background: #000;
    border-bottom: 1px solid var(--dsp-border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 999;
}
.dsp-header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}
.dsp-header .crumb {
    color: var(--dsp-gray2);
    font-size: 12.5px;
    margin-left: 8px;
}
.dsp-header .right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}
.dsp-header .user {
    display: flex; align-items: center; gap: 10px;
    color: #fff; font-size: 13px;
}
.dsp-header .user .avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dsp-gold), var(--dsp-green));
    display: inline-flex; align-items: center; justify-content: center;
    color: #000; font-weight: 700;
}

.dsp-content {
    padding: 22px 24px 60px;
}

/* ===================== KPI CARDS ===================== */
.dsp-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}
.dsp-kpi {
    background: linear-gradient(135deg, var(--dsp-card) 0%, var(--dsp-card2) 100%);
    border: 1px solid var(--dsp-border);
    border-radius: var(--radius);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
}
.dsp-kpi:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.dsp-kpi::before {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: var(--accent, var(--dsp-gold));
    opacity: .08;
    border-radius: 50%;
    transform: translate(35%, -35%);
}
.dsp-kpi .kpi-label {
    color: var(--dsp-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 600;
    margin-bottom: 8px;
}
.dsp-kpi .kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}
.dsp-kpi .kpi-sub {
    color: var(--dsp-muted);
    font-size: 11.5px;
    margin-top: 6px;
}
.dsp-kpi .kpi-icon {
    position: absolute;
    top: 18px; right: 18px;
    width: 38px; height: 38px;
    background: var(--accent, var(--dsp-gold));
    color: #000;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,.4);
}
.dsp-kpi.k-gold   { --accent: #f2bf20; }
.dsp-kpi.k-green  { --accent: #82b033; }
.dsp-kpi.k-lime   { --accent: #d0e888; }
.dsp-kpi.k-info   { --accent: #3498db; }
.dsp-kpi.k-red    { --accent: #e74c3c; }
.dsp-kpi.k-gray   { --accent: #8f8f8f; }
.dsp-kpi.k-white  { --accent: #ffffff; }

/* ===================== PANELS / CARDS ===================== */
.dsp-panel {
    background: var(--dsp-card);
    border: 1px solid var(--dsp-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
    overflow: hidden;
}
.dsp-panel-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--dsp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, #181818, #141414);
}
.dsp-panel-head h3 {
    margin: 0;
    font-size: 14px;
    color: #fff;
    font-weight: 600;
    letter-spacing: .3px;
}
.dsp-panel-head h3 i {
    color: var(--dsp-gold);
    margin-right: 8px;
}
.dsp-panel-head .actions a {
    color: var(--dsp-gold);
    font-size: 12px;
    font-weight: 600;
}
.dsp-panel-body { padding: 18px; }
.dsp-panel-body.p-0 { padding: 0; }

/* Two column grid */
.dsp-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
@media (max-width: 1100px) { .dsp-grid-2 { grid-template-columns: 1fr; } }

/* ===================== TABLES ===================== */
.dsp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.dsp-table thead th {
    background: #0d0d0d;
    color: var(--dsp-gold);
    text-align: left;
    padding: 10px 14px;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 700;
    border-bottom: 1px solid var(--dsp-border);
}
.dsp-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--dsp-border);
    color: var(--dsp-text);
}
.dsp-table tbody tr:hover { background: #1a1a1a; }
.dsp-table tbody tr:last-child td { border-bottom: 0; }
.dsp-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.dsp-table .pos { color: var(--dsp-green); font-weight: 600; }
.dsp-table .neg { color: var(--dsp-danger); font-weight: 600; }

/* ===================== STATUS BADGES ===================== */
.badge-dsp {
    display: inline-block;
    padding: 3px 9px;
    font-size: 10.5px;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.bg-paid    { background: rgba(130,176,51,.15);  color: var(--dsp-green); }
.bg-pending { background: rgba(242,191,32,.15);  color: var(--dsp-gold); }
.bg-open    { background: rgba(52,152,219,.15);  color: #5dade2; }
.bg-closed  { background: rgba(143,143,143,.15); color: var(--dsp-gray2); }
.bg-crn     { background: rgba(231,76,60,.15);   color: #ff7a6c; }
.bg-problem { background: rgba(208,232,136,.15); color: var(--dsp-lime); }
.bg-default { background: rgba(255,255,255,.08); color: #fff; }

/* ===================== BUTTONS ===================== */
.btn-dsp {
    background: var(--dsp-gold);
    color: #000;
    border: 0;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
    transition: all .2s ease;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.btn-dsp:hover { background: #ffd133; color: #000; }
.btn-dsp-ghost {
    background: transparent;
    color: var(--dsp-gold);
    border: 1px solid var(--dsp-gold);
}
.btn-dsp-ghost:hover { background: var(--dsp-gold); color: #000; }
.btn-dsp-green { background: var(--dsp-green); color: #fff; }
.btn-dsp-green:hover { background: #95c43e; color: #fff; }
.btn-dsp-red { background: var(--dsp-danger); color: #fff; }

/* ===================== FORMS ===================== */
.dsp-input, .dsp-select {
    background: #0d0d0d;
    border: 1px solid var(--dsp-border);
    color: var(--dsp-text);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    width: 100%;
    transition: all .2s ease;
}
.dsp-input:focus, .dsp-select:focus {
    outline: 0;
    border-color: var(--dsp-gold);
    box-shadow: 0 0 0 3px rgba(242,191,32,.15);
}
.dsp-form-row { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 12px; margin-bottom: 14px;}
.dsp-label { display: block; color: var(--dsp-gray2); font-size: 11.5px; text-transform: uppercase; font-weight: 600; margin-bottom: 5px; letter-spacing: .5px;}

/* ===================== PROGRESS BARS ===================== */
.dsp-progress {
    background: #0d0d0d;
    border-radius: 6px;
    overflow: hidden;
    height: 8px;
    border: 1px solid var(--dsp-border);
}
.dsp-progress > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--dsp-gold), var(--dsp-green));
    border-radius: 6px;
}

/* ===================== LIST GROUP ===================== */
.dsp-list { list-style: none; padding: 0; margin: 0; }
.dsp-list li {
    padding: 12px 16px;
    border-bottom: 1px solid var(--dsp-border);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background .2s ease;
}
.dsp-list li:last-child { border-bottom: 0; }
.dsp-list li:hover { background: #1a1a1a; }
.dsp-list .ico {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(242,191,32,.12);
    color: var(--dsp-gold);
    display: inline-flex; align-items: center; justify-content: center;
}
.dsp-list .body { flex: 1; }
.dsp-list .body .t { color: #fff; font-weight: 600; font-size: 13.5px; }
.dsp-list .body .s { color: var(--dsp-muted); font-size: 11.5px; margin-top: 2px; }
.dsp-list .v { color: var(--dsp-gold); font-weight: 700; font-size: 13.5px; }

/* ===================== SCROLLBARS ===================== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--dsp-gold); }

/* ===================== UTILITIES ===================== */
.text-gold { color: var(--dsp-gold) !important; }
.text-green { color: var(--dsp-green) !important; }
.text-lime { color: var(--dsp-lime) !important; }
.text-muted-dsp { color: var(--dsp-muted) !important; }
.text-white-dsp { color: #fff !important; }
.bg-black { background: #000 !important; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 18px; }
.mt-2 { margin-top: 12px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-1 { flex: 1; }
.text-right { text-align: right; }
.text-center-dsp { text-align: center; }

/* ===================== CHART CONTAINER ===================== */
.chart-wrap { position: relative; height: 320px; }
.chart-wrap-sm { position: relative; height: 220px; }

/* ===================== SIDEBAR VISIBILITY ===================== */
.dsp-sidebar { transition: transform .35s ease; }
.dsp-sidebar.hidden { transform: translateX(-100%); }
.dsp-app.sidebar-hidden .dsp-main { margin-left: 0; }
@keyframes sidebarIn { from { transform: translateX(-100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@media (min-width: 901px) { .dsp-sidebar.animate-in { animation: sidebarIn .4s ease both; } }

/* ===================== MOBILE TOGGLE ===================== */
.dsp-toggle {
    display: none;
    background: transparent;
    color: var(--dsp-gold);
    border: 0;
    font-size: 20px;
    cursor: pointer;
    margin-right: 14px;
}
@media (max-width: 900px) {
    .dsp-toggle { display: inline-flex; }
    .dsp-sidebar { transform: translateX(-100%); }
    .dsp-sidebar.open { transform: translateX(0); }
    .dsp-main { margin-left: 0; }
}

/* ===================== FOOTER ===================== */
.dsp-footer {
    text-align: center;
    padding: 14px;
    color: var(--dsp-muted);
    font-size: 11.5px;
    border-top: 1px solid var(--dsp-border);
    background: #000;
}
.dsp-footer a { color: var(--dsp-gold); font-weight: 600; }
