/* =========================================================================
   ERP Planejados Machado — theme-machado.css
   Design System: 100% Modern Light Theme / Cards Base (Padrão ITop Decor & Souza Capas)
   Navegação: Topbar Superior Corporativa Fixa com Dropdown de Atalhos
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Cores de Identidade Grupo Machado */
    --brand-dark:       #0f172a; /* Slate 900 / Navy Profundo da Topbar */
    --brand-dark-card:  #1e293b; /* Slate 800 */
    --brand-gold:       #c29c47; /* Dourado / Madeira Nobre Machado */
    --brand-gold-hover: #a58133;
    --brand-gold-light: #fef9ee;
    --brand-gold-border:#e5d5ac;

    /* Superfícies & Fundos (Light Theme Souza Capas / ITop) */
    --bg-main:          #f8fafc; /* Slate 50 */
    --bg-surface:       #ffffff;
    --bg-subtle:        #f1f5f9; /* Slate 100 */
    --border-color:     #e2e8f0; /* Slate 200 */
    --border-focus:     #c29c47;

    /* Tipografia de Alto Contraste */
    --text-main:        #0f172a; /* Slate 900 */
    --text-muted:       #475569; /* Slate 600 */
    --text-subtle:      #94a3b8; /* Slate 400 */

    /* Acentos e Status */
    --status-success:   #10b981;
    --status-warning:   #f59e0b;
    --status-info:      #3b82f6;
    --status-indigo:    #6366f1;
    --status-danger:    #ef4444;

    /* Métricas Estruturais */
    --topbar-height:    74px;
    --radius-sm:        0.5rem;   /* 8px */
    --radius-md:        0.75rem;  /* 12px */
    --radius-lg:        1rem;     /* 16px */
    --radius-xl:        1.25rem;  /* 20px */
    --radius-2xl:       1.5rem;   /* 24px */

    /* Sombras Elevadas Limpas */
    --shadow-card:      0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
    --shadow-hover:     0 12px 28px -6px rgba(15, 23, 42, 0.09), 0 4px 10px -2px rgba(15, 23, 42, 0.04);
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
}

/* ─── Topbar Corporativa Estilo ITop & Souza Capas ─── */
.topbar-machado {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--brand-dark);
    height: var(--topbar-height);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

/* ─── Card Base do Sistema (Estilo Souza Capas) ─── */
.card-machado {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-machado:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-color: #cbd5e1;
}

/* ─── Animação de Fade-In Escalonado (Cascata Souza Capas) ─── */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.anim-fade {
    animation: fadeInScale 0.35s ease-out forwards;
}

.delay-1 { animation-delay: 0.06s; }
.delay-2 { animation-delay: 0.12s; }
.delay-3 { animation-delay: 0.18s; }
.delay-4 { animation-delay: 0.24s; }

/* ─── Badge de Status ─── */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
}

/* ─── Tabelas Corporativas (Padrão ERP Machado) ─── */
:where(.table-machado) {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--text-main);
}

:where(.table-machado thead tr) {
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border-color);
}

:where(.table-machado thead th) {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    padding: 0.6rem 0.65rem;
    white-space: nowrap;
}

:where(.table-machado tbody tr) {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
}

:where(.table-machado tbody tr:last-child) {
    border-bottom: none;
}

:where(.table-machado tbody tr:hover) {
    background-color: rgba(248, 250, 252, 0.85);
}

:where(.table-machado tbody td) {
    padding: 0.55rem 0.65rem;
    vertical-align: middle;
    font-size: 0.75rem;
}

/* ─── Dropdown de Navegação Rápida ─── */
.dropdown-menu-machado {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    width: 280px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
    padding: 0.5rem;
    z-index: 120;
}

.dropdown-menu-machado.active {
    display: block;
    animation: fadeInScale 0.15s ease-out forwards;
}

.dropdown-item-machado {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.65rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all 0.15s ease;
}

.dropdown-item-machado:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

/* ─── Badge por AKING (Padrão Oficial ITop Decor) ─── */
.topbar-badge-aking {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.22rem 0.65rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
    user-select: none;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    line-height: 1;
}

.topbar-badge-aking:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
}

.topbar-badge-aking .badge-prefix {
    font-size: 0.68rem;
    font-weight: 500;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.topbar-badge-aking .badge-brand {
    font-size: 0.72rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.06em;
}

.topbar-badge-aking .badge-icon {
    font-size: 0.65rem;
    color: #f59e0b;
    margin-left: 0.05rem;
}

/* Variante para fundos claros (Login, cartões, etc.) */
.badge-aking-light {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    padding: 0.22rem 0.65rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    user-select: none;
    transition: all 0.2s ease;
    line-height: 1;
}

.badge-aking-light .badge-prefix {
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.02em;
}

.badge-aking-light .badge-brand {
    font-size: 0.72rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.06em;
}

.badge-aking-light .badge-icon {
    font-size: 0.65rem;
    color: #f59e0b;
    margin-left: 0.05rem;
}

