:root {
    --pitsa-primary: #FF7A00;
    --pitsa-secondary: #FFC107;
    --pitsa-dark: #0F172A;
    --pitsa-success: #00B894;
    --pitsa-background: #F8FAFC;
    --pitsa-surface: #FFFFFF;
    --pitsa-text: #111827;
    --pitsa-muted: #6B7280;
    --pitsa-border: rgba(0,0,0,0.04);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.08);
}

.phone-number-input {
    width: 100%;
    min-height: 1.4375em;
    padding: 8px 12px 8px 52px;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
}

.phone-number-input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.iti {
    width: 100%;
}

.iti__dropdown-content {
    width: 100%;
    box-sizing: border-box;
}

.iti__country-list {
    z-index: 1300;
    overflow-y: auto;
    width: 100% !important;
    min-width: 100%;
    max-width: none;
    box-sizing: border-box;
    background: var(--pitsa-surface);
    border: 1px solid var(--pitsa-border);
    color: var(--pitsa-text);
    box-shadow: var(--shadow-soft);
}

.iti__country {
    color: var(--pitsa-text);
    font-size: 0.9375rem;
}

.iti__country-name,
.iti__dial-code {
    color: var(--pitsa-text) !important;
}

.iti__country:hover,
.iti__country.iti__highlight {
    background: color-mix(in srgb, var(--pitsa-primary) 14%, var(--pitsa-surface));
}

.dark-mode .iti__country-list,
body:has(.dark-mode) .iti__country-list {
    background: #1F2937;
    border-color: rgba(255, 255, 255, 0.12);
}

.dark-mode .iti__country,
.dark-mode .iti__country-name,
.dark-mode .iti__dial-code,
body:has(.dark-mode) .iti__country,
body:has(.dark-mode) .iti__country-name,
body:has(.dark-mode) .iti__dial-code {
    color: #F9FAFB !important;
}

.dark-mode .iti__country:hover,
.dark-mode .iti__country.iti__highlight,
body:has(.dark-mode) .iti__country:hover,
body:has(.dark-mode) .iti__country.iti__highlight {
    background: #374151;
}

.table-qr-preview {
    width: 76px;
    height: 76px;
    padding: 4px;
    background: white;
    border: 1px solid var(--pitsa-border);
    border-radius: 8px;
}

.table-qr-link {
    min-width: 0;
    max-width: 260px;
}

.tables-print-sheet {
    display: none;
}

@media print {
    body * {
        visibility: hidden;
    }

    .tables-print-sheet,
    .tables-print-sheet * {
        visibility: visible;
    }

    .tables-print-sheet {
        display: block;
        position: absolute;
        inset: 0;
        padding: 1rem;
        color: #111827;
        background: white;
    }

    .tables-print-header {
        text-align: center;
        margin-bottom: 1.5rem;
    }

    .tables-print-header h1 {
        margin: 0;
    }

    .tables-print-header p {
        margin: 0.5rem 0 0;
    }

    .tables-print-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .table-print-card {
        break-inside: avoid;
        border: 1px solid #d1d5db;
        padding: 1rem;
        text-align: center;
    }

    .table-print-card h2 {
        margin: 0 0 0.75rem;
    }

    .table-print-card img {
        width: 180px;
        height: 180px;
    }

    .table-print-card p {
        margin: 0.75rem 0 0;
    }
}

/* Basic dark-mode overrides for custom CSS-driven areas.
   MudBlazor components are themed via MudThemeProvider. */
.dark-mode {
    --pitsa-background: #0B1220;
    --pitsa-surface: #111827;
    --pitsa-text: #F9FAFB;
    --pitsa-muted: #9CA3AF;
    --pitsa-border: rgba(255,255,255,0.08);
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.35);
}

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: var(--pitsa-background);
    color: var(--pitsa-text);
}

html,
body,
.dark-mode,
.light-mode {
    min-height: 100vh;
    background: var(--pitsa-background);
    color: var(--pitsa-text);
}

.public-layout-root,
.public-layout {
    min-height: 100vh;
    background: var(--pitsa-background);
    color: var(--pitsa-text);
}

/* AppLayout: ensure the whole viewport (including the space around fixed app bar)
   is painted with the current theme background to avoid thin "white strips". */
.app-layout-root {
    min-height: 100vh;
    background: var(--pitsa-background);
    color: var(--pitsa-text);
}

.app-layout-main {
    padding-top: 64px; /* height of fixed MudAppBar (dense) */
    min-height: calc(100vh - 64px);
    background: var(--pitsa-background);
}

.public-main-content {
    min-height: calc(100vh - 64px);
    background: var(--pitsa-background);
    color: var(--pitsa-text);
}

body,
.page-gradient,
.phone-mockup,
.mud-paper,
.mud-appbar {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.page-gradient {
    background: radial-gradient(circle at top right, rgba(255,122,0,0.12), transparent 30%), radial-gradient(circle at bottom left, rgba(255,193,7,0.12), transparent 30%), linear-gradient(to bottom, #f8fafc, #fffdf8);
}

.dark-mode .page-gradient {
    background: radial-gradient(circle at top right, rgba(255,122,0,0.18), transparent 32%), radial-gradient(circle at bottom left, rgba(255,193,7,0.14), transparent 32%), linear-gradient(to bottom, #0B1220, #0F172A);
}

.dark-mode .feature-card:hover {
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.hero-title {
    font-size: clamp(2.8rem, 5vw, 4.8rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -2px;
    max-width: 700px;
}

.hero-highlight {
    color: var(--pitsa-primary);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--pitsa-muted);
    line-height: 1.8;
    max-width: 620px;
}

.hero-section {
    min-height: calc(100vh - 90px);
    display: flex;
    align-items: center;
}


.phone-mockup {
    border-radius: 42px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    background: var(--pitsa-surface);
}

.brand-logo {
    height: 54px;
}

.section-spacing {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.gradient-button {
    background: linear-gradient(135deg, #FF7A00, #FFB800);
    color: white;
}

.dark-section {
    background: var(--pitsa-dark);
    color: white;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--pitsa-dark);
}

.dark-mode .section-title {
    color: var(--pitsa-text);
}

.section-subtitle {
    text-align: center;
    color: var(--pitsa-muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 4rem auto;
    line-height: 1.8;
}

.feature-card {
    height: 100%;
    border-radius: var(--radius-lg);
    padding: 2rem;
    background: var(--pitsa-surface);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    border: 1px solid var(--pitsa-border);
}

    .feature-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 50px rgba(0,0,0,0.08);
    }

.feature-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #FF7A00, #FFC107);
    color: white;
}

.feature-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--pitsa-muted);
    line-height: 1.8;
}

.how-step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    background: linear-gradient(135deg, #FF7A00, #FFC107);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 auto 1.5rem auto;
}

.step-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.step-description {
    color: var(--pitsa-muted);
    line-height: 1.8;
    max-width: 320px;
    margin: 0 auto;
}

.mud-button {
    text-transform: none !important;
    font-weight: 600;
}

.app-layout-appbar {
    z-index: 1100;
}

.app-layout-toolbar {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.app-layout-search {
    flex: 0 1 260px;
    width: 260px;
    min-width: 0;
    margin-left: 1rem;
}

.app-layout-drawer-account {
    display: none;
}

.app-layout-drawer-content {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
}

.app-layout-drawer-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

@media (max-width: 600px) {
    .app-layout-appbar {
        min-height: 64px !important;
        padding: 8px 12px !important;
    }

    .app-layout-toolbar {
        width: 100%;
        height: 48px;
    }

    .app-layout-logo img {
        width: 112px !important;
        height: auto !important;
    }

    .app-layout-search {
        flex: 1 1 auto;
        width: auto !important;
        max-width: none !important;
        margin: 0 0 0 0.5rem !important;
    }

    .app-layout-tenant,
    .app-layout-notifications,
    .app-layout-theme-toggle,
    .app-layout-toolbar .app-layout-user-menu {
        display: none !important;
    }

    .app-layout-drawer-account {
        display: flex;
        flex: 0 0 auto;
        flex-direction: column;
        gap: 0.25rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--pitsa-border);
    }

    .app-layout-drawer-section-title {
        padding: 0 0.75rem 0.25rem;
        color: var(--pitsa-muted);
        text-transform: uppercase;
    }

    .app-layout-drawer-account .app-layout-user-menu,
    .app-layout-drawer-account .app-layout-user-menu-button,
    .app-layout-drawer-theme {
        width: 100%;
    }

    .app-layout-drawer-account .app-layout-user-menu-button,
    .app-layout-drawer-theme {
        justify-content: flex-start;
        padding: 0.65rem 0.75rem;
    }

    .app-layout-main {
        padding-top: 64px;
        min-height: calc(100vh - 64px);
    }
}

/* Dashboard */
.dashboard-card {
    border-radius: 24px;
    background: var(--pitsa-surface);
    border: 1px solid var(--pitsa-border);
    transition: all 0.25s ease;
}

    .dashboard-card:hover {
        transform: translateY(-2px);
    }

.dashboard-label {
    color: var(--pitsa-muted);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.dashboard-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.dashboard-muted {
    color: var(--pitsa-muted);
}

.page-heading {
    color: var(--pitsa-text);
    font-weight: 800;
}

.management-card {
    border: 1px solid var(--pitsa-border);
    border-radius: var(--radius-md);
    background: var(--pitsa-surface);
}

.role-card {
    height: 100%;
    padding: 1.5rem;
    transition: transform .2s ease, box-shadow .2s ease;
}

.role-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.role-description {
    min-height: 3rem;
    line-height: 1.6;
}

.dark-mode .dashboard-card {
    background: var(--pitsa-surface);
    border: 1px solid rgba(255,255,255,0.06);
}

.pricing-page {
    min-height: 100vh;
    padding: 5rem 0 4rem;
    background: radial-gradient(circle at 10% 0%, rgba(255,122,0,0.14), transparent 28%),
        radial-gradient(circle at 90% 15%, rgba(255,193,7,0.12), transparent 25%),
        var(--pitsa-background);
}

.pricing-container {
    max-width: 1280px;
}

.pricing-hero {
    max-width: 720px;
    margin: 0 auto 4rem;
    text-align: center;
}

.pricing-eyebrow {
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.pricing-title {
    margin: 1rem 0;
    color: var(--pitsa-text);
    font-size: clamp(2.4rem, 5vw, 4.25rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.05;
}

.pricing-subtitle {
    color: var(--pitsa-muted);
    font-size: 1.15rem;
    line-height: 1.8;
}

.pricing-grid {
    align-items: stretch;
}

.pricing-card {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--pitsa-border);
    border-radius: var(--radius-lg);
    background: var(--pitsa-surface);
    transition: transform .25s ease, box-shadow .25s ease;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 55px rgba(15,23,42,.14);
}

.pricing-card-featured {
    border: 2px solid var(--pitsa-primary);
}

.pricing-popular-badge {
    padding: .55rem 1rem;
    background: linear-gradient(135deg, #ff7a00, #ffb800);
    color: white;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-align: center;
}

.pricing-card-content {
    padding: 2rem;
}

.pricing-plan-name {
    color: var(--pitsa-text);
    font-weight: 800;
}

.pricing-plan-description,
.pricing-feature-description {
    color: var(--pitsa-muted);
    line-height: 1.6;
}

.pricing-price-block {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    margin-top: 2rem;
}

.pricing-currency {
    color: var(--pitsa-primary);
    font-size: 1.4rem;
    font-weight: 800;
}

.pricing-price {
    color: var(--pitsa-text);
    font-size: 3.1rem;
    font-weight: 800;
    letter-spacing: -2px;
}

.pricing-period,
.pricing-annual-price,
.pricing-usage-note {
    color: var(--pitsa-muted);
}

.pricing-annual-price {
    display: block;
    min-height: 1.25rem;
}

.pricing-cta {
    margin-top: 1.75rem;
}

.pricing-section-label {
    color: var(--pitsa-text);
    font-weight: 800;
}

.pricing-limits-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
    margin-top: 1rem;
}

.pricing-limit-item,
.pricing-feature-item {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
}

.pricing-limit-item {
    color: var(--pitsa-muted);
    font-size: .85rem;
}

.pricing-limit-item strong,
.pricing-feature-name {
    color: var(--pitsa-text);
}

.pricing-limit-item .mud-icon-root {
    font-size: 1.1rem;
}

.pricing-usage-note {
    display: block;
    margin-top: 1rem;
}

.pricing-feature-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.pricing-feature-name {
    font-weight: 600;
}

.pricing-feature-description {
    display: block;
    margin-top: .15rem;
}

.pricing-state {
    max-width: 720px;
    margin: 0 auto;
}

.pricing-skeleton {
    width: 100%;
    border-radius: var(--radius-lg);
}

.pricing-footer-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-top: 3rem;
    color: var(--pitsa-muted);
}

@media (max-width: 600px) {
    .pricing-page {
        padding-top: 3rem;
    }

    .pricing-card-content {
        padding: 1.5rem;
    }

    .pricing-footer-note {
        text-align: center;
    }
}
/* End Dashboard */

/* Footer */
.privacy-policy-page {
    min-height: calc(100vh - 64px);
    background: var(--pitsa-background);
}

.privacy-policy-card {
    max-width: 960px;
    margin: 0 auto;
    background: var(--pitsa-surface);
    color: var(--pitsa-text);
    border: 1px solid var(--pitsa-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.privacy-policy-title {
    color: var(--pitsa-text);
    font-weight: 700;
}

.privacy-policy-introduction,
.privacy-policy-page section {
    line-height: 1.75;
}

.privacy-policy-page section + section {
    margin-top: 2.5rem;
}

.privacy-policy-heading {
    margin-bottom: 1rem;
    color: var(--pitsa-text);
    font-weight: 700;
}

.privacy-policy-page ul,
.privacy-policy-page ol {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.privacy-policy-page li + li {
    margin-top: 0.65rem;
}

.privacy-policy-table {
    background: var(--pitsa-surface);
}

.privacy-policy-table .mud-table-cell,
.privacy-policy-table .mud-table-head {
    color: var(--pitsa-text);
}

.privacy-policy-address {
    color: var(--pitsa-text);
    font-style: normal;
}

.privacy-policy-address a {
    color: var(--pitsa-primary);
}

@media (max-width: 600px) {
    .privacy-policy-card {
        border-radius: var(--radius-md);
    }

    .privacy-policy-heading {
        font-size: 1.5rem;
    }
}

.footer-section {
    background: linear-gradient(to bottom, #0F172A, #0B1220);
    color: rgba(255,255,255,0.85);
    padding-top: 5rem;
    padding-bottom: 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-logo {
    height: 54px;
    margin-bottom: 1.5rem;
}

.footer-description {
    color: rgba(255,255,255,0.65);
    line-height: 1.9;
    max-width: 360px;
}

.footer-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-link {
    display: block;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    margin-bottom: 0.85rem;
    transition: all 0.2s ease;
}

    .footer-link:hover {
        color: #FFB800;
        transform: translateX(2px);
    }

.footer-divider {
    border-color: rgba(255,255,255,0.08) !important;
    margin-top: 4rem;
    margin-bottom: 2rem;
}

.footer-bottom {
    color: rgba(255,255,255,0.5);
    font-size: 0.95rem;
}

.social-button {
    background: rgba(255,255,255,0.08) !important;
    color: white !important;
    transition: all 0.2s ease;
}

    .social-button:hover {
        background: linear-gradient(135deg, #FF7A00, #FFC107) !important;
        transform: translateY(-2px);
    }
/* End Footer */

/* Error */
.error-layout-container {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.error-card {
    max-width: 620px;
    width: 100%;
    border-radius: 32px;
    padding: 3rem;
    background: var(--pitsa-surface);
    border: 1px solid var(--pitsa-border);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.error-code {
    font-size: clamp(5rem, 10vw, 8rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, #FF7A00, #FFC107);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.error-description {
    color: var(--pitsa-muted);
    line-height: 1.8;
    margin-bottom: 2rem;
}
/* End Error */

/* Authentication */
.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-brand-panel {
    background: radial-gradient(circle at top right, rgba(255,193,7,0.2), transparent 30%), linear-gradient(135deg, #FF7A00, #FFB800);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem;
}

.auth-logo {
    width: 220px;
    margin-bottom: 3rem;
}

.auth-brand-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
}

.auth-brand-description {
    font-size: 1.15rem;
    line-height: 1.9;
    max-width: 520px;
    opacity: 0.9;
    margin-bottom: 3rem;
}

.auth-brand-card {
    max-width: 420px;
    padding: 1.25rem;
    border-radius: 20px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    color: white;
}

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--pitsa-background);
}

.auth-form-card {
    width: 100%;
    max-width: 560px;
    padding: 3rem;
    border-radius: 32px;
    background: var(--pitsa-surface);
    border: 1px solid var(--pitsa-border);
    box-shadow: var(--shadow-soft);
}

@media (max-width: 960px) {

    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-form-panel {
        padding: 2rem;
    }

    .auth-form-card {
        padding: 2rem;
    }
}

@media (max-width: 600px) {
    .auth-form-panel {
        padding: 0.75rem;
    }

    .auth-form-card {
        box-sizing: border-box;
        max-width: 100%;
        padding: 1.25rem;
        border-radius: 24px;
    }
}

/* End Authentication */