:root {
    --account-accent: #b30b00;
    --account-control: #666d70;
    --account-padding: clamp(12px, 2.2vw, 34px);
    color: #111;
    font-family: "Open Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
    display: flex;
    flex-direction: column;
    gap: 25px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 25px var(--account-padding) 14px;
    background: #f2f2f2;
}

.account-header, .account-layout {
    align-self: center;
    width: 100%;
    max-width: 1200px;
}

.account-header, .account-sidebar, .account-panel {
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgb(0 0 0 / 11%);
}

.account-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 16px 25px;
    border: 1px solid #ccc;
}

.account-header h1, .account-panel h2 {
    margin: 0;
    font-weight: 600;
}

.account-header h1 { font-size: calc(1.875rem - 4px); }

.account-status, .account-back {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
}

.account-status { gap: 4px; }
.user-status-icon { display: inline-flex; align-items: center; flex: none; height: 28px; }

.account-layout {
    display: grid;
    align-items: stretch;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 25px;
}

.account-sidebar {
    padding: 19px;
    border: 1px solid #ddd;
}

.account-sidebar h2, .account-panel h2 {
    color: var(--account-accent);
    font-size: calc(1.0625rem + 4pt);
}

.account-sidebar h2 {
    margin: 0 0 18px;
    font-weight: 500;
}

.account-options {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.account-options span, .account-options a {
    display: flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 10px;
    border-radius: 5px;
    font-size: 1rem;
    line-height: 1.25;
}

.account-options a { color: inherit; text-decoration: none; }
.account-options a:focus-visible { outline: 2px solid var(--account-accent); outline-offset: 2px; }

.account-options [aria-current] {
    background: var(--account-control);
    color: #fff;
    font-weight: 600;
}

.account-back {
    gap: 12px;
    margin-top: 10px;
    padding: 12px 10px;
    border-top: 1px solid #aaa;
    color: inherit;
    font-size: 1rem;
    text-decoration: none;
}

.account-options a:hover, .account-back:hover {
    box-shadow: inset 0 0 0 100px rgb(0 0 0 / 6%);
}
.account-back:focus-visible, .account-identification button:focus-visible {
    outline: 2px solid var(--account-accent);
    outline-offset: 3px;
}

.account-panel {
    display: flex;
    flex-direction: column;
    padding: 20px 11px;
}

.account-identification {
    display: grid;
    gap: 10px;
    width: min(100%, clamp(24rem, 61%, 42.25rem));
    margin: 74px auto 36px;
}

.account-identification { margin-block: 24px; }


.account-identification > .account-button { margin-top: 30px; }

.account-identification input, .account-button {
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 6px 10px;
    border: 1px solid #888;
    border-radius: 6px;
    text-align: center;
}

.account-identification input {
    color: #033d64;
    font: 1.375rem Arial, sans-serif;
}

.account-identification input::placeholder { color: inherit; opacity: 1; }

.account-identification input:focus {
    border-width: 3px;
    outline: none;
}

.account-button {
    background: var(--account-control);
    color: #fff;
    opacity: 1;
    font: 1.125rem system-ui, sans-serif;
    cursor: pointer;
}

.account-button:disabled { cursor: default; }

.account-panel > p { margin: auto 0 0; padding: 20px 0 0; text-align: center; }
.account-panel[hidden] { display: none; }
#account-conditions-panel { min-height: 0; contain: size; }
.account-conditions { min-height: 0; overflow-y: auto; padding-inline-end: 8px; scrollbar-width: thin; scrollbar-color: #aaa transparent; text-align: left; }
.account-conditions h2 { margin-bottom: 12px; }
.account-conditions p { font-size: 0.875rem; }
@media (max-width: 760px) {
    #account-conditions-panel { contain: none; max-height: 65dvh; }
}
.account-invoice-actions { display: grid; gap: 42px; width: min(100%, clamp(24rem, 61%, 42.25rem)); margin: 42px auto 36px; }
.account-invoice-notes { margin: 8px 0 0; padding-left: 1.2rem; list-style-type: '–  '; }
#account-invoice-message:not(:empty) { margin-bottom: 12px; text-align: center; color: #0d47a1; }
@media (max-width: 760px) { .account-invoice-actions { gap: 20px; margin-block: 24px; } }
.account-purchase { width: 100%; margin-top: 18px; border-collapse: collapse; table-layout: fixed; }
.account-purchase th, .account-purchase td { padding: 12px 8px; border-bottom: 1px solid #ccc; text-align: left; font-weight: 400; overflow-wrap: anywhere; }
.account-purchase th { width: 59%; }
.account-purchase tr:nth-child(even) { background: #f7f7f7; }
#account-purchase-message:not(:empty) { margin-top: 18px; }
#account-feedback { min-height: 1.5rem; margin: 0 0 20px; color: #0d47a1; font-size: 1.0625rem; line-height: 1.4; text-align: center; }
#account-feedback:empty { display: none; }
.account-options button { width: 100%; min-height: 40px; padding: 6px 10px; border: 0; border-radius: 5px; background: transparent; color: #555; font: inherit; text-align: left; }
@media (max-width: 760px) { .account-layout { grid-template-columns: minmax(0, 1fr); } .account-options { grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); } .account-identification input { font-size: clamp(1rem, 4.5vw, 1.375rem); } }
.account-checkout { padding: clamp(18px, 3vw, 33px); }
.account-checkout h2 { text-align: center; font-weight: 500; }
.account-checkout .account-checkout-subtitle { margin: 0; padding: 4px 0 0; color: #666; }
#account-checkout-package { display: grid; gap: 8px; justify-items: center; width: min(100%, 320px); margin: 26px auto 16px; padding: 16px; border: 1px solid #ccc; border-radius: 10px; background: #fff; color: #222; font: inherit; box-shadow: 0 2px 8px #0001; cursor: pointer; }
#account-checkout-package:hover, #account-checkout-package:focus-visible { border-color: var(--account-accent); }
#account-checkout-package:disabled { cursor: default; }
#account-checkout-package strong { color: var(--account-accent); font-size: 1.5rem; }
#account-checkout-package small { color: #666; }
#account-payment-form { display: grid; }
#account-payment-form[hidden], #account-payment-new[hidden] { display: none; }
#account-payment-form input { display: block; width: 100%; margin-top: 5px; padding: 11px; border: 1px solid #aaa; border-radius: 5px; font: inherit; }
#account-payment-status { text-align: center; }
#account-payment-status:not(:empty) { margin: 0 0 14px; }
#account-payment-new { width: auto; align-self: center; margin-bottom: 12px; }
.account-checkout-info { padding: 14px; border: 1px solid #ddd; border-left: 3px solid var(--account-accent); background: #f5f5f5; color: #444; }
.account-checkout-info h3 { margin: 0 0 6px; color: var(--account-accent); font-size: 1em; font-weight: 500; }
.account-checkout-info ul { margin: 0; padding-left: 1.15em; }
.account-checkout-info li + li { margin-top: 4px; }
.account-checkout-info a { color: var(--account-accent); }
#account-checkout-package { text-decoration: none; }
.account-payment-back { align-self: flex-start; margin-bottom: 14px; color: var(--account-accent); text-decoration: none; }
#account-payment-form { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(16px, 3vw, 32px); width: 100%; margin: 22px 0 14px; }
.account-payment-fields, .account-payment-summary { display: grid; align-content: start; gap: 14px; min-width: 0; }
.account-payment-summary h3 { margin: 0; font-size: 1.125rem; font-weight: 500; }
.account-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; margin: 0; padding: 10px; border: 1px solid #ccc; border-radius: 6px; background: #f5f5f5; }
.account-card legend { color: var(--account-accent); }
.account-card > div { min-height: 38px; padding: 10px; border: 1px solid #aaa; border-radius: 5px; background: #fff; }
#account-card-number { grid-column: 1 / -1; }
.account-payment-totals { padding: 12px; border: 1px solid #ccc; border-radius: 6px; background: #eff0f1; }
.account-payment-totals p { margin: 0 0 14px; text-align: center; }
.account-payment-totals dl, .account-payment-totals dd { margin: 0; }
.account-payment-totals dl > div { display: flex; justify-content: space-between; gap: 8px; }
.account-payment-total { margin-top: 8px; padding-top: 8px; border-top: 1px solid #ccc; font-weight: 700; }
.account-payment-footer { margin-top: 16px; text-align: center; color: var(--account-accent); }
@media (max-width: 960px) { #account-payment-form { grid-template-columns: 1fr; } }
#account-fiscal-dialog { width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: clamp(16px, 3vw, 28px); border: 1px solid #ccc; border-radius: 10px; color: #222; box-shadow: 0 8px 24px #0003; }
#account-fiscal-dialog::backdrop { background: #0007; }
.account-fiscal-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-fiscal-heading h2 { margin: 0; color: var(--account-accent); font-size: 1.35rem; }
#account-fiscal-close { padding: 0 8px; border: 0; border-radius: 4px; background: transparent; color: #555; font-size: 1.6rem; cursor: pointer; }
#account-fiscal-details { margin-bottom: 16px; padding: 10px 12px; background: #f5f5f5; border-radius: 6px; }
#account-fiscal-details p { margin: 3px 0; }
#account-fiscal-form { display: grid; gap: 10px; }
#account-fiscal-form input, #account-fiscal-form select { width: 100%; min-height: 34px; padding: 4px 10px; border: 1px solid #aaa; border-radius: 5px; background: #fff; color: #222; font: inherit; }
#account-fiscal-form input::placeholder, #account-fiscal-form select:invalid { color: #0d47a1; opacity: 1; }
#account-fiscal-form select option { color: #222; }
#account-fiscal-feedback:not(:empty) { margin-top: 12px; color: var(--account-accent); }
