:root{
  --sidebar-bg: linear-gradient(180deg,#0b4a2f 0%,#0f6b3f 100%);
  --accent: #1f7a45;
  --accent-2: #d8b437;
  --text: #12222d;
  --muted: #6f7d89;
  --line: #e8edf1;
  --card: #ffffff;
  --bg: #f4f7f8;
  --danger: #d84a57;
  --warning: #d89a22;
  --success: #1b8f5a;
  --shadow: 0 18px 42px rgba(15,40,28,.08);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit}
button,input,select,textarea{font:inherit}
.admin-shell{display:flex;min-height:100vh}
.sidebar{width:280px;background:var(--sidebar-bg);color:#fff;position:sticky;top:0;height:100vh;padding:22px 16px;display:flex;flex-direction:column;gap:16px;box-shadow:inset -1px 0 0 rgba(255,255,255,.06)}
.brand{display:flex;align-items:center;gap:14px;padding:6px 10px 18px;border-bottom:1px solid rgba(255,255,255,.12)}
.brand-badge{width:52px;height:52px;border-radius:18px;display:grid;place-items:center;background:rgba(255,255,255,.12);font-size:24px;font-weight:700}
.brand-title{font-size:30px;font-weight:800;line-height:1;margin:0}
.brand-sub{opacity:.8;font-size:12px;letter-spacing:.12em;text-transform:uppercase;margin-top:6px}
.nav-group-title{font-size:12px;text-transform:uppercase;letter-spacing:.18em;color:rgba(255,255,255,.65);font-weight:700;padding:8px 12px}
.nav-menu{display:flex;flex-direction:column;gap:6px}
.nav-item{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;color:rgba(255,255,255,.92);font-weight:600;transition:.18s background,.18s transform}
.nav-item:hover{background:rgba(255,255,255,.08);transform:translateX(2px)}
.nav-item.active{background:rgba(255,255,255,.12);box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.nav-icon{width:24px;height:24px;border-radius:8px;display:grid;place-items:center;background:rgba(255,255,255,.12);font-size:13px}
.sidebar-footer{margin-top:auto;padding:14px;border-radius:18px;background:rgba(255,255,255,.08)}
.sidebar-footer .mini{font-size:12px;color:rgba(255,255,255,.76);line-height:1.5}
.main-wrap{flex:1;min-width:0}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px 28px;background:rgba(255,255,255,.92);backdrop-filter:blur(10px);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}
.topbar-left h1{margin:0;font-size:30px;line-height:1.1}
.kicker{margin:0 0 6px;color:#b18719;font-size:12px;text-transform:uppercase;letter-spacing:.18em;font-weight:800}
.topbar-actions{display:flex;align-items:center;gap:14px}
.search-box{display:flex;align-items:center;gap:10px;min-width:420px;background:#f8fafb;border:1px solid var(--line);padding:12px 16px;border-radius:18px;color:var(--muted)}
.search-box input{background:transparent;border:0;outline:none;width:100%;color:var(--text)}
.icon-btn{width:46px;height:46px;border-radius:14px;border:1px solid var(--line);background:#fff;display:grid;place-items:center;color:#264a34;box-shadow:var(--shadow)}
.profile-chip{display:flex;align-items:center;gap:12px;padding:7px 14px 7px 7px;border:1px solid var(--line);background:#fff;border-radius:18px;box-shadow:var(--shadow)}
.avatar{width:44px;height:44px;border-radius:14px;background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#fff;display:grid;place-items:center;font-weight:800}
.avatar.sm{width:38px;height:38px;border-radius:12px;font-size:14px}
.profile-chip strong,.profile-mini strong{display:block;font-size:15px}
.profile-chip span,.profile-mini span{font-size:12px;color:var(--muted)}
.page{padding:28px}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.stat-card,.card{background:var(--card);border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow)}
.stat-card{padding:22px;display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.stat-label{color:var(--muted);font-weight:600}
.stat-value{font-size:38px;font-weight:800;line-height:1.05;margin:0 0 6px}
.stat-icon{width:56px;height:56px;border-radius:18px;background:#eff8f2;color:#236e42;display:grid;place-items:center;font-size:24px}
.card{padding:22px}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.card-head h2,.card-head h3{margin:0;font-size:22px}
.subtext{color:var(--muted);line-height:1.65}
.notice{padding:14px 16px;border-radius:16px;margin-bottom:18px;font-weight:600}
.notice.success{background:#ecfaf1;color:#196541;border:1px solid #caeed8}
.notice.error{background:#fff0f1;color:#9c2f45;border:1px solid #f1c2cb}
.notice.info{background:#eef7ff;color:#275989;border:1px solid #d2e5ff}
.btn,.btn-secondary,.btn-danger,.btn-warning{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:12px 16px;border-radius:14px;border:0;cursor:pointer;font-weight:700;transition:.18s transform,.18s box-shadow,.18s opacity}
.btn{background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#fff;box-shadow:0 14px 28px rgba(31,122,69,.22)}
.btn:hover,.btn-secondary:hover,.btn-danger:hover,.btn-warning:hover{transform:translateY(-1px)}
.btn-secondary{background:#fff;border:1px solid var(--line);color:var(--text)}
.btn-danger{background:#fff1f2;color:var(--danger);border:1px solid #f6c9cf}
.btn-warning{background:#fff7ea;color:#9a6708;border:1px solid #f2dcae}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.form-grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.field{display:flex;flex-direction:column;gap:8px}
.field label{font-weight:700;font-size:14px}
.field input,.field select,.field textarea{width:100%;padding:13px 14px;border:1px solid #d9e2e8;background:#fff;border-radius:14px;outline:none;transition:.18s border,.18s box-shadow}
.field input:focus,.field select:focus,.field textarea:focus{border-color:#6eb184;box-shadow:0 0 0 4px rgba(64,157,96,.12)}
.field textarea{min-height:116px;resize:vertical}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:20px}
table{width:100%;border-collapse:separate;border-spacing:0;background:#fff}
th,td{padding:14px 16px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}
th{background:#f9fbfc;font-size:12px;color:#5d6b76;text-transform:uppercase;letter-spacing:.08em}
tr:last-child td{border-bottom:0}
.badge{display:inline-flex;align-items:center;justify-content:center;padding:7px 11px;border-radius:999px;font-size:12px;font-weight:800}
.badge.active{background:#ebf9ef;color:#1d7c49}
.badge.suspended{background:#fff5e7;color:#a36d07}
.badge.revoked{background:#fff0f1;color:#bb3744}
.badge.muted{background:#eef3f5;color:#60727d}
.kbd{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:#f6f9fb;padding:8px 10px;border-radius:12px;border:1px solid var(--line)}
.split{display:grid;grid-template-columns:1.1fr .9fr;gap:18px}
.list{display:flex;flex-direction:column;gap:12px}
.list-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}
.list-row:last-child{border-bottom:0;padding-bottom:0}
.profile-layout{display:grid;grid-template-columns:320px 1fr;gap:18px}
.profile-side{display:flex;flex-direction:column;gap:16px}
.profile-card{text-align:center}
.profile-card .avatar{margin:4px auto 14px;width:78px;height:78px;border-radius:24px;font-size:28px}
.profile-mini{display:flex;align-items:center;gap:12px}
.empty{padding:28px;text-align:center;color:var(--muted)}
.login-shell{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at top left,rgba(31,122,69,.35),transparent 35%),linear-gradient(135deg,#eef6ef,#f5efdf)}
.login-panel{width:min(980px,92vw);display:grid;grid-template-columns:1fr 1fr;background:#fff;border-radius:32px;overflow:hidden;box-shadow:0 30px 90px rgba(17,33,27,.16)}
.login-brand{padding:46px;background:linear-gradient(160deg,#0d4f31,#1f7a45);color:#fff;display:flex;flex-direction:column;justify-content:center}
.login-brand h1{font-size:42px;margin:0 0 10px}
.login-brand p{opacity:.88;line-height:1.7}
.feature-bullet{display:flex;gap:10px;align-items:flex-start;margin-top:14px}
.feature-bullet i{display:grid;place-items:center;width:28px;height:28px;background:rgba(255,255,255,.12);border-radius:10px;font-style:normal}
.login-form{padding:44px}
.login-form h2{font-size:36px;margin:8px 0 10px}
.login-form .btn{width:100%;margin-top:6px}
.muted{color:var(--muted)}
.inline-actions{display:flex;gap:10px;flex-wrap:wrap}
@media (max-width: 1200px){.search-box{min-width:0;width:320px}.profile-layout,.split{grid-template-columns:1fr}.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}.form-grid.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width: 900px){.admin-shell{display:block}.sidebar{position:relative;height:auto;width:auto;border-radius:0}.topbar{padding:16px}.topbar{flex-wrap:wrap}.search-box{width:100%}.page{padding:18px}.grid-3,.form-grid,.form-grid.cols-4{grid-template-columns:1fr}.login-panel{grid-template-columns:1fr}.login-brand{display:none}}


/* V6 - Premium licenses layout / Admin profile / single login */
.avatar-img{width:44px;height:44px;border-radius:14px;object-fit:cover;display:block;border:2px solid #fff;box-shadow:0 6px 16px rgba(0,0,0,.10)}
.avatar-img.sm{width:38px;height:38px;border-radius:12px}
.profile-photo-large{width:100px;height:100px;border-radius:28px;object-fit:cover;margin:0 auto 14px;border:4px solid #fff;box-shadow:0 14px 30px rgba(26,73,47,.16)}
.profile-fallback{width:100px;height:100px;border-radius:28px;margin:0 auto 14px;font-size:30px}

.license-stats{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important;margin-bottom:18px!important}
.license-stat{background:#fff!important;border:1px solid var(--line)!important;border-radius:22px!important;padding:18px!important;display:flex!important;align-items:center!important;gap:14px!important;box-shadow:var(--shadow)!important;min-height:88px}
.license-stat b{display:block!important;font-size:28px!important;line-height:1!important}.license-stat small{display:block!important;color:var(--muted)!important;margin-top:6px!important;font-weight:650!important}
.stat-bubble{width:48px!important;height:48px!important;border-radius:16px!important;display:grid!important;place-items:center!important;font-weight:900!important;font-size:19px!important}
.stat-bubble.key{background:#eef5ff!important;color:#285c9a!important}.stat-bubble.ok{background:#eaf9ef!important;color:#188651!important}.stat-bubble.warn{background:#fff6e8!important;color:#b87813!important}.stat-bubble.globe{background:#f2edff!important;color:#6a3fbd!important}

.premium-license-create{background:#fff!important;border:1px solid var(--line)!important;border-radius:26px!important;padding:22px!important;box-shadow:var(--shadow)!important}
.license-create-head{display:flex!important;justify-content:space-between!important;gap:15px!important;align-items:flex-start!important;margin-bottom:18px!important}
.license-create-head h2{margin:0 0 6px!important}.license-create-head p{margin:0!important;color:var(--muted)!important}
.license-create-icon{width:56px;height:56px;border-radius:18px;background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#fff;font-size:30px;display:grid;place-items:center}
.license-notes-row{display:grid!important;grid-template-columns:1fr 220px!important;gap:16px!important;align-items:end!important;margin-top:16px!important}.generate-license-btn{height:54px!important}

.license-table-card{padding:0!important;overflow:hidden!important}.license-table-head{display:flex!important;justify-content:space-between!important;gap:20px!important;align-items:end!important;padding:22px!important}
.license-table-head h2{margin:0 0 6px!important}.license-table-head p{margin:0!important;color:var(--muted)!important}
.license-tools{display:flex!important;gap:10px!important;align-items:center!important}
.license-search{height:46px!important;width:330px!important;border:1px solid var(--line)!important;border-radius:14px!important;background:#f8fafb!important;display:flex!important;align-items:center!important;gap:9px!important;padding:0 13px!important}
.license-search input{width:100%!important;border:0!important;outline:none!important;background:transparent!important;padding:0!important}
.license-tools select{height:46px!important;border-radius:14px!important;border:1px solid var(--line)!important;background:#fff!important;padding:0 12px!important}
.premium-table-wrap{border-left:0!important;border-right:0!important;border-bottom:0!important;border-radius:0!important}
.premium-license-table th{position:sticky;top:0;z-index:2}.premium-license-table tbody tr:hover{background:#fbfdfb}
.customer-cell{display:flex;align-items:center;gap:11px;min-width:190px}.customer-avatar{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,#e7f5ea,#f4e8b9);color:#1f7445;display:grid;place-items:center;font-weight:900}.customer-cell strong,.customer-cell small,.row-note{display:block}.customer-cell small,.row-note{font-size:11px;color:var(--muted);margin-top:4px}
.license-key-pill{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;background:#f3f7f5;color:#1e5a3a;padding:8px 10px;border:1px solid #dde9e1;border-radius:11px;display:inline-flex}
.domain-pill{display:inline-flex;align-items:center;gap:5px;padding:7px 10px;border-radius:999px;background:#eef8f1;color:#226c43;font-size:12px;font-weight:750}
.premium-actions{display:flex;flex-direction:column;gap:7px;min-width:210px}.status-inline{display:flex;gap:6px}.status-inline select{height:36px;border-radius:10px;border:1px solid var(--line);padding:0 8px}.mini-action{height:36px;border:0;border-radius:10px;padding:0 11px;font-size:12px;font-weight:800;cursor:pointer}.mini-action.save{background:#edf7ef;color:#1e7145}.mini-action.reset{background:#fff5e8;color:#9b670c;border:1px solid #f1dbb2}

.single-login-shell{background:
 radial-gradient(circle at 15% 10%,rgba(50,160,100,.22),transparent 31%),
 radial-gradient(circle at 90% 90%,rgba(212,175,55,.16),transparent 30%),
 linear-gradient(135deg,#edf5ee,#f7f3e7)!important}
.single-login-card{width:min(520px,92vw);background:#fff;border:1px solid #e9eeea;border-radius:30px;padding:42px;box-shadow:0 32px 85px rgba(14,45,28,.14)}
.single-login-card h1{font-size:38px;margin:4px 0 10px}.login-lock{width:62px;height:62px;border-radius:20px;display:grid;place-items:center;background:linear-gradient(135deg,#0d5c38,#d1ad34);color:#fff;font-size:28px;margin-bottom:20px;box-shadow:0 14px 28px rgba(24,103,61,.20)}
.login-submit{width:100%;height:52px;margin-top:8px}.login-security-note{text-align:center;color:#7b8981;font-size:12px;margin-top:18px;padding-top:16px;border-top:1px solid #edf1ee}

@media(max-width:1200px){.license-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important}.license-notes-row{grid-template-columns:1fr!important}.license-tools{width:100%!important}.license-table-head{align-items:stretch!important;flex-direction:column!important}.license-search{width:100%!important}}
@media(max-width:700px){.license-stats{grid-template-columns:1fr!important}.license-tools{flex-direction:column!important;align-items:stretch!important}.license-tools select{width:100%!important}.single-login-card{padding:28px}.single-login-card h1{font-size:32px}}
