:root{
    --primary:#005E32;
    --primary2:#008F45;
    --yellow:#FCB317;
    --dark:#0F172A;
    --muted:#64748B;
    --soft:#F8FAFC;
    --border:rgba(15,23,42,.10);
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    background:#F3F7F5;
    color:var(--dark);
}

a{
    text-decoration:none;
}

/* Login */
.LoginBody{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    background:
        radial-gradient(circle at top left, rgba(252,179,23,.26), transparent 32%),
        radial-gradient(circle at bottom right, rgba(0,143,69,.20), transparent 30%),
        #F5F8F6;
    padding:18px;
}

.LoginCard{
    width:100%;
    max-width:420px;
    background:#fff;
    border:1px solid var(--border);
    border-radius:30px;
    padding:32px;
    box-shadow:0 24px 65px rgba(15,23,42,.13);
}

.LoginIcon{
    width:72px;
    height:72px;
    border-radius:24px;
    margin:0 auto 14px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,var(--primary),var(--primary2));
    color:white;
    font-size:32px;
    font-weight:900;
}

.LoginCard h1{
    font-size:30px;
    font-weight:900;
    color:var(--primary);
    margin:0;
}

.LoginCard p{
    color:var(--muted);
    margin:6px 0 0;
}

/* Layout */
.AppShell{
    min-height:100vh;
    display:flex;
}

.Sidebar{
    width:280px;
    background:#fff;
    border-right:1px solid var(--border);
    padding:22px;
    position:fixed;
    top:0;
    bottom:0;
    left:0;
    z-index:20;
}

.BrandBox{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:28px;
}

.BrandIcon{
    width:48px;
    height:48px;
    border-radius:18px;
    background:linear-gradient(135deg,var(--primary),var(--primary2));
    color:white;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:22px;
}

.BrandTitle{
    font-weight:900;
    color:var(--primary);
    line-height:1.05;
}

.BrandSub{
    font-size:12px;
    color:var(--muted);
    font-weight:700;
}

.MenuBox{
    display:grid;
    gap:10px;
}

.MenuItem{
    display:flex;
    align-items:center;
    gap:10px;
    color:var(--dark);
    padding:13px 14px;
    border-radius:18px;
    font-weight:800;
    transition:.2s;
}

.MenuItem:hover{
    background:rgba(0,143,69,.09);
    color:var(--primary);
}

.MainContent{
    margin-left:280px;
    flex:1;
    min-width:0;
}

.Topbar{
    min-height:92px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    padding:22px 28px;
    background:rgba(255,255,255,.86);
    backdrop-filter:blur(8px);
    border-bottom:1px solid var(--border);
    position:sticky;
    top:0;
    z-index:10;
}

.Topbar h1{
    font-size:26px;
    font-weight:900;
    color:var(--primary);
    margin:0;
}

.Topbar p{
    margin:5px 0 0;
    color:var(--muted);
}

.UserBox{
    display:flex;
    align-items:center;
    gap:10px;
}

.UserAvatar{
    width:42px;
    height:42px;
    border-radius:15px;
    background:rgba(0,143,69,.10);
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--primary);
    font-size:20px;
}

.UserBox small{
    display:block;
    color:var(--muted);
    line-height:1;
}

.ContentArea{
    padding:28px;
}

/* Componentes */
.CardSoft{
    background:#fff;
    border:1px solid var(--border);
    border-radius:28px;
    box-shadow:0 18px 45px rgba(15,23,42,.07);
    overflow:hidden;
}

.SectionHeader .BadgeSoft,
.BadgeSoft{
    display:inline-flex;
    align-items:center;
    gap:6px;
    background:rgba(252,179,23,.18);
    color:#8A5B00;
    border:1px solid rgba(252,179,23,.25);
    padding:6px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:900;
    margin-bottom:9px;
}

.SectionHeader h4{
    margin:0;
    color:var(--primary);
    font-weight:900;
}

.SectionHeader p{
    margin:5px 0 0;
    color:var(--muted);
}

.BtnPrimary{
    border:0;
    border-radius:16px;
    background:linear-gradient(135deg,var(--primary),var(--primary2));
    color:white;
    font-weight:900;
    padding:12px 18px;
    box-shadow:0 12px 24px rgba(0,143,69,.22);
}

.BtnPrimary:hover{
    color:white;
    transform:translateY(-1px);
}

.form-control,
.form-select{
    border-radius:15px;
    border:1px solid rgba(15,23,42,.13);
    padding:12px 14px;
}

.form-control:focus,
.form-select:focus{
    border-color:rgba(0,143,69,.45);
    box-shadow:0 0 0 .2rem rgba(0,143,69,.12);
}

.TableApp{
    border-collapse:separate;
    border-spacing:0 10px;
}

.TableApp thead th{
    color:var(--muted);
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.04em;
    border:0;
}

.TableApp tbody tr{
    background:#fff;
    box-shadow:0 10px 22px rgba(15,23,42,.06);
}

.TableApp tbody td{
    background:#fff;
    border-top:1px solid rgba(15,23,42,.06);
    border-bottom:1px solid rgba(15,23,42,.06);
    padding:14px;
}

.TableApp tbody td:first-child{
    border-left:1px solid rgba(15,23,42,.06);
    border-radius:18px 0 0 18px;
}

.TableApp tbody td:last-child{
    border-right:1px solid rgba(15,23,42,.06);
    border-radius:0 18px 18px 0;
}

.StatCard{
    background:#fff;
    border:1px solid var(--border);
    border-radius:26px;
    padding:22px;
    display:flex;
    gap:15px;
    box-shadow:0 18px 40px rgba(15,23,42,.06);
}

.StatIcon{
    width:52px;
    height:52px;
    border-radius:18px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(0,143,69,.10);
    color:var(--primary);
    font-size:24px;
    flex:0 0 auto;
}

.StatCard span{
    color:var(--muted);
    font-size:13px;
    font-weight:800;
}

.StatCard strong{
    display:block;
    color:var(--primary);
    font-size:20px;
    font-weight:900;
}

.StatCard p{
    margin:4px 0 0;
    color:var(--muted);
    font-size:14px;
}

.AlertInfo{
    background:rgba(0,143,69,.08);
    border:1px solid rgba(0,143,69,.15);
    border-radius:18px;
    padding:14px 16px;
    color:#075B34;
}

.ComidaItem{
    background:#F8FAFC;
    border:1px dashed rgba(15,23,42,.18);
    border-radius:20px;
    padding:14px;
    margin-bottom:12px;
}

/* Mobile */
@media(max-width:991px){
    .Sidebar{
        position:static;
        width:100%;
        border-right:0;
        border-bottom:1px solid var(--border);
    }

    .AppShell{
        display:block;
    }

    .MainContent{
        margin-left:0;
    }

    .Topbar{
        position:static;
        padding:18px;
        align-items:flex-start;
        flex-direction:column;
    }

    .ContentArea{
        padding:18px;
    }
}

@media(max-width:767px){
    input,
    select,
    textarea{
        font-size:16px !important;
    }

    .TableApp,
    .TableApp thead,
    .TableApp tbody,
    .TableApp tr,
    .TableApp td{
        display:block;
        width:100%;
    }

    .TableApp thead{
        display:none;
    }

    .TableApp tbody tr{
        margin-bottom:14px;
        border-radius:22px;
        overflow:hidden;
        border:1px solid rgba(15,23,42,.08);
        box-shadow:0 14px 30px rgba(15,23,42,.08);
    }

    .TableApp tbody td{
        border:0;
        border-radius:0 !important;
        padding:10px 14px;
    }

    .TableApp tbody td:first-child{
        padding-top:16px;
    }

    .TableApp tbody td:last-child{
        padding-bottom:16px;
    }
}


/* =========================================================
   FIX MODAL PEDIDO TEMÁTICA - SCROLL COMPLETO
========================================================= */

#ModalPedidoTematica {
    overflow-y: auto !important;
}

#ModalPedidoTematica .modal-dialog {
    height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px);
    margin-top: 12px !important;
    margin-bottom: 12px !important;
    display: flex;
    align-items: stretch;
}

#ModalPedidoTematica .modal-content {
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#ModalPedidoTematica #FormPedidoTematica {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#ModalPedidoTematica .modal-header {
    flex: 0 0 auto;
    background: #fff;
    z-index: 10;
}

#ModalPedidoTematica .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
}

#ModalPedidoTematica .modal-footer {
    flex: 0 0 auto;
    background: #fff;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* CELULAR */
@media (max-width: 767px) {
    #ModalPedidoTematica .modal-dialog {
        width: calc(100% - 16px) !important;
        max-width: calc(100% - 16px) !important;
        height: calc(100dvh - 16px);
        max-height: calc(100dvh - 16px);
        margin: 8px auto !important;
    }

    #ModalPedidoTematica .modal-content {
        border-radius: 24px !important;
    }

    #ModalPedidoTematica .modal-header,
    #ModalPedidoTematica .modal-body,
    #ModalPedidoTematica .modal-footer {
        padding-left: 18px !important;
        padding-right: 18px !important;
    }
}