:root {
    --agroat-honey: #d9a01c;
    --agroat-honey-dark: #b58222;
    --agroat-brown: #5a4015;
    --agroat-dark: #3b2a12;
    --agroat-cream: #fffaf0;
    --agroat-soft: #f8f2df;
    --agroat-border: rgba(90, 64, 21, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #fffdf7 0%, #f8f2df 100%);
    min-height: 100vh;
    color: var(--agroat-dark);
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22180%22%20height%3D%22156%22%20viewBox%3D%220%200%20180%20156%22%3E%0A%20%20%3Cg%20fill%3D%22none%22%20stroke%3D%22%23b58222%22%20stroke-opacity%3D%220.10%22%20stroke-width%3D%222%22%3E%0A%20%20%20%20%3Cpolygon%20points%3D%2245%2C4%2077%2C22%2077%2C58%2045%2C76%2013%2C58%2013%2C22%22/%3E%0A%20%20%20%20%3Cpolygon%20points%3D%22109%2C4%20141%2C22%20141%2C58%20109%2C76%2077%2C58%2077%2C22%22/%3E%0A%20%20%20%20%3Cpolygon%20points%3D%2277%2C58%20109%2C76%20109%2C112%2077%2C130%2045%2C112%2045%2C76%22/%3E%0A%20%20%3C/g%3E%0A%3C/svg%3E");
    background-size: 180px 156px;
    background-repeat: repeat;
    opacity: .55;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22220%22%20height%3D%22180%22%20viewBox%3D%220%200%20220%20180%22%3E%0A%20%20%3Cg%20opacity%3D%220.08%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22translate%2825%2030%29%20rotate%28-10%29%22%3E%0A%20%20%20%20%20%20%3Cellipse%20cx%3D%2224%22%20cy%3D%2222%22%20rx%3D%2215%22%20ry%3D%2210%22%20fill%3D%22%23e0a106%22/%3E%0A%20%20%20%20%20%20%3Crect%20x%3D%2214%22%20y%3D%2215%22%20width%3D%224%22%20height%3D%2214%22%20fill%3D%22%235a4015%22/%3E%0A%20%20%20%20%20%20%3Crect%20x%3D%2221%22%20y%3D%2214%22%20width%3D%224%22%20height%3D%2216%22%20fill%3D%22%235a4015%22/%3E%0A%20%20%20%20%20%20%3Crect%20x%3D%2228%22%20y%3D%2215%22%20width%3D%224%22%20height%3D%2214%22%20fill%3D%22%235a4015%22/%3E%0A%20%20%20%20%20%20%3Cellipse%20cx%3D%2215%22%20cy%3D%2212%22%20rx%3D%228%22%20ry%3D%225%22%20fill%3D%22%23d9e9f7%22/%3E%0A%20%20%20%20%20%20%3Cellipse%20cx%3D%2234%22%20cy%3D%2211%22%20rx%3D%228%22%20ry%3D%225%22%20fill%3D%22%23d9e9f7%22/%3E%0A%20%20%20%20%20%20%3Ccircle%20cx%3D%228%22%20cy%3D%2222%22%20r%3D%225%22%20fill%3D%22%235a4015%22/%3E%0A%20%20%20%20%3C/g%3E%0A%20%20%20%20%3Cg%20transform%3D%22translate%28145%2098%29%20rotate%2812%29%22%3E%0A%20%20%20%20%20%20%3Cellipse%20cx%3D%2224%22%20cy%3D%2222%22%20rx%3D%2215%22%20ry%3D%2210%22%20fill%3D%22%23e0a106%22/%3E%0A%20%20%20%20%20%20%3Crect%20x%3D%2214%22%20y%3D%2215%22%20width%3D%224%22%20height%3D%2214%22%20fill%3D%22%235a4015%22/%3E%0A%20%20%20%20%20%20%3Crect%20x%3D%2221%22%20y%3D%2214%22%20width%3D%224%22%20height%3D%2216%22%20fill%3D%22%235a4015%22/%3E%0A%20%20%20%20%20%20%3Crect%20x%3D%2228%22%20y%3D%2215%22%20width%3D%224%22%20height%3D%2214%22%20fill%3D%22%235a4015%22/%3E%0A%20%20%20%20%20%20%3Cellipse%20cx%3D%2215%22%20cy%3D%2212%22%20rx%3D%228%22%20ry%3D%225%22%20fill%3D%22%23d9e9f7%22/%3E%0A%20%20%20%20%20%20%3Cellipse%20cx%3D%2234%22%20cy%3D%2211%22%20rx%3D%228%22%20ry%3D%225%22%20fill%3D%22%23d9e9f7%22/%3E%0A%20%20%20%20%20%20%3Ccircle%20cx%3D%228%22%20cy%3D%2222%22%20r%3D%225%22%20fill%3D%22%235a4015%22/%3E%0A%20%20%20%20%3C/g%3E%0A%20%20%3C/g%3E%0A%3C/svg%3E");
    background-size: 220px 180px;
    background-repeat: repeat;
    opacity: .18;
    pointer-events: none;
    z-index: 0;
}

main, .page-wrap, .login-wrap, .navbar, .container, .container-fluid {
    position: relative;
    z-index: 1;
}

.navbar-agroat {
    background: linear-gradient(90deg, #6b4b17 0%, #8a631f 55%, #d9a01c 100%);
}

.brand-title {
    color: var(--agroat-brown);
    font-weight: 800;
    letter-spacing: .5px;
}

.card-soft,
.login-card {
    border: 1px solid var(--agroat-border);
    border-radius: 22px;
    background: rgba(255, 250, 240, .92);
    backdrop-filter: blur(3px);
    box-shadow: 0 12px 32px rgba(90, 64, 21, .08);
}

.login-card {
    border-radius: 26px;
}

.btn-agroat {
    background: linear-gradient(90deg, #c89212 0%, #e0ab28 100%);
    border: 1px solid #c89212;
    color: #3b2a12;
    font-weight: 700;
}

.btn-agroat:hover {
    background: linear-gradient(90deg, #b58222 0%, #d9a01c 100%);
    border-color: #b58222;
    color: #3b2a12;
}

.btn-honey {
    background: linear-gradient(90deg, #f0c85a 0%, #f7d97d 100%);
    border: 1px solid #ddb247;
    color: #3b2a12;
    font-weight: 700;
}

.btn-honey:hover {
    background: linear-gradient(90deg, #e9bc47 0%, #f0cf68 100%);
    border-color: #d1a23b;
    color: #3b2a12;
}

.stat-card {
    border: 1px solid var(--agroat-border);
    border-radius: 22px;
    background: rgba(255, 251, 244, .95);
    box-shadow: 0 10px 24px rgba(90, 64, 21, .06);
}

.stat-icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(217, 160, 28, .15);
    font-size: 24px;
}

.table thead th {
    background: #f7e9b0 !important;
    color: var(--agroat-dark);
}

.badge-mora {
    background: #c04a1a;
    color: #fff;
}

.badge-ok {
    background: #3c7a3d;
    color: #fff;
}

.badge-muted {
    background: #7b756c;
    color: #fff;
}

.honey-line {
    height: 4px;
    width: 120px;
    border-radius: 999px;
    background: linear-gradient(90deg, #c89212, #f3d06b);
}

.form-control {
    background: rgba(255,255,255,.75);
    border: 1px solid rgba(90,64,21,.15);
}

.form-control:focus {
    border-color: #d9a01c;
    box-shadow: 0 0 0 .25rem rgba(217, 160, 28, .18);
}

.page-title {
    font-weight: 800;
    color: var(--agroat-brown);
}

.small-note,
.text-muted {
    color: #6f6454 !important;
}

@media (max-width: 768px) {
    body::before,
    body::after {
        opacity: .14;
    }
}

/* ===== AGROAT v10: logo institucional ===== */
.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
}
.navbar-logo-mark {
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.16));
}
.login-logo {
    display: block;
    width: min(150px, 52%);
    height: auto;
    margin: 0 auto 12px auto;
    filter: drop-shadow(0 8px 14px rgba(90,64,21,.10));
}
.dashboard-brand-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
}
.dashboard-brand-panel .brand-copy h2 {
    color: var(--agroat-brown);
    font-weight: 900;
    letter-spacing: .4px;
}
.dashboard-logo {
    display: none;
}
.print-logo,
.receipt-logo {
    display: block;
    width: 118px;
    max-height: 94px;
    object-fit: contain;
    margin: 0 auto 8px auto;
}
.ticket-logo {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
    margin: 0 auto 3px auto;
}
@media (max-width: 768px) {
    .dashboard-brand-panel {
        text-align: center;
        flex-direction: column-reverse;
    }
    .dashboard-logo {
    display: none;
}
}


/* ===== AGROAT v11: menú en cascada, logo moderado y ventas ===== */
.login-card .card-body { padding-top: 2rem !important; }
.dashboard-brand-panel { min-height: auto; }
.dashboard-brand-panel.compact-panel { align-items: flex-start; }
.sales-summary-card { border: 1px solid var(--agroat-border); border-radius: 18px; background: rgba(255,251,244,.96); padding: 16px; height: 100%; }
.sales-summary-card .label { color: #6f6454; font-size: .84rem; }
.sales-summary-card .value { font-weight: 900; font-size: 1.45rem; color: var(--agroat-brown); }
.submodule-bar { border: 1px solid var(--agroat-border); border-radius: 20px; background: rgba(255,250,240,.92); padding: 12px; display:flex; gap:10px; flex-wrap:wrap; }
.submodule-bar .btn { border-radius: 14px; font-weight:700; }
@media (min-width: 992px) {
    .navbar-agroat .dropdown:hover .dropdown-menu { display:block; margin-top:0; }
}


/* ===== AGROAT v12: login elegante y logo controlado ===== */
.agroat-login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
}
.login-symbol {
    width: 88px !important;
    height: 88px !important;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(90,64,21,.14));
    margin-bottom: .2rem;
}
.login-wordmark {
    font-size: clamp(2.1rem, 5vw, 3.2rem);
    line-height: .95;
    font-weight: 950;
    letter-spacing: .06em;
    color: #0f6b34;
    text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(255,255,255,.65);
}
.login-logo {
    max-width: 110px !important;
    width: 110px !important;
    height: auto !important;
}
.login-card .card-body {
    padding-top: 1.7rem !important;
    padding-bottom: 1.8rem !important;
}
@media (max-width: 576px) {
    .login-symbol { width: 72px !important; height: 72px !important; }
    .login-wordmark { font-size: 2rem; }
}
