/* ADMIN — Apple Sidebar Design */
.admin-body{display:flex;min-height:100vh;background:#f5f5f5;font-family:'Inter',-apple-system,sans-serif; }
/* SIDEBAR */
.sidebar{width:240px;min-height:100vh;background:#fff;border-right:1px solid rgba(0,0,0,.09);position:fixed;top:0;left:0;bottom:0;display:flex;flex-direction:column;z-index:50;overflow-y:auto;transition:transform .3s}
.sidebar-logo{padding:18px 20px 16px;border-bottom:1px solid rgba(0,0,0,.09);display:flex;align-items:center;gap:10px}
.sidebar-brand{font-size:14px;font-weight:800;color:#0a0a0a;letter-spacing:-.4px;text-decoration:none}
.sidebar-brand .dot{color:#cc0000}
.admin-pill{font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;background:#cc0000;color:#fff;padding:2px 7px;border-radius:5px}
.sidebar-nav{padding:10px;flex:1}
.nav-section{font-size:12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:black;padding:0 8px;margin:16px 0 4px}
.nav-section:first-child{margin-top:4px}
.nav-item{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:8px;font-size:13px;font-weight:500;color:black;text-decoration:none;cursor:pointer;transition:background .12s,color .12s;border:none;background:none;width:100%;text-align:left;font-family:inherit;position:relative}
.nav-item:hover{background:#f5f5f5;color:#0a0a0a}
.nav-item.active{background: var(--white);color:#cc0000;font-weight:600}
.nav-icon{font-size:15px;width:20px;text-align:center;flex-shrink:0}
.nav-badge{margin-left:auto;background:#cc0000;color:#fff;font-size:10px;font-weight:700;padding:1px 7px;border-radius:10px;min-width:20px;text-align:center}
.sidebar-footer{padding:10px;border-top:1px solid rgba(0,0,0,.09)}
.user-chip{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:10px;cursor:pointer;transition:background .15s}
.user-chip:hover{background:#f5f5f5}
.user-av{width:28px;height:28px;border-radius:50%;background:#cc0000;color:#fff;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.user-info .name{font-size:12px;font-weight:600;color:#0a0a0a}
.user-info .role{font-size:10px;color:#999}
/* MAIN */
.admin-main{margin-left:240px;flex:1;min-height:100vh;display:flex;flex-direction:column}
.topbar{height:52px;background:#fff;border-bottom:1px solid rgba(0,0,0,.09);display:flex;align-items:center;padding:0 32px;gap:16px;position:sticky;top:0;z-index:40}
.topbar-title{font-size:16px;font-weight:700;letter-spacing:-.3px}
.topbar-right{display:flex;align-items:center;gap:10px;margin-left:auto}
.admin-content{padding:28px 32px;flex:1}
/* STATS */
.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:28px}
.stat-card{background:#fff;border:1px solid rgba(0,0,0,.09);border-radius:14px;padding:20px 22px}
.stat-icon-box{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:17px;margin-bottom:14px}
.si-red{background:rgba(204,0,0,.08)}
.si-black{background:#f0f0f0}
.stat-label{font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:black;margin-bottom:6px}
.stat-value{font-size:26px;font-weight:800;letter-spacing:-.8px}
.stat-sub{font-size:11px;color:#999;margin-top:4px}
.stat-up{color:#007700} .stat-down{color:#cc0000}
/* ADMIN CARD */
.ac{background:#fff;border:1px solid rgba(0,0,0,.09);border-radius:14px;overflow:hidden}
.ac-head{padding:16px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #f0f0f0}
.ac-title{font-size:14px;font-weight:700;letter-spacing:-.2px}
.ac-body{padding:0}
.ac-foot{padding:12px 20px;border-top:1px solid #f0f0f0;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#999}
/* FILTER BAR */
.fbar{display:flex;align-items:center;gap:10px;padding:12px 20px;border-bottom:1px solid #f0f0f0;flex-wrap:wrap}
.fbar .input,.fbar .sel{padding:8px 12px;font-size:13px}
.fbar .sel{padding-right:32px;width:auto;min-width:140px}
.fbar .input{max-width:220px}
/* ACTION BUTTONS */
.abts{display:flex;gap:4px}
.abt{width:28px;height:28px;border-radius:6px;border:1px solid rgba(0,0,0,.09);background:#fff;cursor:pointer;font-size:12px;transition:.15s;display:flex;align-items:center;justify-content:center;color:#555}
.abt:hover{background:#f5f5f5}
.abt.danger:hover{background:rgba(204,0,0,.07);color:#cc0000;border-color:#cc0000}
.abt.ok:hover{background:rgba(0,140,0,.07);color:#007700;border-color:#007700}
/* USER CELL */
.ucell{display:flex;align-items:center;gap:10px}
.uav{width:32px;height:32px;border-radius:50%;background:#f0f0f0;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:700;flex-shrink:0}
.ucell-name{font-size:13px;font-weight:600}
.ucell-email{font-size:11px;color:#999}
/* SETTINGS */
.settings-section{background:#fff;border:1px solid rgba(0,0,0,.09);border-radius:14px;overflow:hidden;margin-bottom:18px}
.ss-head{padding:16px 20px;border-bottom:1px solid #f0f0f0;display:flex;align-items:center;gap:12px}
.ss-icon{width:34px;height:34px;border-radius:8px;background:#f0f0f0;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0}
.ss-title{font-size:14px;font-weight:700}
.ss-desc{font-size:12px;color:#555;margin-top:1px}
.ss-body{padding:18px 20px;display:flex;flex-direction:column;gap:16px}
.ss-row{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.ss-row-info h4{font-size:13px;font-weight:500;margin-bottom:2px}
.ss-row-info p{font-size:12px;color:#555}
.api-row{display:flex;gap:8px;align-items:center}
.api-inp{font-family:monospace;font-size:12px;max-width:280px}
/* MOBILE */
@media(max-width:900px){
  .sidebar{transform:translateX(-100%)}
  .sidebar.open{transform:translateX(0)}
  .admin-main{margin-left:0}
  .stats-grid{grid-template-columns:1fr 1fr}
  .admin-content{padding:20px 16px}
  .topbar{padding:0 16px}
}

/* ── Settings classes (aliases) ── */
.settings-section{background:#fff;border:1px solid rgba(0,0,0,.09);border-radius:14px;overflow:hidden;margin-bottom:18px}
.settings-header,.ss-head{padding:16px 20px;border-bottom:1px solid #f0f0f0;display:flex;align-items:center;gap:12px}
.settings-icon-box,.ss-icon{width:34px;height:34px;border-radius:8px;background:#f0f0f0;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0}
.settings-title,.ss-title{font-size:14px;font-weight:700}
.settings-desc,.ss-desc{font-size:12px;color:#666;margin-top:2px}
.settings-body,.ss-body{padding:20px;display:flex;flex-direction:column;gap:14px}
.settings-row,.ss-row{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.settings-row-info h4{font-size:13px;font-weight:500;margin-bottom:3px}
.settings-row-info p{font-size:12px;color:#666}
/* ── Tab system ── */
.tab-system{display:flex;gap:2px;background:#f0f0f0;border-radius:10px;padding:3px;flex-wrap:wrap;margin-bottom:20px}
.tab-btn{padding:7px 16px;border-radius:8px;border:none;background:transparent;font-size:13px;font-weight:500;font-family:inherit;color:#666;cursor:pointer;transition:.12s;white-space:nowrap}
.tab-btn:hover{background:rgba(0,0,0,.06);color:#0a0a0a}
.tab-btn.active{background:#fff;color:#0a0a0a;box-shadow:0 2px 8px rgba(0,0,0,.08);font-weight:600}
.tab-pane{display:none}.tab-pane.active{display:block}
/* ── API input rows ── */
.api-field{display:grid;grid-template-columns:200px 1fr;gap:10px;align-items:center;margin-bottom:10px}
.api-field label{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#666}
.sec-head{font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.1em;color:#999;padding:10px 0 6px;border-top:1px solid #f0f0f0;margin-top:6px}
.sec-head:first-child{border-top:none;padding-top:0}
/* ── Plan cards ── */
.plan-card{border:1.5px solid rgba(0,0,0,.1);border-radius:12px;padding:20px;transition:.15s}
.plan-card:hover{border-color:rgba(0,0,0,.2)}
.plan-card.current{border-color:#CC0000;background:rgba(204,0,0,.04)}
.plan-price{font-size:28px;font-weight:800;letter-spacing:-.5px;margin:8px 0}
/* ── Dashboard stats ── */
.kpi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px}
.kpi{background:#fff;border:1px solid rgba(0,0,0,.09);border-radius:12px;padding:18px}
.kpi-icon{font-size:20px;margin-bottom:10px}
.kpi-val{font-size:24px;font-weight:800;letter-spacing:-.5px;margin-bottom:3px}
.kpi-lbl{font-size:11px;color:#666;font-weight:600;text-transform:uppercase;letter-spacing:.05em}
.kpi-change{font-size:11px;margin-top:4px;font-weight:500}
.kpi-up{color:#007700}.kpi-dn{color:#CC0000}.kpi-neu{color:#999}
/* ── Chart bars ── */
.chart-area{height:120px;display:flex;align-items:flex-end;gap:4px;padding:0 0 4px}
.bar-col{flex:1;background:#f0f0f0;border-radius:4px 4px 0 0;position:relative;min-height:4px;cursor:pointer;transition:.15s}
.bar-col:hover{background:rgba(204,0,0,.2)}
.bar-col.filled{background:rgba(204,0,0,.15)}
.bar-tip{position:absolute;bottom:calc(100% + 4px);left:50%;transform:translateX(-50%);background:#0a0a0a;color:#fff;font-size:10px;font-weight:600;padding:3px 7px;border-radius:5px;white-space:nowrap;opacity:0;transition:.15s;pointer-events:none}
.bar-col:hover .bar-tip{opacity:1}
.chart-lbls{display:flex;gap:4px;margin-top:6px}
.chart-lbl{flex:1;text-align:center;font-size:10px;color:#999}
/* ── Product grid ── */
.prod-img-cell{width:40px;height:40px;border-radius:8px;background:#f5f5f5;display:flex;align-items:center;justify-content:center;font-size:20px;overflow:hidden;flex-shrink:0}
.prod-img-cell img{width:100%;height:100%;object-fit:cover}
/* ── Status badges ── */
.badge-sm{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:5px;font-size:11px;font-weight:600}
.badge-green{background:rgba(0,140,0,.08);color:#007700}
.badge-red{background:rgba(204,0,0,.08);color:#CC0000}
.badge-orange{background:rgba(180,100,0,.1);color:#8A5000}
.badge-blue{background:rgba(0,80,200,.08);color:#0044BB}
.badge-grey{background:#f0f0f0;color:#555}
/* ── Responsive ── */
@media(max-width:900px){
  .kpi-grid{grid-template-columns:1fr 1fr}
  .api-field{grid-template-columns:1fr}
  .settings-row{flex-direction:column}
}
