:root {
    --sidebar-width: 260px;
    --topbar-height: 72px;
    --bottomnav-height: 60px;
    --color-primary: #0f6cfb;
    --color-primary-hover: #0b5cd4;
    --color-primary-light: #eff6ff;
    --color-primary-glow: rgba(15, 108, 251, 0.25);
    --color-text: #1f2933;
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-hover: #f3f4f6;
}

html, body {
    font-family: 'Poppins', 'Segoe UI', Helvetica, Arial, sans-serif;
    background-color: #f7f8fb;
    color: #1f2933;
    line-height: 1.6;
}

/* Prevent text cursor on non-editable elements globally */
*:not(input):not(textarea):not(select):not([contenteditable="true"]) {
    cursor: default;
}

/* Allow pointer cursor on interactive elements */
a, button, .btn, .nav-link, .dropdown-item, .accordion-button,
[role="button"], [onclick], .clickable, .card:hover {
    cursor: pointer;
}

/* Prevent text selection on UI elements (not content) */
.nav, .navbar, .card-header, .card-footer, .modal-header, .modal-footer,
.list-group-item, .badge, .btn, .nav-link, .dropdown-menu, label,
h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Remove focus ring on all elements by default */
*:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Visible focus ring for keyboard users on interactive elements only */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible:not([tabindex="-1"]) {
    outline: 2px solid rgba(15, 108, 251, 0.6) !important;
    outline-offset: 2px !important;
}

/* Form-specific focus styling for keyboard users */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 0.2rem rgba(15, 108, 251, 0.25) !important;
}

a, .btn-link {
    color: #0f6cfb;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(120deg, #0f6cfb, #5c9dff);
    border: none;
    box-shadow: 0 10px 30px rgba(15, 108, 251, 0.25);
}

.btn-outline-primary {
    border-color: #0f6cfb;
    color: #0f6cfb;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(15, 108, 251, 0.25);
}

/* ============================
   App Shell Layout (Authenticated)
   ============================ */
.app-main {
    padding-top: calc(var(--topbar-height, 72px) + 32px);
    margin-left: var(--sidebar-width, 260px);
    min-height: 100vh;
}


@media (max-width: 991.98px) {
    .app-main {
        margin-left: 0;
        padding-bottom: calc(var(--bottomnav-height, 60px) + 16px);
    }
}

.hero {
    background: radial-gradient(circle at 20% 20%, rgba(15,108,251,0.08), transparent 30%), radial-gradient(circle at 80% 0%, rgba(92,157,255,0.12), transparent 28%), #f7f8fb;
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 20px 60px rgba(15, 108, 251, 0.08);
}

.hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background-color: #e8f0ff;
    color: #0f6cfb;
    font-weight: 600;
}

.hero-actions .card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.hero-actions .step-header {
    background: linear-gradient(135deg, #e8f0ff, #f4f7ff);
    border: 1px solid #dce7ff;
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: 0 6px 20px rgba(15, 108, 251, 0.08);
}

.hero-actions .step-header-icon {
    background: #0f6cfb1a;
    color: #0f6cfb;
}

.hero-actions .guide-badge {
    background: #0f6cfb1a;
    color: #0f6cfb;
    font-weight: 700;
    border: 1px solid #dce7ff;
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
}

.hero-actions .step-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #fff;
}

.hero-actions .step-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #e8f0ff;
    color: #0f6cfb;
    display: grid;
    place-items: center;
    font-size: 22px;
}

.section-title {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.category-card {
    border: none;
    border-top: 3px solid transparent;
    border-radius: 14px;
    transition: all 0.25s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.category-card:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 18px 40px rgba(0,0,0,0.08);
}

.icon-pill {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 24px;
    margin: 0 auto 10px;
    transition: background-color 0.25s ease;
}

/* Color tints per trade — 5-color rotation */
.row > .col:nth-child(5n+1) .icon-pill { background-color: rgba(37,99,235,0.1); color: #2563eb; }
.row > .col:nth-child(5n+2) .icon-pill { background-color: rgba(234,88,12,0.1); color: #ea580c; }
.row > .col:nth-child(5n+3) .icon-pill { background-color: rgba(22,163,74,0.1); color: #16a34a; }
.row > .col:nth-child(5n+4) .icon-pill { background-color: rgba(168,85,247,0.1); color: #a855f7; }
.row > .col:nth-child(5n+5) .icon-pill { background-color: rgba(239,68,68,0.1); color: #ef4444; }

.row > .col:nth-child(5n+1) .category-card:hover { border-top-color: #2563eb; }
.row > .col:nth-child(5n+2) .category-card:hover { border-top-color: #ea580c; }
.row > .col:nth-child(5n+3) .category-card:hover { border-top-color: #16a34a; }
.row > .col:nth-child(5n+4) .category-card:hover { border-top-color: #a855f7; }
.row > .col:nth-child(5n+5) .category-card:hover { border-top-color: #ef4444; }

.row > .col:nth-child(5n+1):hover .icon-pill { background-color: rgba(37,99,235,0.18); }
.row > .col:nth-child(5n+2):hover .icon-pill { background-color: rgba(234,88,12,0.18); }
.row > .col:nth-child(5n+3):hover .icon-pill { background-color: rgba(22,163,74,0.18); }
.row > .col:nth-child(5n+4):hover .icon-pill { background-color: rgba(168,85,247,0.18); }
.row > .col:nth-child(5n+5):hover .icon-pill { background-color: rgba(239,68,68,0.18); }

.feature {
    padding: 24px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    height: 100%;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: #0f6cfb1a;
    color: #0f6cfb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.filter-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.job-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.07);
}

.job-card .card-title {
    font-weight: 700;
}

.job-card .card-text {
    min-height: 54px;
}

.badge {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.auth-wrapper {
    display: flex;
    justify-content: center;
}

.auth-card {
    max-width: 460px;
    width: 100%;
    border: none;
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}

.form-label {
    font-weight: 600;
}

.form-section {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.06);
    margin-bottom: 18px;
}

.muted-hint {
    color: #6b7280;
    font-size: 0.9rem;
}

.blazor-error-boundary {
    background: #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;
}

.email-verify-banner {
    background: #fef3cd;
    color: #856404;
    text-align: center;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 1px solid #ffc107;
}

/* Subscription Tier Badges (global - not scoped, because badges are rendered via RenderTreeBuilder) */
.sub-badge {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.4;
    min-width: 32px;
    text-align: center;
}

.sub-badge-pro {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
}

.sub-badge-biz {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
    color: #fff;
}

/* ===== Bug Report FAB + Modal ===== */
.bug-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 900;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    border: none;
    box-shadow: 0 4px 14px rgba(220,38,38,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.bug-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(220,38,38,0.5);
}

.bug-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.bug-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    pointer-events: auto;
    position: relative;
}

.bug-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}
.bug-modal-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #dc2626;
}
.bug-modal-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}
.bug-modal-close:hover { color: #111; }

.bug-modal-body {
    padding: 1.25rem;
}

.bug-success-banner {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.bug-error-banner {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .bug-fab {
        bottom: 5rem;
    }
    .bug-modal-content {
        max-height: 85vh;
    }
}

/* ===== Profile Dropdown Menu ===== */
.profile-dropdown {
    min-width: 260px !important;
    padding: 0 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06) !important;
    overflow: hidden;
    background: #fff;
}

.profile-dd-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.profile-dd-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f6cfb, #5c9dff);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15,108,251,0.25);
}

.profile-dd-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-dd-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.profile-dd-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-dd-role-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: inline-block;
    width: fit-content;
}

.role-tradie { background: #f0fdf4; color: #16a34a; }
.role-customer { background: #eff6ff; color: #2563eb; }
.role-admin { background: #fef2f2; color: #dc2626; }

.profile-dd-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0;
}

.profile-dd-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.15rem;
    text-decoration: none;
    color: #334155;
    transition: background 0.15s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.profile-dd-item:hover {
    background: #f8fafc;
    text-decoration: none;
    color: #334155;
}

.profile-dd-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #475569;
    flex-shrink: 0;
    transition: all 0.15s;
}

.profile-dd-item:hover .profile-dd-item-icon {
    background: #e0e7ff;
    color: #2563eb;
}

.profile-dd-item-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.2;
}

.profile-dd-item-hint {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.3;
}

.profile-dd-signout:hover {
    background: #fef2f2;
}

.profile-dd-signout:hover .signout-icon {
    background: #fee2e2;
    color: #dc2626;
}

.profile-dd-signout .profile-dd-item-label {
    color: #dc2626;
}

