/* Global app shell */
body {
    background: linear-gradient(180deg, #f6fbf8 0, #ffffff 18rem);
    color: var(--gray-900);
}

.app-navbar {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(1, 170, 73, 0.16) !important;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.06);
    backdrop-filter: blur(8px);
    padding-block: 0.35rem;
    position: relative;
    z-index: var(--z-index-fixed);
}

.app-navbar .container-fluid {
    max-width: 1360px;
    margin-inline: auto;
    padding-inline: 1rem;
    flex-wrap: nowrap;
    align-items: center;
}

.app-navbar .navbar-nav {
    flex-direction: row;
    align-items: center;
}

.app-navbar .btn {
    border-radius: 999px;
    font-weight: 600;
}

.app-navbar .dropdown-menu {
    border-radius: 0.85rem;
    border: 1px solid var(--gray-200);
    box-shadow: 0 14px 40px rgba(17, 24, 39, 0.14);
    padding-block: 0.5rem;
    position: absolute;
}

.app-navbar .dropdown-item {
    border-radius: 0.55rem;
    margin-inline: 0.35rem;
    width: auto;
}

.app-avatar-icon {
    font-size: 1.9rem;
    color: var(--gray-500);
    transition: color 0.2s ease;
}

.app-navbar .dropdown-toggle:hover .app-avatar-icon,
.app-navbar .dropdown-toggle:focus .app-avatar-icon {
    color: var(--brand-primary);
}

.app-main {
    padding-top: 1rem;
    padding-bottom: 4rem;
}

.footer {
    background: rgba(255, 255, 255, 0.96);
    border-top-color: var(--gray-200) !important;
    backdrop-filter: blur(8px);
}

.footer .container {
    max-width: 1360px;
}

/* Shared page scaffolding */
.page-shell {
    padding-block: 1rem 1.5rem;
}

.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.9rem;
    margin-bottom: 1.4rem;
}

.page-title {
    margin: 0;
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.page-subtitle {
    margin: 0.3rem 0 0;
    color: var(--gray-600);
    font-size: 0.95rem;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.page-actions .btn {
    border-radius: 999px;
}

.surface-card {
    border: 1px solid var(--gray-200);
    border-radius: 0.95rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

.surface-card .card-header {
    background: #fff;
    border-bottom: 1px solid var(--gray-100);
}

.surface-card .card-title {
    font-weight: 650;
    color: var(--gray-900);
}

.filter-surface {
    border: 1px solid var(--gray-200);
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 2px 10px rgba(2, 6, 23, 0.04);
}

.data-panel {
    border: 1px solid var(--gray-200);
    border-radius: 0.95rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
}

.data-panel .table {
    margin-bottom: 0;
}

.data-panel .table > :not(caption) > * > * {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    vertical-align: middle;
}

.data-panel .table thead th {
    background: #f8fbf9;
    color: var(--gray-700);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--gray-200);
}

.data-panel .table-hover > tbody > tr:hover > * {
    background-color: #f5faf7;
}

.data-panel code {
    font-size: 0.82rem;
    color: #b4236d;
    background-color: #f8faf9;
    border: 1px solid #e8f0ec;
    border-radius: 0.35rem;
    padding: 0.2rem 0.4rem;
}

.empty-state {
    text-align: center;
    border: 1px dashed var(--gray-300);
    border-radius: 1rem;
    background: #fcfefc;
    padding: 2.25rem 1rem;
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--gray-400);
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-top: 0.75rem;
}

.empty-state p {
    color: var(--gray-600);
    margin-bottom: 0;
}

.metric-card {
    border: 1px solid var(--gray-200);
    border-radius: 0.95rem;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.metric-card .metric-label {
    color: var(--gray-500);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.metric-card .metric-value {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    font-weight: 700;
    line-height: 1.15;
}

.btn-cart-float {
    border: 2px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 14px 28px rgba(1, 170, 73, 0.3);
}

.auth-shell {
    min-height: calc(100vh - 12rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-block: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 34rem;
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    box-shadow: 0 16px 35px rgba(2, 6, 23, 0.09);
    overflow: hidden;
}

.auth-card .card-body {
    padding: 1.4rem 1.4rem 1.1rem;
}

.auth-card .card-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.15rem;
}

.auth-card .form-label {
    font-weight: 600;
    color: var(--gray-700);
}

.auth-card .btn-primary {
    border-radius: 0.65rem;
    min-height: 2.8rem;
    font-weight: 600;
}

.nav-tabs .nav-link {
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--gray-600);
    font-weight: 500;
    padding-inline: 0.9rem;
}

.nav-tabs .nav-link.active {
    color: var(--brand-primary);
    background: #ecfdf4;
    border-color: #c7f4db;
}

.badge {
    font-weight: 600;
}

.card .card-img-top {
    border-bottom-color: var(--gray-200);
}

.product-list-image {
    height: 200px;
    object-fit: cover;
}

.product-detail-image,
.product-detail-image-placeholder {
    height: clamp(280px, 45vw, 430px);
    object-fit: cover;
}

.producer-banner-image,
.producer-banner-placeholder {
    width: 100%;
    height: clamp(220px, 36vw, 320px);
    object-fit: cover;
}

.producer-product-thumb {
    height: 150px;
    object-fit: cover;
}

.app-toast-zone {
    z-index: 11;
}

.no-results-icon {
    font-size: 2rem;
    color: var(--gray-500);
}

.bi {
    vertical-align: middle;
}

@media (max-width: 767.98px) {
    .page-shell {
        padding-top: 0.5rem;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }

    .auth-shell {
        min-height: auto;
        align-items: flex-start;
    }

    .auth-card .card-body {
        padding: 1.15rem 1rem 1rem;
    }
}
