:root {
    --bg: #f5eddc;
    --bg-alt: #eadfc4;
    --panel: rgba(255, 251, 243, 0.92);
    --panel-strong: #14352d;
    --text: #1d2d2a;
    --muted: #5f6d68;
    --line: rgba(29, 45, 42, 0.12);
    --accent: #b76e2a;
    --success: #2f7a59;
    --danger: #b44637;
    --shadow: 0 18px 40px rgba(46, 31, 14, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text);
    font-family: "Manrope", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(183, 110, 42, 0.18), transparent 24rem),
        radial-gradient(circle at top right, rgba(20, 53, 45, 0.18), transparent 22rem),
        linear-gradient(180deg, #f9f3e8 0%, var(--bg) 45%, var(--bg-alt) 100%);
}

body.rtl {
    font-family: "Noto Nastaliq Urdu", "Manrope", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.ui-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
}

.app-frame {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns 0.2s ease;
}

.app-sidebar {
    position: sticky;
    top: 0;
    z-index: 70;
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100vh;
    overflow-y: auto;
    padding: 16px;
    border-inline-end: 1px solid var(--line);
    background: rgba(255, 251, 243, 0.96);
    box-shadow: 14px 0 32px rgba(29, 45, 42, 0.08);
}

.sidebar-brand {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
}

.sidebar-brand .brand-link {
    min-width: 0;
}

.sidebar-brand .brand-title {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-brand .brand-copy {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-toggle,
.mobile-sidebar-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(20, 53, 45, 0.06);
    color: var(--panel-strong);
    padding: 10px;
    cursor: pointer;
}

.sidebar-toggle .ui-icon {
    transition: transform 0.2s ease;
}

.sidebar-nav,
.sidebar-footer {
    display: grid;
    gap: 8px;
}

.sidebar-nav {
    flex: 1;
}

.sidebar-footer {
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.sidebar-link,
.sidebar-button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: transparent;
    color: var(--muted);
    padding: 10px 12px;
    font-size: 0.92rem;
    font-weight: 750;
    text-align: start;
    cursor: pointer;
    transition: 0.18s ease;
}

.sidebar-link:hover,
.sidebar-button:hover,
.sidebar-link.active {
    border-color: rgba(20, 53, 45, 0.08);
    background: rgba(20, 53, 45, 0.07);
    color: var(--panel-strong);
}

.sidebar-link.active {
    box-shadow: inset 3px 0 0 var(--accent);
}

body.rtl .sidebar-link.active {
    box-shadow: inset -3px 0 0 var(--accent);
}

.sidebar-link .ui-icon,
.sidebar-button .ui-icon {
    color: currentColor;
}

.sidebar-language {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
}

.sidebar-language .lang-link {
    min-width: 44px;
    padding: 9px 10px;
    text-align: center;
}

.sidebar-scrim {
    display: none;
}

body.sidebar-collapsed .app-frame {
    grid-template-columns: 86px minmax(0, 1fr);
}

body.sidebar-collapsed .app-sidebar {
    padding-inline: 12px;
}

body.sidebar-collapsed .sidebar-label,
body.sidebar-collapsed .sidebar-brand .brand-copy {
    display: none;
}

body.sidebar-collapsed .sidebar-brand {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-brand .brand-link {
    display: none;
}

body.sidebar-collapsed .sidebar-toggle .ui-icon {
    transform: rotate(180deg);
}

body.sidebar-collapsed .sidebar-link,
body.sidebar-collapsed .sidebar-button {
    justify-content: center;
    padding-inline: 10px;
}

body.sidebar-collapsed .sidebar-language {
    grid-template-columns: 1fr;
}

.page-shell {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 16px 18px 32px;
}

.topbar,
.hero,
.stat-card,
.panel,
.flash {
    animation: rise 0.55s ease both;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 14px;
}

.app-header {
    min-height: 54px;
}

.mobile-sidebar-button {
    display: none;
}

.app-header-title {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
    color: var(--muted);
}

.app-header-title .eyebrow {
    background: rgba(20, 53, 45, 0.08);
    color: var(--panel-strong);
    padding: 7px 10px;
}

.app-header-title strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-panel,
.panel,
.stat-card,
.flash {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.brand-panel {
    padding: 18px 20px;
    min-width: min(100%, 380px);
}

.brand-link {
    display: flex;
    gap: 16px;
    align-items: center;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent), #cf9a59);
    color: #fffaf3;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.brand-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px;
}

.brand-title,
.hero h1,
.hero h2,
.section-heading h1,
.panel-header h2 {
    margin: 0;
    font-family: "Space Grotesk", "Manrope", sans-serif;
}

body.rtl .brand-title,
body.rtl .hero h1,
body.rtl .hero h2,
body.rtl .section-heading h1,
body.rtl .panel-header h2 {
    font-family: "Noto Nastaliq Urdu", "Manrope", sans-serif;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.brand-copy {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.nav-cluster,
.nav-links,
.hero-actions,
.toolbar,
.action-row,
.language-switcher,
.session-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.nav-cluster {
    justify-content: flex-end;
}

.mobile-nav {
    display: none;
    width: 100%;
}

.app-main {
    position: relative;
    z-index: 1;
}

.mobile-tabbar {
    display: none;
}

.mobile-form-tabs {
    display: none;
}

.mobile-form-shell {
    display: grid;
    gap: 12px;
}

.settings-screen {
    display: grid;
    gap: 18px;
}

.settings-form {
    display: grid;
    gap: 12px;
}

.settings-action-bar {
    position: sticky;
    top: 10px;
    z-index: 40;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid rgba(20, 53, 45, 0.12);
    border-radius: 18px;
    background: rgba(255, 251, 243, 0.95);
    box-shadow: 0 16px 34px rgba(29, 45, 42, 0.11);
    backdrop-filter: blur(14px);
}

.settings-action-bar strong,
.settings-action-bar span {
    display: block;
}

.settings-action-bar strong {
    color: var(--panel-strong);
    font-size: 0.98rem;
}

.settings-action-bar span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.84rem;
}

.settings-tab-shell .mobile-form-tabs {
    position: sticky;
    top: 80px;
    z-index: 32;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 8px;
    scrollbar-width: thin;
}

.settings-tab-shell .mobile-form-pane[hidden] {
    display: none;
}

.settings-bottom-toolbar {
    justify-content: flex-end;
}

.dashboard-shell,
.dashboard-main,
.dashboard-sidebar-stack,
.utility-list,
.utility-actions,
.utility-metrics {
    display: grid;
    gap: 18px;
}

.dashboard-shell {
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.78fr);
    align-items: start;
}

.dashboard-sidebar-stack {
    position: sticky;
    top: 18px;
}

.utility-card {
    padding: 20px;
}

.dashboard-utility-header {
    margin-bottom: 16px;
    align-items: flex-start;
}

.utility-row,
.utility-metric {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
}

.utility-row strong,
.utility-metric strong {
    display: block;
    margin-top: 8px;
    color: var(--panel-strong);
}

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

.utility-actions form {
    margin: 0;
}

.utility-actions .button,
.utility-actions form .button {
    width: 100%;
}

.database-clear-stack {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.database-clear-stack form {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 12px;
    border: 1px solid rgba(180, 70, 55, 0.16);
    border-radius: 16px;
    background: rgba(180, 70, 55, 0.06);
}

.database-clear-stack .button {
    width: 100%;
}

.settings-section-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255, 251, 243, 0.82);
    box-shadow: var(--shadow);
}

.mobile-form-tab {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    padding: 8px 12px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.mobile-form-tab.is-active {
    border-color: transparent;
    background: var(--panel-strong);
    color: #fef5e7;
    box-shadow: 0 14px 28px rgba(20, 53, 45, 0.18);
}

.mobile-form-pane {
    display: block;
}

.mobile-pane-heading {
    display: none;
}

.mobile-sticky-toolbar {
    gap: 12px;
}

.mobile-tabbar-link {
    color: var(--muted);
}

.mobile-tabbar-glyph {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(20, 53, 45, 0.06);
    color: var(--panel-strong);
    font-family: "Space Grotesk", "Manrope", sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
}

.nav-link,
.lang-link,
.button,
.text-link {
    transition: 0.2s ease;
}

.nav-link,
.lang-link {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.64);
    padding: 10px 14px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.nav-link:hover,
.lang-link:hover,
.text-link:hover {
    transform: translateY(-1px);
}

.nav-link.active,
.lang-link.active {
    background: var(--panel-strong);
    color: #fef5e7;
    border-color: transparent;
}

.switch-label {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(20, 53, 45, 0.06);
    color: var(--panel-strong);
    font-size: 0.9rem;
    font-weight: 700;
}

.logout-form {
    margin: 0;
}

.hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.6fr 0.9fr;
    gap: 24px;
    padding: 22px;
    margin-bottom: 16px;
    border-radius: 24px;
    border: 1px solid rgba(20, 53, 45, 0.12);
    background:
        linear-gradient(135deg, rgba(20, 53, 45, 0.96), rgba(41, 90, 74, 0.92)),
        linear-gradient(180deg, rgba(183, 110, 42, 0.18), transparent 55%);
    color: #fef6ea;
    box-shadow: var(--shadow);
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -40px -90px auto;
    width: 220px;
    height: 220px;
    border-radius: 48px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04));
    transform: rotate(22deg);
}

.eyebrow,
.mini-label {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffe8c7;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero h1 {
    margin-top: 12px;
    font-size: clamp(1.65rem, 3.5vw, 2.55rem);
    line-height: 1.08;
}

.hero p {
    max-width: 54ch;
    color: rgba(254, 246, 234, 0.78);
    line-height: 1.55;
}

.hero-panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 28px;
    background: rgba(255, 248, 236, 0.1);
    backdrop-filter: blur(10px);
}

.hero-panel h2 {
    font-size: clamp(1.45rem, 3vw, 2.1rem);
    line-height: 1.1;
}

.hero-metrics,
.stats-grid,
.section-grid,
.form-grid,
.meta-grid {
    display: grid;
    gap: 12px;
}

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

.hero-metrics div {
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
}

.hero-metrics span,
.meta-grid span,
.notification-meta span,
.stat-card span,
.field label,
.table-wrap th,
.payment-side span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.hero-metrics strong,
.stat-card strong {
    display: block;
    margin-top: 8px;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin-bottom: 14px;
}

.stat-card {
    padding: 16px;
}

.stat-card strong {
    font-size: 1.45rem;
    color: var(--panel-strong);
}

.section-grid {
    grid-template-columns: 1.25fr 0.95fr;
}

.panel {
    padding: 18px;
}

.panel-header,
.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: end;
    margin-bottom: 14px;
}

.panel-header h2,
.section-heading h1 {
    font-size: 1.38rem;
    line-height: 1.15;
}

.panel-header p,
.section-heading p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.text-link {
    color: var(--accent);
    font-weight: 700;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 14px;
    border: 1px solid transparent;
    padding: 10px 13px;
    font-weight: 700;
    cursor: pointer;
}

.button.primary {
    background: linear-gradient(135deg, var(--accent), #ce9156);
    color: #fff9f1;
}

.button.secondary {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff6e5;
}

.button.tertiary {
    background: #fff6eb;
    border-color: rgba(183, 110, 42, 0.18);
    color: var(--accent);
}

.button.small {
    padding: 7px 10px;
    border-radius: 12px;
}

.button.danger {
    background: rgba(180, 70, 55, 0.12);
    border-color: rgba(180, 70, 55, 0.16);
    color: var(--danger);
}

.button.light {
    background: rgba(20, 53, 45, 0.06);
    border-color: var(--line);
    color: var(--panel-strong);
}

.button .ui-icon {
    width: 17px;
    height: 17px;
    flex-basis: 17px;
}

.filter-card {
    padding: 0;
    overflow: hidden;
}

.filter-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    cursor: pointer;
    list-style: none;
    font-size: 0.98rem;
    font-weight: 700;
}

.filter-toggle::-webkit-details-marker,
.mobile-nav-toggle::-webkit-details-marker {
    display: none;
}

.filter-toggle strong {
    display: block;
    margin-bottom: 4px;
    color: var(--panel-strong);
}

.filter-toggle small {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 600;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(20, 53, 45, 0.08);
    color: var(--panel-strong);
}

.filter-form {
    padding: 0 24px 24px;
    border-top: 1px solid var(--line);
}

.mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--panel-strong);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.mobile-nav-panel {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.mobile-nav-links {
    display: grid;
    gap: 10px;
}

.mobile-nav-links .nav-link,
.mobile-language-switcher .lang-link {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.mobile-language-switcher {
    margin-top: 16px;
    justify-content: center;
}

.search-form {
    gap: 8px;
}

.search-input {
    min-width: min(100%, 320px);
}

.due-card,
.payment-row {
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.54);
}

.due-card + .due-card,
.payment-row + .payment-row {
    margin-top: 10px;
}

.due-card-header,
.payment-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.due-card h3,
.payment-row h3 {
    margin: 0;
    font-size: 1.05rem;
}

.due-card p,
.payment-row p {
    margin: 6px 0 0;
    color: var(--muted);
}

.meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
}

.meta-grid strong {
    display: block;
    margin-top: 8px;
}

.payment-side {
    text-align: end;
}

.progress-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.progress {
    width: 100%;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(20, 53, 45, 0.08);
}

.progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent), #f0b16a);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 800;
}

.badge-available {
    background: rgba(47, 122, 89, 0.12);
    color: var(--success);
}

.badge-reserved,
.badge-active,
.badge-installment {
    background: rgba(183, 110, 42, 0.12);
    color: var(--accent);
}

.badge-sold,
.badge-completed,
.badge-adjustment {
    background: rgba(20, 53, 45, 0.12);
    color: var(--panel-strong);
}

.badge-cancelled,
.badge-overdue {
    background: rgba(180, 70, 55, 0.12);
    color: var(--danger);
}

.badge-pending,
.badge-partial,
.badge-booking,
.badge-final,
.badge-inactive,
.badge-skipped {
    background: rgba(68, 96, 196, 0.12);
    color: #3754ab;
}

.badge-today {
    background: rgba(47, 122, 89, 0.18);
    color: #206447;
}

.dashboard-notification-stats {
    margin-bottom: 18px;
}

.notification-row {
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.58);
}

.notification-row + .notification-row {
    margin-top: 10px;
}

.notification-overdue {
    border-color: rgba(180, 70, 55, 0.2);
}

.notification-today {
    border-color: rgba(47, 122, 89, 0.24);
}

.notification-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.notification-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.notification-header p {
    margin: 6px 0 0;
    color: var(--muted);
}

.notification-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.notification-meta strong {
    display: block;
    margin-top: 8px;
}

.scroll-list {
    max-height: 390px;
    overflow-y: auto;
    padding-inline-end: 6px;
    scrollbar-width: thin;
}

.scroll-list .notification-row:first-child,
.scroll-list .due-card:first-child,
.scroll-list .payment-row:first-child {
    margin-top: 0;
}

.compact-dashboard-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(290px, 0.95fr);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 18px;
    background:
        radial-gradient(circle at top left, rgba(183, 110, 42, 0.18), transparent 24rem),
        radial-gradient(circle at top right, rgba(20, 53, 45, 0.18), transparent 22rem),
        linear-gradient(180deg, #f9f3e8 0%, var(--bg) 45%, var(--bg-alt) 100%);
}

.auth-card {
    width: min(1080px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    border: 1px solid var(--line);
    border-radius: 32px;
    overflow: hidden;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.auth-side {
    padding: 32px;
    color: #fef6ea;
    background:
        linear-gradient(135deg, rgba(20, 53, 45, 0.96), rgba(41, 90, 74, 0.92)),
        linear-gradient(180deg, rgba(183, 110, 42, 0.18), transparent 55%);
}

.auth-copy {
    margin-top: 40px;
}

.auth-side .brand-copy {
    color: rgba(254, 246, 234, 0.72);
}

.auth-copy h1 {
    margin: 18px 0 12px;
    font-family: "Space Grotesk", "Manrope", sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
}

body.rtl .auth-copy h1 {
    font-family: "Noto Nastaliq Urdu", "Manrope", sans-serif;
}

.auth-copy p {
    max-width: 42ch;
    color: rgba(254, 246, 234, 0.82);
    line-height: 1.85;
}

.auth-language-switcher {
    margin-top: 28px;
}

.auth-demo-card {
    margin-top: 28px;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.14);
    color: #fff6e5;
}

.auth-demo-card p {
    margin: 10px 0 0;
}

.auth-form-panel {
    padding: 32px;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.checkbox-field {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--muted);
    font-size: 0.92rem;
}

.checkbox-field input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.auth-submit {
    width: 100%;
}

.table-wrap {
    max-height: min(58vh, 520px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.38);
}

table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

th,
td {
    padding: 10px 11px;
    text-align: start;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(255, 251, 243, 0.96);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.45);
}

.empty-state {
    padding: 24px;
    border: 1px dashed rgba(20, 53, 45, 0.18);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.4);
    text-align: center;
    color: var(--muted);
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field.is-hidden {
    display: none !important;
}

.field-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.field-hint,
.muted-copy {
    color: var(--muted);
    font-size: 0.88rem;
}

.help-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(20, 53, 45, 0.08);
    color: var(--panel-strong);
    font-size: 0.76rem;
    font-weight: 800;
    cursor: help;
}

.field.full {
    grid-column: 1 / -1;
}

.checkbox-stack {
    justify-content: flex-end;
}

.selection-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.66);
}

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

.selection-grid strong {
    display: block;
    margin-top: 8px;
}

.quick-sale-plot-list {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.56);
}

.quick-sale-choice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
    cursor: pointer;
}

.quick-sale-choice input {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.quick-sale-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.quick-sale-summary div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.62);
}

.quick-sale-summary span {
    display: block;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.quick-sale-summary strong {
    display: block;
    margin-top: 8px;
    color: var(--panel-strong);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    padding: 11px 13px;
    color: var(--text);
}

textarea {
    min-height: 92px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(183, 110, 42, 0.18);
    border-color: rgba(183, 110, 42, 0.36);
}

.flash {
    margin-bottom: 16px;
    padding: 16px 18px;
}

.flash-success {
    border-color: rgba(47, 122, 89, 0.18);
}

.flash-error {
    border-color: rgba(180, 70, 55, 0.18);
}

.error-list {
    margin: 10px 0 0;
    padding-inline-start: 20px;
}

.inline-form {
    display: inline;
}

.footer-note {
    margin-top: 24px;
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
}

.file-preview-row,
.project-landing-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.project-landing-cell {
    flex-direction: column;
    align-items: flex-start;
}

.field input[type="checkbox"] {
    width: auto;
}

.landing-body {
    min-height: 100vh;
    color: #152723;
    background: #f7f2e8;
    font-family: "Manrope", sans-serif;
}

.landing-body.rtl {
    font-family: "Noto Nastaliq Urdu", "Manrope", sans-serif;
}

.landing-header {
    position: absolute;
    inset: 18px 22px auto;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    color: #fffaf2;
}

.landing-brand,
.landing-nav {
    display: inline-flex;
    align-items: center;
}

.landing-brand {
    gap: 12px;
    min-width: 0;
    font-weight: 850;
}

.landing-brand span:last-child {
    max-width: min(44vw, 360px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.landing-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.landing-nav a {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(9, 24, 22, 0.26);
    padding: 9px 11px;
    color: #fffaf2;
    font-size: 0.88rem;
    font-weight: 750;
    backdrop-filter: blur(10px);
}

.landing-nav a.active,
.landing-nav a:hover {
    background: rgba(255, 255, 255, 0.18);
}

.landing-nav .landing-login {
    background: #fffaf2;
    color: #14352d;
}

.landing-hero {
    min-height: min(76vh, 720px);
    display: flex;
    align-items: center;
    padding: 116px clamp(18px, 6vw, 88px) 58px;
    background-position: center;
    background-size: cover;
    color: #fffaf2;
}

.landing-hero-copy {
    width: min(790px, 100%);
}

.landing-kicker {
    display: inline-flex;
    width: fit-content;
    border-radius: 8px;
    background: rgba(239, 178, 92, 0.18);
    color: #ffe3b2;
    padding: 8px 10px;
    font-size: 0.8rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.landing-hero h1,
.landing-section h2,
.landing-contact h2,
.landing-project-card h3 {
    margin: 0;
    font-family: "Space Grotesk", "Manrope", sans-serif;
    letter-spacing: 0;
}

.landing-body.rtl .landing-hero h1,
.landing-body.rtl .landing-section h2,
.landing-body.rtl .landing-contact h2,
.landing-body.rtl .landing-project-card h3 {
    font-family: "Noto Nastaliq Urdu", "Manrope", sans-serif;
}

.landing-hero h1 {
    margin-top: 16px;
    font-size: clamp(2.4rem, 7vw, 5.4rem);
    line-height: 0.98;
    max-width: 10ch;
}

.landing-hero p {
    max-width: 62ch;
    margin: 20px 0 0;
    color: rgba(255, 250, 242, 0.86);
    font-size: clamp(1rem, 2vw, 1.24rem);
    line-height: 1.65;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.landing-actions .button,
.landing-project-actions .button,
.landing-section-head .button {
    border-radius: 8px;
}

.landing-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 34px;
    max-width: 720px;
}

.landing-metrics span {
    border-inline-start: 2px solid rgba(239, 178, 92, 0.7);
    padding-inline-start: 12px;
    color: rgba(255, 250, 242, 0.78);
    font-size: 0.88rem;
    font-weight: 750;
}

.landing-metrics strong {
    display: block;
    color: #fffaf2;
    font-size: 1.55rem;
}

.landing-section,
.landing-contact {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.landing-section {
    padding: 34px 0 20px;
}

.landing-section-head,
.landing-contact {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-end;
}

.landing-section-head {
    margin-bottom: 18px;
}

.landing-section h2,
.landing-contact h2 {
    margin-top: 12px;
    color: #14352d;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.landing-section-head p,
.landing-contact p,
.landing-project-description {
    color: #60716c;
    line-height: 1.62;
}

.landing-section-head p {
    max-width: 66ch;
    margin: 10px 0 0;
}

.landing-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.landing-project-card {
    display: flex;
    flex-direction: column;
    min-height: 310px;
    border: 1px solid rgba(20, 53, 45, 0.12);
    border-radius: 8px;
    background: #fffaf2;
    padding: 18px;
    box-shadow: 0 18px 34px rgba(35, 48, 43, 0.08);
}

.landing-project-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.landing-project-card h3 {
    margin-top: 12px;
    color: #14352d;
    font-size: 1.25rem;
}

.landing-project-top p {
    margin: 7px 0 0;
    color: #60716c;
}

.landing-code {
    flex: 0 0 auto;
    height: fit-content;
    border-radius: 8px;
    background: #e9f0f7;
    color: #245176;
    padding: 7px 9px;
    font-size: 0.78rem;
    font-weight: 850;
}

.landing-project-description {
    flex: 1;
    margin: 16px 0;
}

.landing-project-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.landing-project-meta span {
    border-radius: 8px;
    background: #f1f6ee;
    padding: 10px;
    color: #60716c;
    font-size: 0.84rem;
    font-weight: 750;
}

.landing-project-meta strong {
    display: block;
    color: #2f7a59;
    font-size: 1.22rem;
}

.landing-project-actions {
    display: flex;
    align-items: center;
    min-height: 42px;
}

.landing-project-actions .button {
    width: 100%;
}

.landing-file-muted {
    width: 100%;
    border-radius: 8px;
    background: #f4eee2;
    padding: 11px 12px;
    color: #6f6255;
    font-size: 0.9rem;
    font-weight: 750;
    text-align: center;
}

.landing-empty {
    grid-column: 1 / -1;
    border: 1px dashed rgba(20, 53, 45, 0.18);
    border-radius: 8px;
    padding: 28px;
    background: #fffaf2;
    text-align: center;
}

.landing-contact {
    align-items: center;
    margin-top: 20px;
    margin-bottom: 26px;
    border-top: 1px solid rgba(20, 53, 45, 0.14);
    padding: 28px 0 0;
}

.landing-contact p {
    max-width: 58ch;
    margin: 10px 0 0;
}

.landing-contact-list {
    display: grid;
    gap: 8px;
    min-width: min(100%, 300px);
}

.landing-contact-list a,
.landing-contact-list span {
    border-radius: 8px;
    background: #fffaf2;
    padding: 12px 14px;
    color: #14352d;
    font-weight: 750;
}

.landing-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    padding: 20px 18px 28px;
    color: #60716c;
    font-size: 0.9rem;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 960px) {
    .landing-header {
        position: static;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 14px;
        background: #14352d;
    }

    .landing-brand {
        justify-content: center;
    }

    .landing-brand span:last-child {
        max-width: calc(100vw - 120px);
    }

    .landing-nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        justify-content: stretch;
    }

    .landing-nav a {
        display: inline-flex;
        justify-content: center;
        min-height: 40px;
        text-align: center;
    }

    .landing-hero {
        min-height: auto;
        padding: 44px 18px 40px;
        background-position: center right;
    }

    .landing-hero h1 {
        max-width: 12ch;
    }

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

    .landing-section-head,
    .landing-contact {
        flex-direction: column;
        align-items: stretch;
    }

    .landing-section-head .button {
        width: fit-content;
    }

    .app-frame {
        display: block;
    }

    .app-sidebar {
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        width: min(86vw, 320px);
        height: 100vh;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
    }

    body.rtl .app-sidebar {
        transform: translateX(105%);
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    body.sidebar-collapsed .app-frame {
        display: block;
    }

    body.sidebar-collapsed .app-sidebar {
        padding: 16px;
    }

    body.sidebar-collapsed .sidebar-label,
    body.sidebar-collapsed .sidebar-brand .brand-copy {
        display: block;
    }

    body.sidebar-collapsed .sidebar-brand .brand-link {
        display: flex;
    }

    body.sidebar-collapsed .sidebar-link,
    body.sidebar-collapsed .sidebar-button {
        justify-content: flex-start;
    }

    body.sidebar-collapsed .sidebar-language {
        grid-template-columns: 1fr auto auto;
    }

    .sidebar-scrim {
        position: fixed;
        inset: 0;
        z-index: 65;
        display: block;
        pointer-events: none;
        opacity: 0;
        border: 0;
        background: rgba(16, 24, 22, 0.35);
        transition: opacity 0.18s ease;
    }

    body.sidebar-open .sidebar-scrim {
        pointer-events: auto;
        opacity: 1;
    }

    .mobile-sidebar-button {
        display: inline-flex;
    }

    .section-grid,
    .dashboard-shell,
    .hero,
    .panel-header,
    .section-heading,
    .payment-row,
    .due-card-header {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .hero-panel,
    .hero-copy,
    .payment-side {
        text-align: start;
    }

    .dashboard-sidebar-stack {
        position: static;
    }

    .form-grid,
    .hero-metrics,
    .meta-grid,
    .selection-grid,
    .quick-sale-summary,
    .notification-meta,
    .auth-card {
        grid-template-columns: 1fr;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    .topbar {
        position: sticky;
        top: 12px;
        z-index: 45;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        margin-bottom: 18px;
    }

    .page-shell {
        padding: 12px 14px 26px;
    }

    .settings-section-card {
        padding: 20px;
    }

    .settings-action-bar {
        top: 76px;
        align-items: stretch;
        flex-direction: column;
    }

    .settings-action-bar .toolbar {
        width: 100%;
    }

    .settings-action-bar .button {
        flex: 1 1 0;
    }

    .settings-tab-shell .mobile-form-tabs {
        top: 168px;
    }

    .brand-panel {
        flex: 1 1 auto;
        min-width: 0;
        padding: 14px 16px;
        backdrop-filter: blur(14px);
    }

    .brand-link {
        gap: 12px;
        align-items: center;
    }

    .brand-mark,
    .brand-logo {
        width: 46px;
        height: 46px;
        border-radius: 16px;
    }

    .brand-copy {
        display: none;
    }

    .brand-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-nav {
        width: auto;
        flex: 0 0 auto;
    }

    .mobile-nav-toggle {
        width: auto;
        min-width: 84px;
        padding-inline: 18px;
        backdrop-filter: blur(14px);
    }

    .filter-toggle {
        padding: 18px 20px;
    }

    .filter-form {
        padding: 0 20px 20px;
    }

    .auth-side,
    .auth-form-panel {
        padding: 24px;
    }

    .mobile-session-tools {
        margin-top: 16px;
        justify-content: center;
    }

    .mobile-tabbar {
        display: none;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
        z-index: 60;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
        padding: 10px;
        border: 1px solid rgba(20, 53, 45, 0.12);
        border-radius: 26px;
        background: rgba(255, 251, 243, 0.92);
        box-shadow: 0 18px 36px rgba(29, 45, 42, 0.18);
        backdrop-filter: blur(14px);
    }

    .mobile-tabbar-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 58px;
        padding: 8px 6px;
        border-radius: 18px;
        text-align: center;
        font-size: 0.72rem;
        font-weight: 700;
    }

    .mobile-tabbar-link.active {
        background: rgba(20, 53, 45, 0.08);
        color: var(--panel-strong);
    }

    .mobile-tabbar-link.active .mobile-tabbar-glyph {
        background: linear-gradient(135deg, var(--accent), #cf9a59);
        color: #fffaf3;
    }

    .mobile-form-tabs {
        position: sticky;
        top: 92px;
        z-index: 25;
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 4px 0 6px;
        margin: -2px 0 2px;
        scrollbar-width: none;
    }

    .mobile-form-tabs::-webkit-scrollbar {
        display: none;
    }

    .mobile-pane-heading {
        display: block;
        margin: 0 0 14px;
        font-family: "Space Grotesk", "Manrope", sans-serif;
        font-size: 1.05rem;
    }

    body.rtl .mobile-pane-heading {
        font-family: "Noto Nastaliq Urdu", "Manrope", sans-serif;
    }

    .mobile-sticky-toolbar {
        position: sticky;
        bottom: 88px;
        z-index: 30;
        padding: 14px;
        border: 1px solid rgba(20, 53, 45, 0.1);
        border-radius: 24px;
        background: rgba(255, 251, 243, 0.94);
        box-shadow: 0 18px 36px rgba(29, 45, 42, 0.14);
        backdrop-filter: blur(14px);
    }

    .mobile-sticky-toolbar .button.primary {
        box-shadow: 0 14px 28px rgba(183, 110, 42, 0.2);
    }

    table {
        min-width: 640px;
    }
}

@media (max-width: 640px) {
    .landing-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .landing-hero {
        padding: 34px 16px 34px;
    }

    .landing-hero h1 {
        font-size: clamp(2.05rem, 13vw, 3.1rem);
    }

    .landing-actions,
    .landing-metrics,
    .landing-project-meta {
        grid-template-columns: 1fr;
    }

    .landing-actions {
        display: grid;
    }

    .landing-section,
    .landing-contact {
        width: min(100% - 24px, 1180px);
    }

    .landing-project-card {
        min-height: 0;
        padding: 14px;
    }

    .landing-project-top {
        flex-direction: column;
    }

    .page-shell {
        padding-inline: 14px;
        padding-bottom: 24px;
    }

    .brand-link {
        align-items: center;
    }

    .hero {
        padding: 18px;
    }

    .panel,
    .stat-card,
    .brand-panel,
    .settings-section-card {
        border-radius: 22px;
    }

    .brand-title {
        font-size: 1.05rem;
    }

    .brand-copy,
    .panel-header p,
    .section-heading p,
    .footer-note {
        font-size: 0.82rem;
        line-height: 1.65;
    }

    .panel,
    .stat-card,
    .brand-panel,
    .mobile-nav-panel,
    .settings-section-card {
        padding: 14px;
    }

    .filter-card {
        padding: 0;
    }

    .section-heading h1,
    .panel-header h2 {
        font-size: 1.35rem;
    }

    .nav-link,
    .lang-link,
    .button,
    .mobile-nav-toggle,
    .user-chip {
        padding: 10px 12px;
        border-radius: 14px;
        font-size: 0.82rem;
    }

    .switch-label,
    .hero-metrics span,
    .meta-grid span,
    .stat-card span,
    .field label,
    .table-wrap th,
    .payment-side span,
    .filter-toggle small {
        font-size: 0.78rem;
    }

    .stat-card strong {
        font-size: 1.28rem;
    }

    .toolbar {
        width: 100%;
    }

    .toolbar .button,
    .toolbar > a.button,
    .toolbar > button.button {
        flex: 1 1 calc(50% - 8px);
    }

    .hero-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .hero-actions .button {
        width: 100%;
    }

    .search-form {
        width: 100%;
        flex-wrap: wrap;
    }

    .search-input {
        min-width: 0;
        width: 100%;
    }

    .search-form .button {
        flex: 1 1 calc(50% - 8px);
    }

    .action-row {
        gap: 8px;
    }

    .notification-row {
        padding: 16px;
    }

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

    .notification-header {
        flex-direction: column;
        align-items: stretch;
    }

    .auth-shell {
        padding: 16px 14px;
    }

    .auth-side,
    .auth-form-panel {
        padding: 20px;
    }

    .auth-copy {
        margin-top: 28px;
    }

    .checkbox-field {
        font-size: 0.84rem;
    }

    table {
        min-width: 540px;
    }

    .table-wrap {
        max-height: 54vh;
    }

    .scroll-list {
        max-height: 330px;
    }

    .filter-toggle {
        padding: 16px 18px;
        font-size: 0.9rem;
    }

    .filter-form {
        padding: 0 18px 18px;
    }

    .mobile-tabbar {
        left: 10px;
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        gap: 6px;
        padding: 8px;
        border-radius: 22px;
    }

    .mobile-tabbar-link {
        min-height: 54px;
        font-size: 0.68rem;
    }

    .mobile-tabbar-glyph {
        width: 30px;
        height: 30px;
        border-radius: 10px;
        font-size: 0.78rem;
    }

    .mobile-sticky-toolbar {
        bottom: 80px;
        padding: 12px;
        border-radius: 22px;
    }
}
