:root {
    --rasoa-primary: #135d4c;
    --rasoa-primary-dark: #0d3f35;
    --rasoa-primary-soft: #e8f4ef;
    --rasoa-accent: #d8a028;
    --rasoa-ink: #1f2933;
    --rasoa-muted: #6b7280;
    --rasoa-border: #dbe3e8;
    --rasoa-bg: #f4f7f6;
}

body {
    background: var(--rasoa-bg);
    color: var(--rasoa-ink);
}

.bg-gradient-primary {
    background-color: var(--rasoa-primary);
    background-image: linear-gradient(180deg, var(--rasoa-primary) 0%, var(--rasoa-primary-dark) 100%);
}

.sidebar {
    box-shadow: 0 0.75rem 1.75rem rgba(13, 63, 53, .18);
}

.sidebar .sidebar-brand {
    height: 5rem;
    padding: .85rem 1rem;
}

.sidebar-brand-logo {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: .5rem;
    box-shadow: 0 .35rem .8rem rgba(0, 0, 0, .12);
    height: 52px;
    max-width: 132px;
    object-fit: contain;
    padding: .25rem .45rem;
    width: 132px;
}

.sidebar .nav-item .nav-link {
    align-items: center;
    display: flex;
    gap: .35rem;
    padding-bottom: .72rem;
    padding-top: .72rem;
}

.sidebar .nav-item.active .nav-link {
    background: rgba(255, 255, 255, .12);
    border-left: 4px solid var(--rasoa-accent);
}

.sidebar .sidebar-heading {
    color: rgba(255, 255, 255, .62);
    letter-spacing: 0;
}

.topbar {
    border-bottom: 1px solid var(--rasoa-border);
}

.app-title {
    color: var(--rasoa-primary-dark);
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.content-header {
    gap: 1rem;
}

.content-header h1 {
    color: var(--rasoa-ink);
    font-weight: 700;
}

.card,
.modal-content {
    border: 1px solid var(--rasoa-border);
    border-radius: .5rem;
}

.shadow,
.shadow-sm,
.shadow-lg {
    box-shadow: 0 .45rem 1.15rem rgba(31, 41, 51, .08) !important;
}

.btn {
    border-radius: .35rem;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--rasoa-primary);
    border-color: var(--rasoa-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--rasoa-primary-dark);
    border-color: var(--rasoa-primary-dark);
}

.btn-warning {
    background-color: var(--rasoa-accent);
    border-color: var(--rasoa-accent);
    color: #1f2933;
}

.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.actions form {
    margin: 0;
}

.table td,
.table th {
    vertical-align: middle;
}

.table thead th {
    background: #f8faf9;
    border-bottom: 1px solid var(--rasoa-border);
    color: var(--rasoa-muted);
    font-size: .76rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.form-control:focus,
.custom-select:focus,
.select2-container--bootstrap4.select2-container--focus .select2-selection {
    border-color: var(--rasoa-primary);
    box-shadow: 0 0 0 .2rem rgba(19, 93, 76, .16);
}

.alert {
    border-radius: .5rem;
}

select.product-unit + .select2 .select2-selection--single {
    padding-left: 1.85rem;
    position: relative;
}

select.product-unit + .select2 .select2-selection--single::before {
    color: #858796;
    content: "\f002";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    left: .75rem;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

select.product-unit + .select2 .select2-selection--single::after {
    color: #858796;
    content: "\f078";
    font-family: "Font Awesome 5 Free";
    font-size: .75rem;
    font-weight: 900;
    pointer-events: none;
    position: absolute;
    right: .8rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

select.product-unit + .select2 .select2-selection__arrow {
    display: none;
}

select.product-unit + .select2 .select2-selection__rendered {
    padding-right: 2rem;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: var(--rasoa-primary) !important;
    color: #fff !important;
}

.login-page {
    align-items: center;
    background: linear-gradient(135deg, var(--rasoa-primary-dark), var(--rasoa-primary) 58%, #f1f5ef);
    display: flex;
    min-height: 100vh;
}

.login-card {
    border: 0;
    border-radius: .75rem;
    overflow: hidden;
}

.login-logo {
    height: auto;
    max-width: 220px;
    width: 100%;
}

.btn[disabled],
button[disabled] {
    cursor: not-allowed;
}

@media (max-width: 767.98px) {
    .content-header {
        align-items: flex-start !important;
    }

    .app-title {
        font-size: .9rem;
    }
}

.dashboard-kpi {
    align-items: center;
    display: flex;
    gap: .9rem;
}

.dashboard-kpi-icon {
    align-items: center;
    background: var(--rasoa-primary-soft);
    border-radius: .5rem;
    color: var(--rasoa-primary);
    display: inline-flex;
    flex: 0 0 44px;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.dashboard-kpi-label {
    color: var(--rasoa-muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: .2rem;
    text-transform: uppercase;
}

.dashboard-kpi-value {
    color: var(--rasoa-ink);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
}

.dashboard-section-title {
    align-items: center;
    color: var(--rasoa-primary-dark);
    display: flex;
    font-size: .95rem;
    font-weight: 800;
    gap: .45rem;
    margin: 0;
}

.dashboard-store {
    border: 1px solid var(--rasoa-border);
    border-radius: .5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.dashboard-store-toggle {
    color: var(--rasoa-ink);
    text-decoration: none;
}

.dashboard-store-toggle:hover,
.dashboard-store-toggle:focus {
    color: var(--rasoa-primary-dark);
    text-decoration: none;
}

.dashboard-store-header {
    align-items: center;
    background: #f8faf9;
    border-bottom: 1px solid var(--rasoa-border);
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: space-between;
    padding: .75rem 1rem;
}

.dashboard-store-header .fa-chevron-down {
    transition: transform .18s ease;
}

.dashboard-store-toggle[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

.dashboard-store-body {
    padding: 1rem;
}

.dashboard-scroll {
    max-height: 315px;
    overflow-y: auto;
    padding-right: .25rem;
}

.dashboard-scroll .table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.dashboard-tabbar {
    border-bottom: 1px solid var(--rasoa-border);
    gap: .35rem;
}

.dashboard-tabbar .nav-link {
    border: 0;
    border-bottom: 3px solid transparent;
    color: var(--rasoa-muted);
    font-weight: 700;
}

.dashboard-tabbar .nav-link.active {
    background: transparent;
    border-bottom-color: var(--rasoa-primary);
    color: var(--rasoa-primary-dark);
}

.dashboard-mini-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    margin-bottom: 1rem;
}

.dashboard-mini-stat {
    background: #f8faf9;
    border: 1px solid var(--rasoa-border);
    border-radius: .5rem;
    padding: .75rem;
}

.dashboard-mini-stat span {
    color: var(--rasoa-muted);
    display: block;
    font-size: .72rem;
    font-weight: 700;
    margin-bottom: .25rem;
    text-transform: uppercase;
}

.dashboard-mini-stat strong {
    color: var(--rasoa-ink);
    display: block;
    font-size: 1rem;
}

.report-filter {
    align-items: end;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.report-period {
    color: var(--rasoa-muted);
    font-size: .85rem;
    font-weight: 700;
}

.report-summary-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.report-summary-card {
    background: #fff;
    border: 1px solid var(--rasoa-border);
    border-left: 4px solid var(--rasoa-primary);
    border-radius: .5rem;
    padding: 1rem;
}

.report-summary-card.warning {
    border-left-color: var(--rasoa-accent);
}

.report-summary-card.success {
    border-left-color: #1cc88a;
}

.report-summary-card.info {
    border-left-color: #36b9cc;
}

.report-summary-label {
    color: var(--rasoa-muted);
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
}

.report-summary-value {
    color: var(--rasoa-ink);
    font-size: 1.2rem;
    font-weight: 800;
    margin-top: .25rem;
}

.report-store-nav {
    border-bottom: 1px solid var(--rasoa-border);
    gap: .35rem;
}

.report-store-nav .nav-link {
    border: 1px solid var(--rasoa-border);
    border-bottom: 0;
    color: var(--rasoa-muted);
    font-weight: 700;
}

.report-store-nav .nav-link.active {
    background: var(--rasoa-primary-soft);
    color: var(--rasoa-primary-dark);
}
