/* ============================================================
   Avelum Labs Workspace — alinhado ao brand v0.2
   Tokens vindos de avelum-brand.css (DARK editorial, Poppins, pill style)
   ============================================================ */

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

:root {
    /* Surface — pure black first */
    --bg:               #000000;
    --bg-soft:          #0A0A0A;
    --bg-cool:          #0F0F0F;
    --surface-card:     #111111;
    --surface-strong:   #1A1A1A;

    --border-soft:      rgba(255, 255, 255, 0.08);
    --border:           rgba(255, 255, 255, 0.12);
    --border-strong:    rgba(255, 255, 255, 0.20);
    --border-brand:     rgba(64, 129, 255, 0.28);

    /* Brand */
    --brand:            #0057FF;
    --brand-bright:     #4081FF;
    --brand-glow:       rgba(64, 129, 255, 0.18);
    --brand-deep:       #003FB8;
    --brand-soft:       rgba(64, 129, 255, 0.10);

    /* Acentos */
    --accent-mint:      #5AFFBE;
    --accent-mint-soft: rgba(90, 255, 190, 0.12);
    --accent-amber:     #FFB347;
    --accent-coral:     #FF7A7F;

    /* Ink */
    --ink:              #F5F7FA;
    --ink-soft:         #E5E9F2;
    --ink-muted:        #A8B0C2;
    --ink-whisper:      #6B7280;
    --ink-fog:          #4A5267;

    /* Gradient CTA */
    --gradient-cta:        linear-gradient(135deg, #0057FF 0%, #4081FF 100%);
    --gradient-cta-hover:  linear-gradient(135deg, #003FB8 0%, #2E73FF 100%);

    /* Shadows */
    --shadow-md:        0 4px 16px rgba(0, 0, 0, 0.40);
    --shadow-lg:        0 12px 32px rgba(0, 0, 0, 0.50);
    --glow-brand:       0 8px 28px rgba(0, 87, 255, 0.40);

    /* Radius */
    --radius-sm:    6px;
    --radius-md:    10px;
    --radius:       12px;
    --radius-lg:    16px;
    --radius-xl:    24px;
    --radius-pill:  999px;

    /* Spacing */
    --space-1: 4px;   --space-2: 8px;   --space-3: 12px;
    --space-4: 16px;  --space-5: 20px;  --space-6: 24px;
    --space-8: 32px;  --space-10: 40px; --space-12: 48px;

    /* Type */
    --font-sans:  'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Motion */
    --ease:       cubic-bezier(0.32, 0.72, 0, 1);
    --dur:        200ms;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; overflow: hidden; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-feature-settings: 'cv01', 'cv02', 'cv03';
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

code {
    font-family: var(--font-mono);
    background: var(--surface-strong);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
    color: var(--brand-bright);
    border: 1px solid var(--border-soft);
}

/* ============================================================
   APP LAYOUT
   ============================================================ */

.app {
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: 100vh;
}

/* ============================================================
   HEADER — PILL STYLE
   ============================================================ */

.header {
    padding: var(--space-4) var(--space-6);
}

.header-inner {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: var(--space-2) var(--space-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 600;
}

.logo-mark {
    width: 32px;
    height: 32px;
    background: var(--gradient-cta);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    color: #fff;
    box-shadow: var(--glow-brand);
}

.logo-text {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.logo-divider { color: var(--ink-fog); margin: 0 var(--space-1); }
.logo-section { color: var(--ink-muted); font-weight: 500; font-size: 14px; }

.aluno-badge {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--surface-strong);
    border: 1px solid var(--border-soft);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
}

.aluno-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-mint);
    box-shadow: 0 0 8px var(--accent-mint);
}

/* ============================================================
   MAIN
   ============================================================ */

.main {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: var(--space-4);
    padding: 0 var(--space-6) var(--space-4);
    overflow: hidden;
    min-height: 0;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    overflow: hidden;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    color: var(--ink-muted);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--dur) var(--ease);
    text-align: left;
}

.nav-item:hover {
    background: var(--surface-strong);
    color: var(--ink);
}

.nav-item.active {
    background: var(--brand-soft);
    color: var(--brand-bright);
    border: 1px solid var(--border-brand);
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.usage-card {
    margin-top: auto;
    padding: var(--space-4);
    background: var(--bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
}

.usage-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-whisper);
    margin-bottom: var(--space-3);
    font-weight: 600;
}

.usage-bar {
    height: 6px;
    background: var(--surface-strong);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.usage-fill {
    height: 100%;
    background: var(--gradient-cta);
    border-radius: var(--radius-pill);
    transition: width var(--dur) var(--ease);
    box-shadow: var(--glow-brand);
}

.usage-text {
    font-size: 12px;
    color: var(--ink-muted);
    margin-bottom: var(--space-3);
}

.usage-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--ink-whisper);
}

.usage-meta strong {
    color: var(--ink);
    font-weight: 600;
}

/* ============================================================
   CONTENT
   ============================================================ */

.content {
    overflow: auto;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
}

.dashboard {
    padding: var(--space-12) var(--space-10);
    max-width: 1100px;
    margin: 0 auto;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: var(--space-2);
    letter-spacing: -0.02em;
}

.page-title span {
    color: var(--brand-bright);
}

.page-subtitle {
    color: var(--ink-muted);
    margin-bottom: var(--space-10);
    font-size: 15px;
}

/* ============================================================
   CARDS
   ============================================================ */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    transition: all var(--dur) var(--ease);
    color: var(--ink);
    min-height: 170px;
}

.card:hover:not(.card-info) {
    border-color: var(--border-brand);
    background: var(--surface-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-primary {
    background: var(--gradient-cta);
    border-color: transparent;
    box-shadow: var(--glow-brand);
}

.card-primary:hover {
    background: var(--gradient-cta-hover);
    box-shadow: 0 12px 40px rgba(0, 87, 255, 0.55);
}

.card-icon {
    font-size: 28px;
    margin-bottom: var(--space-1);
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card-desc {
    font-size: 13px;
    color: var(--ink-muted);
    flex: 1;
    line-height: 1.5;
}

.card-primary .card-desc { color: rgba(255,255,255,0.85); }

.card-cta {
    margin-top: var(--space-3);
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-bright);
}

.card-primary .card-cta { color: #fff; }

.card-info {
    background: var(--bg-soft);
    cursor: default;
}

.card-status {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: auto;
    font-size: 13px;
    color: var(--ink-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-on {
    background: var(--accent-mint);
    box-shadow: 0 0 8px var(--accent-mint);
}

/* ============================================================
   INFO BOX
   ============================================================ */

.info-box {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
}

.info-box strong {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 600;
}

.info-box ul { list-style: none; padding: 0; }

.info-box li {
    padding: var(--space-1) 0;
    color: var(--ink-muted);
    font-size: 13px;
}

/* ============================================================
   TERMINAL
   ============================================================ */

.terminal-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.terminal-header {
    background: var(--surface-strong);
    padding: var(--space-2) var(--space-4);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.terminal-title {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 12px;
    color: var(--ink-muted);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red { background: var(--accent-coral); }
.dot-yellow { background: var(--accent-amber); }
.dot-green { background: var(--accent-mint); }

.terminal-name {
    margin-left: var(--space-3);
    font-family: var(--font-mono);
    color: var(--ink-soft);
}

.btn-small {
    padding: var(--space-1) var(--space-3);
    border: 1px solid var(--border);
    background: var(--surface-strong);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-muted);
    transition: all var(--dur) var(--ease);
}

.btn-small:hover {
    background: var(--bg-soft);
    border-color: var(--border-brand);
    color: var(--brand-bright);
}

.terminal-frame {
    flex: 1;
    width: 100%;
    border: none;
    background: var(--bg);
}

/* ============================================================
   PLACEHOLDER
   ============================================================ */

.placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-10);
    color: var(--ink-muted);
}

.placeholder-icon {
    font-size: 64px;
    opacity: 0.4;
    margin-bottom: var(--space-4);
    filter: grayscale(0.5);
}

.placeholder h2 {
    color: var(--ink);
    margin-bottom: var(--space-2);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.placeholder-meta {
    margin-top: var(--space-4);
    font-size: 12px;
    color: var(--ink-whisper);
    background: var(--surface-strong);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-soft);
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    padding: var(--space-3) var(--space-6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--ink-fog);
    letter-spacing: 0.02em;
}
