html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #007BFF;
    margin: 0;
    padding: 0;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    width: 100%;
    height: 30px;
    padding: 16px 24px;
    background: #007BFF;
    border: none;
    color: #ffffff;
    font-family: sans-serif;
    font-size: 12pc;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-primary:hover {
    background: #007BFF;
    border: none;
    color: #ffffff;
}

/* Ambient shine — a translucent white/blue streak loops across the button
   on its own. z-index: -1 keeps it behind the label text (relies on the
   isolation: isolate above), so it works on every .btn-primary regardless
   of markup, without needing to wrap the button's text in a span. */
.btn-primary::after {
    content: "";
    position: absolute;
    top: -30%;
    left: -110%;
    width: 100%;
    height: 160%;
    background: linear-gradient(100deg,
        rgba(179, 217, 255, 0) 4%,
        rgba(214, 235, 255, 0.15) 18%,
        rgba(255, 255, 255, 0.45) 38%,
        rgba(255, 255, 255, 0.45) 62%,
        rgba(214, 235, 255, 0.15) 82%,
        rgba(179, 217, 255, 0) 96%
    );
    transform: skewX(-18deg);
    filter: blur(1px);
    z-index: -1;
    pointer-events: none;
    animation: btn-shine-loop 6s ease-in-out infinite;
}

.btn-secondary {
    width: 100%;
    height: 30px;
    padding: 16px 24px;
    background: #6c757d;
    border: none;
    color: #ffffff;
    font-family: sans-serif;
    font-size: 12pc;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

@keyframes btn-shine-loop {
    0% {
        left: -110%;
    }
    32% {
        left: 180%;
    }
    100% {
        left: 180%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-primary::after {
        animation: none;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1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32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

input:focus,
textarea:focus,
select:focus {
    border-color: #0078d4;
    outline: none;
}

.details-header{
    font-weight: bold;
}

.top-row-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.top-row-header .header-app-brand {
    position: relative;
    font-weight: 700;
    font-size: 16px;
    color: #222;
    white-space: nowrap;
    top: 0;
}

.header-app-brand b {
    color: #3399ff;
}

/*
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: #c02d76;
}*/
.top-row {
    position: absolute;
    top: 0;
    flex-shrink: 0;
    background-color: #ffffff;
    height: 2.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid #c4c4c4;
    justify-content: center;
    z-index: 0;
}


/* Outer dialog controls width */
.custom-size-modal {
    width: 100% !important;
    min-width: 80vw !important;
    height: 100% !important;
    min-height: 50vh !important;
}

.custom-modal-footer {
    display: flex;
    justify-content:center;
    gap: 30px;
    position: sticky;
    bottom: 0;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.custom-modal-footer .btn {
    flex-basis: 300px;
    font-weight: bold;
}

.info-custom-size-modal {
    width: 100% !important;
    min-width: 60vw !important;
    height: 100% !important;
    min-height: 50vh !important;
}

.delete-custom-size-modal {
    width: 100% !important;
    height: 100% !important;
    min-width: 20vw !important;
    min-height: 30vh !important;
}

/* Blazored.Modal's .bm-header carries padding: 0 0 2rem 0 — 32px of air between the title and the
   content. That suits the tall Create/Edit forms, but the GST filing popups are short: a generated
   e-way bill is 100px of content in a 365px dialog, and the header padding is the single largest
   contributor. Trimmed to 12px for those three popups only, matched by name so no other modal moves.

   :has() is what keeps this scoped — the header is a SIBLING of the popup's content, so no
   descendant selector could reach it from the popup's own stylesheet. Unsupported browsers simply
   keep the original spacing, which is the pre-existing behaviour rather than a broken layout.

   Note the descendant combinator inside :has(), NOT a direct child: Blazored wraps the supplied
   content in a .bm-content element, so the popup body is a GRANDCHILD of .blazored-modal and
   ":has(> .ewb-popup-body)" silently matches nothing. */
.blazored-modal:has(.ewb-popup-body) .bm-header,
.blazored-modal:has(.einv-popup-body) .bm-header,
.blazored-modal:has(.gst-popup-body) .bm-header {
    padding-bottom: 0.75rem;
}

/*======================================== Responsive (modals) ================================================*/
/* Blazored.Modal's own wrapper (.blazored-modal) has a fixed 1.75rem margin
   on every side and, for ModalSize.Automatic (used by every Create/Edit
   popup), sizes itself to width:fit-content — fine on desktop, but on a
   narrow phone that margin plus fit-content sizing leaves little to no
   room and can still overflow. Shrinking the margin and forcing full width
   here is a safety net on top of the .form/.details-container fixes
   (CreateAccount.css, CreateCompany.css, CompanyInfo.css) that removed the
   800px content floor actually causing the overflow. */
@media (max-width: 700px) {
    .blazored-modal {
        margin: 0.75rem !important;
        max-width: calc(100vw - 1.5rem) !important;
        box-sizing: border-box;
    }

    .size-automatic,
    .size-small,
    .size-medium,
    .size-large,
    .size-extra-large {
        width: calc(100vw - 1.5rem) !important;
        max-width: calc(100vw - 1.5rem) !important;
    }
}


.no-internet-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #f2f2f2;
}

.no-internet-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}