/* Shell do ERP (header, sidebar, fundo) — controlado por data-theme no html */

html[data-theme="light"] body.app-shell {
    background-color: #f4f6f9;
    color: #334155;
}

html[data-theme="dark"] body.app-shell {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #e2e8f0;
}

html[data-theme="light"] .app-header {
    border-bottom: 1px solid rgb(226 232 240 / 0.8);
    background: rgb(255 255 255 / 0.9);
    box-shadow: 0 1px 2px 0 rgb(15 23 42 / 0.04);
}

html[data-theme="dark"] .app-header {
    border-bottom: 1px solid #1e293b;
    background: rgb(15 23 42 / 0.85);
    backdrop-filter: blur(8px);
}

html[data-theme="light"] .app-nav-mobile {
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

html[data-theme="dark"] .app-nav-mobile {
    border-bottom: 1px solid #1e293b;
    background: rgb(15 23 42 / 0.95);
}

html[data-theme="light"] .app-sidebar {
    background: #fff;
    border-right: 1px solid #e2e8f0;
    color: #475569;
    box-shadow: 1px 0 2px rgb(15 23 42 / 0.03);
}

html[data-theme="dark"] .app-sidebar {
    background: rgb(15 23 42 / 0.7);
    border-right: 1px solid #1e293b;
    color: #cbd5e1;
}

html[data-theme="light"] .app-sidebar .nav-section {
    color: #94a3b8;
}

html[data-theme="dark"] .app-sidebar .nav-section {
    color: #64748b;
}

html[data-theme="light"] .app-sidebar .nav-link,
html[data-theme="light"] .app-sidebar button.nav-link {
    color: #475569;
    font-size: 1rem;
    line-height: 1.45;
}

.app-sidebar .nav-link .bi,
.app-sidebar button.nav-link .bi {
    font-size: 1.35rem;
    width: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.app-sidebar-footer .bi {
    font-size: 1.2rem;
    width: 1.35rem;
}

html[data-theme="light"] .app-sidebar .nav-link:hover {
    background: #f8fafc;
    color: #334155;
}

html[data-theme="dark"] .app-sidebar .nav-link,
html[data-theme="dark"] .app-sidebar button.nav-link {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.45;
}

html[data-theme="dark"] .app-sidebar .nav-link:hover {
    background: rgb(30 41 59 / 0.6);
    color: #f1f5f9;
}

html[data-theme="light"] .app-sidebar .nav-link-active {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
    font-weight: 600;
}

html[data-theme="dark"] .app-sidebar .nav-link-active {
    background: rgb(30 41 59 / 0.8);
    color: #f1f5f9;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
}

html[data-theme="light"] .app-sidebar-footer {
    border-top: 1px solid #e2e8f0;
    color: #64748b;
}

html[data-theme="dark"] .app-sidebar-footer {
    border-top: 1px solid #1e293b;
    color: #64748b;
}

html[data-theme="light"] .app-content-card {
    background: #fff;
    border: 1px solid rgb(226 232 240 / 0.8);
    border-radius: 1rem;
    box-shadow: 0 1px 3px 0 rgb(15 23 42 / 0.06);
}

html[data-theme="dark"] .app-content-card {
    background: rgb(15 23 42 / 0.7);
    border: 1px solid #1e293b;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.35);
}

html[data-theme="light"] .app-title {
    color: #0f172a;
}

html[data-theme="dark"] .app-title {
    color: #f8fafc;
}

html[data-theme="light"] .app-subtitle {
    color: #64748b;
}

html[data-theme="dark"] .app-subtitle {
    color: #94a3b8;
}

html[data-theme="light"] .app-btn-ghost {
    border: 1px solid #e2e8f0;
    color: #475569;
}

html[data-theme="light"] .app-btn-ghost:hover {
    background: #f8fafc;
    color: #0f172a;
}

html[data-theme="dark"] .app-btn-ghost {
    border: 1px solid #334155;
    color: #cbd5e1;
}

html[data-theme="dark"] .app-btn-ghost:hover {
    background: #1e293b;
    color: #f8fafc;
}

html[data-theme="light"] .app-pill {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
}

html[data-theme="light"] .app-pill:hover {
    background: #f0f9ff;
    border-color: #bae6fd;
    color: #0369a1;
}

html[data-theme="dark"] .app-pill {
    border: 1px solid #334155;
    background: rgb(30 41 59 / 0.5);
    color: #cbd5e1;
}

html[data-theme="dark"] .app-pill:hover {
    background: rgb(30 41 59 / 0.8);
    color: #f1f5f9;
}

html[data-theme="light"] .app-flash-success {
    border-color: rgb(16 185 129 / 0.35);
    background: #ecfdf5;
    color: #047857;
}

html[data-theme="light"] .app-flash-error {
    border-color: rgb(244 63 94 / 0.35);
    background: #fff1f2;
    color: #be123c;
}

html[data-theme="dark"] .app-flash-success {
    border-color: rgb(16 185 129 / 0.4);
    background: rgb(6 78 59 / 0.25);
    color: #a7f3d0;
}

html[data-theme="dark"] .app-flash-error {
    border-color: rgb(244 63 94 / 0.4);
    background: rgb(136 19 55 / 0.25);
    color: #fecdd3;
}

/* Pagina de login (visitante) */
html[data-theme="dark"] .app-login-page {
    color: #e2e8f0;
}

html[data-theme="dark"] .app-login-card {
    background-color: rgb(15 23 42 / 0.95) !important;
    border-color: #475569 !important;
    color: #e2e8f0;
}

html[data-theme="dark"] .app-login-card h2 {
    color: #f8fafc !important;
}

html[data-theme="dark"] .app-login-card label {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .app-login-card input {
    background-color: #0f172a !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
}

html[data-theme="dark"] .app-login-card input::placeholder {
    color: #64748b !important;
}
