/* StreamOps Portal — Hype.bet-inspired dark theme */

:root {
    --bg: #0b0e11;
    --bg-card: #131620;
    --bg-surface: #181c28;
    --bg-elevated: #1c2030;
    --bg-input: #0e1118;
    --border: #1c2030;
    --border-light: #232940;
    --text: #dfe3ec;
    --text-secondary: #717d96;
    --text-muted: #4a5368;
    --accent: #1ce479;
    --accent-hover: #17c96b;
    --accent-dim: rgba(28, 228, 121, .07);
    --accent-border: rgba(28, 228, 121, .18);
    --danger: #e54545;
    --warning: #e5a620;
    --info: #4a8cff;
    --shadow: 0 2px 8px rgba(0,0,0,.25);
    --radius: 8px;
    --radius-sm: 6px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: var(--font);
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
.mono { font-family: var(--mono); font-size: 12px; }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-hover); }

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

/* ====== Sidebar ====== */
.sidebar {
    width: 200px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 100;
}
.sidebar-logo { padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.logo-img { height: 28px; width: auto; display: block; }
.auth-logo .logo-img { height: 48px; margin: 0 auto; }
.logo-text { font-size: 14px; font-weight: 800; letter-spacing: .8px; color: #fff; text-transform: uppercase; }
.logo-accent { color: var(--accent); }

.sidebar-nav { flex: 1; padding: 10px 8px; display: flex; flex-direction: column; gap: 1px; }
.nav-item {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 12px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 13px; font-weight: 500;
    transition: all .12s; text-decoration: none; border-left: 2px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,.025); color: var(--text); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); border-left-color: var(--accent); }
.nav-item.disabled { opacity: .35; cursor: default; pointer-events: none; }
.nav-icon { width: 16px; text-align: center; font-size: 12px; }
.nav-badge {
    margin-left: auto; font-size: 9px; font-weight: 700;
    padding: 2px 5px; border-radius: 3px;
    background: var(--border); color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .4px;
}

.sidebar-footer { padding: 10px 12px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.user-info { flex: 1; display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-avatar {
    width: 28px; height: 28px; border-radius: var(--radius-sm);
    background: var(--accent-dim); border: 1px solid var(--accent-border);
    color: var(--accent); display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 11px; flex-shrink: 0;
}
.user-meta { min-width: 0; }
.user-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.user-role { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; }

/* ====== Main ====== */
.main-content { flex: 1; margin-left: 200px; padding: 24px 28px; min-height: 100vh; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-header h1 { font-size: 17px; font-weight: 700; color: #fff; }
.greeting { font-size: 13px; color: var(--text-secondary); }

/* ====== Stats ====== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; margin-bottom: 20px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 16px;
    display: flex; align-items: center; gap: 12px;
}
.stat-card.accent { border-color: var(--accent-border); background: linear-gradient(135deg, var(--bg-card) 60%, var(--accent-dim)); }
.stat-icon {
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    background: var(--bg-surface); display: flex; align-items: center; justify-content: center;
    font-size: 13px; color: var(--text-secondary); flex-shrink: 0;
}
.stat-icon.green { color: var(--accent); background: var(--accent-dim); }
.stat-icon.blue { color: var(--info); background: rgba(74,140,255,.08); }
.stat-icon.orange { color: var(--warning); background: rgba(229,166,32,.08); }
.stat-value { font-size: 20px; font-weight: 800; color: #fff; }
.stat-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }

/* ====== Card ====== */
.content-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.card-header h2 { font-size: 13px; font-weight: 700; color: #fff; }

/* ====== License ====== */
.license-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px; border-bottom: 1px solid var(--border); transition: background .08s;
}
.license-row:last-child { border-bottom: none; }
.license-row:hover { background: rgba(255,255,255,.015); }
.license-key-display { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.license-key-display .mono { font-size: 12px; font-weight: 600; }
.license-meta { display: flex; gap: 14px; font-size: 11px; color: var(--text-secondary); }
.license-meta i { margin-right: 3px; font-size: 10px; opacity: .6; }
.license-key-big { font-size: 13px; font-weight: 600; }

.plan-badge { display: inline-block; padding: 2px 7px; border-radius: 3px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.plan-free     { background: #1e2230; color: #717d96; }
.plan-standard { background: rgba(74,140,255,.1); color: var(--info); }
.plan-pro      { background: rgba(28,228,121,.1); color: var(--accent); }

.status-badge { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .3px; }
.status-active  { background: rgba(28,228,121,.08); color: var(--accent); border: 1px solid var(--accent-border); }
.status-unused  { background: rgba(229,166,32,.08); color: var(--warning); border: 1px solid rgba(229,166,32,.15); }
.status-revoked { background: rgba(229,69,69,.08); color: var(--danger); border: 1px solid rgba(229,69,69,.15); }
.status-expired { background: rgba(74,83,104,.08); color: var(--text-muted); border: 1px solid rgba(74,83,104,.15); }

.license-detail-card { padding: 18px; border-bottom: 1px solid var(--border); }
.license-detail-card:last-child { border-bottom: none; }
.license-detail-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.license-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.detail-item { padding: 6px 0; }
.detail-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; font-weight: 600; }
.detail-value { font-size: 13px; font-weight: 600; }

/* ====== Tools ====== */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; padding: 14px 18px; }
.tool-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; transition: all .12s; }
.tool-card:hover:not(.coming-soon) { border-color: var(--accent-border); }
.tool-card.coming-soon { opacity: .4; }
.tool-icon { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--bg-card); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--accent); margin-bottom: 10px; }
.tool-icon.muted { color: var(--text-muted); }
.tool-name { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.tool-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.45; }
.tool-status { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.tool-status i { margin-right: 4px; }
.tool-status.active { color: var(--accent); }

/* ====== Empty ====== */
.empty-state { text-align: center; padding: 36px 20px; }
.empty-icon { font-size: 28px; color: var(--text-muted); margin-bottom: 10px; }
.empty-title { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.empty-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; max-width: 320px; margin-left: auto; margin-right: auto; }

/* ====== Buttons ====== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border);
    background: var(--bg-elevated); color: var(--text); font-size: 12.5px; font-weight: 600;
    cursor: pointer; transition: all .12s; text-decoration: none; white-space: nowrap; font-family: var(--font);
}
.btn:hover { background: var(--bg-surface); color: #fff; }
.btn-primary { background: var(--accent); color: #081a0f; border-color: var(--accent-hover); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; border-color: var(--border-light); color: var(--text-secondary); }
.btn-outline:hover { background: var(--bg-surface); color: var(--text); }
.btn-ghost { background: transparent; border: none; color: var(--text-muted); padding: 5px 7px; }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-full { width: 100%; }

/* ====== Forms ====== */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 5px; }
.optional { color: var(--text-muted); text-transform: none; font-weight: 400; }
.form-group input {
    width: 100%; padding: 9px 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: var(--bg-input);
    color: var(--text); font-size: 13px; font-family: var(--font); outline: none; transition: border-color .15s;
}
.form-group input:focus { border-color: var(--accent); }
.form-group input::placeholder { color: var(--text-muted); }
.form-group input.mono { font-family: var(--mono); font-size: 12px; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-inline { display: flex; gap: 8px; align-items: flex-start; }
.form-row-inline input { flex: 1; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-input); color: var(--text); font-size: 13px; outline: none; font-family: var(--font); }
.form-row-inline input:focus { border-color: var(--accent); }
.link-form { padding: 14px 18px; }
.form-divider { text-align: center; margin: 18px 0 14px; position: relative; }
.form-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--border); }
.form-divider span { position: relative; background: var(--bg-card); padding: 0 10px; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }

/* ====== Alerts ====== */
.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 500; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.alert i { font-size: 12px; }
.alert-error { background: rgba(229,69,69,.06); border: 1px solid rgba(229,69,69,.15); color: #f07070; }
.alert-success { background: var(--accent-dim); border: 1px solid var(--accent-border); color: var(--accent); }

/* ====== Auth ====== */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg); }
.auth-container { position: relative; width: 100%; max-width: 380px; padding: 20px; }
.auth-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 28px; position: relative; z-index: 1; }
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo .logo-text { font-size: 18px; }
.logo-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.auth-footer { text-align: center; margin-top: 18px; font-size: 12px; color: var(--text-secondary); }
.auth-bg-accent { position: fixed; top: -40%; right: -20%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(28,228,121,.03) 0%, transparent 70%); border-radius: 50%; pointer-events: none; }

/* ====== Responsive ====== */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; padding: 14px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .tools-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}
