/* ==========================================================
   BlackAuth — KeyAuth-Style Dark Charcoal Theme
   ========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    --bg-page: #08090A;
    --bg-sidebar: #0D0E11;
    --bg-surface: #121418;
    --bg-elevated: #181A20;
    --bg-input: #0B0D10;
    --border: #23262D;
    --border-light: #323640;
    --primary: #FFFFFF;
    --primary-hover: #E4E4E7;
    --text: #F4F4F5;
    --text-secondary: #A1A1AA;
    --text-muted: #71717A;
    --text-dim: #52525B;
    --success: #22C55E;
    --danger: #EF4444;
    --warning: #F97316;
    --purple: #8B5CF6;
    --teal: #14B8A6;
}

body {
    background-color: var(--bg-page);
    color: var(--text);
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.01em;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Particle Canvas */
#particles-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 1;
    opacity: 0.25;
}

/* ─── Cards ─── */
.ka-card, .obsidian-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ka-card:hover, .obsidian-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* ─── Buttons ─── */
.btn-primary {
    background: #FFFFFF;
    color: #000000 !important;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 10px;
    padding: 0.65rem 1.35rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.18);
    cursor: pointer;
}
.btn-primary:hover {
    background: #E4E4E7;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

.btn-cancel {
    background: transparent;
    color: var(--text);
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 8px;
    padding: 0.6rem 1.25rem;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-cancel:hover {
    background: var(--bg-elevated);
    border-color: var(--border-light);
}

/* Colored Action Buttons */
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}
.btn-action:hover { opacity: 0.85; }

.btn-selected   { background: #16A34A; }
.btn-select     { background: #4B5563; }
.btn-rename     { background: #7C3AED; }
.btn-edit-desc  { background: #0D9488; }
.btn-pause      { background: #EA580C; }
.btn-resume     { background: #16A34A; }
.btn-delete     { background: #DC2626; }

/* ─── Inputs ─── */
.ka-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.15s;
}
.ka-input:focus {
    border-color: var(--primary);
}
.ka-input::placeholder {
    color: var(--text-muted);
}

.ka-select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.875rem;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2371717A' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}
.ka-select:focus {
    border-color: var(--primary);
}

/* ─── Info Icon ─── */
.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--primary);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    cursor: help;
    flex-shrink: 0;
}

/* ─── Status Pills ─── */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}
.pill-active  { background: rgba(34,197,94,0.15); color: #22C55E; }
.pill-paused  { background: rgba(249,115,22,0.15); color: #F97316; }
.pill-unused  { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.pill-used    { background: rgba(34,197,94,0.15); color: #22C55E; }
.pill-expired { background: rgba(239,68,68,0.15); color: #EF4444; }
.pill-banned  { background: rgba(239,68,68,0.15); color: #EF4444; }

/* ─── Stat Card ─── */
.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    text-align: center;
}
.stat-card .stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text);
}
.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ─── Modal ─── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
}
.modal-box {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    width: 100%;
    max-width: 520px;
    padding: 1.75rem;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-box h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.25rem;
}

/* ─── Form Label ─── */
.ka-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}
.ka-label .required {
    color: #EF4444;
}

/* ─── Copy Button ─── */
.copy-btn {
    padding: 0.35rem;
    color: var(--text-muted);
    cursor: pointer;
    border: none;
    background: transparent;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.copy-btn:hover { 
    color: #FFFFFF; 
    background: var(--bg-elevated);
}

/* ─── Blurred Secret (KeyAuth style) ─── */
.ka-blurred-secret {
    filter: blur(5px) !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    transition: filter 0.2s ease;
}
.ka-blurred-secret:hover {
    filter: blur(0px) !important;
}

/* ─── Success Banner ─── */
.success-banner {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--success);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

/* ─── License Card ─── */
.license-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.15s;
}
.license-card:hover {
    border-color: var(--border-light);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-page); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ─── Checkbox ─── */
input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px; height: 16px;
    cursor: pointer;
}

/* ─── Misc ─── */
[x-cloak] { display: none !important; }

.font-mono, pre, code {
    font-family: 'JetBrains Mono', monospace !important;
}
