/* =========================
   DEFAULT / BLAZOR STYLES
   ========================= */

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.login-shell {
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f5f7fa;
    overflow: hidden;
}

.login-brand-panel {
    position: relative;
    height: 100%;
    overflow: hidden;
    background: linear-gradient( rgba(11, 31, 58, 0.15), rgba(11, 31, 58, 0.65) ), url('/images/vendor-login-store.png');
    background-size: cover;
    background-position: center;
    color: white;
}

.brand-overlay {
    position: relative;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 40px 44px;
}

/* -------------------------
   TOP BRANDING
   ------------------------- */

.brand-top {
    position: absolute;
    top: 36px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 88px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.brand-logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    width: 100%;
}

.brand-logo {
    width: 200px;
    max-width: 38%;
}

.food-bazaar-logo {
    width: 180px;
    max-width: 36%;
}

.brand-divider {
    width: 1px;
    height: 72px;
    background: rgba(255, 255, 255, 0.8);
}

.brand-tagline {
    margin-top: 18px;
    font-size: 1.45rem;
    font-weight: 400;
    text-align: center;
}

/* -------------------------
   BOTTOM CONTENT
   ------------------------- */

.brand-bottom {
    position: absolute;
    left: 44px;
    right: 44px;
    bottom: 48px;
}

.brand-message {
    margin-bottom: 46px;
}

.brand-message-title {
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.brand-message-subtitle {
    margin-top: 12px;
    font-size: 1.1rem;
}

.brand-values {
    display: flex;
    align-items: flex-start;
    gap: 60px;
}

.brand-value {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 700;
}

.login-form-panel {
    height: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 32px 48px;
    overflow-y: auto;
}

.login-form-container {
    width: 100%;
    max-width: 560px;
    text-align: center;
}

.login-logo {
    width: 260px;
    max-width: 70%;
    margin-bottom: 24px;
}

.login-title {
    font-weight: 700 !important;
    color: #12233f;
    margin-bottom: 8px !important;
}

.login-subtitle {
    color: #65748b;
    margin-bottom: 36px !important;
}

.login-form {
    width: 100%;
}

.login-button {
    background: #d71920 !important;
    color: white !important;
    min-height: 56px;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
}

.forgot-password {
    display: inline-block;
    margin-top: 22px;
    color: #d71920 !important;
}

.login-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 120px;
    padding-top: 28px;
    border-top: 1px solid #dfe5ec;
    color: #53627a;
    font-size: 0.9rem;
}

.footer-divider {
    width: 1px;
    height: 48px;
    background: #cfd7e2;
}

.register-button {
    color: #d71920 !important;
    font-weight: 600 !important;
}

@media (max-width: 768px) {

    .login-shell {
        display: block;
    }

    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        min-height: 100vh;
        padding: 32px 20px;
    }

    .login-form-container {
        max-width: 440px;
    }

    .login-logo {
        width: 210px;
        margin-bottom: 20px;
    }

    .login-title {
        font-size: 2rem !important;
    }

    .login-subtitle {
        margin-bottom: 28px !important;
    }

    .login-footer {
        margin-top: 72px;
        gap: 18px;
        font-size: 0.8rem;
    }
}

/* =========================
   VENDOR PORTAL
   ========================= */

.portal-shell {
    min-height: 100vh;
    background: #f4f6f8;
}

.portal-header {
    height: 86px;
    background: #d71920;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.portal-header-left,
.portal-header-right {
    display: flex;
    align-items: center;
}

.portal-header-left {
    gap: 18px;
}

.portal-header-right {
    gap: 22px;
}

.portal-bogopa-logo {
    width: 135px;
}

.portal-foodbazaar-wrap {
    background: white;
    padding: 6px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-foodbazaar-logo {
    width: 110px;
    display: block;
}

.portal-header-title {
    border-left: 1px solid rgba(255,255,255,0.45);
    padding-left: 18px;
}

.portal-title {
    font-size: 1.35rem;
    font-weight: 700;
}

.portal-tagline {
    margin-top: 2px;
    font-size: 0.78rem;
    opacity: 0.88;
}

.portal-user-info {
    min-width: 140px;
    text-align: right;
}

.portal-user-name {
    font-weight: 700;
}

.portal-user-company {
    font-size: 0.8rem;
    opacity: 0.85;
}

.portal-logout-button {
    color: white !important;
    border-color: rgba(255,255,255,0.8) !important;
}

.portal-body {
    display: grid;
    grid-template-columns: 255px 1fr;
    min-height: calc(100vh - 86px);
}

.portal-sidebar {
    background: white;
    border-right: 1px solid #e0e4e8;
    display: flex;
    flex-direction: column;
    padding: 24px 14px 18px;
}

.portal-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.portal-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 48px;
    padding: 0 14px;
    text-decoration: none;
    color: #334155;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .portal-nav-item:hover {
        background: #f5f6f8;
        color: #d71920;
    }

    .portal-nav-item.active {
        background: #fff1f1;
        color: #d71920;
        font-weight: 700;
    }

.portal-nav-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 14px 8px;
}

.portal-nav-badge {
    margin-left: auto;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    border-radius: 999px;
    background: #d71920;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

.portal-sidebar-footer {
    margin-top: auto;
    padding: 20px 12px 4px;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #9ca3af;
}

.portal-content {
    min-width: 0;
    padding: 32px;
}

@media (max-width: 900px) {

    .portal-header {
        padding: 0 18px;
    }

    .portal-tagline,
    .portal-user-company,
    .portal-foodbazaar-logo {
        display: none;
    }

    .portal-body {
        grid-template-columns: 78px 1fr;
    }

    .portal-sidebar {
        padding-left: 10px;
        padding-right: 10px;
    }

    .portal-nav-item {
        justify-content: center;
        padding: 0;
    }

        .portal-nav-item span:not(.portal-nav-badge) {
            display: none;
        }

    .portal-nav-badge {
        position: absolute;
        top: 4px;
        right: 4px;
        min-width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }

    .portal-sidebar-footer {
        display: none;
    }

    .portal-content {
        padding: 22px;
    }
}

@media (max-width: 600px) {

    .portal-bogopa-logo {
        width: 105px;
    }

    .portal-header-title,
    .portal-user-info {
        display: none;
    }

    .portal-body {
        display: block;
    }

    .portal-sidebar {
        display: none;
    }

    .portal-content {
        padding: 18px;
    }
}

/* =========================
   OPEN PURCHASE ORDERS
   ========================= */

.po-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

.po-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.po-page-title {
    font-weight: 700 !important;
    color: #1f2937;
}

.po-page-subtitle {
    margin-top: 6px !important;
    color: #64748b;
}

.po-welcome {
    color: #64748b;
    font-size: 0.9rem;
    white-space: nowrap;
}

.po-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.po-summary-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 105px;
    padding: 20px 22px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.po-summary-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff1f1;
    color: #d71920;
}

.po-summary-value {
    font-size: 1.75rem;
    line-height: 1;
    font-weight: 700;
    color: #1f2937;
}

.po-summary-label {
    margin-top: 7px;
    color: #64748b;
    font-size: 0.9rem;
}

.po-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: white;
    border: 1px solid #e5e7eb;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

.po-search {
    width: 100%;
    max-width: 460px;
}

.po-table-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.po-table {
    width: 100%;
}

    .po-table thead {
        background: #f8fafc;
    }

    .po-table th {
        color: #475569 !important;
        font-weight: 700 !important;
    }

.po-number {
    font-weight: 600;
    color: #1f2937;
}

.po-status {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.po-status-review {
    background: #fff7d6;
    color: #8a6500;
}

.po-review-button {
    background: #d71920 !important;
    color: white !important;
    min-width: 88px;
    font-weight: 600 !important;
}

.po-action-column {
    text-align: right !important;
    width: 120px;
}

.po-empty-state {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #64748b;
}

.po-empty-icon {
    color: #94a3b8;
    margin-bottom: 14px;
}

.po-loading {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.po-status-confirmed {
    background: #dcfce7;
    color: #166534;
}

.po-view-button {
    color: #334155 !important;
    border-color: #cbd5e1 !important;
    font-weight: 600 !important;
    min-width: 88px;
}

@media (max-width: 900px) {

    .po-summary-grid {
        grid-template-columns: 1fr;
    }

    .po-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .po-welcome {
        display: none;
    }

    .po-search {
        max-width: none;
    }
}

/* =========================
   DASHBOARD
   ========================= */

.dashboard-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.dashboard-title {
    font-weight: 700 !important;
    color: #1f2937;
}

.dashboard-subtitle {
    margin-top: 6px !important;
    color: #64748b;
}

.dashboard-welcome {
    color: #64748b;
    font-size: 0.9rem;
    white-space: nowrap;
}

.dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.dashboard-summary-card {
    min-height: 115px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: default;
}

    .dashboard-summary-card:first-child,
    .dashboard-summary-card:nth-child(2) {
        cursor: pointer;
    }

        .dashboard-summary-card:first-child:hover,
        .dashboard-summary-card:nth-child(2):hover {
            border-color: #cbd5e1;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
        }

.dashboard-card-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.dashboard-card-icon-red {
    background: #fff1f1;
    color: #d71920;
}

.dashboard-card-icon-green {
    background: #dcfce7;
    color: #166534;
}

.dashboard-card-icon-blue {
    background: #e8f1ff;
    color: #2563eb;
}

.dashboard-card-icon-yellow {
    background: #fff7d6;
    color: #8a6500;
}

.dashboard-card-value {
    font-size: 1.8rem;
    line-height: 1;
    font-weight: 700;
    color: #1f2937;
}

.dashboard-card-label {
    margin-top: 8px;
    color: #64748b;
    font-size: 0.9rem;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.dashboard-primary-button {
    background: #d71920 !important;
    color: white !important;
    font-weight: 600 !important;
}

.dashboard-secondary-button {
    color: #334155 !important;
    border-color: #cbd5e1 !important;
    font-weight: 600 !important;
}

.dashboard-section {
    margin-top: 8px;
}

.dashboard-section-header {
    margin-bottom: 14px;
}

.dashboard-section-title {
    font-weight: 700 !important;
    color: #1f2937;
}

.dashboard-section-subtitle {
    margin-top: 4px !important;
    color: #64748b;
}

.dashboard-table-card {
    border-radius: 10px;
}

@media (max-width: 1100px) {

    .dashboard-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-welcome {
        display: none;
    }

    .dashboard-summary-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-actions {
        flex-direction: column;
    }
}

/* =========================
   ONBOARDING
   ========================= */

.onboarding-content {
    width: 100%;
    flex: 1;
    min-width: 0;
}

.portal-body:has(.onboarding-content) {
    grid-template-columns: minmax(0, 1fr);
}

.onboarding-approval-table {
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
}
