/* partner.css — Kolorowey UI
   - Enhanced left nav colors aligned to logo
   - Bigger logo
   - No Rev Share column styles needed
*/

/* ====== THEME ====== */
:root{
  /* Brand palette tuned to the logo (violet → indigo → azure) */
  --brand:#6c59ff;          /* primary violet */
  --brand-2:#5668ff;        /* indigo */
  --brand-3:#2e90c9;        /* azure */
  --brand-grad: linear-gradient(140deg, #6c59ff 0%, #5668ff 52%, #2e90c9 100%);

  /* Sidebar glass gradient built from brand palette */
  --side-a:#e9e6ff;   /* soft violet wash */
  --side-b:#e6f3ff;   /* soft azure wash */
  --side-glow-1:#b6a7ff;
  --side-glow-2:#8ecbff;

  --bg:#f6f8fc;
  --card:#ffffff;
  --muted:#5f7180;
  --text:#0b1b22;
  --accent:#0d2a4a;
  --accent-2:#537b98;
  --danger:#e05b5b;

  --radius:16px;
  --shadow: 0 10px 30px rgba(10,20,30,0.08);
  --sidebar-w:258px; /* a bit wider to breathe */

  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* ====== BASE ====== */
*{box-sizing:border-box}
.hidden{display:none !important}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,Arial,Helvetica,sans-serif
}
.app{display:flex;min-height:100vh}

/* ====== LEFT SIDEBAR ====== */
.sidebar{
  position:relative;
  width:var(--sidebar-w);
  background:
    radial-gradient(140% 140% at -10% -20%, #ffffff 0%, var(--side-a) 55%, var(--side-b) 100%);
  padding:22px 20px;
  border-right:1px solid rgba(15,25,30,0.08);
  display:flex;flex-direction:column;gap:18px;overflow:hidden;
}
/* soft aurora glow */
.sidebar-bg{
  position:absolute;inset:-42% -60% auto auto;height:320px;width:320px;border-radius:50%;
  background:
    conic-gradient(from 210deg, var(--side-glow-1) 0%, #9fb6ff 25%, var(--side-glow-2) 55%, #d6b6ff 85%, var(--side-glow-1) 100%);
  filter: blur(42px) saturate(120%); opacity:.28; pointer-events:none;
}

.sidebar-top{padding:6px 0 6px}
.logo-wrap{text-align:center}
.logo-img{
  max-width:240px;  /* bigger logo */
  width:100%;
  height:auto;
  display:block;margin:0 auto;
  filter: drop-shadow(0 12px 28px rgba(108,89,255,.28));
}

/* ====== NAV LIST ====== */
.nav-list{display:flex;flex-direction:column;gap:10px;margin-top:8px}

.nav-item{
  display:flex;align-items:center;gap:12px;
  padding:12px 12px;
  border-radius:14px;
  color:var(--accent);
  text-decoration:none;
  font-weight:800;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, box-shadow .2s ease, color .12s ease;
}

/* icon container picks up brand gradient border + subtle glossy bg */
.nav-item .nav-icon{
  width:42px;height:42px;border-radius:13px;
  background:linear-gradient(180deg,#ffffff, #f3f5ff);
  display:flex;align-items:center;justify-content:center;
  color:#3b5bff;
  box-shadow:
    inset 0 0 0 1px rgba(86,104,255,.22),
    0 6px 14px rgba(86,104,255,.14);
}
.nav-item .nav-icon svg{width:22px;height:22px;stroke-width:1.9}

.nav-item:hover{
  background:linear-gradient(180deg, #f1f3ff 0%, #eaf4ff 100%);
  transform:translateX(6px);
  color:#102b50;
}

.nav-item.active{
  background:
    linear-gradient(180deg,#eef0ff 0%, #e7f2ff 100%);
  box-shadow:
    inset 0 0 0 1px rgba(38,56,120,0.10),
    0 10px 22px rgba(86,104,255,.18);
  border-left:6px solid rgba(86,104,255,.50);
  color:#0e2a48;
}

/* Sidebar footer */
.sidebar-bottom{margin-top:auto;text-align:center}
.btn-ghost{
  background:#fff;border:1px solid #e2eef6;
  padding:8px 10px;border-radius:10px;color:var(--accent);
  font-weight:700
}

/* New Logout Button Styling */
.btn-logout {
  background-color: #e63946;   /* Red background */
  color: #ffffff;             /* White text */
  font-weight: 700;
  padding: 12px 20px;         /* Slightly bigger than Collapse button */
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: inline-block;
  transition: background 0.2s ease;
}

.btn-logout:hover {
  background-color: #d62828;   /* Darker red when hovered */
}


/* ====== BADGES & TEXT SIZES ====== */
.small{font-size:13px}
.tiny{font-size:12px}
.muted{color:var(--muted)}
.chip{
  display:inline-block;margin-left:6px;padding:2px 8px;
  border-radius:999px;background:#eef5ff;border:1px solid #e2ecff;
  color:#1c3550;font-weight:700;font-size:11px
}
.chip.tz{margin-left:12px}

/* ====== TOP BAR ====== */
.main{flex:1;display:flex;flex-direction:column}
.topbar{
  display:flex;justify-content:space-between;align-items:center;
  padding:22px 28px;border-bottom:1px solid rgba(8,15,20,0.06);
  background:
    linear-gradient(180deg,#ffffff,#f6f9ff);
}
.title{margin:0;font-size:22px;font-weight:800;letter-spacing:.2px}
.subtitle{color:var(--muted);font-size:13px;margin-top:6px}
.actions{display:flex;gap:12px}

.btn{
  background:var(--accent);color:#fff;padding:10px 14px;border-radius:12px;border:none;cursor:pointer;font-weight:800;
  transition:transform .08s ease, box-shadow .12s ease
}
.btn:hover{transform:translateY(-1px);box-shadow:0 8px 22px rgba(16,42,72,.12)}
.btn.ghost{background:#fff;color:var(--accent);border:1px solid #e3f0f7}
.btn.small{padding:6px 10px;font-size:13px}
.btn.primary{background:var(--brand-grad);box-shadow: 0 8px 22px rgba(86,104,255,.28)}
.btn.danger{background:var(--danger);color:#fff}

/* ====== LAYOUT ====== */
.container{display:grid;grid-template-columns:420px 1fr;gap:22px;padding:26px 32px}
.panel{background:var(--card);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow)}
.left-panel{min-height:60vh}
.right-panel{min-height:60vh}

/* ====== PARTNERS LIST ====== */
.search-header{display:flex;flex-direction:column;gap:10px}
.search-count{font-weight:800;color:var(--accent-2)}
.input{
  padding:10px;border-radius:12px;border:1px solid #e2f0f8;background:#fbfeff;width:100%;
  outline:none
}
.input:focus{border-color:#cfe3ff; box-shadow:0 0 0 3px rgba(86,104,255,.12)}

.partners-list{margin-top:12px;max-height:66vh;overflow:auto;padding-right:6px}
.partner-item{
  display:grid;grid-template-columns:1fr auto;gap:8px;
  padding:14px;border-radius:16px;border:1px solid #e9f0fb;
  background:linear-gradient(180deg,#fff,#fbfeff);margin-bottom:12px
}
.partner-item .name{font-weight:800;font-size:16px;letter-spacing:.1px}
.partner-item .meta{color:var(--muted);font-size:13px;margin-top:2px;font-weight:500}
.partner-item .created{color:#5d7287;font-size:12px;margin-top:8px}
.openBtn{
  background:#0e2a48;color:#fff;padding:10px 14px;border-radius:12px;border:none;align-self:center;font-weight:800
}

/* ====== DETAILS ====== */
.placeholder{
  padding:30px;border-radius:12px;
  background:linear-gradient(180deg,#fff,#fbfdff);
  border:1px dashed #eef7fb;color:var(--muted)
}
.partner-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:14px}
.partner-head h2{margin:0;font-weight:800}
.partner-actions{display:flex;gap:8px;flex-wrap:wrap}

/* ====== DOMAINS TABLE ====== */
.domains-section{margin-top:14px}
.domains-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.domains-controls{display:flex;gap:8px;align-items:center}
.table-frame{overflow:auto;border-radius:10px;border:1px solid #eef6fb}
.table{width:100%;border-collapse:collapse}
.table thead th{
  padding:12px;background:#fbfdff;text-align:left;border-bottom:1px solid #eef6fb;font-weight:800
}
.table tbody td{padding:12px;border-top:1px solid #f5f9fb;vertical-align:middle}
.domain-chip{font-weight:800;color:var(--accent-2)}
.table select,
.table input[type=number],
.table input[type=password]{padding:8px;border-radius:10px;border:1px solid #e2f0f8;background:#fff}
.table select:focus,
.table input:focus{border-color:#cfe3ff; box-shadow:0 0 0 3px rgba(86,104,255,.12)}

.cut-pill{
  display:inline-block;padding:4px 8px;border-radius:999px;border:1px solid #e4ecf8;background:#f6fbff;
  font-weight:800;font-size:12px;color:#0c2a44;margin-right:6px
}
.cut-pill.over{
  background:var(--brand-grad);border-color:transparent;color:#fff;font-weight:900
}

/* ====== DEFAULTS BOX ====== */
.defaults{
  margin-top:8px;background:#fbfdff;padding:12px;border-radius:10px;border:1px solid #eef7fb
}

/* ====== MODAL ====== */
.modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(8,12,16,0.45);z-index:300}
.modal.open{display:flex}
.modal-panel{width:840px;background:var(--card);border-radius:18px;padding:16px;box-shadow:0 24px 60px rgba(6,12,20,0.45)}
.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.modal-body{max-height:64vh;overflow:auto}
.code-pre{background:#0b1620;color:#fff;padding:12px;border-radius:8px}

/* ====== Metrics tabs ====== */
.tabs{display:flex;gap:10px;margin-bottom:12px;flex-wrap:wrap}
.tab-btn{
  border:1px solid #e3eef7;background:#fff;border-radius:999px;padding:8px 14px;cursor:pointer;
  font-weight:800;color:var(--accent);letter-spacing:.2px
}
.tab-btn.active{background:#eef2ff;border-color:#d1e0ff}
.tab-panel{display:none}
.tab-panel.active{display:block}
.metrics-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}

/* Switch in tabs */
.switch{position:relative;display:inline-block;width:52px;height:30px;margin-right:10px}
.switch input{display:none}
.switch span{position:absolute;cursor:pointer;inset:0;background:#e5edf6;border-radius:20px;transition:all .2s;}
.switch span:before{
  content:"";position:absolute;height:24px;width:24px;left:3px;top:3px;background:#fff;border-radius:50%;
  transition:.2s;box-shadow:0 2px 6px rgba(0,0,0,.15)
}
.switch input:checked + span{background:var(--brand-grad)}
.switch input:checked + span:before{transform:translateX(22px)}
.tab-toggle{display:flex;align-items:center;gap:10px;margin:6px 0 12px 0;font-weight:800;color:#1a2b3e}

/* ====== Allowed Menus — checkboxes in Create/Edit ====== */
.checkbox-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:8px;
  margin-top:8px
}
.checkbox-grid label{
  display:flex;align-items:center;gap:8px;
  padding:8px 10px;border:1px solid #e8eef7;border-radius:10px;background:#fff;
  font-weight:700;color:#17324b
}
.checkbox-grid input[type=checkbox]{accent-color:#596dff}

/* ====== RESPONSIVE ====== */
@media (max-width:1100px){
  .container{grid-template-columns:1fr; padding:16px}
}
@media (max-width:980px){
  .sidebar{display:none}
}
/* partner.css — Kolorowey UI
   - Enhanced left nav colors aligned to logo
   - Bigger logo
   - No Rev Share column styles needed
*/

/* ====== THEME ====== */
:root{
  /* Brand palette tuned to the logo (violet → indigo → azure) */
  --brand:#6c59ff;          /* primary violet */
  --brand-2:#5668ff;        /* indigo */
  --brand-3:#2e90c9;        /* azure */
  --brand-grad: linear-gradient(140deg, #6c59ff 0%, #5668ff 52%, #2e90c9 100%);

  /* Sidebar glass gradient built from brand palette */
  --side-a:#e9e6ff;   /* soft violet wash */
  --side-b:#e6f3ff;   /* soft azure wash */
  --side-glow-1:#b6a7ff;
  --side-glow-2:#8ecbff;

  --bg:#f6f8fc;
  --card:#ffffff;
  --muted:#5f7180;
  --text:#0b1b22;
  --accent:#0d2a4a;
  --accent-2:#537b98;
  --danger:#e05b5b;

  --radius:16px;
  --shadow: 0 10px 30px rgba(10,20,30,0.08);
  --sidebar-w:258px; /* a bit wider to breathe */

  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* ====== BASE ====== */
*{box-sizing:border-box}
.hidden{display:none !important}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,Arial,Helvetica,sans-serif
}
.app{display:flex;min-height:100vh}

/* ====== LEFT SIDEBAR ====== */
.sidebar{
  position:relative;
  width:var(--sidebar-w);
  background:
    radial-gradient(140% 140% at -10% -20%, #ffffff 0%, var(--side-a) 55%, var(--side-b) 100%);
  padding:22px 20px;
  border-right:1px solid rgba(15,25,30,0.08);
  display:flex;flex-direction:column;gap:18px;overflow:hidden;
}
/* soft aurora glow */
.sidebar-bg{
  position:absolute;inset:-42% -60% auto auto;height:320px;width:320px;border-radius:50%;
  background:
    conic-gradient(from 210deg, var(--side-glow-1) 0%, #9fb6ff 25%, var(--side-glow-2) 55%, #d6b6ff 85%, var(--side-glow-1) 100%);
  filter: blur(42px) saturate(120%); opacity:.28; pointer-events:none;
}

.sidebar-top{padding:6px 0 6px}
.logo-wrap{text-align:center}
.logo-img{
  max-width:240px;  /* bigger logo */
  width:100%;
  height:auto;
  display:block;margin:0 auto;
  filter: drop-shadow(0 12px 28px rgba(108,89,255,.28));
}

/* ====== NAV LIST ====== */
.nav-list{display:flex;flex-direction:column;gap:10px;margin-top:8px}

.nav-item{
  display:flex;align-items:center;gap:12px;
  padding:12px 12px;
  border-radius:14px;
  color:var(--accent);
  text-decoration:none;
  font-weight:800;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, box-shadow .2s ease, color .12s ease;
}

/* icon container picks up brand gradient border + subtle glossy bg */
.nav-item .nav-icon{
  width:42px;height:42px;border-radius:13px;
  background:linear-gradient(180deg,#ffffff, #f3f5ff);
  display:flex;align-items:center;justify-content:center;
  color:#3b5bff;
  box-shadow:
    inset 0 0 0 1px rgba(86,104,255,.22),
    0 6px 14px rgba(86,104,255,.14);
}
.nav-item .nav-icon svg{width:22px;height:22px;stroke-width:1.9}

.nav-item:hover{
  background:linear-gradient(180deg, #f1f3ff 0%, #eaf4ff 100%);
  transform:translateX(6px);
  color:#102b50;
}

.nav-item.active{
  background:
    linear-gradient(180deg,#eef0ff 0%, #e7f2ff 100%);
  box-shadow:
    inset 0 0 0 1px rgba(38,56,120,0.10),
    0 10px 22px rgba(86,104,255,.18);
  border-left:6px solid rgba(86,104,255,.50);
  color:#0e2a48;
}

/* Sidebar footer */
.sidebar-bottom{margin-top:auto;text-align:center}
.btn-ghost{
  background:#fff;border:1px solid #e2eef6;
  padding:8px 10px;border-radius:10px;color:var(--accent);
  font-weight:700
}

/* New Logout Button Styling */
.btn-logout {
  background-color: #e63946;   /* Red background */
  color: #ffffff;             /* White text */
  font-weight: 700;
  padding: 12px 20px;         /* Slightly bigger than Collapse button */
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: inline-block;
  transition: background 0.2s ease;
}

.btn-logout:hover {
  background-color: #d62828;   /* Darker red when hovered */
}


/* ====== BADGES & TEXT SIZES ====== */
.small{font-size:13px}
.tiny{font-size:12px}
.muted{color:var(--muted)}
.chip{
  display:inline-block;margin-left:6px;padding:2px 8px;
  border-radius:999px;background:#eef5ff;border:1px solid #e2ecff;
  color:#1c3550;font-weight:700;font-size:11px
}
.chip.tz{margin-left:12px}

/* ====== TOP BAR ====== */
.main{flex:1;display:flex;flex-direction:column}
.topbar{
  display:flex;justify-content:space-between;align-items:center;
  padding:22px 28px;border-bottom:1px solid rgba(8,15,20,0.06);
  background:
    linear-gradient(180deg,#ffffff,#f6f9ff);
}
.title{margin:0;font-size:22px;font-weight:800;letter-spacing:.2px}
.subtitle{color:var(--muted);font-size:13px;margin-top:6px}
.actions{display:flex;gap:12px}

.btn{
  background:var(--accent);color:#fff;padding:10px 14px;border-radius:12px;border:none;cursor:pointer;font-weight:800;
  transition:transform .08s ease, box-shadow .12s ease
}
.btn:hover{transform:translateY(-1px);box-shadow:0 8px 22px rgba(16,42,72,.12)}
.btn.ghost{background:#fff;color:var(--accent);border:1px solid #e3f0f7}
.btn.small{padding:6px 10px;font-size:13px}
.btn.primary{background:var(--brand-grad);box-shadow: 0 8px 22px rgba(86,104,255,.28)}
.btn.danger{background:var(--danger);color:#fff}

/* ====== LAYOUT ====== */
.container{display:grid;grid-template-columns:420px 1fr;gap:22px;padding:26px 32px}
.panel{background:var(--card);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow)}
.left-panel{min-height:60vh}
.right-panel{min-height:60vh}

/* ====== PARTNERS LIST ====== */
.search-header{display:flex;flex-direction:column;gap:10px}
.search-count{font-weight:800;color:var(--accent-2)}
.input{
  padding:10px;border-radius:12px;border:1px solid #e2f0f8;background:#fbfeff;width:100%;
  outline:none
}
.input:focus{border-color:#cfe3ff; box-shadow:0 0 0 3px rgba(86,104,255,.12)}

.partners-list{margin-top:12px;max-height:66vh;overflow:auto;padding-right:6px}
.partner-item{
  display:grid;grid-template-columns:1fr auto;gap:8px;
  padding:14px;border-radius:16px;border:1px solid #e9f0fb;
  background:linear-gradient(180deg,#fff,#fbfeff);margin-bottom:12px
}
.partner-item .name{font-weight:800;font-size:16px;letter-spacing:.1px}
.partner-item .meta{color:var(--muted);font-size:13px;margin-top:2px;font-weight:500}
.partner-item .created{color:#5d7287;font-size:12px;margin-top:8px}
.openBtn{
  background:#0e2a48;color:#fff;padding:10px 14px;border-radius:12px;border:none;align-self:center;font-weight:800
}

/* ====== DETAILS ====== */
.placeholder{
  padding:30px;border-radius:12px;
  background:linear-gradient(180deg,#fff,#fbfdff);
  border:1px dashed #eef7fb;color:var(--muted)
}
.partner-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:14px}
.partner-head h2{margin:0;font-weight:800}
.partner-actions{display:flex;gap:8px;flex-wrap:wrap}

/* ====== DOMAINS TABLE ====== */
.domains-section{margin-top:14px}
.domains-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}
.domains-controls{display:flex;gap:8px;align-items:center}
.table-frame{overflow:auto;border-radius:10px;border:1px solid #eef6fb}
.table{width:100%;border-collapse:collapse}
.table thead th{
  padding:12px;background:#fbfdff;text-align:left;border-bottom:1px solid #eef6fb;font-weight:800
}
.table tbody td{padding:12px;border-top:1px solid #f5f9fb;vertical-align:middle}
.domain-chip{font-weight:800;color:var(--accent-2)}
.table select,
.table input[type=number],
.table input[type=password]{padding:8px;border-radius:10px;border:1px solid #e2f0f8;background:#fff}
.table select:focus,
.table input:focus{border-color:#cfe3ff; box-shadow:0 0 0 3px rgba(86,104,255,.12)}

.cut-pill{
  display:inline-block;padding:4px 8px;border-radius:999px;border:1px solid #e4ecf8;background:#f6fbff;
  font-weight:800;font-size:12px;color:#0c2a44;margin-right:6px
}
.cut-pill.over{
  background:var(--brand-grad);border-color:transparent;color:#fff;font-weight:900
}

/* ====== DEFAULTS BOX ====== */
.defaults{
  margin-top:8px;background:#fbfdff;padding:12px;border-radius:10px;border:1px solid #eef7fb
}

/* ====== MODAL ====== */
.modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(8,12,16,0.45);z-index:300}
.modal.open{display:flex}
.modal-panel{width:840px;background:var(--card);border-radius:18px;padding:16px;box-shadow:0 24px 60px rgba(6,12,20,0.45)}
.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.modal-body{max-height:64vh;overflow:auto}
.code-pre{background:#0b1620;color:#fff;padding:12px;border-radius:8px}

/* ====== Metrics tabs ====== */
.tabs{display:flex;gap:10px;margin-bottom:12px;flex-wrap:wrap}
.tab-btn{
  border:1px solid #e3eef7;background:#fff;border-radius:999px;padding:8px 14px;cursor:pointer;
  font-weight:800;color:var(--accent);letter-spacing:.2px
}
.tab-btn.active{background:#eef2ff;border-color:#d1e0ff}
.tab-panel{display:none}
.tab-panel.active{display:block}
.metrics-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}

/* Switch in tabs */
.switch{position:relative;display:inline-block;width:52px;height:30px;margin-right:10px}
.switch input{display:none}
.switch span{position:absolute;cursor:pointer;inset:0;background:#e5edf6;border-radius:20px;transition:all .2s;}
.switch span:before{
  content:"";position:absolute;height:24px;width:24px;left:3px;top:3px;background:#fff;border-radius:50%;
  transition:.2s;box-shadow:0 2px 6px rgba(0,0,0,.15)
}
.switch input:checked + span{background:var(--brand-grad)}
.switch input:checked + span:before{transform:translateX(22px)}
.tab-toggle{display:flex;align-items:center;gap:10px;margin:6px 0 12px 0;font-weight:800;color:#1a2b3e}

/* ====== Allowed Menus — checkboxes in Create/Edit ====== */
.checkbox-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:8px;
  margin-top:8px
}
.checkbox-grid label{
  display:flex;align-items:center;gap:8px;
  padding:8px 10px;border:1px solid #e8eef7;border-radius:10px;background:#fff;
  font-weight:700;color:#17324b
}
.checkbox-grid input[type=checkbox]{accent-color:#596dff}

/* ====== RESPONSIVE ====== */
@media (max-width:1100px){
  .container{grid-template-columns:1fr; padding:16px}
}
@media (max-width:980px){
  .sidebar{display:none}
}

/* ===== Dashboard-only styles ===== */

:root{
  --muted:#6a7a90;
  --brand-grad:linear-gradient(135deg,#6c59ff 0%, #2e90c9 100%);
}

.dash-container{padding:22px 28px;display:flex;flex-direction:column;gap:16px}
.title.soft{font-weight:700}

.topbar .actions{display:flex;gap:10px;align-items:center}

.range-row{display:flex;gap:14px;align-items:center;flex-wrap:wrap}
.segmented{display:inline-flex;background:#fff;border:1px solid #e6eef7;border-radius:12px;overflow:hidden;box-shadow:0 4px 10px rgba(14,28,50,.04)}
.seg-btn{border:none;background:transparent;padding:10px 14px;font-weight:800;color:#0d2a4a;cursor:pointer;transition:.15s}
.segmented .seg-btn + .seg-btn{border-left:1px solid #e6eef7}
.seg-btn:hover{background:#f3f7ff}
.seg-btn.active{background:var(--brand-grad);color:#fff;box-shadow:0 6px 16px rgba(86,104,255,.22)}

.custom-range{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid #e6eef7;border-radius:12px;padding:8px 10px;box-shadow:0 6px 18px rgba(10,18,28,.06)}
.custom-range .btn{margin-left:4px}
.date-label{position:relative;display:inline-flex;align-items:center}
.date-label .icon{position:absolute;left:10px;font-size:16px;color:#6c59ff}
.input.date{padding:8px 10px 8px 34px;border-radius:10px;border:1px solid #dde3ee;background:#fff}

.filter-bar.grid-3{
  display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:18px
}
.filter-bar label{display:flex;flex-direction:column;gap:6px}
.filter-bar .label-text{font-size:12px;font-weight:800;color:#4f5d75;letter-spacing:.2px}
.filter-bar .input.large{
  padding:10px 14px;border-radius:12px;border:1px solid #dde3ee;background:#fff;
  box-shadow:0 4px 10px rgba(0,0,0,.05);font-weight:700
}

.kpi-grid.six{
  display:grid;grid-template-columns:repeat(6,1fr);gap:12px
}
.kpi-card{
  position:relative;background:#fff;border:1px solid #eaf1fb;border-radius:18px;padding:14px;
  box-shadow:0 10px 26px rgba(10,18,28,.06);min-width:160px
}
.kpi-title{font-size:12px;font-weight:800;color:var(--muted);letter-spacing:.3px;margin-bottom:8px}
.kpi-value{font-size:22px;font-weight:800;color:#0d2a4a}

.kpi-change{margin-top:4px}
.pill{display:inline-block;padding:3px 8px;border-radius:999px;font-size:12px;font-weight:800}
.pill.up{background:#e8fbf2;color:#14b36f}
.pill.down{background:#ffecee;color:#e05b5b}
.spark{position:absolute;left:0;right:0;bottom:0;height:42px}

.row-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.panel{background:#fff;border:1px solid #eaf1fb;border-radius:18px;padding:14px;box-shadow:0 10px 26px rgba(10,18,28,.06);min-height:320px}
.panel-title{font-weight:800;color:#0d2a4a;margin-bottom:8px}
.alerts{margin:0;padding-left:18px}
.alerts li{margin:6px 0}

.subtitle{display:flex;align-items:center;gap:8px}
.subtitle .chip{background:#eef3ff;border:1px solid #dde5ff;color:#304c89;padding:3px 8px;border-radius:999px;font-weight:800}

@media (max-width:1300px){
  .kpi-grid.six{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:820px){
  .row-2{grid-template-columns:1fr}
  .kpi-grid.six{grid-template-columns:repeat(2,1fr)}
  .filter-bar.grid-3{grid-template-columns:1fr}
}

.hidden{display:none!important}

/* Make KPI cards taller for more content */
.kpi-grid.six .kpi-card{
  min-height:120px;   /* taller box */
  padding:20px 16px;  /* extra padding for breathing space */
}
.kpi-value{font-size:26px;font-weight:700;margin-bottom:8px}
.kpi-change{margin-top:8px}

/* Ensure selects show as interactive (fix Safari pointer issue) */
.filter-bar select.input.large{
  cursor:pointer;
}
/* Safety lock: if a parent tries to grow, don't allow the canvas to exceed our fixed height */
#chartTrend,
#chartFormat,
#chartCountries,
#chartDomains,
#chartOS,
#chartPlatforms {
  height: 280px !important;
  max-height: 280px !important;
  display: block;
}
/* Hide sparklines inside KPI cards */
.kpi-card .spark {
  display: none !important;
}

/* === KPI REVAMP (append-only; safe to paste at the very end) ================= */

/* Hide any legacy sparklines inside the KPI tiles */
.kpi-card .spark { display: none !important; }

/* Tile look & feel (uses your existing .kpi-card) */
.kpi-card {
  position: relative;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(17, 24, 39, .06);
  padding: 18px 18px 16px;
  transition: transform .15s ease, box-shadow .15s ease;
  overflow: hidden;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(17,24,39,.08); }

/* New structured content pieces */
.kpi-head{
  font: 700 12px/1 var(--kpi-font, "Inter", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial);
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--muted);
}
.kpi-main{
  font: 700 34px/1.1 var(--kpi-font, "Inter", system-ui);
  color: #0f172a;
  letter-spacing: .2px;
}
.kpi-sub{
  color: #111827;
  opacity: .65;
  font-weight: 600;
  margin-top: 6px;
}
.kpi-divider{
  height: 4px;
  width: 56px;
  border-radius: 999px;
  background: #e8eef7;
  margin: 12px 0 10px;
}
.kpi-foot{
  display: flex; align-items: center; justify-content: space-between;
  font: 600 12.5px/1.1 var(--kpi-font, "Inter", system-ui);
}
.kpi-change{
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 999px;
  background: #ecfdf5; color: #0f766e;
}
.kpi-change.down{ background: #fff1f2; color: #be123c; }
.kpi-change .arrow{ font-size: 12px; line-height: 1; }
.kpi-mtd{ color: #64748b; white-space: nowrap; font-weight: 600; }
.kpi-mtd b{ color: #0f172a; font-weight: 800; }

/* Colored metric headers (apply by adding a class to each .kpi-card) */
.kpi-card.req  .kpi-head{ color:#e61e72; }   /* Ad Requests */
.kpi-card.imp  .kpi-head{ color:#1e88ff; }   /* Impressions */
.kpi-card.ecpm .kpi-head{ color:#16a34a; }   /* eCPM */
.kpi-card.fill .kpi-head{ color:#f59e0b; }   /* Fill Rate */
.kpi-card.ctr  .kpi-head{ color:#64748b; }   /* CTR */
.kpi-card.rev  .kpi-head{ color:#7c3aed; }   /* Revenue */

/* Keep your current grid, just ensure breathing room on smaller screens */
@media (max-width: 1400px){
  .kpi-main{ font-size: 28px; }
}

/* === KPI Updates: compact numbers & stable footer === */

.kpi-value{
  font-weight:700;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size: clamp(20px, 2.6vw, 34px);
}

.kpi-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}

.kpi-footer .mtd{
  font-weight:800;
  color:#4f5d75;
  white-space:nowrap;
}
.kpi-footer .mtd .label{
  opacity:.75;
  margin-right:6px;
}

.pill{
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
}

/* Base pill */
.pill {
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  font-weight:700;
  font-size:12px;
  line-height:1;
  /* remove any default background so state classes own it */
  background:none;
}

/* Positive and negative states */
.pill.up {
  background:#e8fbf2;   /* light green */
  color:#14b36f;
}

.pill.down {
  background:#ffecee;   /* light red */
  color:#e05b5b;
}

/* Clean, single-layer KPI change badges */
.kpi-change{
  /* strip the default look so states own the paint */
  background: transparent !important;
  box-shadow: none !important;
  padding: 0;                 /* we’ll add padding on states */
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

/* Positive / Negative states */
.kpi-change.up{
  background: #e8fbf2 !important;   /* light green */
  color: #14b36f !important;
  padding: 7px 12px;
}

.kpi-change.down{
  background: #ffecee !important;   /* light red */
  color: #e05b5b !important;
  padding: 7px 12px;
}

/* optional: the small triangle glyph inside */
.kpi-change .arrow{
  font-size: 12px;
  line-height: 1;
}

