/* Extraído de templates/index.html */
:root{
    --blue-500:#4b7bfd;
    --blue-600:#3a63f0;
    --card-bg:#ffffff;
    --text-primary:#1d1d1f;
    --text-secondary:#16325c;
    --text-label:#3a63f0;
    --hero-gradient-start:#4b7bfd;
    --hero-gradient-end:#6aa0ff;
    --bg-gradient-start:#f3f6ff;
    --bg-gradient-end:#f5f7fb;
    --card-shadow:rgba(23,63,161,0.08);
    --icon-bg:#f2f6ff;
    --header-bg:#ffffff;
    --header-border:#eef2ff;
    --brand-color:#13294b;
    --hero-shape-color:rgba(255,255,255,0.7);
}

body.light-mode{
    --blue-500:#5a67d8;
    --blue-600:#4c51bf;
    --card-bg:#ffffff;
    --text-primary:#1a202c;
    --text-secondary:#2d3748;
    --text-label:#5a67d8;
    --hero-gradient-start:#667eea;
    --hero-gradient-end:#764ba2;
    --bg-gradient-start:#f7fafc;
    --bg-gradient-end:#edf2f7;
    --card-shadow:rgba(0,0,0,0.08);
    --icon-bg:#edf2f7;
    --header-bg:#ffffff;
    --header-border:#e2e8f0;
    --brand-color:#2d3748;
    --hero-shape-color:rgba(255,255,255,0.5);
}

body{
    margin:0;
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif;
    color:var(--text-primary);
    background:linear-gradient(180deg,var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    transition:all 0.4s ease;
}
header{
    height:72px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 28px;
    background:var(--header-bg);
    border-bottom:1px solid var(--header-border);
    transition:all 0.3s ease;
}
.brand{
    display:flex;
    align-items:center;
    gap:12px;
    font-weight:700;
    color:var(--brand-color);
    transition:color 0.3s ease;
}
.brand .logo{
    width:28px;
    height:28px;
    background:linear-gradient(135deg,var(--blue-500),var(--blue-600));
    border-radius:6px;
    transition:all 0.3s ease;
}
.nav-actions{display:flex;gap:10px}
.btn-sm{
    padding:8px 12px;
    border-radius:8px;
    border:none;
    background:var(--blue-500);
    color:#fff;
    font-weight:600;
    cursor:pointer;
    transition:all 0.2s ease;
}
.hero{
    background:linear-gradient(180deg,var(--hero-gradient-start) 0%,var(--hero-gradient-end) 60%);
    padding:48px 18px 120px 18px;
    position:relative;
    min-height:100vh;
    transition:all 0.4s ease;
}
.hero-shape{
    position:absolute;
    left:0;
    right:0;
    bottom:-40px;
    height:120px;
    background:linear-gradient(180deg,transparent,var(--hero-shape-color));
    filter:blur(8px);
    transition:all 0.4s ease;
}
.card-wrap{max-width:1100px;margin:0 auto}
.card{
    background:var(--card-bg);
    border-radius:28px;
    padding:36px 28px;
    margin:0 auto;
    box-shadow:0 12px 40px var(--card-shadow);
    position:relative;
    transition:all 0.4s ease;
}
.title{
    color:var(--text-secondary);
    font-size:28px;
    font-weight:800;
    margin:8px 0 20px;
    text-align:left;
    transition:color 0.3s ease;
}
.tools-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:28px}
.tool{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:12px;
    padding:18px;
    border-radius:12px;
    background:transparent;
    cursor:pointer;
    transition:transform 0.2s ease;
}
.tool:hover{transform:translateY(-4px)}
.tool .icon{
    width:56px;
    height:56px;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:var(--icon-bg);
    color:var(--blue-600);
    font-weight:700;
    transition:all 0.3s ease;
}
.tool .label{
    font-weight:700;
    color:var(--text-secondary);
    transition:color 0.3s ease;
}
footer{
    max-width:1100px;
    margin:28px auto;
    text-align:center;
    color:#6b7280;
    transition:color 0.3s ease;
}
@media(max-width:640px){.title{text-align:center}.card{padding:20px}}

/* Modelo de botão inspirado no anexo - TELA PRINCIPAL */
.tool-btn{
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:2px;
    text-decoration:none;
    padding:8px;
    transition:transform 0.2s ease;
}
.tool-btn:hover{transform:translateY(-4px)}
.tool-icon{
    width:64px;
    height:64px;
    border-radius:12px;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--text-label);
    font-weight:800;
    font-size:20px;
    transition:all 0.3s ease;
}
.tool-icon svg{width:40px;height:40px}
.tool-label{
    color:var(--text-label);
    font-weight:700;
    margin-top:-6px;
    transition:color 0.3s ease;
}

/* Ajustes para os botões gerados dinamicamente */
.tool-btn.dynamic{min-width:140px;max-width:220px;padding:12px;border-radius:12px}
.tool-btn.dynamic .tool-icon{
    background:var(--blue-600);
    color:#fff;
}
.tool-btn.back { color:#6b7280 }
.tool-btn.back .tool-icon{background:transparent;color:#6b7280}
