/*
 * City on a Hill PayTrack - Premium Design System
 */

/* Organic Flow Elements */
.hero-organic-flow {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.hero-flow-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(212, 175, 55, 0.3) 0%,
            rgba(212, 175, 55, 0.1) 70%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    animation: float 3s ease-in-out infinite;
}

.hero-flow-wave {
    width: 8rem;
    height: 2rem;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(212, 175, 55, 0.2) 50%,
            transparent 100%);
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.hero-flow-wave::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(212, 175, 55, 0.4),
            transparent);
    animation: wave-flow 2s linear infinite;
}

.hero-balance-scale {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
}

.hero-scale-arm {
    width: 6rem;
    height: 0.25rem;
    background: linear-gradient(to right,
            rgba(212, 175, 55, 0.3),
            var(--primary),
            rgba(212, 175, 55, 0.3));
    position: relative;
    border-radius: 0.125rem;
}

.hero-scale-weight {
    width: 1.5rem;
    height: 1.5rem;
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    position: absolute;
    top: -0.625rem;
    animation: balance 4s ease-in-out infinite;
}

.hero-scale-weight.left {
    left: -0.75rem;
}

.hero-scale-weight.right {
    right: -0.75rem;
}

.hero-status-indicator {
    width: 0.75rem;
    height: 0.75rem;
    background-color: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: pulse 2s infinite;
}

.hero-flow-circle:hover {
    transform: scale(1.1);
    background: radial-gradient(circle,
            rgba(212, 175, 55, 0.4) 0%,
            rgba(212, 175, 55, 0.2) 70%);
}

.hero-scale-weight:hover {
    background: rgba(212, 175, 55, 0.4);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes wave-flow {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes balance {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(2deg);
    }

    75% {
        transform: rotate(-2deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

:root {
    /* Paper Style: Gray & Gold Palette */
    --primary: #d4af37;
    /* Premium Gold */
    --primary-light: #f1d279;
    /* Champagne Gold */
    --primary-dark: #996515;
    /* Metallic Gold */
    --primary-glow: rgba(212, 175, 55, 0.2);
    --accent-gray: #a1a1aa;
    /* Gray accent for gradients */
    --gold-gray-gradient: linear-gradient(90deg,
            var(--primary),
            var(--accent-gray));

    --bg-body: #f4f4f5;
    /* Zinc 100 */
    --bg-surface: #ffffff;
    /* Pure White Paper */

    --text-main: #18181b;
    /* Zinc 950 */
    --text-muted: #52525b;
    /* Zinc 600 */
    --text-light: #a1a1aa;
    /* Zinc 400 */

    --danger: #991b1b;
    /* Professional Deep Red */
    --success: #166534;
    /* Professional Deep Green */
    --warning: #854d0e;
    /* Bronze Warning */

    /* Flat Paper Refined */
    --glass-bg: rgba(255, 255, 255, 0.98);
    --glass-border: #e2e8f0;
    --glass-shadow:
        10px 10px 30px rgba(0, 0, 0, 0.05),
        -5px -5px 15px rgba(255, 255, 255, 0.8);

    /* Sharp Edges Design */
    --radius-sm: 0px;
    --radius-md: 0px;
    --radius-lg: 0px;

    /* Elevation Transitions */
    --transition-fast: 0.1s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Outfit", sans-serif;
    background-color: var(--bg-body);
    background-color: var(--bg-body);
    /* Removed gradients to maintain neutral gray aesthetic */
    color: var(--text-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

/* Layout Utilities */
.u-hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

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

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.w-full {
    width: 100%;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Header */
/* Header (Paper Style) */
header {
    background: var(--bg-surface);
    border-bottom: 4px solid transparent;
    border-image: var(--gold-gray-gradient) 1;
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.logo-area {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==================== LOGIN / HERO STYLES ==================== */
.login-split-container {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    width: 100%;
    background: white;
}

@media (min-width: 1024px) {
    .login-split-container {
        display: grid;
        grid-template-columns: 1.6fr 1fr;
        /* Wider left pane */
    }
}

/* Premium Gold & Gray Aesthetic */
.hero-visual-side {
    background: linear-gradient(135deg, #3f3f46 0%, #27272a 50%, #18181b 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6rem;
    color: white;
    border-right: 3px solid var(--primary);
}

/* Gold Accent Gradient Overlay */
.hero-visual-side::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    background: radial-gradient(ellipse at top right,
            rgba(212, 175, 55, 0.28) 0%,
            transparent 70%);
    z-index: 1;
    pointer-events: none;
}

/* Geometric Pattern Overlay */
.hero-visual-side::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(212, 175, 55, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212, 175, 55, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.55;
    z-index: 2;
    pointer-events: none;
}

/* Subtle vignette / depth layer for the new cards + headline */
.hero-visual-side .hero-content {
    position: relative;
    z-index: 10;
}

/* Gold Accent Bar */
.gold-accent-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg,
            var(--primary) 0%,
            var(--primary-dark) 100%);
    z-index: 5;
}

/* Headline updated to work better with the new structured layout */
.hero-headline {
    font-size: clamp(3.1rem, 4.3vw, 5.2rem);
    font-weight: 950;
    line-height: 0.9;
    letter-spacing: -0.05em;
    margin: 0 0 2rem 0;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary) 85%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

/* Quote tightened and softened to match the new feature cards */
.hero-quote {
    font-family: "Outfit", sans-serif;
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.5;
    max-width: 720px;
    margin: 0 0 0 0;
    color: #e4e4e7;
    /* Zinc 200 */
    position: relative;
    padding-left: 1.5rem;
}

.hero-quote::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.2rem;
    bottom: 0.2rem;
    width: 3px;
    background: var(--primary);
    opacity: 0.95;
}

/* Feature tiles in the new left pane (matches the gold/gray theme) */
.hero-visual-side .bg-white\/5 {
    background: rgba(255, 255, 255, 0.06);
}

.hero-visual-side .border-white\/10 {
    border-color: rgba(255, 255, 255, 0.12);
}

/* Add a bit more premium feel: hover lift + sharper grid alignment */
.hero-visual-side .bg-white\/5.border-white\/10 {
    border-radius: 0;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.15),
        0 10px 25px rgba(0, 0, 0, 0.25);
    transition:
        transform var(--transition-smooth),
        box-shadow var(--transition-smooth),
        background-color var(--transition-smooth);
}

.hero-visual-side .bg-white\/5.border-white\/10:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.075);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.15),
        0 16px 34px rgba(0, 0, 0, 0.32);
}

/* Improve layout spacing on smaller desktop sizes */
@media (min-width: 1024px) and (max-width: 1280px) {
    .hero-visual-side {
        padding: 4.5rem;
    }
}

/* Payment Journey Visualization for Login Page */
.payment-journey {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.journey-path {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            rgba(212, 175, 55, 0.2),
            rgba(212, 175, 55, 0.6),
            rgba(212, 175, 55, 0.2));
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 2px;
}

.journey-node {
    position: absolute;
    left: calc(var(--node-position, 0%) - 30px);
    top: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #1f1f1f;
    border: 2px solid var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.journey-node.active {
    background: linear-gradient(135deg, var(--primary), #ffd700);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

.journey-node:not(.active) {
    background: #1f1f1f;
}

.journey-node:not(.active) .node-icon {
    color: var(--primary);
}

.journey-node.active .node-icon {
    color: #1f1f1f;
}

.journey-node:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.7);
}

.node-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 20px;
    margin-bottom: 0.15rem;
    color: var(--primary);
}

.node-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: white;
    text-align: center;
    line-height: 0.3;
    white-space: nowrap;
    margin-top: -1.3rem;
}

.node-description {
    font-size: 0.6rem;
    color: #a1a1aa;
    text-align: center;
    margin-top: 0.2rem;
    display: none;
    /* Hidden by default, can be shown with responsive design */
}

.journey-indicator {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    animation: journeyProgress 6s infinite alternate ease-in-out;
}

@keyframes journeyProgress {
    0% {
        left: 0%;
    }

    100% {
        left: 88%;
    }
}

/* Animation for when the journey indicator touches a node */
.journey-node.triggered {
    animation: touchGlow 0.5s ease-in-out;
}

@keyframes touchGlow {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 0 25px rgba(212, 175, 55, 0.7);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    }
}

/* Verification Chain */
.verification-chain {
    display: flex;
    justify-content: space-around;
    width: 100%;
    gap: 0.5rem;
}

.verification-block {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 0.8rem;
    text-align: center;
    transition: all 0.3s ease;
}

.verification-block:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-3px);
}

.block-header {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.block-content {
    font-size: 0.65rem;
    color: #a1a1aa;
}

/* Form Side */
.login-form-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    background: #ffffff;
    position: relative;
    z-index: 20;
    min-height: 100vh;
}

.login-form-container {
    width: 100%;
    max-width: 440px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Glass Card (Alias to Card Base for backward compatibility) */
.glass-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.03),
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 10px 20px -5px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    transition:
        transform var(--transition-smooth),
        box-shadow var(--transition-smooth);
}

.glass-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    opacity: 0.8;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 0 1px rgba(99, 102, 241, 0.1),
        0 10px 30px -5px rgba(0, 0, 0, 0.06);
}

/* Card Base (Paper Style) */
.card-base {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    padding: 2rem;
    border: 1px solid #e2e8f0;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    transition:
        transform var(--transition-smooth),
        box-shadow var(--transition-smooth);
}

.card-base::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold-gray-gradient);
}

.card-base:hover {
    transform: translateY(-5px);
    box-shadow:
        25px 25px 75px rgba(0, 0, 0, 0.07),
        -10px -10px 30px rgba(255, 255, 255, 0.9);
}

/* Stat Card */
.stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    /* Pill shape */
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all var(--transition-smooth);
    cursor: pointer;
    border: 1px solid transparent;
    outline: none;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn i {
    font-size: 1rem;
    margin-right: -2px;
}

.btn:active {
    transform: scale(0.96);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

.btn-flat {
    background: white;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.btn-flat:hover {
    background: #fafafa;
    border-color: #cbd5e1;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    background: transparent;
    /* Removed border to be cleaner */
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: transparent;
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    border-bottom: 2px solid #e4e4e7;
}

td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #fafafa;
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
    transition: background-color 0.1s;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #fafafa;
}

/* Badges */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.badge-paid {
    background: #dcfce7;
    color: #16a34a;
}

.badge-unpaid {
    background: #fee2e2;
    color: #dc2626;
}

.badge-pending {
    background: #fef3c7;
    color: #d97706;
}

.badge-voided {
    background: #f4f4f5;
    color: #94a3b8;
    text-decoration: line-through;
}

/* Custom Checkbox / Toggle */
.custom-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    line-height: 1;
}

.custom-checkbox input {
    display: none;
}

.checkbox-box {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
    background: #fff;
    position: relative;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.custom-checkbox input:checked+.checkbox-box {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-box::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    left: 6px;
    top: 2px;
    transform: rotate(45deg) scale(0);
    transition: transform var(--transition-fast);
}

.custom-checkbox input:checked+.checkbox-box::after {
    transform: rotate(45deg) scale(1);
}

/* Inputs */
.input-group {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.input-field {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fafafa;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all var(--transition-smooth);
}

.input-field:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    transform: translateY(-1px);
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s var(--transition-smooth);
}

#tenant-details-modal {
    z-index: 1100;
}

#receipt-preview-modal {
    z-index: 1200;
}

#status-modal {
    z-index: 1300;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 95%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: translateY(20px) scale(0.98);
    transition: all 0.4s var(--transition-smooth);
}

.modal-content::before,
.card-base::before,
.hub-tab-content::before,
.stat-card::before,
.glass-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold-gray-gradient);
    z-index: 10;
}

.modal-overlay.open .modal-content {
    transform: translateY(0) scale(1);
}

/* Section Header (Elegant Redesign) */
.section-header {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eef2f6;
}

@media (min-width: 768px) {
    .section-header {
        flex-direction: row;
        align-items: center;
    }
}

.section-title {
    position: relative;
    padding-left: 1.25rem;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 15%;
    bottom: 15%;
    width: 4px;
    background: linear-gradient(to bottom,
            var(--primary),
            var(--primary-light));
    border-radius: 2px;
}

.section-title h2 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #1e293b;
    margin-bottom: 0.25rem;
    line-height: 1.1;
}

.section-title p {
    color: #64748b;
    font-size: 1rem;
    font-weight: 500;
}

/* Login View */
.login-container {
    max-width: 100%;
    width: 440px;
    margin: auto;
    padding: 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Management Hub Tab Buttons */
.hub-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border-radius: 0px;
    transition: all var(--transition-smooth);
    position: relative;
}

.hub-tab-btn:hover {
    background: #fafafa;
    color: var(--primary);
}

.hub-tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.hub-tab-content {
    position: relative;
    padding-top: 10px;
}

.hub-tab-content.hidden {
    display: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d4d4d8;
    /* Zinc 300 */
    border-radius: 0px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa;
    /* Zinc 400 */
}

/* Animations */
.text-danger {
    color: var(--danger);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-primary {
    color: var(--primary);
    text-decoration: none !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animate-in {
    animation: fadeInUp 0.6s var(--transition-smooth) forwards;
}

/* Expandable Rows (Tenant View) */
.bill-row-header {
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.bill-row-header:hover {
    background: #fafafa;
}

.bill-details-container {
    display: none;
    background: #fafafa;
}

.bill-details-container.open {
    display: table-row;
}

.bill-details-content {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f4f4f5;
}

.expand-icon {
    transition: transform 0.3s var(--transition-smooth);
}

.expand-icon.rotated {
    transform: rotate(180deg);
}

/* Month Navigator Premium Styles */
.month-navigator {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    padding: 0.4rem;
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.nav-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.nav-btn:active:not(:disabled) {
    transform: translateY(0);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(1);
}

.month-display {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
    min-width: 130px;
    text-align: center;
    user-select: none;
}

/* Interactive Stat Cards */
.stat-card-clickable {
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stat-card-clickable:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.1);
}

.stat-card-active {
    border-color: var(--primary);
    background: linear-gradient(to bottom right, white, #f4f4f5);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    animation: fadeIn 0.3s ease;
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.status-badge-unpaid {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.05);
}

.status-badge-partial {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-badge-paid {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Debtor Row */
.debtor-row {
    transition: all var(--transition-fast);
    cursor: pointer;
}

.debtor-row:hover {
    background: white !important;
    transform: translateX(4px);
}

/* Premium Header Utilities */
.header-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-light);
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    flex-shrink: 0;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.search-input-pill {
    background: #f4f4f5;
    border: 1px solid transparent;
    padding: 0.6rem 1rem 0.6rem 2.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    width: 200px;
    transition: all var(--transition-smooth);
    font-family: inherit;
    color: var(--text-main);
}

.search-input-pill:focus {
    width: 260px;
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
    outline: none;
}

.search-icon-fixed {
    position: absolute;
    left: 1rem;
    color: var(--text-light);
    pointer-events: none;
    transition: color 0.3s ease;
}

.search-input-pill:focus+.search-icon-fixed {
    color: var(--primary);
}

/* ==================== RECEIPT TEMPLATE STYLING ==================== */
.receipt-paper {
    width: 794px;
    /* A4 Width at 96 DPI */
    min-height: 560px;
    /* Half of A4 approx */
    padding: 3rem;
    background: white;
    color: #1e293b;
    font-family: "Outfit", "Inter", sans-serif;
    line-height: 1.4;
    margin: 0;
    /* Reset for PDF capture stability */
}

.receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.receipt-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    height: 36px;
    width: 36px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #18181b;
    letter-spacing: -0.03em;
}

.receipt-business-info {
    text-align: right;
}

.business-name {
    font-size: 1rem;
    margin: 0;
    color: #1e293b;
}

.business-sub {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

.business-contact {
    font-size: 0.7rem;
    color: #94a3b8;
    margin: 0;
}

.receipt-divider {
    height: 1px;
    background: #f4f4f5;
    margin: 0.75rem 0;
}

.receipt-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.receipt-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #18181b;
    margin: 0;
    letter-spacing: -0.02em;
}

.receipt-or-box {
    background: #fafafa;
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    text-align: right;
}

.or-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.or-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}

.receipt-body {
    margin-bottom: 1.5rem;
}

.receipt-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed #f4f4f5;
}

.row-label {
    min-width: 140px;
    color: #64748b;
    font-size: 0.9rem;
}

.row-value {
    color: #18181b;
    font-size: 1rem;
}

.receipt-table-container {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
}

.receipt-table th {
    text-align: left;
    padding: 0.6rem 0.8rem;
    background: #fafafa;
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.receipt-table td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #f4f4f5;
    font-size: 0.9rem;
    color: #1e293b;
}

.total-label {
    font-weight: 700;
    color: #18181b;
    background: #fafafa;
}

.total-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
    text-align: right;
    background: #fafafa;
}

.receipt-remarks {
    background: #fffbeb;
    padding: 0.75rem;
    border-radius: 10px;
    border: 1px solid #fef3c7;
}

.remarks-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #92400e;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.remarks-text {
    font-size: 0.75rem;
    color: #b45309;
    margin: 0;
}

.receipt-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.signature-box {
    text-align: center;
    width: 250px;
}

.signature-line {
    border-top: 2px solid #18181b;
    margin-bottom: 0.2rem;
}

.signature-label {
    font-size: 0.75rem;
    color: #64748b;
}

.signature-name {
    margin: 0;
    font-weight: 700;
    font-size: 0.9rem;
    color: #18181b;
}

.receipt-tagline {
    text-align: right;
    font-size: 0.75rem;
    color: #94a3b8;
}

.receipt-tagline p {
    margin: 0;
}

.clickable-or {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    text-decoration-color: var(--primary-light);
    cursor: pointer;
    font-weight: 700;
    transition: all var(--transition-fast);
}

.clickable-or:hover {
    color: var(--primary-dark);
    text-decoration-thickness: 2px;
}

#receipt-preview-body .receipt-paper {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    transform: scale(0.9);
    transform-origin: top center;
}

/* Modal sizing tweaks */
.modal-content.\!max-w-4xl {
    max-width: 860px !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==================== PREMIUM MODAL STYLES ==================== */
.modal-header-box {
    border-bottom: 1px solid #f4f4f5;
    padding-bottom: 1.5rem;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.modal-icon-container {
    width: 48px;
    height: 48px;
    background: #eef2ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-icon-container i {
    width: 24px;
    height: 24px;
}

.premium-header {
    background: var(--primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* ==================== FLATPICKR THEME ==================== */
.flatpickr-calendar {
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid #e2e8f0 !important;
    font-family: "Outfit", sans-serif !important;
    padding: 10px !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.selected.prevMonthDay,
.flatpickr-day.startRange.prevMonthDay,
.flatpickr-day.endRange.prevMonthDay,
.flatpickr-day.selected.nextMonthDay,
.flatpickr-day.startRange.nextMonthDay,
.flatpickr-day.endRange.nextMonthDay {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
}

.flatpickr-day.today {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}

.flatpickr-months .flatpickr-month {
    background: transparent !important;
    color: var(--text-main) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    font-weight: 700 !important;
}

.flatpickr-weekdays {
    background: transparent !important;
    margin-bottom: 5px !important;
}

.flatpickr-weekday {
    color: var(--text-muted) !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
}

.flatpickr-calendar.arrowTop:after,
.flatpickr-calendar.arrowTop:before {
    border-bottom-color: #fff !important;
}

/* Inactive Tenant Row Styling */
.inactive-tenant-row {
    opacity: 0.5 !important;
    filter: grayscale(1) !important;
}

.inactive-tenant-row td,
.inactive-tenant-row span,
.inactive-tenant-row div,
.inactive-tenant-row a {
    color: #94a3b8 !important;
    /* Muted slate grey */
    text-decoration-color: #94a3b8 !important;
}

.inactive-tenant-row .text-danger,
.inactive-tenant-row .text-primary,
.inactive-tenant-row .text-success {
    color: #94a3b8 !important;
}

/* ==================== PREMIUM MODAL SYSTEM ==================== */
.modal-overlay {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
}

.modal-premium {
    background: white;
    border-radius: 28px;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.2),
        0 0 1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.6);
    overflow: hidden;
    position: relative;
    width: 100%;
}

.premium-modal-header {
    padding: 2rem 2.5rem;
    background: linear-gradient(to bottom right, #ffffff, #f4f4f5);
    border-bottom: 1px solid #e4e4e7;
}

.premium-modal-body {
    padding: 2.5rem;
}

.premium-modal-footer {
    padding: 1.5rem 2.5rem;
    background: #fafafa;
    border-top: 1px solid #e4e4e7;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ==================== REGISTRY HEADER (TABLE TITLES) ==================== */
.registry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-left: 0.5rem;
}

.registry-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.registry-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-body);
    color: var(--primary);
    border: 1px solid #eef2f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.registry-text {
    display: flex;
    flex-direction: column;
}

.registry-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #1e293b;
    line-height: 1.2;
}

.registry-subtitle {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

/* Global Paper Style Overrides (Force Sharp Edges) */
[class*="rounded-"],
.rounded-full,
.rounded-xl,
.rounded-2xl,
.rounded-3xl,
.btn,
.card-base,
.modal-content,
.input-field,
.notification-badge-header,
.notification-item,
.modal-overlay .modal-content {
    border-radius: 0px !important;
}

/* Enhanced Paper Shadows */
.card-base,
.modal-content {
    box-shadow:
        10px 10px 30px rgba(0, 0, 0, 0.05),
        -5px -5px 15px rgba(255, 255, 255, 0.8) !important;
}

.card-base:hover {
    transform: translateY(-5px);
    box-shadow:
        25px 25px 75px rgba(0, 0, 0, 0.08),
        -10px -10px 30px rgba(255, 255, 255, 0.9) !important;
}

/* Primary Color Overrides (Gradients to Paper) */
.btn-primary {
    background: var(--primary) !important;
    color: #ffffff !important;
    border: 1px solid var(--primary-dark) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    background: var(--primary-light) !important;
    color: var(--text-main) !important;
    transform: translateY(-2px);
}