/* ═══════════════════════════════════════════════════════════════
   EWW Framework — Design System
   Paleta: Indigo (#6366f1) + Slate dark (#0f172a)
═══════════════════════════════════════════════════════════════ */

:root {
    --eww-primary:    #6366f1;
    --eww-primary-d:  #4f46e5;
    --eww-secondary:  #8b5cf6;
    --eww-dark:       #0f172a;
    --eww-dark-2:     #1e293b;
    --eww-dark-3:     #334155;
    --eww-light:      #f8fafc;
    --eww-border:     #e2e8f0; 
    --eww-text:       #1e293b;
    --eww-muted:      #64748b;
    --eww-radius:     .75rem;
    --eww-radius-sm:  .5rem;
    --eww-shadow:     0 1px 3px 0 rgb(0 0 0/.1), 0 1px 2px -1px rgb(0 0 0/.1);
    --eww-shadow-md:  0 4px 6px -1px rgb(0 0 0/.1), 0 2px 4px -2px rgb(0 0 0/.1);
    --eww-shadow-lg:  0 10px 15px -3px rgb(0 0 0/.1), 0 4px 6px -4px rgb(0 0 0/.1);
    --font-main:      'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-main);
    color: var(--eww-text);
    background: var(--eww-light);
    font-size: .9375rem;
}

/* ── Navbar ────────────────────────────────────────────────── */
.eww-navbar {
    background: linear-gradient(135deg, var(--eww-dark) 0%, var(--eww-dark-2) 100%);
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: .6rem 1.5rem;
}

.eww-brand {
    color: #fff !important;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -.3px;
    display: flex;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
}

.brand-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 6px rgba(99,102,241,.8));
}

.eww-navbar .nav-link {
    color: rgba(255,255,255,.7) !important;
    font-weight: 500;
    font-size: .875rem;
    padding: .4rem .8rem !important;
    border-radius: var(--eww-radius-sm);
    transition: all .15s;
}
.eww-navbar .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,.08);
}

/* ── Hero ──────────────────────────────────────────────────── */
.eww-hero {
    background: linear-gradient(135deg, var(--eww-dark) 0%, #1e1b4b 50%, var(--eww-dark-2) 100%);
    color: #fff;
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.eww-hero::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,.2) 0%, transparent 70%);
    top: -150px; right: -150px;
    border-radius: 50%;
}

.eww-logo-large {
    font-size: 4rem;
    line-height: 1;
    filter: drop-shadow(0 0 20px rgba(99,102,241,1));
}

.eww-logo-sm {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(99,102,241,.8));
}

/* ── Cards ─────────────────────────────────────────────────── */
.eww-card {
    border: 1px solid var(--eww-border);
    border-radius: var(--eww-radius);
    box-shadow: var(--eww-shadow);
    background: #fff;
}

.eww-feature-card {
    border: 1px solid var(--eww-border);
    border-radius: var(--eww-radius);
    box-shadow: var(--eww-shadow);
    transition: transform .2s, box-shadow .2s;
}
.eww-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--eww-shadow-lg);
}

.eww-feature-icon {
    width: 44px; height: 44px;
    border-radius: var(--eww-radius-sm);
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ── Code blocks ───────────────────────────────────────────── */
.eww-code {
    background: var(--eww-dark);
    color: #a5f3fc;
    border-radius: var(--eww-radius-sm);
    padding: .75rem 1rem;
    font-size: .78rem;
    line-height: 1.6;
    margin: 0;
    overflow-x: auto;
    font-family: 'Consolas', 'Fira Code', monospace;
}

.eww-code code { color: inherit; background: none; padding: 0; font-size: inherit; }

/* ── Quick Start steps ─────────────────────────────────────── */
.eww-step {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .5rem;
}
.step-num {
    width: 28px; height: 28px;
    background: var(--eww-primary);
    color: #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Table ─────────────────────────────────────────────────── */
.table th {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.table td { font-size: .875rem; vertical-align: middle; }

/* ── Avatar ────────────────────────────────────────────────── */
.eww-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ── Badge de rol ──────────────────────────────────────────── */
.eww-badge-role {
    background: #ede9fe;
    color: #5b21b6;
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
}

/* ── Loading overlay ───────────────────────────────────────── */
.eww-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* ── Modal ─────────────────────────────────────────────────── */
.eww-modal-header {
    background: linear-gradient(135deg, var(--eww-dark) 0%, var(--eww-dark-2) 100%);
    color: #fff;
    border-radius: var(--eww-radius) var(--eww-radius) 0 0;
}

.modal-content {
    border: none;
    border-radius: var(--eww-radius);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.25);
}

/* ── Flash messages ────────────────────────────────────────── */
.flash-container {
    position: fixed;
    top: 70px;
    right: 1rem;
    z-index: 1060;
    width: 340px;
}

/* ── Footer ────────────────────────────────────────────────── */
.eww-footer {
    background: var(--eww-dark);
    color: rgba(255,255,255,.5);
    padding: 1rem 0;
    margin-top: 4rem;
    font-size: .8rem;
}

/* ── Auth ──────────────────────────────────────────────────── */
.eww-auth-wrap {
    min-height: calc(100vh - 60px);
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--eww-dark) 0%, #1e1b4b 100%);
    padding: 2rem;
}

.eww-auth-card {
    background: #fff;
    border-radius: var(--eww-radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--eww-shadow-lg);
}

/* ── Inputs ────────────────────────────────────────────────── */
.form-control, .form-select {
    border-color: var(--eww-border);
    border-radius: var(--eww-radius-sm);
    font-size: .9rem;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--eww-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary {
    background: var(--eww-primary);
    border-color: var(--eww-primary);
}
.btn-primary:hover {
    background: var(--eww-primary-d);
    border-color: var(--eww-primary-d);
}

/* ── Purple badge (Bootstrap extra) ───────────────────────── */
.bg-purple-subtle { background: #ede9fe !important; }
.text-purple       { color: #7c3aed !important; }

/* ── Paginación ────────────────────────────────────────────── */
.page-link { color: var(--eww-primary); }
.page-item.active .page-link {
    background: var(--eww-primary);
    border-color: var(--eww-primary);
}

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

/* ── Utilities ─────────────────────────────────────────────── */
.fw-black { font-weight: 900 !important; }
.cursor-pointer { cursor: pointer; }
