/* ============================================================
   KNOWLY CONSOLE — Global Styles
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

:root {
    /* Brand primary — Knowly orange (remapeado sobre os nomes legados --indigo-*
       para que todos os var(--indigo-*) existentes herdem a nova marca). */
    --indigo-50:  #fff4ec;
    --indigo-100: #ffe4d1;
    --indigo-400: #ffb988;
    --indigo-500: #ff8f47;
    --indigo-600: #f2741f;
    --violet-500: #4102b6;

    --slate-50:  #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    --green-50:  #f0fdf4;
    --green-500: #22c55e;
    --green-700: #15803d;

    --red-50:   #fff1f2;
    --red-500:  #ef4444;
    --red-700:  #b91c1c;

    --amber-400: #fbbf24;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
    background: var(--slate-50);
    color: var(--slate-800);
    -webkit-font-smoothing: antialiased;
}

[v-cloak] { display: none; }

/* ── Layout ──────────────────────────────────────────────── */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.page-content {
    flex: 1;
    padding: 32px 36px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

/* ── Card ────────────────────────────────────────────────── */
.card {
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    padding: 24px;
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 36px;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid var(--slate-200);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-breadcrumb {
    font-size: 14px;
    color: var(--slate-500);
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-breadcrumb-current {
    color: var(--slate-800);
    font-weight: 600;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    text-decoration: none;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--indigo-500);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--indigo-600);
}

.btn-ghost {
    background: transparent;
    color: var(--slate-600);
    border: 1px solid var(--slate-200);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--slate-100);
    color: var(--slate-800);
}

.btn-secondary {
    background: var(--slate-100);
    color: var(--slate-700);
    border: 1px solid var(--slate-200);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--slate-200);
    color: var(--slate-800);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12.5px;
}

/* ── Section separator ───────────────────────────────────── */
.section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 36px 0 20px;
}

.section-divider-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate-400);
    white-space: nowrap;
}

.section-divider-line {
    flex: 1;
    height: 1px;
    background: var(--slate-200);
}

/* ── Toast ───────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    animation: toastIn 0.2s ease;
    pointer-events: all;
}

.toast-success {
    background: var(--slate-900);
    color: #fff;
}

.toast-error {
    background: var(--red-700);
    color: #fff;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Delete confirm modal ────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

/* ── Login gate ──────────────────────────────────────────── */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.08);
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--slate-900);
    margin-bottom: 12px;
}

.login-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--slate-600);
    margin-top: 6px;
}

.login-input {
    padding: 10px 12px;
    border: 1px solid var(--slate-300);
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.login-input:focus {
    border-color: var(--indigo-400);
}

.login-error {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--red-700);
}

.login-submit {
    margin-top: 16px;
    justify-content: center;
}

