/* ========================================
   PropManage – Bold & Colorful Design
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --pm-primary:       #6C63FF;
    --pm-primary-dark:  #5046e4;
    --pm-secondary:     #FF6584;
    --pm-success:       #22c55e;
    --pm-warning:       #f59e0b;
    --pm-danger:        #ef4444;
    --pm-info:          #06b6d4;
    --pm-sidebar-bg:    #1e1b4b;
    --pm-sidebar-hover: rgba(108,99,255,0.25);
    --pm-sidebar-active:rgba(108,99,255,0.45);
    --pm-card-radius:   16px;
    --pm-shadow:        0 4px 20px rgba(0,0,0,0.08);
    --pm-shadow-hover:  0 8px 32px rgba(108,99,255,0.18);
    /* light-mode surface tokens */
    --pm-bg:            #f4f6fb;
    --pm-surface:       #ffffff;
    --pm-surface-2:     #f8fafc;
    --pm-border:        #e8ecf4;
    --pm-border-soft:   #f1f5f9;
    --pm-text:          #1e293b;
    --pm-text-muted:    #64748b;
    --pm-text-heading:  #0f172a;
}

/* ---- Dark mode ---- */
html.dark {
    --pm-bg:            #0f1117;
    --pm-surface:       #1a1d27;
    --pm-surface-2:     #22263a;
    --pm-border:        #2d3148;
    --pm-border-soft:   #252840;
    --pm-text:          #e2e8f0;
    --pm-text-muted:    #94a3b8;
    --pm-text-heading:  #f1f5f9;
    --pm-sidebar-bg:    #111320;
    --pm-shadow:        0 4px 20px rgba(0,0,0,0.4);
    --pm-shadow-hover:  0 8px 32px rgba(108,99,255,0.28);
}

html.dark body                   { background: var(--pm-bg); color: var(--pm-text); }
html.dark main                   { background: var(--pm-bg) !important; }
html.dark .stat-card             { background: var(--pm-surface); color: var(--pm-text); }
html.dark .pm-table thead th     { background: var(--pm-surface-2); color: var(--pm-text-muted); border-bottom-color: var(--pm-border); }
html.dark .pm-table tbody td     { border-bottom-color: var(--pm-border-soft); color: var(--pm-text); }
html.dark .pm-table tbody tr:hover td { background: var(--pm-surface-2); }
html.dark .pm-modal              { background: var(--pm-surface); color: var(--pm-text); }
html.dark .pm-modal-header,
html.dark .pm-modal-footer       { border-color: var(--pm-border); }
html.dark .pm-modal-title        { color: var(--pm-text-heading); }
html.dark .pm-modal-close        { background: var(--pm-surface-2); color: var(--pm-text-muted); }
html.dark .pm-modal-close:hover  { background: var(--pm-border); color: var(--pm-text); }
html.dark .pm-input,
html.dark .pm-select,
html.dark .pm-textarea           { background: var(--pm-surface-2); border-color: var(--pm-border); color: var(--pm-text); }
html.dark .pm-input:focus,
html.dark .pm-select:focus,
html.dark .pm-textarea:focus     { background: var(--pm-surface); border-color: var(--pm-primary); }
html.dark .pm-label              { color: var(--pm-text-muted); }
html.dark .pm-page-header h2     { color: var(--pm-text-heading); }
html.dark .pm-page-header p      { color: var(--pm-text-muted); }
html.dark .pm-empty              { background: var(--pm-surface); }
html.dark .fw-bold,
html.dark .fw-semibold           { color: var(--pm-text-heading) !important; }
html.dark .text-muted            { color: var(--pm-text-muted) !important; }
html.dark .badge-status-paid     { background: rgba(34,197,94,0.15);  color: #4ade80; }
html.dark .badge-status-pending  { background: rgba(245,158,11,0.15); color: #fbbf24; }
html.dark .badge-status-overdue  { background: rgba(239,68,68,0.15);  color: #f87171; }
html.dark .badge-status-open     { background: rgba(6,182,212,0.15);  color: #67e8f9; }
html.dark .badge-status-inprogress { background: rgba(167,139,250,0.15); color: #c4b5fd; }
html.dark .badge-status-resolved { background: rgba(34,197,94,0.15);  color: #4ade80; }
html.dark .badge-status-closed   { background: rgba(148,163,184,0.15);color: #94a3b8; }
html.dark .pm-photo-upload-btn   { background: var(--pm-surface-2); border-color: var(--pm-border); color: var(--pm-text-muted); }
html.dark .pm-photo-thumb        { border-color: var(--pm-border); }
html.dark .auth-form-card        { background: var(--pm-surface); }
html.dark .auth-input            { background: var(--pm-surface-2); border-color: var(--pm-border); color: var(--pm-text); }
html.dark .btn-outline-secondary { border-color: var(--pm-border); color: var(--pm-text-muted); }
html.dark .btn-outline-secondary:hover { background: var(--pm-surface-2); }
html.dark hr                     { border-color: var(--pm-border); }

/* ---- Dark mode toggle button ---- */
.pm-darkmode-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.75);
    border-radius: 8px;
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.pm-darkmode-btn:hover { background: rgba(255,255,255,0.2); color: #fff; }

html, body {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    background: #f4f6fb;
    color: #1e293b;
}

/* ---- Top Navigation Bar ---- */
.pm-topnav {
    background: var(--pm-sidebar-bg);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0 0.75rem;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 16px rgba(0,0,0,0.18);
}

.pm-topnav-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none !important;
    flex-shrink: 0;
    margin-right: 0.25rem;
}

.pm-topnav-brand .brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #fff;
    flex-shrink: 0;
}

.pm-topnav-brand .brand-text {
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: -0.02em;
}

@media (max-width: 1279px) {
    .pm-topnav-brand .brand-text { display: none; }
}

.pm-topnav-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}

.pm-topnav-links::-webkit-scrollbar { display: none; }

.pm-topnav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    font-size: 0.775rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7) !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    position: relative;
}

.pm-topnav-link .pm-nav-label {
    display: inline;
}

@media (max-width: 1399px) {
    .pm-topnav-link .pm-nav-label { display: none; }
    .pm-topnav-link { padding: 0.4rem 0.5rem; }
    .pm-topnav-link[title]:hover::after {
        content: attr(title);
        position: absolute;
        top: calc(100% + 6px);
        left: 50%;
        transform: translateX(-50%);
        background: rgba(15,23,42,0.92);
        color: #fff;
        font-size: 0.7rem;
        font-weight: 500;
        padding: 0.25rem 0.55rem;
        border-radius: 6px;
        white-space: nowrap;
        pointer-events: none;
        z-index: 999;
    }
}

.pm-topnav-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff !important;
}

.pm-topnav-link.active {
    background: rgba(108,99,255,0.5);
    color: #fff !important;
    font-weight: 600;
}

.pm-topnav-right {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
    flex-shrink: 0;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 0.25rem 0.6rem 0.25rem 0.25rem;
    cursor: pointer;
    transition: background 0.15s;
}

.user-pill:hover { background: rgba(255,255,255,0.18); }

.user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pm-logout-btn {
    background: rgba(239,68,68,0.15);
    border: 1.5px solid rgba(239,68,68,0.4);
    color: #fca5a5;
    border-radius: 8px;
    padding: 0.3rem 0.55rem;
    font-size: 0.775rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pm-logout-btn:hover {
    background: rgba(239,68,68,0.35);
    color: #fff;
}

.pm-topnav-auth-btn {
    border-radius: 8px;
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: opacity 0.15s;
}

.pm-topnav-auth-login {
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-primary-dark));
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(108,99,255,0.35);
}

.pm-topnav-auth-reg {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85) !important;
    border: 1.5px solid rgba(255,255,255,0.2);
}

.pm-topnav-toggler {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    font-size: 1rem;
    margin-left: auto;
    cursor: pointer;
}

@media (max-width: 991px) {
    .pm-topnav { flex-wrap: wrap; height: auto; padding: 0.6rem 1rem; }
    .pm-topnav-links {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        padding: 0.5rem 0;
        order: 99;
        gap: 0.1rem;
    }
    .pm-topnav-links.open { display: flex; }
    .pm-topnav-right { margin-left: auto; }
}

/* ---- Stat Cards ---- */
.stat-card {
    background: #fff;
    border: none;
    border-radius: var(--pm-card-radius);
    box-shadow: var(--pm-shadow);
    transition: transform 0.18s, box-shadow 0.18s;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--pm-shadow-hover);
}

.stat-card-gradient {
    border-radius: var(--pm-card-radius);
    color: #fff;
    padding: 1.5rem;
}

.gradient-purple  { background: linear-gradient(135deg, #6C63FF 0%, #9b5fe0 100%); }
.gradient-pink    { background: linear-gradient(135deg, #FF6584 0%, #ff8e53 100%); }
.gradient-teal    { background: linear-gradient(135deg, #06b6d4 0%, #22c55e 100%); }
.gradient-orange  { background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%); }
.gradient-blue    { background: linear-gradient(135deg, #3b82f6 0%, #6C63FF 100%); }
.gradient-green   { background: linear-gradient(135deg, #22c55e 0%, #06b6d4 100%); }

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.85;
    margin-top: 0.25rem;
}

.stat-icon-bg {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* ---- Page header ---- */
.pm-page-header {
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.pm-page-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin-bottom: 0.2rem;
}

.pm-page-header p {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0;
}

/* ---- Tables ---- */
.pm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.pm-table thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.85rem 1rem;
    border-bottom: 2px solid #e8ecf4;
}

.pm-table thead th:first-child { border-radius: 10px 0 0 0; }
.pm-table thead th:last-child  { border-radius: 0 10px 0 0; }

.pm-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    vertical-align: middle;
}

.pm-table tbody tr:hover td {
    background: #f8fafc;
}

/* ---- Badges ---- */
.pm-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.badge-status-paid       { background: #dcfce7; color: #15803d; }
.badge-status-pending    { background: #fef9c3; color: #854d0e; }
.badge-status-overdue    { background: #fee2e2; color: #b91c1c; }
.badge-status-waived     { background: #f1f5f9; color: #475569; }
.badge-status-open       { background: #cffafe; color: #0e7490; }
.badge-status-inprogress { background: #ede9fe; color: #5b21b6; }
.badge-status-resolved   { background: #dcfce7; color: #15803d; }
.badge-status-closed     { background: #f1f5f9; color: #475569; }

/* ---- Buttons ---- */
.btn-pm-primary {
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-primary-dark));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.55rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: opacity 0.15s, transform 0.15s;
    box-shadow: 0 4px 12px rgba(108,99,255,0.3);
}

.btn-pm-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff;
}

/* ---- Form Controls ---- */
.form-control, .form-select {
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    padding: 0.6rem 0.9rem;
    font-size: 0.875rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--pm-primary);
    box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
}

/* ---- Misc ---- */
a, .btn-link { color: var(--pm-primary); }

.btn-primary {
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-primary-dark));
    border: none;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(108,99,255,0.25);
}

.btn-primary:hover { opacity: 0.9; }

.btn-success  { border-radius: 10px; font-weight: 600; }
.btn-danger   { border-radius: 10px; font-weight: 600; }
.btn-warning  { border-radius: 10px; font-weight: 600; }
.btn-outline-primary { border-radius: 10px; font-weight: 600; border-color: var(--pm-primary); color: var(--pm-primary); }
.btn-outline-primary:hover { background: var(--pm-primary); color: #fff; }

.darker-border-checkbox.form-check-input { border-color: #929292; }

.valid.modified:not([type=checkbox]) { outline: 1.5px solid var(--pm-success); }
.invalid  { outline: 1.5px solid var(--pm-danger); }
.validation-message { color: var(--pm-danger); font-size: 0.8rem; }

.blazor-error-boundary {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: #b91c1c;
}

.blazor-error-boundary::after { content: "An unhandled error has occurred." }

/* ========================================
   Auth Pages (Login / Register)
   ======================================== */

.auth-page {
    display: flex;
    min-height: 100vh;
}

/* Left gradient panel */
.auth-panel-left {
    flex: 1;
    background: linear-gradient(145deg, #1e1b4b 0%, #312e81 55%, #4c1d95 100%);
    display: flex;
    flex-direction: column;
    padding: 2.5rem 3rem;
    position: relative;
    overflow: hidden;
}

.auth-panel-left::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: rgba(108,99,255,0.18);
}

.auth-panel-left::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: rgba(255,101,132,0.12);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: auto;
}

.auth-brand-icon {
    width: 38px; height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-secondary));
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; color: #fff;
}

.auth-brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.auth-panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.auth-panel-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}

.auth-panel-sub {
    color: rgba(255,255,255,0.65);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 360px;
}

.auth-feature-list { display: flex; flex-direction: column; gap: 0.65rem; }

.auth-feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-feature .fa-check-circle { color: #4ade80; font-size: 1rem; }

/* Right form panel */
.auth-panel-right {
    width: 480px;
    flex-shrink: 0;
    background: #f4f6fb;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

.auth-form-card {
    background: #fff;
    border-radius: 20px;
    padding: 2.25rem 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}

.auth-form-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-primary-dark));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: #fff;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 20px rgba(108,99,255,0.3);
}

.auth-form-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.2rem;
    letter-spacing: -0.02em;
}

.auth-form-sub {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0;
}

/* Fields */
.auth-field { margin-bottom: 1rem; }

.auth-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-input {
    display: block;
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    font-size: 0.9rem;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    outline: none;
}

.auth-input:focus {
    border-color: var(--pm-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
}

.auth-validation {
    display: block;
    font-size: 0.75rem;
    color: var(--pm-danger);
    margin-top: 0.3rem;
}

/* Remember me */
.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 1.25rem;
    margin-top: 0.25rem;
}

.auth-checkbox { cursor: pointer; accent-color: var(--pm-primary); }

/* Submit */
.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pm-primary), var(--pm-primary-dark));
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(108,99,255,0.35);
    transition: opacity 0.15s, transform 0.15s;
    margin-top: 0.25rem;
}

.auth-submit-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* Alt button (passkey) */
.auth-alt-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.65rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: border-color 0.15s, background 0.15s;
}

.auth-alt-btn:hover { border-color: var(--pm-primary); background: #fff; color: var(--pm-primary); }

/* Error */
.auth-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    font-size: 0.82rem;
    color: #b91c1c;
    margin-bottom: 1rem;
}

/* Switch link */
.auth-switch {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 1.25rem;
    margin-bottom: 0;
}

.auth-link { color: var(--pm-primary); text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

/* Responsive */
@media (max-width: 768px) {
    .auth-panel-left { display: none; }
    .auth-panel-right { width: 100%; background: linear-gradient(145deg,#1e1b4b,#312e81); padding: 2rem 1rem; }
    .auth-form-card { box-shadow: none; }
}

/* ========================================
   Empty States
   ======================================== */
.pm-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: #fff;
    border-radius: var(--pm-card-radius);
    box-shadow: var(--pm-shadow);
}
.pm-empty-icon {
    width: 72px; height: 72px;
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.25rem;
}
.pm-empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.35rem;
}
.pm-empty-sub {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    max-width: 280px;
    line-height: 1.5;
}

/* ========================================
   Page Spinner
   ======================================== */
.pm-spinner-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    gap: 1rem;
}
.pm-spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(108,99,255,0.15);
    border-top-color: var(--pm-primary);
    border-radius: 50%;
    animation: pm-spin 0.7s linear infinite;
}
.pm-spinner-sm {
    width: 18px; height: 18px;
    border-width: 2px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes pm-spin { to { transform: rotate(360deg); } }
.pm-spinner-text {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ========================================
   Form Controls (pm-*)
   ======================================== */
.pm-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pm-input,
.pm-select,
.pm-textarea {
    display: block;
    width: 100%;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    font-size: 0.875rem;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    outline: none;
    font-family: inherit;
}
.pm-input:focus,
.pm-select:focus,
.pm-textarea:focus {
    border-color: var(--pm-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(108,99,255,0.1);
}
.pm-textarea { resize: vertical; min-height: 80px; }
.pm-select { appearance: auto; cursor: pointer; }

.pm-form-group { margin-bottom: 1rem; }

/* ========================================
   Page Fade-in Animation
   ======================================== */
.pm-page-fade {
    animation: pmFadeUp 0.3s ease both;
}
@keyframes pmFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.pm-card-delay-1 { animation-delay: 0.05s; }
.pm-card-delay-2 { animation-delay: 0.10s; }
.pm-card-delay-3 { animation-delay: 0.15s; }
.pm-card-delay-4 { animation-delay: 0.20s; }

/* ========================================
   Styled Modal
   ======================================== */
.pm-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(3px);
    z-index: 1050;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.pm-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 2rem);
    box-shadow: 0 24px 60px rgba(0,0,0,0.18);
    animation: pmFadeUp 0.2s ease both;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.pm-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
}
.pm-modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}
.pm-modal-close {
    background: #f1f5f9;
    border: none;
    width: 30px; height: 30px;
    border-radius: 8px;
    cursor: pointer;
    color: #64748b;
    font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
}
.pm-modal-close:hover { background: #e2e8f0; color: #0f172a; }
.pm-modal-body    { padding: 1.25rem 1.5rem; overflow-y: auto; }
.pm-modal-footer  { padding: 1rem 1.5rem; border-top: 1px solid #f1f5f9; display: flex; gap: 0.5rem; justify-content: flex-end; flex-shrink: 0; }

/* ========================================
   Filter Bar
   ======================================== */
.pm-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.pm-filter-bar .pm-select { width: auto; min-width: 160px; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }

/* ---- Photo Upload ---- */
.pm-photo-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-top: 0.25rem;
}
.pm-photo-upload-btn:hover {
    border-color: var(--pm-primary);
    background: rgba(108,99,255,0.05);
    color: var(--pm-primary);
}

.pm-photo-preview {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}
.pm-photo-thumb {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}
.pm-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.pm-photo-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    background: rgba(239,68,68,0.85);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}
.pm-photo-remove:hover { background: #ef4444; }

/* Thumbnail row in table */
.pm-thumb-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.pm-thumb-sm {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: transform 0.15s;
}
.pm-thumb-sm:hover { transform: scale(1.08); }

/* ---- Priority Badges ---- */
.badge-priority-urgent { background: rgba(239,68,68,0.12);  color: #ef4444; font-weight: 700; }
.badge-priority-high   { background: rgba(245,158,11,0.12); color: #d97706; font-weight: 700; }
.badge-priority-medium { background: rgba(6,182,212,0.12);  color: #0891b2; font-weight: 600; }
.badge-priority-low    { background: rgba(148,163,184,0.12);color: #64748b; font-weight: 600; }

/* ---- Utility ---- */
.text-pm-primary { color: var(--pm-primary) !important; }
.bg-pm-primary   { background: var(--pm-primary) !important; }
.rounded-pm      { border-radius: var(--pm-card-radius) !important; }

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: #94a3b8;
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ================================================================
   FOOTER
   ================================================================ */
.pm-footer {
    background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 60%, #1a1040 100%);
    color: rgba(255,255,255,0.75);
    border-top: 1px solid rgba(108,99,255,0.25);
    position: relative;
    overflow: hidden;
}

.pm-footer::before {
    content: '';
    position: absolute;
    top: -120px;
    left: -80px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(108,99,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.pm-footer::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -60px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,101,132,0.08) 0%, transparent 70%);
    pointer-events: none;
}

.pm-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 992px) {
    .pm-footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .pm-footer-inner {
        grid-template-columns: 1fr;
        padding: 2rem 1.25rem 1.5rem;
    }
}

/* Brand column */
.pm-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pm-footer-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6C63FF, #FF6584);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    box-shadow: 0 8px 20px rgba(108,99,255,0.35);
    flex-shrink: 0;
}

.pm-footer-logo-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
}

.pm-footer-logo-sub {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pm-footer-desc {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
    margin: 0.25rem 0 0;
    max-width: 280px;
}

.pm-footer-socials {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.pm-footer-social {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.pm-footer-social:hover {
    background: rgba(108,99,255,0.35);
    border-color: rgba(108,99,255,0.6);
    color: #fff;
    transform: translateY(-2px);
}

/* Link columns */
.pm-footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.pm-footer-col-title {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.35rem;
}

.pm-footer-link {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    text-decoration: none !important;
    transition: color 0.15s, padding-left 0.15s;
    display: flex;
    align-items: center;
}

.pm-footer-link:hover {
    color: #fff;
    padding-left: 4px;
}

.pm-footer-link i {
    opacity: 0.5;
    transition: opacity 0.15s;
    width: 16px;
}

.pm-footer-link:hover i {
    opacity: 1;
}

/* Status items */
.pm-footer-stat {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
}

.pm-footer-stat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.6rem;
    flex-shrink: 0;
}

.pm-footer-stat-dot.green {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
    animation: pm-pulse 2s infinite;
}

@keyframes pm-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }
    50%       { box-shadow: 0 0 0 6px rgba(34,197,94,0.05); }
}

.pm-footer-divider {
    height: 1px;
    background: rgba(255,255,255,0.07);
    margin: 0.6rem 0;
}

/* Bottom bar */
.pm-footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    position: relative;
    z-index: 1;
}

.pm-footer-bottom-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pm-footer-badge {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    border-radius: 50px;
    padding: 0.2rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 600;
}

/* Dark mode footer tweaks */
html.dark .pm-footer {
    border-top-color: rgba(108,99,255,0.2);
}

/* ================================================================
   TOAST NOTIFICATIONS
   ================================================================ */
#pm-toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    pointer-events: none;
}

.pm-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.06);
    padding: 0.85rem 1rem;
    min-width: 300px;
    max-width: 360px;
    border-left: 3px solid #6C63FF;
    pointer-events: all;
    opacity: 0;
    transform: translateX(24px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.pm-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.pm-toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.pm-toast-body {
    flex: 1;
    min-width: 0;
}

.pm-toast-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pm-toast-msg {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pm-toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: color 0.15s;
}

.pm-toast-close:hover { color: #ef4444; }

html.dark .pm-toast {
    background: #1e293b;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

html.dark .pm-toast-title { color: #f1f5f9; }
html.dark .pm-toast-msg   { color: #94a3b8; }