:root{
    --teiner-red:#f5b400;
    --teiner-red-dark:#d89000;
    --sil-yellow:#ffc400;
    --sil-amber:#f5a800;
    --sil-black:#0b0c0e;
    --sil-graphite:#17191d;
}

body{accent-color:var(--sil-yellow)}
body .btn-primary,
body .crm-primary-button,
body button[type="submit"]{
    background:linear-gradient(135deg,#ffd21a 0%,#f5a400 100%) !important;
    border-color:#e49a00 !important;
    color:#111 !important;
    box-shadow:0 10px 24px rgba(245,164,0,.22) !important;
}
body .btn-primary:hover,
body button[type="submit"]:hover{filter:brightness(1.04)}

body .crm-sidebar{
    background:
        linear-gradient(180deg,rgba(8,9,11,.94),rgba(16,17,20,.96)),
        url('../img/sil-entardecer.png') 68% center/cover no-repeat !important;
}
body .crm-sidebar::before{
    background:linear-gradient(180deg,rgba(0,0,0,.08),rgba(0,0,0,.62)) !important;
}
body .crm-menu-item.active{
    background:linear-gradient(90deg,#ffc400 0%,#ed9f00 100%) !important;
    color:#111 !important;
    box-shadow:0 9px 22px rgba(245,164,0,.28) !important;
}
body .crm-menu-item:hover{border-color:rgba(255,196,0,.36) !important}
body .crm-sidebar-signature strong,
body .crm-profile-dropdown-menu a:hover,
body .crm-topbar-profile.is-open .crm-profile-arrow{color:#f5a800 !important}
body .crm-profile-avatar{background:linear-gradient(135deg,#ffc400,#ee9d00) !important;color:#111 !important}

body .finance-tab.active,
body .finance-nav-link.active,
body .teiner-mobile-nav-item.active{color:#d58d00 !important}
body .teiner-mobile-nav-main .teiner-mobile-nav-icon{background:#f5a800 !important;color:#111 !important}

body.teiner-login-body{
    background:
        linear-gradient(115deg,rgba(4,5,7,.76),rgba(12,14,18,.38)),
        url('../img/sil-entardecer.png') center/cover fixed no-repeat !important;
}
body .teiner-login-visual{
    background:
        linear-gradient(115deg,rgba(0,0,0,.74),rgba(0,0,0,.20)),
        url('../img/sil-entardecer.png') center/cover no-repeat !important;
}
body .teiner-login-visual::before{background:linear-gradient(135deg,rgba(0,0,0,.10),rgba(0,0,0,.36)) !important}
body .teiner-login-visual::after{background:#ffc400 !important}
body .teiner-visual-line{background:#ffc400 !important}
body .teiner-visual-content h2 strong,
body .teiner-welcome span,
body .teiner-password-toggle:hover,
body .teiner-developed strong b{color:#e99a00 !important}
body .teiner-forgot,body .teiner-forgot:hover{color:#c98200 !important}
body .teiner-input input:focus{border-color:rgba(245,164,0,.68) !important;box-shadow:0 0 0 4px rgba(245,164,0,.11) !important}
body .teiner-submit{background:linear-gradient(135deg,#ffd21a,#f2a200) !important;color:#111 !important}
body a:hover{color:#c98200}
body input:focus,body select:focus,body textarea:focus{border-color:rgba(245,164,0,.68) !important;box-shadow:0 0 0 3px rgba(245,164,0,.10) !important}

@media(max-width:1024px){
    body .teiner-mobile-nav{border-top-color:#f0d889 !important}
}

/* Navegação mobile financeira */
body .teiner-install-button{
    background:linear-gradient(135deg,#ffd21a,#f5a400) !important;
    color:#111 !important;
}
@media(max-width:1024px){
    body .teiner-mobile-nav{
        height:70px !important;
        grid-template-columns:repeat(5,minmax(0,1fr)) !important;
        padding:5px 6px calc(5px + env(safe-area-inset-bottom)) !important;
        border-top:3px solid #f5a800 !important;
        background:rgba(17,19,22,.98) !important;
        box-shadow:0 -10px 28px rgba(9,10,12,.20) !important;
    }
    body .teiner-mobile-nav-item{
        color:#aeb4bc !important;
        font-size:8px !important;
        letter-spacing:.02em !important;
    }
    body .teiner-mobile-nav-item.active{color:#ffc400 !important}
    body .teiner-mobile-nav-icon{font-size:18px !important}
    body .teiner-mobile-nav-main{
        transform:translateY(-10px) !important;
        color:#ffc400 !important;
    }
    body .teiner-mobile-nav-main .teiner-mobile-nav-icon{
        width:50px !important;
        height:50px !important;
        border:4px solid #17191d !important;
        border-radius:4px 16px 4px 4px !important;
        background:linear-gradient(135deg,#ffd21a,#f5a400) !important;
        color:#111 !important;
        box-shadow:0 6px 18px rgba(245,164,0,.30) !important;
    }
    body .teiner-mobile-more{
        bottom:calc(80px + env(safe-area-inset-bottom)) !important;
        border:1px solid #34383e !important;
        border-top:4px solid #f5a800 !important;
        border-radius:4px 18px 4px 4px !important;
        background:#17191d !important;
        box-shadow:0 20px 50px rgba(0,0,0,.30) !important;
    }
    body .teiner-mobile-more a{
        border:1px solid #30343a !important;
        border-radius:3px 11px 3px 3px !important;
        background:#22252a !important;
        color:#eef0f2 !important;
    }
    body .teiner-mobile-more a.active{
        border-color:#f5a800 !important;
        background:#332b13 !important;
        color:#ffc400 !important;
    }
    body .teiner-mobile-more-icon{
        background:#111316 !important;
        color:#ffc400 !important;
    }
    body .crm-main{padding-bottom:calc(80px + env(safe-area-inset-bottom)) !important}
}

/* SIL 2026 — linguagem industrial, diferente do CRM original */
body.crm-body,
body:not(.teiner-login-body){
    background-color:#edf0f2 !important;
    background-image:
        linear-gradient(rgba(17,19,22,.025) 1px,transparent 1px),
        linear-gradient(90deg,rgba(17,19,22,.025) 1px,transparent 1px) !important;
    background-size:28px 28px !important;
}

@media(min-width:1025px){
    body .crm-sidebar{
        width:238px !important;
        min-width:238px !important;
        border-right:3px solid #f5a800 !important;
        box-shadow:14px 0 36px rgba(9,10,12,.18) !important;
    }
    body .crm-main{
        width:calc(100% - 238px) !important;
        margin-left:238px !important;
    }
    body .crm-sidebar-top{
        min-height:116px !important;
        padding:20px 18px !important;
        border-bottom:1px solid rgba(255,196,0,.30) !important;
        background:linear-gradient(135deg,rgba(255,196,0,.09),transparent 68%) !important;
    }
    body .crm-sidebar-logo img{width:198px !important;max-height:74px !important}
    body .crm-menu{padding:18px 11px !important;gap:7px !important}
    body .crm-menu-item{
        min-height:48px !important;
        padding:0 14px !important;
        border:1px solid transparent !important;
        border-radius:3px 14px 3px 3px !important;
        font-size:12px !important;
        letter-spacing:.02em !important;
        text-transform:uppercase !important;
    }
    body .crm-menu-item.active{
        border-color:#ffc400 !important;
        clip-path:polygon(0 0,calc(100% - 13px) 0,100% 13px,100% 100%,0 100%) !important;
    }
    body .crm-menu-icon{color:#ffc400 !important}
    body .crm-menu-item.active .crm-menu-icon{color:#111 !important}
}

body .crm-header{
    min-height:68px !important;
    background:rgba(17,19,22,.97) !important;
    border-bottom:3px solid #f5a800 !important;
    box-shadow:0 8px 24px rgba(15,17,20,.12) !important;
}
body .crm-top-search{
    border:1px solid #34383e !important;
    border-radius:3px 13px 3px 3px !important;
    background:#24272c !important;
}
body .crm-top-search input{color:#f7f7f7 !important}
body .crm-top-search input::placeholder{color:#8f969f !important}
body .crm-topbar-profile{color:#fff !important}
body .crm-topbar-profile:hover{background:#25282d !important}
body .crm-profile-info strong{color:#fff !important}
body .crm-profile-info span{color:#aeb4bc !important}
body .crm-profile-dropdown-menu a:hover,
body .crm-profile-dropdown-menu a:focus{background:#fff8df !important;color:#a96f00 !important}
body .crm-profile-dropdown-menu a:hover strong,
body .crm-profile-dropdown-menu a:focus strong{color:#a96f00 !important}
body .crm-dropdown-icon{background:#fff4c2 !important;color:#c98200 !important}
body .crm-profile-dropdown-menu .crm-dropdown-logout,
body .crm-profile-dropdown-menu .crm-dropdown-logout strong{color:#a96f00 !important}
body .crm-profile-dropdown-menu .crm-dropdown-logout .crm-dropdown-icon{background:#fff4c2 !important;color:#c98200 !important}

body .accounting-kicker,
body .export-modal-kicker{color:#c98200 !important}
body .accounting-button.primary,
body .export-confirm-button{
    border-color:#e49a00 !important;
    background:linear-gradient(135deg,#ffd21a 0%,#f5a400 100%) !important;
    color:#111 !important;
    box-shadow:0 8px 20px rgba(245,164,0,.20) !important;
}
body .accounting-button.primary:hover,
body .export-confirm-button:hover{
    border-color:#c98200 !important;
    background:linear-gradient(135deg,#ffda3c 0%,#e99a00 100%) !important;
    color:#111 !important;
}

body .finance-page{padding:26px 30px 42px !important;gap:18px !important}
body .finance-hero{
    border:0 !important;
    border-left:7px solid #ffc400 !important;
    border-radius:3px 24px 3px 3px !important;
    background:
        linear-gradient(92deg,rgba(11,12,14,.97) 0%,rgba(20,22,25,.92) 66%,rgba(20,22,25,.76) 100%),
        url('../img/sil-entardecer.png') right center/cover no-repeat !important;
    box-shadow:0 18px 40px rgba(13,15,18,.16) !important;
}
body .finance-hero h2,body .finance-hero p{color:#fff !important}
body .finance-hero-label{color:#ffc400 !important}
body .accounting-kicker,
body .export-modal-kicker,
body .finance-card-header > div > span,
body .finance-section-label{color:#d58d00 !important}
body .accounting-button.primary,
body .finance-button.primary,
body .finance-button-primary,
body .export-modal-button.primary,
body .export-confirm-button{
    border-color:#e49a00 !important;
    background:linear-gradient(135deg,#ffd21a 0%,#f5a400 100%) !important;
    color:#111 !important;
    box-shadow:0 8px 20px rgba(245,164,0,.20) !important;
}
body .accounting-button.primary:hover,
body .finance-button.primary:hover,
body .finance-button-primary:hover,
body .export-modal-button.primary:hover,
body .export-confirm-button:hover{
    border-color:#c98200 !important;
    background:linear-gradient(135deg,#ffda3c 0%,#e99a00 100%) !important;
    color:#111 !important;
}
body .accounting-button:hover,
body .export-option.recommended,
body .export-option:hover{border-color:#f5a800 !important}
body .accounting-button:hover,
body .export-option.recommended .export-option-arrow{color:#c98200 !important}
body .finance-card,
body .audit-card,
body .employee-card,
body .supplier-card{
    border:1px solid #dce0e4 !important;
    border-radius:3px 18px 3px 3px !important;
    box-shadow:0 10px 28px rgba(18,21,25,.07) !important;
}
body .finance-card-header{
    border-bottom:1px solid #e3e6e9 !important;
    background:linear-gradient(90deg,#f7f8f9,#fff) !important;
}
body .finance-card-header::before{
    content:"";
    width:4px;
    align-self:stretch;
    background:#f5a800;
}

/* Configurações — SIL Máquinas */
body .settings-page-header{
    position:relative !important;
    overflow:hidden !important;
    padding:26px 30px !important;
    border:0 !important;
    border-left:7px solid #ffc400 !important;
    border-radius:3px 24px 3px 3px !important;
    background:
        linear-gradient(92deg,rgba(11,12,14,.97),rgba(20,22,25,.88)),
        url('../img/sil-entardecer.png') right center/cover no-repeat !important;
    box-shadow:0 18px 40px rgba(13,15,18,.14) !important;
}
body .settings-page-header .crm-page-eyebrow{color:#ffc400 !important}
body .settings-page-header h2{color:#fff !important}
body .settings-page-header p{color:#c9cdd2 !important}
body .settings-profile-card{
    border:1px solid #dce0e4 !important;
    border-radius:3px 18px 3px 3px !important;
    background:#fff !important;
    box-shadow:0 10px 28px rgba(18,21,25,.07) !important;
}
body .settings-profile-avatar{
    border-radius:3px 12px 3px 3px !important;
    background:linear-gradient(135deg,#ffd21a,#f5a400) !important;
    color:#111 !important;
}
body .settings-profile-button{
    border-color:#d99a13 !important;
    border-radius:3px 11px 3px 3px !important;
    color:#a96f00 !important;
}
body .settings-section-title span{color:#c98200 !important}
body .settings-card{
    min-height:150px !important;
    border:1px solid #dce0e4 !important;
    border-radius:3px 18px 3px 3px !important;
    background:linear-gradient(145deg,#fff 0%,#f7f8f9 100%) !important;
    box-shadow:0 9px 25px rgba(18,21,25,.06) !important;
}
body .settings-card::before{
    content:"";
    position:absolute;
    top:0;
    left:0;
    width:5px;
    height:100%;
    background:#f5a800;
}
body .settings-card:hover{
    border-color:#f5a800 !important;
    box-shadow:0 14px 32px rgba(245,164,0,.14) !important;
}
body .settings-card-icon{
    border-radius:3px 11px 3px 3px !important;
    background:#17191d !important;
    color:#ffc400 !important;
}
body .settings-card-arrow{color:#c98200 !important}

@media(max-width:700px){
    body .settings-page-header{padding:20px !important;border-radius:3px 16px 3px 3px !important}
    body .settings-grid{grid-template-columns:1fr !important}
    body .settings-card{min-height:128px !important}
}

@media(min-width:901px){
    body.teiner-login-body .teiner-login-screen{padding:34px !important}
    body.teiner-login-body .teiner-login-box{
        width:min(1280px,calc(100vw - 68px)) !important;
        height:min(740px,calc(100vh - 68px)) !important;
        grid-template-columns:64% 36% !important;
        border:1px solid rgba(255,196,0,.48) !important;
        border-radius:4px 30px 4px 4px !important;
        background:transparent !important;
        box-shadow:0 40px 100px rgba(0,0,0,.48) !important;
    }
    body .teiner-login-visual{
        clip-path:polygon(0 0,100% 0,91% 100%,0 100%) !important;
        margin-right:-44px !important;
        z-index:2 !important;
    }
    body .teiner-login-panel{
        padding:48px 48px 40px 68px !important;
        border-top:7px solid #ffc400 !important;
        background:rgba(250,250,249,.97) !important;
    }
    body .teiner-login-panel::before{border-color:rgba(245,168,0,.10) !important}
    body .teiner-logo img{width:min(330px,92%) !important;max-height:125px !important}
    body .teiner-visual-content{max-width:430px !important}
    body .teiner-visual-content h2{font-size:46px !important;line-height:1.02 !important;text-transform:uppercase !important}
}
