/* ============================================================
   STUDIO 8S PAKISTAN — ADMIN PANEL CSS
   Light-mode dashboard aligned with studio8s.com branding
   ============================================================ */

.admin-body { background: #f0f2f7; overflow-x: hidden; font-family: var(--font-b); }

/* ===== LOGIN ===== */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--s8-charcoal); background-image: radial-gradient(rgba(0,87,255,.06) 1px,transparent 1px); background-size: 28px 28px; }
.login-card { background: #fff; border-radius: var(--r-xl); padding: 44px 40px; width: 100%; max-width: 420px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-logo { height: 36px; margin: 0 auto 6px; }
.login-logo-dark { filter: invert(0); }
.login-title { font-size: 1.5rem; color: var(--s8-dark); margin-bottom: 4px; font-family: var(--font-h); }
.login-sub { font-size: 13px; color: var(--s8-muted); }
.login-error { color: var(--s8-red); font-size: 13px; margin-top: 8px; padding: 8px 12px; background: rgba(239,68,68,.07); border-radius: var(--r-sm); border: 1px solid rgba(239,68,68,.15); }

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

/* ===== SIDEBAR ===== */
.admin-sidebar { width: 230px; flex-shrink: 0; background: var(--s8-charcoal); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; box-shadow: 2px 0 20px rgba(0,0,0,.15); }
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 20px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo-img { height: 28px; }
.sidebar-pk { font-size: 10px; background: var(--s8-blue); color: #fff; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; font-family: var(--font-b); }
.sidebar-nav { flex: 1; padding: 10px 0; overflow-y: auto; }
.sn-item { display: flex; align-items: center; gap: 10px; padding: 11px 20px; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.65); cursor: pointer; transition: all .15s; text-decoration: none; position: relative; border-left: 3px solid transparent; }
.sn-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.sn-item.active { background: rgba(0,87,255,.15); color: #fff; border-left-color: var(--s8-blue); }
.sn-icon { font-size: 16px; flex-shrink: 0; }
.sn-badge { margin-left: auto; background: var(--s8-red); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 10px; font-family: var(--font-h); font-weight: 800; }
.sn-badge:empty { display: none; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 8px; }
.sf-link { font-size: 12px; color: rgba(255,255,255,.4); transition: color .15s; }
.sf-link:hover { color: rgba(255,255,255,.7); }
.sf-logout { background: transparent; border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.5); padding: 7px 12px; border-radius: var(--r-sm); font-size: 12px; cursor: pointer; transition: all .15s; font-family: var(--font-b); font-weight: 600; }
.sf-logout:hover { border-color: var(--s8-red); color: #ff7a7a; }

/* ===== MAIN AREA ===== */
.admin-main { flex: 1; overflow-y: auto; min-width: 0; }
.admin-tab { padding: 32px 36px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--s8-border); }
.admin-header h1 { font-size: 1.7rem; color: var(--s8-dark); font-family: var(--font-h); font-weight: 900; }
.admin-date { font-size: 13px; color: var(--s8-muted); }
.filter-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.filter-row select,.filter-row input { font-size: 13px; padding: 9px 13px; border-radius: var(--r-sm); background: #fff; border: 1.5px solid var(--s8-border); color: var(--s8-dark); font-family: var(--font-b); transition: border-color .2s; outline: none; }
.filter-row select:focus,.filter-row input:focus { border-color: var(--s8-blue); }

/* ===== STAT TILES ===== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 16px; margin-bottom: 28px; }
.stat-tile { background: #fff; border: 1px solid var(--s8-border); border-radius: var(--r-lg); padding: 22px 20px; box-shadow: var(--shadow-sm); transition: box-shadow .2s; }
.stat-tile:hover { box-shadow: var(--shadow-md); }
.st-label { font-size: 11px; font-weight: 700; color: var(--s8-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.st-val { font-family: var(--font-h); font-size: 2.2rem; font-weight: 900; color: var(--s8-dark); line-height: 1; margin-bottom: 4px; }
.st-sub { font-size: 12px; color: var(--s8-muted); }
.st-warning { border-top: 3px solid var(--s8-orange); }
.st-warning .st-val { color: var(--s8-orange); }
.st-success { border-top: 3px solid var(--s8-green); }
.st-success .st-val { color: var(--s8-green); }
.st-blue { border-top: 3px solid var(--s8-blue); }
.st-blue .st-val { color: var(--s8-blue); font-size: 1.6rem; }

/* ===== SECTIONS ===== */
.admin-section { background: #fff; border: 1px solid var(--s8-border); border-radius: var(--r-lg); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.admin-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.admin-section-header h3 { font-size: 1rem; color: var(--s8-dark); font-family: var(--font-h); font-weight: 800; }
.as-link { font-size: 13px; color: var(--s8-blue); background: none; border: none; cursor: pointer; font-family: var(--font-b); font-weight: 600; transition: opacity .15s; }
.as-link:hover { opacity: .7; }

/* ===== ORDERS TABLE ===== */
.order-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.order-table th { text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 700; color: var(--s8-muted); text-transform: uppercase; letter-spacing: .07em; border-bottom: 2px solid var(--s8-border); white-space: nowrap; background: var(--s8-bg-alt); }
.order-table th:first-child { border-radius: var(--r-sm) 0 0 0; }
.order-table th:last-child  { border-radius: 0 var(--r-sm) 0 0; }
.order-table td { padding: 13px 14px; color: var(--s8-text); border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.order-table tr:hover td { background: var(--s8-bg-alt); }
.order-table tr:last-child td { border-bottom: none; }
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; font-family: var(--font-h); }
.sp-pending  { background: rgba(245,158,11,.12);  color: #b45309; }
.sp-active   { background: rgba(16,185,129,.12);   color: #065f46; }
.sp-paused   { background: rgba(107,114,128,.1);   color: var(--s8-muted); }
.sp-cancelled{ background: rgba(239,68,68,.1);     color: #b91c1c; }
.action-btn { padding: 5px 10px; border-radius: var(--r-sm); font-size: 11px; font-weight: 700; cursor: pointer; border: none; font-family: var(--font-b); margin-right: 4px; transition: all .15s; }
.ab-view   { background: #f3f4f6; color: var(--s8-text); }
.ab-active { background: rgba(16,185,129,.1); color: #065f46; }
.ab-pause  { background: rgba(245,158,11,.1); color: #b45309; }
.ab-delete { background: rgba(239,68,68,.1);  color: #b91c1c; }
.ab-view:hover   { background: var(--s8-border); }
.ab-active:hover { background: rgba(16,185,129,.2); }
.ab-pause:hover  { background: rgba(245,158,11,.2); }
.ab-delete:hover { background: rgba(239,68,68,.2); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 52px 24px; color: var(--s8-muted); }
.empty-state .es-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ===== CLIENTS GRID ===== */
.clients-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 16px; }
.client-card { background: #fff; border: 1px solid var(--s8-border); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); transition: box-shadow .2s,transform .2s; }
.client-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cc-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cc-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--s8-blue-light); border: 2px solid var(--s8-blue); display: flex; align-items: center; justify-content: center; font-family: var(--font-h); font-weight: 800; font-size: 14px; color: var(--s8-blue); flex-shrink: 0; }
.cc-name { font-family: var(--font-h); font-size: 14px; font-weight: 800; color: var(--s8-dark); }
.cc-city { font-size: 12px; color: var(--s8-muted); }
.cc-row { display: flex; justify-content: space-between; font-size: 12px; padding: 6px 0; border-bottom: 1px solid #f3f4f6; }
.cc-row:last-of-type { border: none; }
.cc-row span:first-child { color: var(--s8-muted); font-weight: 600; }
.cc-row span:last-child { color: var(--s8-text); }

/* ===== REVENUE ===== */
.plan-breakdown { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.pb-card { background: var(--s8-bg-alt); border: 1px solid var(--s8-border); border-radius: var(--r-md); padding: 18px; text-align: center; }
.pb-name { font-size: 11px; font-weight: 700; color: var(--s8-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.pb-count { font-family: var(--font-h); font-size: 2rem; font-weight: 900; color: var(--s8-dark); }
.pb-rev { font-size: 12px; color: var(--s8-blue); font-weight: 700; margin-top: 3px; }
.revenue-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 16px; margin-bottom: 24px; }
.rev-tile { background: #fff; border: 1px solid var(--s8-border); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); border-top: 3px solid var(--s8-blue); }
.rt-label { font-size: 11px; font-weight: 700; color: var(--s8-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.rt-val { font-family: var(--font-h); font-size: 1.8rem; font-weight: 900; color: var(--s8-blue); }
.rt-sub { font-size: 12px; color: var(--s8-muted); margin-top: 3px; }

/* ===== MODAL ===== */
.modal-overlay { position: fixed; inset: 0; background: rgba(13,17,23,.65); display: flex; align-items: center; justify-content: center; z-index: 300; backdrop-filter: blur(4px); }
.modal-box { background: #fff; border-radius: var(--r-xl); padding: 36px; width: 100%; max-width: 580px; max-height: 85vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--s8-border); }
.modal-header h3 { font-size: 1.15rem; color: var(--s8-dark); font-family: var(--font-h); font-weight: 800; }
.modal-close { background: var(--s8-bg-alt); border: none; color: var(--s8-muted); font-size: 1.1rem; cursor: pointer; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.modal-close:hover { background: rgba(239,68,68,.1); color: var(--s8-red); }
.modal-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.modal-row:last-of-type { border: none; }
.modal-row span:first-child { color: var(--s8-muted); font-weight: 600; }
.modal-row span:last-child { color: var(--s8-dark); text-align: right; max-width: 60%; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--s8-border); }

/* ===== SETTINGS ===== */
.settings-card { background: #fff; border: 1px solid var(--s8-border); border-radius: var(--r-lg); padding: 28px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.settings-card h3 { font-size: 1rem; color: var(--s8-dark); margin-bottom: 6px; font-family: var(--font-h); font-weight: 800; }
.settings-note { font-size: 13px; color: var(--s8-muted); margin-bottom: 18px; }
.settings-note code { font-family: monospace; background: var(--s8-bg-alt); padding: 2px 6px; border-radius: 4px; color: var(--s8-blue); font-size: 12px; }
.settings-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; color: var(--s8-muted); }
.settings-row:last-child { border: none; }
.settings-row strong { color: var(--s8-dark); font-weight: 700; }
.admin-btn { padding: 10px 20px; background: var(--s8-blue-light); border: 1.5px solid var(--s8-blue); color: var(--s8-blue); border-radius: var(--r-sm); font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s; font-family: var(--font-b); }
.admin-btn:hover { background: var(--s8-blue); color: #fff; }
.admin-btn-danger { padding: 10px 20px; background: rgba(239,68,68,.07); border: 1.5px solid rgba(239,68,68,.3); color: var(--s8-red); border-radius: var(--r-sm); font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s; font-family: var(--font-b); }
.admin-btn-danger:hover { background: var(--s8-red); color: #fff; }

/* ===== RESPONSIVE ===== */
@media(max-width:900px){.admin-sidebar{width:190px}.admin-tab{padding:20px}.plan-breakdown{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.admin-app{flex-direction:column}.admin-sidebar{width:100%;height:auto;position:relative}.sidebar-nav{display:flex;overflow-x:auto;padding:6px 10px;gap:2px}.sn-item{flex-direction:column;padding:8px 14px;font-size:11px;border-left:none;white-space:nowrap;border-bottom:3px solid transparent;min-width:60px;text-align:center;gap:3px}.sn-item.active{border-left:none;border-bottom-color:var(--s8-blue);background:rgba(0,87,255,.1)}.sn-icon{font-size:18px}.admin-tab{padding:16px}.plan-breakdown{grid-template-columns:1fr}}
