/* assets/style.css — Mlab License Manager */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:       #0f172a;
    --surface:  #1e293b;
    --border:   #334155;
    --text:     #e2e8f0;
    --muted:    #94a3b8;
    --primary:  #3b82f6;
    --primary-h:#2563eb;
    --success:  #22c55e;
    --warning:  #f59e0b;
    --danger:   #ef4444;
    --radius:   8px;
}

html { font-size: 15px; }
body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
    display: flex; align-items: center; gap: 1.5rem;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 0 1.5rem; height: 56px; position: sticky; top: 0; z-index: 100;
}
.navbar-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--text); }
.navbar-brand .version { font-size: 0.7rem; color: var(--muted); font-weight: 400; }
.navbar-menu { display: flex; gap: 0.25rem; flex: 1; }
.navbar-menu a {
    color: var(--muted); text-decoration: none; padding: 0.4rem 0.75rem;
    border-radius: var(--radius); font-size: 0.9rem; transition: all .15s;
}
.navbar-menu a:hover, .navbar-menu a.active { background: var(--border); color: var(--text); }
.navbar-user { display: flex; align-items: center; gap: 0.75rem; }

/* ── Container ──────────────────────────────────────────── */
.container { max-width: 1400px; margin: 0 auto; padding: 2rem 1.5rem; }

/* ── Page header ────────────────────────────────────────── */
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.75rem;
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; }

/* ── Stats grid ─────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem 1.5rem; text-align: center;
}
.stat-value { font-size: 2.5rem; font-weight: 800; }
.stat-label { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }
.stat-green  .stat-value { color: var(--success); }
.stat-yellow .stat-value { color: var(--warning); }
.stat-red    .stat-value { color: var(--danger); }
.stat-orange .stat-value { color: #f97316; }

/* ── Cards ──────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem; }
.card-header { padding: 0.875rem 1.25rem; font-weight: 600; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); }
.card-body { padding: 1.25rem; }
.card-body.p0 { padding: 0; }

/* ── Table ──────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th { padding: 0.75rem 1rem; text-align: left; color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.02); }
.table td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(51,65,85,.5); vertical-align: middle; }
.table tbody tr:hover { background: rgba(255,255,255,.02); }
.table tbody tr:last-child td { border-bottom: none; }
.row-expired { opacity: .65; }

/* ── Badges ─────────────────────────────────────────────── */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 20px; font-size: .75rem; font-weight: 600; color: #fff; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .5rem 1rem; border-radius: var(--radius); border: none;
    font-size: .875rem; font-weight: 500; cursor: pointer;
    text-decoration: none; transition: all .15s; line-height: 1;
}
.btn-sm    { padding: .3rem .65rem; font-size: .8rem; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-secondary:hover { background: #475569; }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-ghost   { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-icon    { background: none; border: none; cursor: pointer; font-size: .9rem; padding: .2rem .3rem; opacity: .6; }
.btn-icon:hover { opacity: 1; }

/* ── Action buttons group ───────────────────────────────── */
.action-btns { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.action-btns form { margin: 0; }

/* ── Forms ──────────────────────────────────────────────── */
.form-label { display: block; font-size: .85rem; font-weight: 500; color: var(--muted); margin-bottom: .4rem; }
.form-input, .form-select {
    width: 100%; padding: .6rem .85rem; background: var(--bg);
    border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); font-size: .875rem;
}
.form-input:focus, .form-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.2); }
textarea.form-input { resize: vertical; }

/* ── Filter bar ─────────────────────────────────────────── */
.filter-bar { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.25rem; }
.filter-bar .form-input, .filter-bar .form-select { width: auto; }

/* ── Alerts ─────────────────────────────────────────────── */
.alert { padding: .875rem 1.25rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.alert-success { background: #14532d; color: #86efac; border: 1px solid #166534; }
.alert-danger  { background: #7f1d1d; color: #fca5a5; border: 1px solid #991b1b; }
.alert-warning { background: #78350f; color: #fcd34d; border: 1px solid #92400e; }

/* ── Modals ─────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.7);
    display: flex; align-items: center; justify-content: center; z-index: 999;
}
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 2rem; width: min(480px, 95vw); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-header h2 { font-size: 1.15rem; font-weight: 700; }

/* ── Pagination ─────────────────────────────────────────── */
.pagination { display: flex; gap: .5rem; margin-top: 1.5rem; justify-content: center; }
.pagination a { padding: .4rem .75rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .875rem; }
.pagination a.active { background: var(--primary); border-color: var(--primary); }
.pagination a:hover:not(.active) { background: var(--border); }

/* ── Plugin badges ──────────────────────────────────────── */
.plugin-badge {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .5rem 1rem; background: var(--bg); border: 1px solid var(--border);
    border-radius: 20px; text-decoration: none; color: var(--text);
    font-size: .875rem; margin-right: .5rem; margin-bottom: .5rem;
    transition: all .15s;
}
.plugin-badge:hover { border-color: var(--primary); color: var(--primary); }

/* ── Utils ──────────────────────────────────────────────── */
.text-muted { color: var(--muted); }
.key-display { font-family: monospace; font-size: .85rem; color: var(--muted); }
code { font-family: monospace; font-size: .875rem; color: #7dd3fc; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .navbar-menu { display: none; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .table { font-size: .8rem; }
    .table th, .table td { padding: .5rem .6rem; }
    .action-btns { flex-direction: column; }
}
