.auth-page {
    min-height: 100vh;
    padding: 0;

    display: flex;
    flex-direction: column;

    background:
        radial-gradient(circle at top left, rgba(91, 30, 158, 0.12), transparent 34%),
        linear-gradient(145deg, #F7F4FC 0%, #EEEAF3 56%, #FFFFFF 100%);
}


.auth-check-pending {
    visibility: hidden;
}


.login-page {
    flex: 1 0 auto;

    display: grid;
    place-items: center;

    padding: 32px 20px;
}


.login-card {
    width: min(100%, 462px);

    padding: 42px;

    border: 1px solid rgba(91, 30, 158, 0.13);
    border-radius: 18px;

    background: var(--vij-bg);
    box-shadow:
        0 24px 58px rgba(21, 13, 43, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}


.auth-brand {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;

    width: 100%;
    margin-bottom: 30px;

    color: var(--vij-primary);

    font-family: var(--vij-font-heading);
    font-size: 22px;
    font-weight: 850;
    letter-spacing: 0.08em;
    line-height: 1;
    text-decoration: none;
}


.auth-brand sup {
    position: relative;
    top: -0.35em;

    font-family: var(--vij-font-body);
    font-size: 0.42em;
    font-weight: 800;
    letter-spacing: 0;
}


.auth-title {
    margin: 0;

    color: var(--vij-text);

    font-size: 31px;
    line-height: 1.1;
    text-align: center;
}


.login-description {
    margin: 12px 0 0;

    color: var(--vij-text-muted);

    text-align: center;
}


.login-form {
    margin-top: 28px;
}


.form-group + .form-group {
    margin-top: 18px;
}


.form-group label {
    display: block;

    margin-bottom: 7px;

    font-weight: 600;
}


.form-group input {
    width: 100%;
    min-height: 50px;

    padding: 12px 14px;

    border: 1px solid var(--vij-rule-strong);
    border-radius: 10px;

    background: var(--vij-bg);
    color: var(--vij-text);

    font: inherit;
}


.form-hint {
    margin: 7px 0 0;

    color: var(--vij-text-muted);

    font-size: 12px;
    line-height: 1.4;
}


.field-error {
    margin: 7px 0 0;

    color: #8A2424;

    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}


.field-error[hidden] {
    display: none;
}


.form-group > input[aria-invalid="true"],
.password-input-row:has(input[aria-invalid="true"]) {
    border-color: #B93838;
}


.phone-input-row,
.password-input-row {
    display: flex;
    align-items: stretch;

    min-height: 50px;

    border: 1px solid var(--vij-rule-strong);
    border-radius: 10px;

    background: var(--vij-bg);
}


.phone-input-row:focus-within,
.password-input-row:focus-within,
.form-group > input:focus-visible,
.otp-input:focus-visible {
    outline: 2px solid var(--vij-primary);
    outline-offset: 2px;
}


.phone-input-row input,
.password-input-row input {
    min-height: 48px;

    border: none;
    border-radius: 10px;

    outline: none;
}


.phone-prefix {
    display: inline-flex;
    align-items: center;

    padding: 0 14px;

    border-right: 1px solid var(--vij-rule);

    color: var(--vij-primary-deep);

    font-weight: 700;
}


.password-toggle {
    flex: 0 0 auto;

    padding: 0 14px;

    border: none;
    border-left: 1px solid var(--vij-rule);
    border-radius: 0 10px 10px 0;

    background: transparent;
    color: var(--vij-primary);

    font: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}


.password-toggle:focus-visible {
    outline: 2px solid var(--vij-primary);
    outline-offset: -3px;
}


.primary-button {
    width: 100%;
    min-height: 50px;

    margin-top: 24px;
    padding: 10px 16px;

    border: 1px solid var(--vij-primary);
    border-radius: 10px;

    background: var(--vij-primary);
    color: var(--vij-on-primary);

    font: inherit;
    font-weight: 600;

    cursor: pointer;
}


.primary-button:hover {
    background: var(--vij-primary-deep);
}


.primary-button:disabled,
.auth-mode-toggle:disabled,
.logout-button:disabled,
.secondary-auth-button:disabled,
.auth-link-button:disabled,
.password-toggle:disabled {
    opacity: 0.6;

    cursor: not-allowed;
}


.auth-mode-toggle {
    width: auto;

    margin: 0;
    padding: 0;

    border: none;

    background: transparent;
    color: var(--vij-primary);

    font: inherit;
    font-weight: 600;

    cursor: pointer;
}


.auth-mode-toggle:hover,
.auth-link-button:hover {
    text-decoration: underline;
    text-decoration-color: var(--vij-contrast);
    text-underline-offset: 3px;
}


.auth-mode-prompt {
    margin: 22px 0 0;

    color: var(--vij-text-muted);

    text-align: center;
}


.auth-link-button {
    border: none;

    background: transparent;
    color: var(--vij-primary);

    font: inherit;
    font-weight: 700;

    cursor: pointer;
}


.forgot-password-button {
    display: block;

    margin: 16px auto 0;
    padding: 0;
}


.auth-message {
    margin-top: 16px;
    padding: 10px 12px;

    border-radius: var(--vij-radius);

    font-size: 13px;
}


.auth-message.is-error {
    background: #FBEBEB;
    color: #8A2424;
}


.auth-message.is-success {
    background: #E8F5ED;
    color: #245E3A;
}


.auth-message.is-info {
    background: var(--vij-primary-tint);
    color: var(--vij-primary-deep);
}


.legal-consent-field {
    margin-top: 18px;
}


.legal-consent-field[hidden] {
    display: none;
}


.legal-consent-field label {
    display: flex;
    align-items: flex-start;

    gap: 10px;

    color: var(--vij-text-muted);

    font-size: 13px;
    line-height: 1.45;

    cursor: pointer;
}


.legal-consent-field input {
    flex: 0 0 auto;

    width: 17px;
    height: 17px;
    margin-top: 1px;

    accent-color: var(--vij-primary);
}


.legal-consent-field a,
.site-footer a,
.legal-back-link {
    color: var(--vij-primary);
    font-weight: 700;
}


.legal-consent-field a:focus-visible,
.site-footer a:focus-visible,
.legal-back-link:focus-visible {
    outline: 2px solid var(--vij-primary);
    outline-offset: 3px;
}


.otp-section[hidden],
.auth-action-row[hidden],
.auth-mode-prompt[hidden],
.forgot-password-button[hidden],
#authPrimaryButton[hidden],
#phoneGroup[hidden],
#passwordGroup[hidden],
#nameGroup[hidden],
#organizationGroup[hidden],
#confirmPasswordGroup[hidden] {
    display: none;
}


.otp-section {
    margin-top: 8px;
}


.otp-phone-label {
    margin: 0;

    color: var(--vij-text-muted);

    font-size: 12px;
    font-weight: 700;
}


.otp-phone-display {
    margin: 4px 0 18px;

    color: var(--vij-primary-deep);

    font-size: 16px;
    font-weight: 800;
}


.otp-label {
    display: block;

    margin-bottom: 10px;

    font-weight: 600;
}


.otp-input-group {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 9px;
}


.otp-input {
    width: 100%;
    min-height: 52px;

    border: 1px solid var(--vij-rule-strong);
    border-radius: 10px;

    background: var(--vij-bg);
    color: var(--vij-text);

    font: inherit;
    font-size: 22px;
    font-weight: 800;
    text-align: center;
}


.otp-resend-button {
    margin-top: 14px;
    padding: 0;
}


.auth-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;

    margin-top: 24px;
}


.auth-action-row .primary-button {
    margin-top: 0;
}


.secondary-auth-button {
    min-height: 50px;
    padding: 10px 16px;

    border: 1px solid var(--vij-rule-strong);
    border-radius: 10px;

    background: var(--vij-bg);
    color: var(--vij-primary);

    font: inherit;
    font-weight: 700;

    cursor: pointer;
}


.secondary-auth-button:hover {
    background: var(--vij-primary-tint);
}


.site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 8px 14px;
    padding: 20px;

    color: var(--vij-text-muted);

    font-size: 13px;
}


.site-footer p {
    margin: 0;
}


.site-footer nav {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;
}


.auth-footer {
    background: rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(14px);
}


.dashboard-footer {
    border-top: 1px solid var(--vij-rule);
    background: var(--vij-bg);
}


.legal-page {
    min-height: 100vh;

    background: #F7F4FC;
    color: var(--vij-text);
}


.legal-shell {
    width: min(100% - 32px, 880px);

    margin: 0 auto;
    padding: 40px 0 56px;
}


.legal-header {
    margin-bottom: 28px;
}


.legal-brand {
    display: inline-flex;
    align-items: flex-start;
    gap: 2px;

    margin-bottom: 20px;

    color: var(--vij-primary);

    font-family: var(--vij-font-heading);
    font-size: 24px;
    font-weight: 850;
    letter-spacing: 0.08em;
    line-height: 1;
    text-decoration: none;
}


.legal-brand sup {
    position: relative;
    top: -0.35em;

    font-family: var(--vij-font-body);
    font-size: 0.42em;
    font-weight: 800;
    letter-spacing: 0;
}


.legal-back-link {
    display: inline-block;

    margin-top: 8px;
}


.legal-document {
    padding: clamp(24px, 5vw, 48px);

    background: transparent;
}


.legal-document h1 {
    margin-top: 0;

    color: var(--vij-primary-deep);

    font-size: clamp(34px, 5vw, 48px);
    line-height: 1.1;
}


.legal-document h2 {
    margin-top: 34px;

    color: var(--vij-primary-deep);

    font-size: 22px;
}


.legal-document p,
.legal-document li,
.legal-document blockquote,
.legal-document td,
.legal-document th {
    font-size: 16px;
    line-height: 1.75;
}


.legal-document blockquote {
    margin: 18px 0;
    padding: 12px 16px;

    border-left: 4px solid var(--vij-primary);

    background: var(--vij-primary-tint);
    color: var(--vij-primary-deep);
}


.legal-document hr {
    margin: 28px 0;

    border: none;
    border-top: 1px solid var(--vij-rule);
}


.legal-document table {
    width: 100%;
    margin: 18px 0;

    border-collapse: collapse;
}


.legal-document th,
.legal-document td {
    padding: 10px 12px;

    border: 1px solid var(--vij-rule);

    text-align: left;
    vertical-align: top;
}


.legal-document th {
    background: var(--vij-primary-tint);
    color: var(--vij-primary-deep);
}


.dashboard-page{
    min-height: 100vh;
    margin: 0;   

    display: flex;
    flex-direction: column;

}

.dashboard-header{
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--vij-rule);
    background: var(--vij-bg);
    position: sticky;
    top: 0;
    z-index: 100;

}

.dashboard-brand {
    display: inline-flex;
    align-items: flex-start;
    gap: 2px;

    margin-left: 14px;

    font-family: var(--vij-font-heading);
    font-size: 24px;
    line-height: 1;

    color: var(--vij-primary);

    text-decoration: none;
}


.dashboard-brand sup {
    position: relative;
    top: -0.18em;

    font-family: var(--vij-font-body);
    font-size: 0.42em;
    font-weight: 700;
    line-height: 1;
}


/* ---------- Profile section ---------- */

.profile-area {
    margin-left: auto;

    position: relative;
}


.profile-button {
    min-width: 42px;
    min-height: 42px;
    padding: 0 14px;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);

    background: var(--vij-bg);

    color: var(--vij-primary);

    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
}


/* ---------- Profile dropdown ---------- */

.profile-menu {
    position: absolute;

    top: 52px;
    right: 0;

    width: 220px;

    padding: 16px;

    background: var(--vij-bg);

    border: 1px solid var(--vij-rule);

    border-radius: var(--vij-radius);

    box-shadow: 0 8px 24px rgba(21, 13, 43, 0.12);

    z-index: 200;
}


.profile-name {
    font-weight: 600;
    margin-bottom: 4px;
}


.profile-email {
    font-size: 14px;
    color: var(--vij-text-muted);

    margin-bottom: 16px;
}


.logout-button {
    width: 100%;

    padding: 9px 12px;

    border: none;
    border-radius: var(--vij-radius);

    background: var(--vij-secondary);

    color: var(--vij-primary);

    cursor: pointer;
}


/* ---------- Sidebar ---------- */

.sidebar {
    position: fixed;

    top: 72px;
    left: 0;

    width: 260px;
    height: calc(100vh - 72px);

    padding: 24px;

    background: var(--vij-bg);

    border-right: 1px solid var(--vij-rule);

    transform: translateX(-100%);

    transition: transform 0.25s ease;

    z-index: 150;
}


/* This class will later be added by JavaScript */
.sidebar.open {
    transform: translateX(0);
}


/* ---------- Sidebar navigation ---------- */

.sidebar-nav {
    display: flex;
    flex-direction: column;

    gap: 8px;
}


.sidebar-nav a {
    padding: 12px;

    border-radius: var(--vij-radius);

    color: var(--vij-text);

    text-decoration: none;
}


.sidebar-nav a:hover {
    background: var(--vij-secondary);
}


/* ---------- Dark area behind open sidebar ---------- */

.sidebar-overlay {
    position: fixed;

    top: 72px;
    left: 0;

    width: 100%;
    height: calc(100vh - 72px);

    background: rgba(21, 13, 43, 0.28);

    opacity: 0;
    visibility: hidden;

    transition: opacity 0.25s ease;

    z-index: 140;
}


/* JavaScript will later add this class */
.sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
}


/* ---------- Dashboard main content ---------- */

.dashboard-main {
    flex: 1 0 auto;

    padding: 48px 24px 72px;
}


.profile-auth-message {
    margin: -6px 0 12px;

    color: #9c2d2d;

    font-size: 12px;
    font-weight: 600;
}


/* ---------- Central working area ---------- */

.dashboard-workspace {
    width: 100%;
    max-width: 1000px;

    margin: 0 auto;
}


.site-settings-section,
.monthly-bills-section,
.monthly-performance-section,
.latest-news-section {
    padding: 28px;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);

    background: var(--vij-bg);
}


.monthly-bills-section,
.monthly-performance-section,
.latest-news-section {
    margin-top: 24px;
}

.latest-news-section {
    margin-top: 0;
}

.latest-news-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;

    margin-top: 24px;
}

.news-tab-button {
    min-height: 40px;
    padding: 9px 14px;

    border: 1px solid var(--vij-rule-strong);
    border-radius: var(--vij-radius);
    background: var(--vij-bg);
    color: var(--vij-text);

    font: inherit;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
}

.news-tab-button:hover {
    background: var(--vij-secondary);
}

.news-tab-button.is-active {
    border-color: var(--vij-primary);
    background: var(--vij-primary);
    color: var(--vij-on-primary);
}

.latest-news-filter-row {
    position: relative;

    display: flex;
    justify-content: flex-end;

    margin-top: 14px;
}

.policy-filter-button {
    position: relative;

    min-height: 38px;
    padding: 8px 14px;

    border: 1px solid var(--vij-rule-strong);
    border-radius: var(--vij-radius);
    background: var(--vij-bg);
    color: var(--vij-text);

    font: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}

.policy-filter-button:hover {
    background: var(--vij-secondary);
}

.policy-filter-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 12;

    width: min(100%, 320px);
    padding: 14px;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);
    background: var(--vij-bg);
    box-shadow: 0 18px 42px rgba(21, 13, 43, 0.16);
}

.policy-filter-group + .policy-filter-group {
    margin-top: 14px;
}

.policy-filter-title {
    margin: 0 0 8px;

    color: var(--vij-text-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.policy-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.policy-filter-option {
    min-height: 34px;
    padding: 7px 10px;

    border: 1px solid var(--vij-rule-strong);
    border-radius: var(--vij-radius);
    background: var(--vij-bg);
    color: var(--vij-text);

    font: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}

.policy-filter-option:hover,
.policy-filter-option.is-active {
    border-color: var(--vij-primary);
    background: var(--vij-primary-tint);
    color: var(--vij-primary-deep);
}

.latest-news-message,
.news-empty-state {
    margin-top: 20px;
    padding: 16px;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);
    background: var(--vij-secondary);
    color: var(--vij-text-muted);

    font-weight: 600;
}

.policy-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;

    margin-top: 24px;
}

.policy-update-card {
    position: relative;

    min-width: 0;
    min-height: 220px;
    padding: 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);
    background: var(--vij-bg);
    box-shadow: 0 10px 24px rgba(21, 13, 43, 0.08);

    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.policy-update-card:hover {
    border-color: rgba(86, 36, 138, 0.28);
    box-shadow: 0 14px 30px rgba(21, 13, 43, 0.12);
    transform: translateY(-2px);
}

.policy-new-badge {
    position: absolute;
    top: 12px;
    left: 12px;

    padding: 4px 7px;

    border-radius: 999px;
    background: var(--vij-primary);
    color: var(--vij-on-primary);

    font-size: 11px;
    font-weight: 850;
    line-height: 1;
}

.policy-card-logo-wrap {
    width: 100%;
    min-height: 98px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.policy-card-logo {
    width: auto;
    height: auto;
    max-width: 135px;
    max-height: 92px;
    object-fit: contain;
}

.policy-card-logo--msedcl {
    max-width: 185px;
}

.policy-card-logo-fallback {
    max-width: min(100%, 180px);
    padding: 10px 14px;

    border: 1px solid rgba(86, 36, 138, 0.18);
    border-radius: var(--vij-radius);
    background: var(--vij-primary-tint);
    color: var(--vij-primary-deep);

    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
}

.policy-update-card p {
    margin: 0;

    color: var(--vij-text);
    font-size: 14px;
    line-height: 1.55;
}

.policy-update-card .policy-published-date {
    color: var(--vij-text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.policy-update-card .policy-summary {
    color: var(--vij-text);
}

.policy-details-button {
    margin-top: auto;
    min-height: 38px;
    padding: 9px 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--vij-primary);
    border-radius: var(--vij-radius);
    background: var(--vij-primary);
    color: var(--vij-on-primary);

    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;

    cursor: pointer;
}

.policy-details-button:hover {
    background: var(--vij-primary-deep);
}

.policy-details-button.is-disabled {
    border-color: var(--vij-rule-strong);
    background: var(--vij-secondary);
    color: var(--vij-text-muted);

    cursor: not-allowed;
}

.policy-news-state {
    grid-column: 1 / -1;
    margin-top: 0;
}

.menu-button,
.sidebar-nav a {
    position: relative;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.news-count-badge {
    min-width: 19px;
    height: 19px;
    padding: 0 5px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;
    background: var(--vij-primary);
    color: var(--vij-on-primary);

    font-size: 11px;
    font-weight: 850;
    line-height: 1;
}

.news-count-badge[hidden] {
    display: none;
}

.menu-news-badge,
.filter-count-badge {
    position: absolute;
    top: -7px;
    right: -7px;
}


.dashboard-section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 24px;
}


.dashboard-section-heading h1,
.dashboard-section-heading h2,
.monthly-performance-section h2 {
    margin-top: 0;
}


.dashboard-section-description,
.monthly-performance-section > .dashboard-section-description {
    max-width: 650px;

    color: var(--vij-text-muted);
}


.bill-list-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 10px;
}


/* ---------- Site settings ---------- */

.operating-hours-field {
    max-width: 380px;

    margin-top: 24px;
    padding: 20px;

    border-radius: var(--vij-radius);

    background: var(--vij-secondary);
}


.operating-hours-field label {
    display: block;

    margin-bottom: 8px;

    font-weight: 600;
}


.operating-hours-field input {
    width: 120px;

    padding: 10px 12px;

    border: 1px solid var(--vij-rule-strong);
    border-radius: var(--vij-radius);

    background: var(--vij-bg);
    color: var(--vij-text);

    font: inherit;
}


.operating-hours-field input:focus-visible,
.bill-upload-button:focus-visible,
.bill-remove-button:focus-visible,
.bill-select-dropzone:focus-visible,
.complete-bill-button:focus-visible,
.policy-filter-button:focus-visible,
.policy-filter-option:focus-visible,
.correction-field-input:focus-visible,
.correction-close-button:focus-visible,
.correction-secondary-button:focus-visible,
.menu-button:focus-visible,
.profile-button:focus-visible,
.logout-button:focus-visible {
    outline: 2px solid var(--vij-primary);
    outline-offset: 2px;
}


.field-help {
    margin-top: 8px;

    color: var(--vij-text-muted);

    font-size: 13px;
}


.operating-hours-error {
    margin-top: 8px;

    color: #9c2d2d;

    font-size: 13px;
    font-weight: 600;
}


/* ---------- Monthly bill uploads ---------- */

.bill-upload-count {
    flex: 0 0 auto;

    margin: 2px 0 0;
    padding: 7px 11px;

    border-radius: var(--vij-radius);

    background: var(--vij-primary-tint);
    color: var(--vij-primary);

    font-size: 13px;
    font-weight: 600;
}


.monthly-bill-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.2fr);

    gap: 24px;

    margin-top: 24px;
}


.bill-selection-panel,
.selected-bills-panel {
    min-width: 0;
}


.bill-selection-panel h3,
.selected-bills-panel h3 {
    margin: 0;

    color: var(--vij-primary-deep);

    font-size: 17px;
}


.bill-selection-panel > p {
    margin: 8px 0 16px;

    color: var(--vij-text-muted);

    font-size: 13px;
}


.bill-select-dropzone {
    width: 100%;
    min-height: 230px;
    padding: 24px;

    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;

    border: 1px dashed rgba(91, 30, 158, 0.35);
    border-radius: var(--vij-radius);

    background: linear-gradient(180deg, #FFFFFF 0%, var(--vij-secondary) 100%);
    color: var(--vij-text);

    font: inherit;
    text-align: center;

    cursor: pointer;
}


.bill-select-dropzone:hover,
.bill-select-dropzone.is-dragging {
    border-color: var(--vij-primary);

    background: var(--vij-primary-tint);
}


.bill-select-dropzone.is-disabled,
.bill-select-dropzone:disabled {
    opacity: 0.58;

    cursor: not-allowed;
}


.bill-select-title {
    color: var(--vij-primary-deep);

    font-size: 20px;
    font-weight: 800;
}


.bill-select-hint,
.bill-select-limit {
    color: var(--vij-text-muted);

    font-size: 13px;
    line-height: 1.4;
}


.bill-select-limit {
    font-weight: 700;
}


.selected-bills-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;
}


.selected-bills-empty {
    margin: 16px 0 0;
    padding: 18px;

    border: 1px dashed var(--vij-rule-strong);
    border-radius: var(--vij-radius);

    background: var(--vij-secondary);
    color: var(--vij-text-muted);

    font-size: 13px;
}


.selected-bills-list {
    display: grid;
    gap: 12px;

    margin-top: 16px;
}


.monthly-bill-card {
    min-width: 0;
    min-height: 0;

    display: grid;
    gap: 12px;

    padding: 16px;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);

    background: var(--vij-secondary);
}


.monthly-bill-card[hidden] {
    display: none;
}


.bill-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 12px;
}


.bill-card-title-group {
    min-width: 0;
}


.bill-slot-label {
    margin: 0;

    color: var(--vij-text);

    font-weight: 600;
    line-height: 1.3;

    overflow-wrap: anywhere;
}


.bill-card-month {
    margin: 4px 0 0;

    color: var(--vij-primary-deep);

    font-size: 15px;
    font-weight: 800;
}


.bill-status {
    display: inline-block;

    margin-top: 8px;

    color: var(--vij-text-muted);

    font-size: 12px;
}


.bill-status.status-ready,
.bill-status.status-queued,
.bill-status.status-uploading,
.bill-status.status-processing,
.bill-status.status-needs_input,
.bill-status.status-processed {
    color: var(--vij-primary);

    font-weight: 600;
}


.bill-status.status-uploading::after,
.bill-status.status-processing::after {
    content: "…";
}


.bill-status.status-needs_input {
    color: var(--vij-contrast);
}


.bill-status.status-failed,
.bill-status.status-needs_review {
    color: #9c2d2d;

    font-weight: 600;
}


.monthly-bill-card.status-needs_input {
    border-color: var(--vij-contrast);
    background: var(--vij-contrast-tint);
}


.monthly-bill-card.status-processed {
    border-color: var(--vij-primary);
}


.monthly-bill-card.status-queued,
.monthly-bill-card.status-uploading,
.monthly-bill-card.status-processing {
    border-color: var(--vij-primary);

    background: var(--vij-primary-tint);
}


.monthly-bill-card.status-failed,
.monthly-bill-card.status-needs_review {
    border-color: #EFC9C9;

    background: #FBEBEB;
}


.bill-file-details {
    margin-top: 0;
    padding-top: 10px;

    border-top: 1px solid var(--vij-rule);
}


.bill-file-name {
    margin-bottom: 2px;

    font-size: 13px;
    font-weight: 600;

    overflow-wrap: anywhere;
}


.bill-file-size {
    color: var(--vij-text-muted);

    font-size: 12px;
}


.bill-card-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 0;
    padding-top: 0;
}


.bill-upload-button,
.bill-remove-button,
.complete-bill-button,
.correction-secondary-button {
    min-height: 38px;

    padding: 8px 12px;

    border-radius: var(--vij-radius);

    font: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
}


.bill-upload-button {
    border: 1px solid var(--vij-primary);

    background: var(--vij-primary);
    color: var(--vij-on-primary);
}


.bill-upload-button:hover {
    background: var(--vij-primary-deep);
}


.bill-remove-button {
    border: 1px solid var(--vij-rule-strong);

    background: var(--vij-bg);
    color: var(--vij-text);
}


.bill-remove-button:hover {
    background: var(--vij-primary-tint);
}


.bill-card-remove-button {
    flex: 0 0 auto;

    width: 34px;
    min-height: 34px;
    padding: 0;

    border-radius: 50%;

    font-size: 20px;
    line-height: 1;
}


.complete-bill-button {
    flex-basis: 100%;

    border: 1px solid var(--vij-contrast);

    background: var(--vij-bg);
    color: var(--vij-text);
}


.complete-bill-button:hover {
    background: var(--vij-contrast-tint);
}


.bill-file-error {
    margin-top: 10px;

    color: #9c2d2d;

    font-size: 12px;
    font-weight: 600;
}


/* ---------- Development mock processing ---------- */

.development-actions {
    display: flex;
    justify-content: flex-end;

    margin-top: 24px;
}


.test-bill-processing-button:disabled {
    opacity: 0.5;

    cursor: not-allowed;
}


.bill-upload-button:disabled,
.bill-remove-button:disabled,
.complete-bill-button:disabled {
    opacity: 0.55;

    cursor: not-allowed;
}


/* ---------- Missing information correction modal ---------- */

.correction-modal-open {
    overflow: hidden;
}


.correction-modal-overlay {
    position: fixed;

    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(21, 13, 43, 0.45);

    z-index: 300;
}


.correction-modal-overlay[hidden] {
    display: none;
}


.correction-modal {
    width: 100%;
    max-width: 680px;
    max-height: calc(100vh - 40px);

    overflow-y: auto;

    padding: 28px;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);

    background: var(--vij-bg);

    box-shadow: 0 18px 50px rgba(21, 13, 43, 0.22);
}


.correction-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 24px;
}


.correction-modal-header h2 {
    margin-top: 0;
}


.correction-close-button {
    padding: 4px 8px;

    border: none;

    background: transparent;
    color: var(--vij-text);

    font-size: 28px;
    line-height: 1;

    cursor: pointer;
}


.correction-bill-meta {
    margin: 16px 0 24px;
    padding: 12px 14px;

    border-radius: var(--vij-radius);

    background: var(--vij-secondary);
}


.correction-bill-meta p {
    margin: 0;
}


#correctionFileName {
    margin-top: 2px;

    color: var(--vij-text-muted);

    font-size: 13px;

    overflow-wrap: anywhere;
}


.correction-field-row {
    padding: 18px 0;

    border-top: 1px solid var(--vij-rule);
}


.correction-field-row:first-child {
    padding-top: 0;

    border-top: none;
}


.correction-field-label {
    display: block;

    margin-bottom: 8px;

    font-weight: 600;
}


.correction-input-line {
    display: flex;
    align-items: center;

    gap: 10px;
}


.correction-field-input {
    width: 100%;

    padding: 10px 12px;

    border: 1px solid var(--vij-rule-strong);
    border-radius: var(--vij-radius);

    background: var(--vij-bg);
    color: var(--vij-text);

    font: inherit;
}


.correction-field-input:disabled {
    background: var(--vij-secondary);
    color: var(--vij-text-faint);
}


.correction-field-unit {
    flex: 0 0 auto;

    min-width: 42px;

    color: var(--vij-text-muted);

    font-size: 13px;
}


.not-available-option {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    margin-top: 10px;

    color: var(--vij-text-muted);

    font-size: 13px;

    cursor: pointer;
}


.not-available-option input {
    width: 16px;
    height: 16px;

    accent-color: var(--vij-primary);
}


.correction-field-error,
.correction-form-error {
    color: #9c2d2d;

    font-size: 13px;
    font-weight: 600;
}


.correction-field-error {
    margin-top: 8px;
}


.correction-form-error {
    margin-top: 16px;
}


.correction-modal-actions {
    display: flex;
    justify-content: flex-end;

    gap: 10px;

    margin-top: 24px;
}


.correction-secondary-button {
    border: 1px solid var(--vij-rule-strong);

    background: var(--vij-bg);
    color: var(--vij-text);
}


.correction-secondary-button:hover {
    background: var(--vij-primary-tint);
}


/* ---------- Monthly performance ---------- */

.monthly-performance-section {
    min-width: 0;

    background: var(--vij-secondary);
}


.monthly-performance-message {
    margin-top: 20px;
    padding: 14px 16px;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);

    background: var(--vij-bg);
    color: var(--vij-text-muted);
}


.monthly-performance-message.is-error {
    border-color: #EFC9C9;

    background: #FBEBEB;
    color: #9c2d2d;
}


.monthly-performance-message.is-warning {
    border-color: rgba(172, 117, 28, 0.34);

    background: #FFF6E6;
    color: #7A4B12;
}


.monthly-performance-table-container {
    width: 100%;
    max-width: 100%;

    margin-top: 20px;

    overflow-x: auto;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);

    background: var(--vij-bg);
}


.performance-grade-legend {
    min-width: max-content;

    display: flex;
    flex-wrap: wrap;

    gap: 12px;

    padding: 12px 14px;

    border-bottom: 1px solid var(--vij-rule);

    color: var(--vij-text-muted);

    font-size: 12px;
}


.performance-grade-legend-item {
    display: inline-flex;
    align-items: center;

    gap: 6px;
}


.performance-grade-swatch {
    width: 12px;
    height: 12px;

    display: inline-block;

    border: 1px solid var(--vij-rule);
    border-radius: 3px;
}


.monthly-performance-table {
    width: 100%;
    min-width: 920px;

    border-collapse: separate;
    border-spacing: 0;

    font-size: 12px;
}


.monthly-performance-table caption {
    position: absolute;

    width: 1px;
    height: 1px;

    overflow: hidden;
    clip: rect(0 0 0 0);

    white-space: nowrap;
}


.monthly-performance-table th,
.monthly-performance-table td {
    min-width: 96px;

    padding: 10px 8px;

    border-right: 1px solid var(--vij-rule);
    border-bottom: 1px solid var(--vij-rule);

    text-align: center;
    vertical-align: middle;

    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}


.monthly-performance-table thead th {
    position: sticky;
    top: 0;

    background: var(--vij-secondary);
    color: var(--vij-primary-deep);

    font-weight: 600;

    z-index: 2;
}


.monthly-performance-table th:first-child {
    position: sticky;
    left: 0;

    min-width: 220px;
    max-width: 220px;

    background: var(--vij-bg);

    text-align: left;
    white-space: normal;

    z-index: 1;
}


.monthly-performance-table thead th:first-child {
    background: var(--vij-secondary);

    z-index: 3;
}


.monthly-performance-table th:last-child,
.monthly-performance-table td:last-child {
    border-right: none;
}


.monthly-performance-table tbody tr:last-child th,
.monthly-performance-table tbody tr:last-child td {
    border-bottom: none;
}


@media (max-width: 1100px) {

    .monthly-performance-table {
        width: max-content;
        min-width: 100%;
    }


    .monthly-performance-table th:first-child,
    .monthly-performance-table td:first-child {
        position: static;

        width: 180px;
        min-width: 180px;
        max-width: 180px;

        text-align: left;
        white-space: normal;
    }


    .monthly-performance-table th:not(:first-child),
    .monthly-performance-table td:not(:first-child) {
        width: 120px;
        min-width: 120px;
    }

}


.performance-value-cell {
    font-weight: 600;
}


.grade-green {
    background: #E8F5ED;
}


.grade-amber {
    background: #FDF3E2;
}


.grade-red {
    background: #FBEBEB;
}


.grade-neutral {
    background: #F7F5FB;
}


.performance-value-cell.is-missing {
    color: var(--vij-text-faint);

    font-weight: 400;
}


.score-summary-section {
    display: grid;

    gap: 20px;
    padding: clamp(22px, 4vw, 34px);

    border-bottom: 1px solid var(--vij-rule);

    background:
        linear-gradient(180deg, #FFFFFF 0%, var(--vij-secondary) 100%);
}


.score-summary-card {
    position: relative;

    min-width: 0;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);

    background: var(--vij-bg);
}


.score-composite-card {
    width: min(100%, 520px);
    margin: 0 auto;
    padding: clamp(30px, 4vw, 40px) clamp(24px, 4vw, 42px);

    display: grid;
    justify-items: center;
    gap: 10px;

    border-color: rgba(91, 30, 158, 0.18);

    box-shadow:
        0 18px 40px rgba(91, 30, 158, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);

    text-align: center;
}


.score-composite-card h2 {
    margin: 0;

    color: var(--vij-primary-deep);

    font-size: clamp(24px, 3vw, 32px);
    line-height: 1.1;
}


.score-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}


.score-detail-card {
    padding: clamp(18px, 3vw, 24px);
}


.score-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;
}


.score-detail-card h3 {
    margin: 0;

    color: var(--vij-primary-deep);

    font-size: 18px;
    line-height: 1.25;
}


.score-value-block {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;

    min-width: 112px;
    padding: 10px 14px;

    border: 1px solid rgba(91, 30, 158, 0.14);
    border-radius: var(--vij-radius);

    background: var(--vij-primary-tint);
    color: var(--vij-primary-deep);
}


.score-value-block.is-missing {
    background: #F7F5FB;
    color: var(--vij-text-faint);
}


.score-value {
    font-size: 28px;
    font-weight: 850;
    line-height: 1;
}


.score-value-hero {
    min-width: 220px;
    padding: 18px 24px;

    border-color: rgba(91, 30, 158, 0.18);

    background:
        linear-gradient(135deg, var(--vij-primary-tint), #FFFFFF 70%);

    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}


.score-value-hero .score-value {
    font-size: clamp(40px, 6vw, 56px);
}


.score-grade-badge {
    position: absolute;
    top: 16px;
    left: 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 72px;
    min-height: 34px;
    padding: 6px 10px;

    border: 1px solid rgba(91, 30, 158, 0.2);
    border-radius: 999px;

    background: var(--vij-primary);
    color: var(--vij-on-primary);

    font-size: 13px;
    font-weight: 800;
}


.score-grade-badge.grade-a {
    background: var(--vij-primary);
}


.score-grade-badge.grade-b {
    background: #5F7D2A;
}


.score-grade-badge.grade-c {
    background: #AC751C;
}


.score-grade-badge.grade-d {
    background: #9C2D2D;
}


.score-summary-meta {
    margin: 6px 0 0;

    color: var(--vij-text-muted);

    font-size: 13px;
    line-height: 1.4;
}


.score-tariff-summary {
    margin-top: 2px;

    display: grid;
    gap: 4px;
}


.score-tariff-summary span {
    color: var(--vij-text-muted);

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


.score-tariff-summary strong {
    color: var(--vij-primary-deep);

    font-size: 18px;
}


.score-parameter-table {
    width: 100%;
    margin-top: 18px;

    border-collapse: collapse;

    font-size: 13px;
}


.score-parameter-table th,
.score-parameter-table td {
    padding: 10px 0;

    border-bottom: 1px solid var(--vij-rule);

    vertical-align: top;
}


.score-parameter-table thead th {
    color: var(--vij-text-muted);

    font-size: 12px;
    font-weight: 700;
}


.score-parameter-table th {
    color: var(--vij-text);

    font-weight: 600;
    text-align: left;
}


.score-parameter-table td {
    color: var(--vij-primary-deep);

    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}


.score-parameter-table td.is-missing {
    color: var(--vij-text-faint);
}


.score-parameter-table tbody tr:last-child th,
.score-parameter-table tbody tr:last-child td {
    border-bottom: none;
}


/* ---------- Saved analysis history ---------- */

.analysis-save-message,
.history-message {
    margin-top: 16px;
    padding: 12px 14px;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);

    background: var(--vij-secondary);
    color: var(--vij-text-muted);
}


.analysis-save-message.is-success,
.history-message.is-success {
    border-color: rgba(42, 125, 78, 0.32);

    background: #E8F5ED;
    color: #215F3B;
}


.analysis-save-message.is-error,
.history-message.is-error {
    border-color: #EFC9C9;

    background: #FBEBEB;
    color: #9c2d2d;
}


.analysis-save-message.is-warning {
    border-color: rgba(172, 117, 28, 0.34);

    background: #FFF6E6;
    color: #7A4B12;
}


.past-bills-section {
    padding: 28px;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);

    background: var(--vij-bg);
}


.history-secondary-button {
    min-height: 40px;
    padding: 9px 14px;

    border: 1px solid var(--vij-primary);
    border-radius: var(--vij-radius);

    background: var(--vij-bg);
    color: var(--vij-primary);

    font: inherit;
    font-weight: 600;

    cursor: pointer;
}


.history-secondary-button:hover {
    background: var(--vij-primary-tint);
}

.card-home-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    text-decoration: none;
    white-space: nowrap;
}

.card-home-link:focus-visible {
    outline: 2px solid var(--vij-primary);
    outline-offset: 2px;
}

.bill-history-search {
    width: min(100%, 420px);
    margin: 26px 0 24px;
}

.bill-history-search input {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--vij-rule-strong);
    border-radius: var(--vij-radius);
    background: var(--vij-bg);
    color: var(--vij-primary-deep);
    font: inherit;
    line-height: 1.4;
}

.bill-history-search input::placeholder {
    color: var(--vij-primary);
    opacity: 0.5;
}

.bill-history-search input:focus {
    border-color: var(--vij-primary);
    outline: 2px solid var(--vij-primary-tint);
    outline-offset: 2px;
}


.past-bills-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;

    margin-top: 20px;
}


.dashboard-workspace[hidden],
.past-bills-list[hidden],
.past-analysis-detail[hidden] {
    display: none;
}


.past-analysis-card {
    min-width: 0;
    padding: 20px;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);

    background: var(--vij-secondary);
}


.past-analysis-card h2 {
    margin-top: 0;
}


.bill-history-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
    margin-top: 18px;
    padding: 14px 16px;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);

    background: var(--vij-secondary);
}


.bill-history-total-count {
    flex: 0 0 auto;

    margin: 0;
    padding: 9px 14px;

    border-radius: var(--vij-radius);

    background: var(--vij-primary);
    color: var(--vij-on-primary);

    font-weight: 800;
}


.bill-history-selection-summary {
    margin: 0;

    color: var(--vij-primary-deep);
    font-weight: 700;
}


.bill-history-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;

    gap: 10px;
}


.bill-history-analyze-button {
    width: auto;
    min-height: 40px;
    margin-top: 0;
}


.bill-history-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;

    min-width: 0;
    padding: 14px;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);

    background: var(--vij-secondary);
}


.bill-history-select {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;

    padding-top: 5px;
}


.bill-history-select input {
    width: 18px;
    height: 18px;

    accent-color: var(--vij-primary);
}


.bill-history-card-body {
    min-width: 0;
}


.bill-history-card h2 {
    margin: 0 0 4px;

    color: var(--vij-primary-deep);
    font-size: 18px;
}


.bill-history-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;

    margin: 10px 0 8px;
}


.bill-history-meta dt {
    color: var(--vij-text-faint);

    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}


.bill-history-meta dd {
    margin: 2px 0 0;

    overflow-wrap: anywhere;
}


.bill-history-card-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 10px;
    margin-top: 8px;
}


.bill-history-duplicate-note {
    margin: 8px 0 0;
    padding: 8px 10px;

    border: 1px solid rgba(172, 117, 28, 0.34);
    border-radius: var(--vij-radius);

    background: #FFF6E6;
    color: #7A4B12;

    font-size: 12px;
}


.past-analysis-card-company {
    margin-bottom: 12px;

    color: var(--vij-primary-deep);
    font-weight: 600;
}


.past-analysis-card-grid,
.history-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
}


.past-analysis-card-grid dt,
.history-meta-grid dt {
    color: var(--vij-text-faint);

    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}


.past-analysis-card-grid dd,
.history-meta-grid dd {
    margin: 2px 0 0;

    overflow-wrap: anywhere;
}


.analysis-status-pill {
    display: inline-flex;
    align-items: center;

    padding: 3px 8px;

    border: 1px solid var(--vij-rule);
    border-radius: 999px;

    background: var(--vij-bg);

    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}


.analysis-status-pill.status-processed {
    border-color: rgba(42, 125, 78, 0.32);

    background: #E8F5ED;
    color: #215F3B;
}


.analysis-status-pill.status-failed,
.analysis-status-pill.status-needs_review {
    border-color: #EFC9C9;

    background: #FBEBEB;
    color: #9c2d2d;
}


.past-analysis-open-button {
    width: 100%;
    min-height: 40px;

    margin-top: 16px;
    padding: 9px 14px;

    border: 1px solid var(--vij-primary);
    border-radius: var(--vij-radius);

    background: var(--vij-primary);
    color: var(--vij-on-primary);

    font: inherit;
    font-weight: 600;

    cursor: pointer;
}


.past-analysis-open-button:hover {
    background: var(--vij-primary-deep);
}


.history-detail-heading {
    padding: 20px;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);

    background: var(--vij-secondary);
}


.history-detail-heading .history-secondary-button {
    margin-bottom: 20px;
}


.history-results-section,
.history-pdfs-section {
    margin-top: 24px;
}


.history-pdf-list {
    display: grid;
    gap: 10px;

    margin-top: 16px;
}


.history-pdf-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;
    padding: 12px 14px;

    border: 1px solid var(--vij-rule);
    border-radius: var(--vij-radius);

    background: var(--vij-secondary);
}


.history-pdf-name {
    margin: 0;

    overflow-wrap: anywhere;
    font-weight: 600;
}


.history-pdf-month {
    margin: 2px 0 0;

    color: var(--vij-text-muted);
    font-size: 12px;
}


.history-pdf-button {
    flex: 0 0 auto;
    padding: 8px 12px;

    border: 1px solid var(--vij-primary);
    border-radius: var(--vij-radius);

    background: var(--vij-bg);
    color: var(--vij-primary);

    font: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
}


.history-pdf-button:disabled,
.past-analysis-open-button:disabled,
.history-secondary-button:disabled {
    opacity: 0.6;

    cursor: not-allowed;
}


/* ---------- Tablet ---------- */

@media (max-width: 800px) {

    .monthly-bill-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .past-bills-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .policy-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* ---------- Mobile ---------- */

@media (max-width: 600px) {

    .login-page {
        padding: 20px 14px;
    }


    .login-card {
        padding: 28px 22px;
    }


    .dashboard-header {
        padding: 0 14px;
    }


    .dashboard-main {
        padding: 32px 16px 48px;
    }


    .site-settings-section,
    .monthly-bills-section,
    .monthly-performance-section,
    .past-bills-section,
    .latest-news-section {
        padding: 20px;
    }


    .dashboard-section-heading {
        flex-direction: column;

        gap: 12px;
    }

    .bill-upload-count {
        margin-top: 0;
    }


    .operating-hours-field {
        max-width: none;
    }


    .monthly-bill-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .latest-news-tabs {
        align-items: stretch;
        flex-direction: column;
    }

    .news-tab-button {
        width: 100%;
    }

    .policy-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .latest-news-filter-row {
        justify-content: stretch;
    }

    .policy-filter-button {
        width: 100%;
    }

    .policy-filter-panel {
        left: 0;
        right: 0;

        width: 100%;
    }


    .score-detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }


    .score-detail-header {
        align-items: flex-start;
        flex-direction: column;
    }


    .score-detail-header .score-value-block {
        align-self: center;
    }


    .development-actions,
    .correction-modal-actions {
        flex-direction: column-reverse;
    }


    .development-actions button,
    .correction-modal-actions button {
        width: 100%;
    }

    .past-analysis-card-grid,
    .history-meta-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .history-pdf-row {
        align-items: stretch;
        flex-direction: column;
    }

    .history-pdf-button {
        width: 100%;
    }


    .bill-history-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .bill-history-search {
        width: 100%;
        margin: 22px 0 20px;
    }


    .bill-history-actions,
    .bill-history-actions .history-secondary-button,
    .bill-history-actions .past-analysis-open-button {
        width: 100%;
    }


    .bill-history-meta {
        grid-template-columns: minmax(0, 1fr);
    }


    .correction-modal {
        padding: 20px;
    }

}

/* ---------- V2 public navigation and authentication states ---------- */

.header-auth-actions {
    margin-left: auto;
}

.header-login-link,
.auth-cta-primary,
.auth-cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: var(--vij-radius);
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.header-login-link,
.auth-cta-primary {
    border: 1px solid var(--vij-primary);
    background: var(--vij-primary);
    color: #FFFFFF;
}

.header-login-link:hover,
.auth-cta-primary:hover {
    background: var(--vij-primary-deep);
}

.auth-cta-secondary {
    border: 1px solid var(--vij-primary);
    background: var(--vij-bg);
    color: var(--vij-primary);
}

.auth-cta-secondary:hover {
    background: var(--vij-primary-tint);
}

.header-login-link:focus-visible,
.auth-cta-primary:focus-visible,
.auth-cta-secondary:focus-visible,
.feature-card:focus-visible {
    outline: 3px solid rgba(91, 30, 158, 0.32);
    outline-offset: 3px;
}

.auth-lock-panel,
.vault-auth-state {
    width: 100%;
    margin-top: 24px;
    padding: clamp(28px, 5vw, 48px) 22px;
    border: 1px dashed rgba(91, 30, 158, 0.38);
    border-radius: calc(var(--vij-radius) + 4px);
    background:
        radial-gradient(circle at top, rgba(91, 30, 158, 0.1), transparent 58%),
        var(--vij-primary-tint);
    text-align: center;
}

.auth-lock-icon {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--vij-bg);
    box-shadow: 0 8px 24px rgba(91, 30, 158, 0.12);
    font-size: 24px;
}

.auth-lock-panel h3,
.vault-auth-state h2 {
    margin: 0;
    color: var(--vij-primary-deep);
    font-size: clamp(21px, 3vw, 26px);
}

.auth-lock-panel p,
.vault-auth-state p {
    margin: 10px auto 0;
    color: var(--vij-text-muted);
}

.auth-cta-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.is-guest .authenticated-bill-ui,
.is-guest .authenticated-vault-ui {
    display: none !important;
}

.public-home-page {
    background:
        radial-gradient(circle at 12% 12%, rgba(91, 30, 158, 0.13), transparent 34%),
        linear-gradient(155deg, #FBF9FE 0%, #F2EDF8 55%, #FFFFFF 100%);
}

.public-home-main {
    flex: 1 0 auto;
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: clamp(64px, 9vw, 112px) 24px 88px;
}

.home-hero {
    max-width: 900px;
}

.home-hero h1 {
    margin: 10px 0 0;
    color: var(--vij-text);
    font-size: clamp(46px, 8vw, 82px);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.home-hero h1 span {
    color: var(--vij-primary);
}

.home-hero-copy {
    max-width: 720px;
    margin: 24px 0 0;
    color: var(--vij-text-muted);
    font-size: clamp(18px, 2.4vw, 22px);
    line-height: 1.6;
}

.home-features {
    margin-top: clamp(70px, 10vw, 112px);
}

.home-section-heading h2 {
    margin: 8px 0 0;
    color: var(--vij-primary-deep);
    font-size: clamp(30px, 4vw, 42px);
}

.feature-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 28px;
}

.feature-card {
    min-width: 0;
    min-height: 290px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(91, 30, 158, 0.17);
    border-radius: calc(var(--vij-radius) + 6px);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 40px rgba(43, 24, 76, 0.08);
    color: var(--vij-text);
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(91, 30, 158, 0.42);
    box-shadow: 0 22px 50px rgba(43, 24, 76, 0.14);
}

.feature-card-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--vij-primary-tint);
    color: var(--vij-primary);
    font-size: 24px;
    font-weight: 800;
}

.feature-card h3 {
    margin: 24px 0 0;
    color: var(--vij-primary-deep);
    font-size: 23px;
}

.feature-card p {
    margin: 12px 0 24px;
    color: var(--vij-text-muted);
    line-height: 1.65;
}

.feature-card-link {
    margin-top: auto;
    color: var(--vij-primary);
    font-weight: 750;
}

@media (max-width: 900px) {
    .feature-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .feature-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .dashboard-brand {
        margin-left: 10px;
        font-size: 21px;
    }

    .header-login-link {
        min-height: 38px;
        padding: 9px 14px;
    }

    .public-home-main {
        padding: 56px 16px 64px;
    }

    .feature-card-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .feature-card:last-child {
        grid-column: auto;
    }

    .feature-card {
        min-height: 250px;
        padding: 24px;
    }

    .auth-cta-row > * {
        flex: 1 1 130px;
    }
}
