/*
 * ============================================================
 * 256Bip — Core CSS
 * Design Premium, Escuro, Sem contraste absoluto (preto/branco puro)
 * ============================================================
 */

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Cores Premium e Escuras extraídas do e81.uk */
    --bg:           #161616;
    --bg-2:         #1c1c1c;
    --surface:      #222222;
    --surface-2:    #2a2a2a;
    --surface-3:    rgba(255,255,255,0.03);
    --border:       rgba(255,255,255,0.07);
    --border-hover: rgba(255,255,255,0.14);
    --border-focus: rgba(255,255,255,0.22);

    --white:        #f0f0f0;
    --text:         #c8c8c8;
    --text-2:       #8a8a8e;
    --text-3:       #555558;

    --accent:       #4F8EF7;
    --accent-soft:  rgba(79,142,247,0.12);
    --accent-glow:  rgba(79,142,247,0.25);
    --green:        #10b981;
    --green-soft:   rgba(16,185,129,0.12);
    --red:          #ef4444;

    --font:         'Inter', system-ui, -apple-system, sans-serif;
    --radius:       10px;
    --radius-lg:    16px;
    --radius-xl:    20px;
    
    --sidebar-width:  76px;
    --container-max:  1080px;
    --container-pad-x: 32px;
    --header-h:     64px;

    --ease:         cubic-bezier(0.4, 0, 0.2, 1);
    --duration:     0.25s;

    --shadow-sm:    0 1px 3px rgba(0,0,0,0.3);
    --shadow-md:    0 4px 16px rgba(0,0,0,0.35);
}

/* === GLOBAL === */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
    font-family: var(--font);
    color: var(--white);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

a { text-decoration: none; color: inherit; }

/* === LAYOUT LATERAL (SIDEBAR) === */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0;
    background: var(--bg);
    border-right: 1px solid var(--border);
    z-index: 100;
}

.sidebar-logo {
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    transition: background var(--duration);
}
.sidebar-logo:hover {
    background: var(--surface);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

.sidebar-link {
    color: var(--text-2);
    font-size: 1.6rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    transition: all var(--duration) ease;
}

.sidebar-link:hover, .sidebar-link.active {
    color: var(--white);
    background: var(--surface-2);
    transform: scale(1.05);
}

/* === MAIN CONTENT === */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    display: flex;
    justify-content: center;
    padding-top: 40px;
    padding-bottom: 60px;
}

.main-content {
    width: 100%;
    max-width: min(var(--container-max), calc(100vw - var(--sidebar-width) - 48px));
    padding: 0 var(--container-pad-x);
}

.container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.container-narrow {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    :root {
        --container-pad-x: 16px;
    }

    .main-content {
        max-width: 100%;
    }
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--duration) var(--ease);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    background: #3d7de5;
    transform: translateY(-1px);
    box-shadow: 0 8px 28px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--surface-3);
}

/* === FORMS & INPUTS === */
.input-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.input-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2);
}
.input-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 0.95rem;
    font-family: var(--font);
    transition: border-color var(--duration);
}
.input-control:focus {
    outline: none;
    border-color: var(--accent);
}

/* Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,10,10,0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration) var(--ease);
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: var(--surface);
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.95);
    transition: all var(--duration) var(--ease);
}
.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.modal-close {
    background: transparent;
    border: none;
    color: var(--text-2);
    cursor: pointer;
    font-size: 1.2rem;
}
.modal-close:hover {
    color: var(--white);
}

/* Utils */
.d-none { display: none !important; }
