/* The application (MudBlazor) in the Tadbirna style "Sous un même toit": ink menu with the coral dot on the
   current page, Alexandria for titles and figures, round-ended buttons, blue = up to date, coral = to pay. */
:root {
    --tb-ink: #0B0B12; --tb-blue: #1E40FF; --tb-blue-soft: #EEF1FF; --tb-coral: #FF5A36; --tb-coral-700: #C93A1B; --tb-coral-soft: #FFEDE7;
    --tb-mist: #F4F5FA; --tb-line: #E3E4EC; --tb-slate: #5B5D72;
    --tb-roof: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 13'%3E%3Cpath d='M2.5 10.5 L10 3' stroke='%23FF5A36' stroke-width='3.2' stroke-linecap='round'/%3E%3Cpath d='M10 3 L17.5 10.5' stroke='%231E40FF' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E");
    --tb-roof-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 13'%3E%3Cpath d='M2.5 10.5 L10 3' stroke='%23FF5A36' stroke-width='3.2' stroke-linecap='round'/%3E%3Cpath d='M10 3 L17.5 10.5' stroke='%235C78FF' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E");
}
html, body { background: var(--tb-mist); }

.brand { font-weight: 700; letter-spacing: -0.02em; }
.brand-accent { color: var(--tb-coral); }
.tb-logo { display: block; width: auto; max-width: 100%; }
.mud-typography-h1, .mud-typography-h2, .mud-typography-h3, .mud-typography-h4, .mud-typography-h5, .mud-typography-h6 { font-family: Alexandria, Inter, sans-serif; }
[dir="rtl"] .mud-typography-h1, [dir="rtl"] .mud-typography-h2, [dir="rtl"] .mud-typography-h3,
[dir="rtl"] .mud-typography-h4, [dir="rtl"] .mud-typography-h5, [dir="rtl"] .mud-typography-h6 { font-family: Alexandria, Cairo, sans-serif; }
.mud-typography-h5, .mud-typography-h6 { font-weight: 700; }

/* Buttons: round ends like the strokes of the logo; the main (filled) action in ink, blue on hover. */
.mud-button-root.mud-button { border-radius: 999px; text-transform: none; letter-spacing: 0; font-family: Alexandria, Inter, sans-serif; font-weight: 600; }
[dir="rtl"] .mud-button-root.mud-button { font-family: Alexandria, Cairo, sans-serif; }
.mud-button-filled.mud-button-filled-primary { background-color: var(--tb-ink); }
.mud-button-filled.mud-button-filled-primary:hover, .mud-button-filled.mud-button-filled-primary:focus-visible { background-color: var(--tb-blue); }
.mud-button-outlined.mud-button-outlined-primary { color: var(--tb-ink); border: 1.5px solid var(--tb-ink); }
.mud-button-outlined.mud-button-outlined-primary:hover { background-color: rgba(11, 11, 18, .05); }
.mud-tab { text-transform: none; font-family: Alexandria, Inter, sans-serif; font-weight: 600; letter-spacing: 0; }
.mud-chip { font-weight: 600; }

/* App bar and menu */
.app-bar { border-bottom: 1px solid var(--tb-line); }
.drawer-header { padding: 20px 20px 8px; }
.drawer-caption { color: #8A8CA0; text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; }
.app-nav { font-family: Alexandria, Inter, sans-serif; }
[dir="rtl"] .app-nav { font-family: Alexandria, Cairo, sans-serif; }
.app-nav .mud-nav-link { position: relative; border-radius: 12px; margin: 2px 10px; width: auto; padding-inline-start: 26px; font-size: .875rem; }
.app-nav .mud-nav-link:hover { background: rgba(255, 255, 255, .05); }
.app-nav .mud-nav-link.active { background: #1B1C2A; color: #fff !important; font-weight: 600; }
.app-nav .mud-nav-link.active .mud-nav-link-icon { color: #fff; }
.app-nav .mud-nav-link.active::before { content: ""; position: absolute; inset-inline-start: 11px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--tb-coral); }
.nav-section { display: flex !important; align-items: center; gap: 8px; color: #8A8CA0; padding: 18px 22px 4px; letter-spacing: .12em; font-size: .68rem; font-weight: 600; }
.nav-section::before { content: ""; flex: none; width: 12px; height: 8px; background: var(--tb-roof-dark) no-repeat center / contain; }
[dir="rtl"] .nav-section, [dir="rtl"] .drawer-caption { letter-spacing: 0; }

/* Page titles end with the dot of the logo. */
.page-header { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
.page-header h1 { margin: 0; }
.page-header .page-title { font-weight: 800 !important; letter-spacing: -0.03em; line-height: 1.15; }
[dir="rtl"] .page-header .page-title { letter-spacing: 0; line-height: 1.4; }
.page-header .page-title::after { content: "."; color: var(--tb-coral); }

/* Figures: tiles with a tinted icon, values in Alexandria. */
.stat-card { height: 100%; border-radius: 22px !important; }
.stat-value { font-family: Alexandria, Inter, sans-serif; font-weight: 800; font-size: 1.9rem; line-height: 1.1; letter-spacing: -0.03em; color: var(--tb-ink); }
[dir="rtl"] .stat-value { letter-spacing: 0; }
.stat-icon { width: 40px; height: 40px; border-radius: 28%; display: inline-grid; place-items: center; flex: none; background: var(--tb-mist); color: var(--tb-ink); }
.stat-icon.stat-primary, .stat-icon.stat-info { background: var(--tb-blue-soft); color: var(--tb-blue); }
.stat-icon.stat-secondary, .stat-icon.stat-warning { background: var(--tb-coral-soft); color: var(--tb-coral-700); }
.stat-icon.stat-error { background: #FEF3F2; color: #B42318; }
.stat-icon.stat-success { background: #E7F6EF; color: #0E7C5A; }
/* Paid in blue, still due in coral. */
.split-bar { display: flex; gap: 3px; height: 8px; margin-top: 10px; }
.split-bar span { border-radius: 999px; min-width: 4px; }
.split-bar span:first-child { background: var(--tb-blue); }
.split-bar span:last-child { background: var(--tb-coral); }

.mud-paper-outlined { border-color: var(--tb-line); }
.mud-table-root .mud-table-head .mud-table-cell, .mud-simple-table table thead th { font-family: Alexandria, Inter, sans-serif; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tb-ink); border-bottom: 1.5px solid var(--tb-ink); }
[dir="rtl"] .mud-table-root .mud-table-head .mud-table-cell, [dir="rtl"] .mud-simple-table table thead th { font-family: Alexandria, Cairo, sans-serif; letter-spacing: 0; font-size: .8rem; }
.amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mud-simple-table th.num, .mud-simple-table td.num { text-align: end; font-variant-numeric: tabular-nums; }
.muted { color: var(--tb-slate); }
.reversed-row { opacity: .55; text-decoration: line-through; }

.logout-button { background: none; border: 0; width: 100%; display: flex; gap: 10px; align-items: center; padding: 8px 16px; cursor: pointer; font: inherit; color: inherit; }
.logout-button:hover { background: rgba(0,0,0,.04); }

/* Sign-in and account pages: the big roof on the ink side, the form on the white side. */
.auth-shell { min-height: 100vh; display: flex; flex-wrap: wrap; background: #fff; font-family: Alexandria, Inter, sans-serif; }
[dir="rtl"] .auth-shell { font-family: Alexandria, Cairo, sans-serif; }
.auth-art { flex: 1 1 440px; position: relative; overflow: hidden; background: var(--tb-ink); padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 100vh; box-sizing: border-box; }
.auth-art > .tb-logo { align-self: flex-start; }
.auth-roof { width: 100%; max-width: 480px; height: auto; align-self: center; }
.auth-tagline { display: flex; flex-direction: column; gap: 10px; color: #A3A5B8; }
.auth-tagline strong { color: #fff; font-size: clamp(1.6rem, 2.4vw, 2.3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; }
[dir="rtl"] .auth-tagline strong { letter-spacing: 0; line-height: 1.4; }
.auth-dot { color: var(--tb-coral); }
.auth-main { flex: 1 1 520px; display: flex; flex-direction: column; padding: 32px 48px 48px; box-sizing: border-box; min-height: 100vh; }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: .9rem; }
.auth-top a { color: #2B2C3B; text-decoration: none; }
.auth-home { display: inline-flex; align-items: center; gap: 8px; }
.auth-home:hover { color: var(--tb-ink); }
.auth-back { width: 16px; height: 16px; }
[dir="rtl"] .auth-back { transform: scaleX(-1); }
.auth-lang { display: inline-flex; gap: 4px; background: var(--tb-mist); border-radius: 999px; padding: 4px; }
.auth-lang a { padding: 4px 14px; border-radius: 999px; color: var(--tb-slate); }
.auth-lang a.on { background: #fff; color: var(--tb-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(11,11,18,.12); }
.auth-card { width: 100%; max-width: 420px; margin: auto; padding: 40px 0; }
a.auth-brand { display: none; margin-bottom: 28px; }
.auth-card h1 { font-family: Alexandria, Inter, sans-serif; font-weight: 800; font-size: 2.3rem; letter-spacing: -0.035em; color: var(--tb-ink); line-height: 1.1; margin-bottom: 8px !important; }
[dir="rtl"] .auth-card h1 { font-family: Alexandria, Cairo, sans-serif; letter-spacing: 0; line-height: 1.4; }
.auth-card h1.text-danger { color: #B42318 !important; }
.auth-card .dotted::after { content: "."; color: var(--tb-coral); }
.auth-card .text-secondary { color: var(--tb-slate) !important; }
.auth-card .form-control { border: 1.5px solid #D5D7E2; border-radius: 14px; color: var(--tb-ink); }
.auth-card .form-control:focus { border-color: var(--tb-blue); box-shadow: 0 0 0 4px #E3E8FF; }
.auth-card .form-floating > label { color: var(--tb-slate); }
.auth-card .form-check-input:checked { background-color: var(--tb-ink); border-color: var(--tb-ink); }
.auth-card .form-check-input:focus { box-shadow: 0 0 0 4px #E3E8FF; border-color: var(--tb-blue); }
.auth-card .btn { --bs-btn-border-radius: 999px; font-weight: 700; }
.auth-card .btn-primary { --bs-btn-bg: var(--tb-ink); --bs-btn-border-color: var(--tb-ink); --bs-btn-hover-bg: var(--tb-blue); --bs-btn-hover-border-color: var(--tb-blue); --bs-btn-active-bg: #1530C9; --bs-btn-active-border-color: #1530C9; --bs-btn-disabled-bg: var(--tb-ink); --bs-btn-disabled-border-color: var(--tb-ink); min-height: 54px; }
.auth-card a:not(.btn):not(.auth-brand) { color: var(--tb-ink); text-decoration: underline; text-decoration-color: var(--tb-coral); text-decoration-thickness: 2px; text-underline-offset: 4px; }
[dir="rtl"] .auth-card .form-check { padding-left: 0; padding-right: 1.5em; }
[dir="rtl"] .auth-card .form-check .form-check-input { float: right; margin-left: 0; margin-right: -1.5em; }
.auth-card .row, .auth-card .col-lg-3, .auth-card .col-lg-9, .auth-card .col-md-4, .auth-card .col-md-6 { width: 100%; max-width: 100%; flex: 0 0 100%; }
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; font-size: .9rem; flex-wrap: wrap; }
@media (max-width: 960px) {
    .auth-art { display: none; }
    .auth-main { padding: 20px 20px 40px; }
    a.auth-brand { display: inline-block; }
    .auth-card { padding-top: 32px; }
}

#blazor-error-ui { background: #FEF3F2; color: #B42318; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .8rem 1.25rem; position: fixed; width: 100%; z-index: 2000; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.rtl-input input, .rtl-input textarea { direction: rtl; text-align: right; }
.residence-picker { min-width: 260px; }
.residence-picker .mud-input-outlined-border { border-color: var(--tb-line); border-radius: 999px; }
.report-card:hover { border-color: #1E40FF; box-shadow: 0 2px 8px rgba(30,64,255,.12); }
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; overflow-x: auto; align-items: start; }
.board-column { background: #EBEDF4; border-radius: 12px; padding: 10px; min-height: 60vh; }
.board-column-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 8px; }
.board-zone { min-height: 55vh; display: flex; flex-direction: column; gap: 8px; }
.board-card { padding: 10px 12px; cursor: grab; background: #fff; }
.board-card:hover { box-shadow: 0 2px 8px rgba(16,24,40,.12); }
@media (max-width: 900px) { .board { grid-template-columns: repeat(4, 260px); } }
.board.board-5 { grid-template-columns: repeat(5, minmax(220px, 1fr)); }
@media (max-width: 1100px) { .board.board-5 { grid-template-columns: repeat(5, 240px); } }
.kv-grid { display: grid; grid-template-columns: max-content 1fr; gap: 2px 14px; font-size: .875rem; margin-top: 4px; }
.kv-grid { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; }
.brand-link { color: inherit; text-decoration: none; }
.logo-preview { width: 96px; height: 64px; border: 1px dashed #D0D5DD; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #fff; overflow: hidden; }
.logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-logo { height: 34px; max-width: 140px; object-fit: contain; border-radius: 6px; background: #fff; padding: 2px; }
.doc-logo { max-height: 60px; max-width: 160px; object-fit: contain; margin-bottom: 6px; display: block; }

/* Filter bars: date pickers and fields keep their own width instead of stretching across the bar. */
.filters > .mud-picker, .filters > .mud-input-control, .filters > .mud-select { flex: 0 0 auto; width: auto; }
.filters .mud-picker .mud-input-control { width: 170px; }

/* Council pages: charges by nature and by month. */
table.matrix { border-collapse: collapse; width: 100%; font-size: 13px; }
table.matrix th, table.matrix td { padding: 6px 8px; border-bottom: 1px solid #EEF0F4; white-space: nowrap; }
table.matrix th { background: #F9FAFB; font-weight: 600; text-align: start; }
table.matrix th.num, table.matrix td.num { text-align: end; font-variant-numeric: tabular-nums; }
table.matrix td:first-child { white-space: normal; min-width: 200px; }
table.matrix tfoot td { font-weight: 700; background: #F9FAFB; }
table.matrix a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }

/* User guide: help page and PDF guides. */
.guide { font-size: 14px; line-height: 1.55; color: #101828; }
.guide-contents { background: #F3F5FF; border: 1px solid #D9DEFF; border-radius: 10px; padding: 12px 18px; margin-bottom: 18px; break-inside: avoid; }
.guide-contents-title { font-weight: 700; margin-bottom: 4px; }
.guide-contents ol { margin: 0; padding-inline-start: 20px; columns: 2; column-gap: 28px; }
.guide-contents li { break-inside: avoid; }
.guide-contents a { color: #1E40FF; text-decoration: none; }
.guide-section { padding: 14px 0 10px; border-top: 1px solid #EAECF0; }
.guide-section h2 { font-size: 18px; margin: 0 0 6px; color: #0B0B12; break-after: avoid; }
.guide-num { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 13px; background: #1E40FF; color: #fff; font-size: 13px; margin-inline-end: 6px; }
.guide-where { font-size: 13px; color: #344054; background: #F2F4F7; border-radius: 6px; padding: 4px 10px; display: inline-block; margin-bottom: 6px; }
.guide-purpose { margin: 6px 0 10px; }
.guide-block { border-radius: 8px; padding: 8px 14px; margin: 8px 0; break-inside: avoid; }
.guide-block ol, .guide-block ul { margin: 4px 0; padding-inline-start: 22px; }
.guide-block li { margin: 3px 0; }
.guide-block-title { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.guide-block.how { background: #F3F5FF; border-inline-start: 4px solid #1E40FF; }
.guide-block.avoid { background: #FEF3F2; border-inline-start: 4px solid #D92D20; }
.guide-block.avoid .guide-block-title { color: #B42318; }
.guide-block.watch { background: #FFFAEB; border-inline-start: 4px solid #F79009; }
.guide-block.watch .guide-block-title { color: #B54708; }
html[dir=rtl] .guide { font-family: Cairo, Arial, sans-serif; }

/* Guided tour (js/tour.js). */
.tour-spot { position: fixed; z-index: 3000; border-radius: 10px; box-shadow: 0 0 0 9999px rgba(11, 11, 18, .6); transition: all .25s ease; pointer-events: none; }
.tour-spot.none { box-shadow: 0 0 0 9999px rgba(11, 11, 18, .6); width: 0 !important; height: 0 !important; }
.tour-card { position: fixed; z-index: 3001; width: 340px; max-width: calc(100vw - 32px); background: #fff; color: #101828; border-radius: 14px; box-shadow: 0 18px 40px rgba(16, 24, 40, .28); padding: 18px 18px 14px; font-size: 14px; line-height: 1.5; }
.tour-card h3 { margin: 0 0 6px; font-size: 16px; color: #0B0B12; }
.tour-card p { margin: 0 0 14px; color: #344054; }
.tour-card .tour-foot { display: flex; align-items: center; gap: 8px; }
.tour-card .tour-count { color: #667085; font-size: 12px; margin-inline-end: auto; }
.tour-card button { font: inherit; border: 0; border-radius: 8px; padding: 7px 14px; cursor: pointer; }
.tour-card .tour-next { background: #0B0B12; color: #fff; border-radius: 999px; }
.tour-card .tour-prev { background: #F4F5FA; color: #0B0B12; border-radius: 999px; }
.tour-card .tour-skip { background: transparent; color: #667085; padding: 0; font-size: 12px; text-decoration: underline; display: block; margin-top: 10px; }
.tour-card .tour-progress { height: 3px; background: #EAECF0; border-radius: 2px; margin-bottom: 12px; overflow: hidden; }
.tour-card .tour-progress > div { height: 100%; background: #1E40FF; transition: width .25s ease; }
html[dir=rtl] .tour-card { font-family: Cairo, Arial, sans-serif; }
@media print {
    .tour-spot, .tour-card { display: none !important; }
}

/* Printing a page of the application (the help page): the content only. */
@media print {
    .mud-appbar, .mud-drawer, .page-header .d-flex, .no-print { display: none !important; }
    .mud-main-content { margin: 0 !important; padding: 0 !important; }
    .mud-main-content .mud-container { max-width: none !important; padding: 0 !important; }
    .guide-block { break-inside: avoid-page; }
}

/* Busy submit buttons (js/site.js) */
button.is-busy { pointer-events: none; opacity: .85; cursor: progress; }
.btn-spinner { display: inline-block; width: 1em; height: 1em; vertical-align: -.15em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: btn-spin .7s linear infinite; margin-inline-end: .35em; }
@keyframes btn-spin { to { transform: rotate(360deg); } }
.status-notes { margin: 0; padding-inline-start: 1.2rem; line-height: 1.8; }
.text-error { color: var(--mud-palette-error); }
.rtl-input { direction: rtl; text-align: right; font-family: Cairo, Tahoma, Arial, sans-serif; }
