:root {
    --orange: #ef7f1a;
    --orange-dark: #cb650d;
    --orange-soft: #fff1e5;
    --yellow: #ffb845;
    --yellow-soft: #ffe3ab;
    --white: #ffffff;
    --surface: #fbf7f2;
    --surface-2: #f6efe6;
    --line: #eadfce;
    --text: #332f2b;
    --muted: #7a746c;
    --shadow: 0 18px 45px rgba(65, 48, 28, .14);
    --shadow-soft: 0 10px 30px rgba(65, 48, 28, .08);
    --success: #5f9b5b;
    --danger: #d66739;
    --warning: #c88a19;
    --info: #5f83d6;
    --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #fff8ef 0%, #f6f7fb 260px);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}
.app-shell-tenant-dashboard {
    grid-template-columns: 1fr;
}

.sidebar {
    color: #fff;
    min-height: 100vh;
    padding: 22px 18px;
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #2b2520 0%, #211d19 100%);
}
.sidebar-admin-visual {
    background:
        linear-gradient(180deg, rgba(81, 51, 25, .92), rgba(116, 64, 18, .97)),
        radial-gradient(circle at top left, rgba(255, 184, 69, .28), transparent 30%),
        linear-gradient(180deg, #6f3f16, #8d4d17);
    border-right: 1px solid rgba(255,255,255,.08);
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}
.brand img {
    width: 58px;
    height: 58px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 10px 24px rgba(0,0,0,.14);
}
.brand-name { font-size: 1.35rem; font-weight: 800; }
.brand-subtitle { margin-top: 4px; color: rgba(255,255,255,.78); font-size: .93rem; }
.brand-admin-visual { margin-bottom: 34px; }

.menu {
    display: grid;
    gap: 8px;
}
.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    color: rgba(255,255,255,.88);
    border-radius: 16px;
    transition: .2s ease;
    font-weight: 600;
}
.menu-link:hover,
.menu-link.is-active {
    background: linear-gradient(90deg, rgba(255,140,33,.92), rgba(239,127,26,.92));
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.menu-icon {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    flex: 0 0 auto;
}
.menu-link.is-active .menu-icon { background: #fff; }
.sidebar-footer-card {
    margin-top: 28px;
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,.9);
}
.sidebar-footer-admin {
    margin-top: 40px;
}
.sidebar-user-avatar,
.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.18);
    color: #fff;
    font-weight: 800;
}

.main-shell { min-width: 0; }
.main-shell-full { width: 100%; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 26px;
    border-bottom: 1px solid rgba(200, 170, 130, .22);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(14px);
}
.topbar-dashboard,
.topbar-tenant-dashboard {
    padding: 18px 28px;
    background: rgba(255,255,255,.95);
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 14px;
    border-right: 1px solid rgba(120,110,98,.18);
    color: var(--orange-dark);
    font-weight: 800;
    letter-spacing: -.01em;
}
.topbar-brand img {
    width: 48px;
    height: 48px;
}
.topbar-page-title { min-width: 0; }
.topbar-title-main {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
}
.topbar-title-sub {
    font-size: .92rem;
    color: var(--muted);
    margin-top: 2px;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.topbar-actions-refined { gap: 14px; }
.user-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 6px;
}
.user-summary .user-avatar {
    background: linear-gradient(135deg, #d7c8ba, #a18b76);
}
.user-summary strong { display: block; }
.notification-badge {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, var(--orange), var(--yellow));
    color: #fff;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}
.logout-link {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(239,127,26,.2);
    color: var(--orange-dark);
    background: #fff;
    font-size: 1.2rem;
}

.menu-toggle {
    display: none;
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--orange), var(--yellow));
    color: #fff;
    cursor: pointer;
}

.content { padding: 26px; }
.content-dashboard-admin { padding: 0 28px 28px; }
.content-dashboard-tenant { padding: 0 0 28px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.form-grid .full { grid-column: 1 / -1; }

.card,
.visual-card {
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(230, 210, 185, .62);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 22px;
}
.card h2, .card h3, .visual-card h2, .visual-card h3 { margin-top: 0; }

.toolbar,
.visual-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
    color: #4a433d;
}
input,
select,
textarea {
    width: 100%;
    border: 1px solid #ddd4c8;
    background: #fff;
    border-radius: 14px;
    padding: 13px 14px;
    color: var(--text);
    transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(239,127,26,.12);
}
textarea { min-height: 110px; resize: vertical; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 14px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(90deg, var(--orange), var(--yellow));
    box-shadow: 0 10px 22px rgba(239,127,26,.2);
}
.button:hover { filter: brightness(.98); }
.button-outline {
    background: #fff;
    color: var(--orange-dark);
    border: 1px solid rgba(239,127,26,.22);
    box-shadow: none;
}
.button-danger {
    background: linear-gradient(90deg, #d64b34, #f07d63);
}
.button-small {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: .92rem;
}
.button-large {
    min-height: 54px;
    padding-inline: 24px;
}
.button-block { width: 100%; }

.table-wrap {
    overflow: auto;
    border-radius: 18px;
    border: 1px solid rgba(232, 220, 206, .9);
}
.table-wrap-visual {
    border-color: rgba(232, 220, 206, .8);
    background: rgba(255,255,255,.9);
}
.visual-table,
table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}
th,
td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(232, 220, 206, .75);
    vertical-align: middle;
}
th {
    background: #fff7ee;
    color: #7a5f43;
    font-size: .84rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}
tr:hover td { background: #fffaf4; }

.badge,
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 800;
}
.badge-success { background: rgba(95,155,91,.16); color: #477a44; }
.badge-warning { background: rgba(200,138,25,.16); color: #9a6a11; }
.badge-danger { background: rgba(214,103,57,.16); color: #b24d24; }
.badge-muted { background: rgba(122,116,108,.12); color: #6d675f; }
.badge-info { background: rgba(95,131,214,.14); color: #4565b1; }
.pill { background: rgba(239,127,26,.12); color: var(--orange-dark); }

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 700;
}
.alert-success { background: rgba(95,155,91,.12); color: #477a44; }
.alert-warning { background: rgba(200,138,25,.12); color: #9a6a11; }
.alert-danger { background: rgba(214,103,57,.12); color: #b24d24; }
.alert-info { background: rgba(95,131,214,.12); color: #4565b1; }

.hero,
.hero-admin,
.hero-tenant {
    border-radius: 28px;
    color: #fff;
    padding: 28px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(20,20,20,.82), rgba(20,20,20,.26));
}
.hero > * { position: relative; z-index: 1; }
.hero-admin {
    background: url("../img/admin-background.webp") center center / cover no-repeat;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.hero-tenant {
    background: url("../img/tenant-background.webp") center center / cover no-repeat;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.hero-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.2);
    font-size: .88rem;
    font-weight: 800;
    margin-bottom: 14px;
}
.hero-kicker-light {
    background: rgba(255,255,255,.16);
    border-color: rgba(255,255,255,.3);
    color: #fff4d9;
}

.stats-card {
    background: rgba(255,255,255,.96);
    border-radius: 22px;
    padding: 20px;
    border-left: 5px solid var(--orange);
    box-shadow: var(--shadow-soft);
}
.stats-card .label { color: var(--muted); margin-bottom: 8px; }
.stats-card .value { font-size: 1.8rem; font-weight: 800; }
.stats-card .sub { margin-top: 8px; color: var(--muted); font-size: .92rem; }

.dashboard-visual-shell {
    position: relative;
    padding: 0 0 18px;
}
.dashboard-scene {
    height: 300px;
    border-radius: 0 0 26px 26px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 -80px 120px rgba(0,0,0,.08);
}
.admin-scene {
    background: url("../img/admin-background.webp") center center / cover no-repeat;
}
.dashboard-scene-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(34,27,20,.18) 0%, rgba(34,27,20,.06) 46%, rgba(34,27,20,.18) 100%);
}
.dashboard-brand-panel {
    position: absolute;
    right: 34px;
    top: 38px;
    padding: 18px 20px;
    border-radius: 20px;
    background: rgba(255,250,244,.86);
    border: 1px solid rgba(255,255,255,.6);
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-soft);
}
.dashboard-brand-panel img {
    width: 56px;
    height: 56px;
    padding: 8px;
    background: #fff;
    border-radius: 16px;
}
.dashboard-brand-panel strong {
    display: block;
    color: var(--orange-dark);
    font-size: 1.15rem;
}
.dashboard-brand-panel span {
    color: #6f675f;
    font-size: .95rem;
}
.dashboard-main-panel {
    margin: -72px 28px 0;
    padding: 32px;
    border-radius: 28px;
    background: rgba(255,249,244,.96);
    border: 1px solid rgba(236, 221, 205, .9);
    box-shadow: var(--shadow);
}
.dashboard-main-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 22px;
}
.dashboard-main-heading h2 {
    margin: 0;
    font-size: 2rem;
    letter-spacing: -.02em;
}
.dashboard-main-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}
.date-chip {
    background: #fff;
    color: #746c63;
    border-radius: 16px;
    padding: 12px 16px;
    border: 1px solid rgba(232, 220, 206, .95);
    white-space: nowrap;
    box-shadow: var(--shadow-soft);
}
.visual-stat-grid {
    display: grid;
    gap: 18px;
}
.visual-stat-grid-admin { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.visual-stat-grid-tenant { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.visual-stat-card {
    border-radius: 22px;
    padding: 22px;
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(233, 220, 205, .88);
    box-shadow: var(--shadow-soft);
    min-height: 158px;
    position: relative;
}
.visual-stat-card .visual-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: inline-block;
    margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(255,184,69,.32), rgba(239,127,26,.18));
}
.visual-stat-label { color: #59524b; font-weight: 700; margin-bottom: 8px; }
.visual-stat-value { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.visual-stat-sub { color: var(--muted); margin-top: 8px; }
.visual-stat-card.receipt .button { margin-top: 14px; }
.visual-stat-card.income .visual-stat-value,
.visual-stat-card.wallet .visual-stat-value { color: #5d8650; }
.visual-stat-card.alert .visual-stat-value,
.visual-stat-card.due .visual-stat-value { color: #cb650d; }

.dashboard-two-columns {
    display: grid;
    grid-template-columns: 1.3fr .9fr;
    gap: 20px;
    margin-top: 22px;
}
.tenant-columns { grid-template-columns: 1fr 1fr; }
.chart-card,
.schedule-card,
.admin-table-card { background: rgba(255,255,255,.92); }
.mini-chart {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
    min-height: 220px;
    padding-top: 8px;
}
.mini-chart-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    justify-content: end;
    min-height: 200px;
}
.mini-chart-bar {
    width: 100%;
    max-width: 54px;
    border-radius: 16px 16px 8px 8px;
    background: linear-gradient(180deg, var(--yellow), var(--orange));
    box-shadow: 0 12px 22px rgba(239,127,26,.18);
}
.mini-chart-col span {
    font-size: .85rem;
    color: var(--muted);
    text-align: center;
}
.action-list {
    display: grid;
    gap: 14px;
}
.action-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fffaf5, #fff);
    border: 1px solid rgba(234, 223, 206, .95);
}
.action-line strong { display: block; }
.action-line span { display: block; margin-top: 4px; color: var(--muted); }
.dashboard-button-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.tenant-visual-page {
    max-width: 1400px;
    margin: 0 auto;
}
.tenant-hero-banner {
    height: 380px;
    background: url("../img/tenant-background.webp") center center / cover no-repeat;
    position: relative;
}
.tenant-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.02) 0%, rgba(255,255,255,.12) 100%);
}
.tenant-summary-panel {
    background: rgba(255,249,244,.97);
    margin-top: 0;
    padding: 28px 36px 20px;
}
.tenant-heading-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 22px;
}
.tenant-heading-row h2 {
    margin: 0;
    font-size: 2rem;
    letter-spacing: -.02em;
}
.tenant-inline-actions,
.tenant-shortcuts-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.tenant-shortcuts-row { margin: 22px 0; }

.login-page {
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.08)),
        url("../img/home-background.webp") center center / cover no-repeat fixed;
}
.login-header-bar {
    height: 122px;
    background: rgba(255,255,255,.97);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(70, 48, 18, .08);
}
.login-header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--orange-dark);
    font-size: 1.25rem;
    font-weight: 900;
}
.login-header-brand img {
    width: 88px;
    height: 88px;
}
.login-stage {
    min-height: calc(100vh - 122px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: 46px 24px 60px;
    text-align: center;
}
.login-hero-copy {
    max-width: 920px;
    color: #fff;
    text-shadow: 0 8px 28px rgba(0,0,0,.22);
}
.login-hero-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    line-height: 1.06;
}
.login-hero-copy p {
    margin: 0 auto;
    max-width: 760px;
    font-size: 1.15rem;
    color: rgba(255,255,255,.95);
}
.hero-chip-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: #fff5dc;
    border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(4px);
}
.login-panel-refined {
    width: min(600px, 100%);
    padding: 34px 34px 28px;
    border-radius: 30px;
    background: rgba(255,255,255,.93);
    border: 1px solid rgba(255,255,255,.62);
    box-shadow: 0 24px 55px rgba(24, 24, 24, .24);
    text-align: left;
}
.login-form-stack {
    display: grid;
    gap: 16px;
}
.remember-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: #6e6a63;
    font-weight: 500;
}
.remember-line input {
    width: 20px;
    height: 20px;
    margin: 0;
}
.login-tabs-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    text-align: center;
    gap: 12px;
    margin: 18px 0 10px;
    color: var(--orange-dark);
    font-weight: 700;
}
.login-tabs-preview span {
    padding: 16px 12px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.login-muted-link {
    text-align: center;
    color: #7a7e89;
    text-decoration: underline;
    text-underline-offset: 3px;
    margin: 16px 0 6px;
}
.login-demo-box,
.login-help {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #fff6e8;
    color: #8a5a00;
    font-size: .94rem;
    border: 1px solid rgba(255, 184, 69, .18);
}
.logo-large {
    display: flex;
    align-items: center;
    gap: 16px;
}
.logo-large img {
    width: 76px;
    background: #fff;
    border-radius: 18px;
    padding: 10px;
}

.receipt {
    background: #fff;
    max-width: 1000px;
    margin: 30px auto;
    padding: 28px;
    border-radius: 24px;
    box-shadow: var(--shadow);
}
.receipt-header,
.receipt-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.receipt-banner {
    background: linear-gradient(90deg, var(--orange), var(--yellow));
    padding: 16px 18px;
    border-radius: 18px;
    color: #fff;
    margin: 20px 0;
}
.kpi-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}
.kpi-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--line);
}
.print-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 18px auto 0;
    max-width: 1000px;
}

.small { color: var(--muted); font-size: .9rem; }
.stack-actions { display: grid; gap: 8px; }
.code-block {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #2a241f;
    color: #fff5cc;
    font-family: Consolas, Monaco, monospace;
    font-size: .88rem;
    overflow: auto;
}
label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    vertical-align: middle;
}
code {
    background: #fff3d8;
    padding: 2px 6px;
    border-radius: 8px;
    color: #8a5400;
}

.admin-dashboard-page,
.tenant-dashboard-page {
    background: linear-gradient(180deg, #fff7ef 0%, #f6f7fb 260px);
}
.tenant-dashboard-page .sidebar {
    display: none;
}

@media (max-width: 1100px) {
    .visual-stat-grid-admin,
    .visual-stat-grid-tenant,
    .grid-4,
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-two-columns,
    .tenant-columns,
    .grid-2,
    .form-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-main-panel { margin-inline: 18px; padding: 24px; }
    .tenant-summary-panel { padding-inline: 22px; }
}

@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        left: -300px;
        width: 280px;
        z-index: 40;
        transition: left .22s ease;
        box-shadow: var(--shadow);
    }
    .sidebar.is-open { left: 0; }
    .menu-toggle { display: inline-flex; }
    .topbar { align-items: flex-start; }
    .topbar-left,
    .dashboard-main-heading,
    .tenant-heading-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .dashboard-brand-panel {
        right: 18px;
        left: 18px;
        top: 18px;
    }
    .login-panel-refined { padding: 24px; }
    .login-header-brand img { width: 72px; height: 72px; }
    .login-stage { padding-top: 32px; }
}

@media (max-width: 720px) {
    .topbar { padding: 16px; }
    .content { padding: 18px; }
    .content-dashboard-admin { padding: 0 14px 18px; }
    .tenant-summary-panel { padding: 18px 14px 20px; }
    .dashboard-main-heading h2,
    .tenant-heading-row h2 { font-size: 1.55rem; }
    .dashboard-main-panel {
        margin-top: -48px;
        margin-inline: 12px;
        padding: 18px;
    }
    .visual-stat-grid-admin,
    .visual-stat-grid-tenant,
    .grid-3,
    .grid-4,
    .login-tabs-preview {
        grid-template-columns: 1fr;
    }
    .dashboard-button-row,
    .tenant-shortcuts-row,
    .tenant-inline-actions,
    .hero-chip-row {
        flex-direction: column;
        align-items: stretch;
    }
    .dashboard-scene,
    .tenant-hero-banner { height: 250px; }
    .mini-chart { gap: 10px; }
    .topbar-brand span { display: none; }
    .user-summary strong { font-size: .95rem; }
}

@media print {
    .topbar,
    .sidebar,
    .print-actions { display: none !important; }
    body { background: #fff; }
    .receipt { box-shadow: none; margin: 0; max-width: 100%; }
}


.legal-page { background: #f4f6f8; min-height: 100vh; }
.legal-container { max-width: 980px; margin: 0 auto; padding: 48px 20px; }
.legal-card { padding: 32px; border-radius: 24px; background: #fff; box-shadow: 0 20px 60px rgba(20, 31, 46, 0.08); }
.legal-card h1 { margin-top: 0; }
.legal-card h2 { margin-top: 28px; color: #263238; }
.legal-card ul { padding-left: 22px; }


.login-legal-links {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    justify-content: center;
    font-size: .9rem;
}

.login-legal-links a {
    color: rgba(255,255,255,.92);
    text-decoration: none;
}

.login-legal-links a:hover {
    text-decoration: underline;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem 1.5rem;
    color: #5f6772;
    font-size: .92rem;
}

.app-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1rem;
}

.app-footer-links a {
    color: #5f6772;
    text-decoration: none;
}

.app-footer-links a:hover {
    text-decoration: underline;
}

@media (max-width: 860px) {
    .app-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}
