:root {
    --brand-navy: #000C34;
    --brand-navy-dark: #071224;
    --brand-navy-card: #0f2442;
    --brand-blue: #1d63ed;
    --brand-blue-hover: #154ec4;
    --brand-blue-light: #eef4ff;

    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --surface-card: #ffffff;
    --border: #e2e8f0;
    --border-dark: #1e293b;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --accent-purple: #8b5cf6;
    --accent-purple-light: #f5f3ff;

    --sp-radius: 12px;
    --sp-radius-lg: 16px;

    /* Theme Token Mappings */
    --sp-primary: var(--brand-navy);
    --sp-primary-light: var(--brand-navy-dark);
    --sp-accent: var(--brand-blue);
    --sp-accent-hover: var(--brand-blue-hover);
    --sp-success: var(--success);
    --sp-warning: var(--warning);
    --sp-danger: var(--danger);
    --sp-bg: var(--surface-muted);
    --sp-card-bg: var(--surface);
    --sp-border: var(--border);
    --sp-text: var(--text-primary);
    --sp-text-muted: var(--text-secondary);
}

html {
    margin: 0 !important;
}

body.macmanus-supplier-portal-body {
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--surface-muted);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

/* Custom scrollbars matching React app */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sidebar dark scrollbar */
.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 9999px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* ==========================================================================
   BUTTON DESIGN SYSTEM (Modern SaaS / MacManus Theme)
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 8px;
    padding: 8px 16px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.15s ease-in-out;
    box-sizing: border-box;
    white-space: nowrap;
    user-select: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.btn:focus-visible {
    outline: 2px solid var(--brand-blue, #1d63ed);
    outline-offset: 2px;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none !important;
    transform: none !important;
}

.btn svg {
    flex-shrink: 0;
    pointer-events: none;
}

/* Primary Button (MacManus Blue) */
.btn-primary {
    background-color: #1d63ed;
    color: #ffffff !important;
    border-color: #1d63ed;
    box-shadow: 0 1px 2px rgba(29, 99, 237, 0.2);
}

.btn-primary:hover {
    background-color: #154ec4;
    border-color: #154ec4;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(29, 99, 237, 0.28);
    transform: translateY(-1px);
}

.btn-primary:active {
    background-color: #103fa6;
    border-color: #103fa6;
    color: #ffffff !important;
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(29, 99, 237, 0.2);
}

/* Secondary Button (Soft Gray / Neutral) */
.btn-secondary {
    background-color: #f1f5f9;
    color: #334155 !important;
    border-color: #e2e8f0;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    color: #0f172a !important;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-secondary:active {
    background-color: #cbd5e1;
    color: #0f172a !important;
    transform: translateY(0);
}

/* Outline Button (Clean White Surface with Slate Border) */
.btn-outline {
    background-color: #ffffff;
    color: #334155 !important;
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-outline:hover {
    background-color: #f8fafc;
    color: #0f172a !important;
    border-color: #94a3b8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.btn-outline:active {
    background-color: #f1f5f9;
    transform: translateY(0);
}

/* Warning Button */
.btn-warning {
    background-color: #f59e0b;
    color: #ffffff !important;
    border-color: #f59e0b;
}

.btn-warning:hover {
    background-color: #d97706;
    border-color: #d97706;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Danger Button */
.btn-danger {
    background-color: #ef4444;
    color: #ffffff !important;
    border-color: #ef4444;
}

.btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Success Button */
.btn-success {
    background-color: #10b981;
    color: #ffffff !important;
    border-color: #10b981;
}

.btn-success:hover {
    background-color: #059669;
    border-color: #059669;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Link Button */
.btn-link {
    background: transparent;
    border: none;
    color: #1d63ed;
    padding: 0;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline !important;
}

.btn-link:hover {
    color: #154ec4;
}

/* Button Sizing Utilities */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    gap: 6px;
    line-height: 1.35;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    line-height: 1.4;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ==========================================================================
   AUTHENTICATION / LOGIN PAGE (Matching React login/page.tsx)
   ========================================================================== */
.macmanus-auth-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(7, 18, 36, 0.90) 0%, rgba(11, 26, 48, 0.85) 100%),
        url('../images/featured-haulage.jpg') center/cover no-repeat fixed;
    color: #ffffff;
    box-sizing: border-box;
    position: relative;
    overflow-x: hidden;
}

.macmanus-auth-top-header {
    position: relative;
    z-index: 10;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-brand-logo {
    height: 38px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.macmanus-auth-grid {
    position: relative;
    z-index: 10;
    flex: 1;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 20px 32px;
    box-sizing: border-box;
}

/* Left Hero Column */
.auth-hero-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    background: rgba(29, 99, 237, 0.2);
    border: 1px solid rgba(29, 99, 237, 0.4);
    color: #60a5fa;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(8px);
    width: fit-content;
}

.auth-pill-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #60a5fa;
    box-shadow: 0 0 10px #60a5fa;
    animation: authPulse 2s infinite;
}

@keyframes authPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.85);
    }
}

.auth-hero-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0;
    color: #ffffff;
}

.auth-gradient-text {
    background: linear-gradient(to right, #ffffff, #e2e8f0, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-hero-desc {
    font-size: 17px;
    line-height: 1.5;
    color: #94a3b8;
    margin: 4px 0 0 0;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.auth-hero-features {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding-top: 10px;
    font-size: 13px;
    color: #94a3b8;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-green {
    background-color: #10b981;
}

.dot-blue {
    background-color: #3b82f6;
}

.dot-purple {
    background-color: #a855f7;
}

/* Right Login Card (Frosted Navy) */
.auth-card-col {
    width: 100%;
    max-width: 460px;
    justify-self: end;
}

.macmanus-auth-card {
    background: rgba(15, 36, 66, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(51, 65, 85, 0.7);
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    box-sizing: border-box;
}

.auth-card-header {
    margin-bottom: 24px;
}

.auth-card-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px;
}

.auth-card-header p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

.macmanus-auth-form .form-group {
    margin-bottom: 18px;
}

.macmanus-auth-form label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #cbd5e1;
    margin-bottom: 6px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .field-icon {
    position: absolute;
    left: 14px;
    color: #64748b;
    pointer-events: none;
}

.input-with-icon input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(7, 18, 36, 0.85);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 12px 14px 12px 42px;
    font-size: 14px;
    color: #ffffff;
    font-family: inherit;
    transition: all 0.15s ease;
}

.input-with-icon input:focus {
    outline: none;
    border-color: #1d63ed;
    background: rgba(7, 18, 36, 0.95);
    box-shadow: 0 0 0 3px rgba(29, 99, 237, 0.25);
}

.input-with-icon input::placeholder {
    color: #64748b;
}

.macmanus-auth-form .form-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 12px;
}

.macmanus-auth-form .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    cursor: pointer;
}

.macmanus-auth-form .forgot-link {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
}

.macmanus-auth-form .forgot-link:hover {
    text-decoration: underline;
}

.auth-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    background-color: #1d63ed;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(29, 99, 237, 0.35);
    transition: all 0.15s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.auth-submit-btn:hover {
    background-color: #154ec4;
    box-shadow: 0 6px 18px rgba(29, 99, 237, 0.45);
}

.auth-submit-btn:active {
    transform: scale(0.99);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Auth form inline alerts (login + activation) */
.macmanus-auth-form .macmanus-alert {
    margin: 0 0 16px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
}

.macmanus-auth-form .macmanus-alert-error {
    background: rgba(190, 18, 60, 0.15);
    border: 1px solid rgba(251, 113, 133, 0.45);
    color: #fecdd3;
}

.macmanus-auth-form .macmanus-alert-success {
    background: rgba(5, 150, 105, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.45);
    color: #a7f3d0;
}

/* Email OTP (login + activation) */
.macmanus-auth-form .otp-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(7, 18, 36, 0.85);
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5em;
    text-align: center;
    color: #ffffff;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.macmanus-auth-form .otp-input:focus {
    outline: none;
    border-color: #1d63ed;
    box-shadow: 0 0 0 3px rgba(29, 99, 237, 0.25);
}

.macmanus-auth-form .otp-hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: #94a3b8;
}

.macmanus-auth-form .otp-send-row + .otp-hint {
    margin: 8px 0 0;
}

.macmanus-auth-form .otp-hint strong {
    color: #e2e8f0;
}

.macmanus-auth-form .otp-send-row {
    display: flex;
    gap: 10px;
}

.macmanus-auth-form .otp-send-btn {
    flex-shrink: 0;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid #1d63ed;
    background: transparent;
    color: #60a5fa;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.macmanus-auth-form .otp-send-btn:disabled,
.macmanus-auth-form .otp-link-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.macmanus-auth-form .otp-actions {
    margin: 14px 0 0;
}

.macmanus-auth-form .otp-link-btn {
    background: none;
    border: none;
    padding: 0;
    color: #60a5fa;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
}

/* Generic .form-group label rule later in this file uses !important and turned auth labels dark-on-dark */
.macmanus-auth-card .macmanus-auth-form .form-group label {
    color: #ffffff !important;
}

.auth-card-header p strong {
    color: #e2e8f0;
}

/* Locked (read-only) field with trailing lock icon */
.input-with-icon.is-locked input {
    color: #94a3b8;
    background: rgba(7, 18, 36, 0.55);
    border-style: dashed;
    padding-right: 42px;
    cursor: not-allowed;
}

.input-with-icon.is-locked input:focus {
    border-color: #334155;
    box-shadow: none;
}

.input-with-icon .field-lock {
    position: absolute;
    right: 14px;
    color: #94a3b8;
    pointer-events: none;
}

/* Password show/hide toggle */
.input-with-icon .password-toggle {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: #60a5fa;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
}

.input-with-icon .password-toggle:hover {
    background: rgba(96, 165, 250, 0.12);
}

.input-with-icon:has(.password-toggle) input {
    padding-right: 64px;
}

/* Password strength meter */
.password-strength {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.password-strength-bar {
    flex: 1;
    height: 6px;
    background: rgba(51, 65, 85, 0.8);
    border-radius: 999px;
    overflow: hidden;
}

.password-strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: #64748b;
    border-radius: 999px;
    transition: width 0.25s ease, background-color 0.25s ease;
}

.password-strength-bar span.is-weak { background: #f43f5e; }
.password-strength-bar span.is-fair { background: #f59e0b; }
.password-strength-bar span.is-good { background: #22c55e; }
.password-strength-bar span.is-strong { background: #10b981; }

.password-strength-label {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    min-width: 76px;
    text-align: right;
}

.password-strength-label.is-weak { color: #fda4af; }
.password-strength-label.is-fair { color: #fcd34d; }
.password-strength-label.is-good { color: #86efac; }
.password-strength-label.is-strong { color: #6ee7b7; }

/* Password requirement checklist */
.password-rules {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
}

.password-rules li {
    position: relative;
    padding-left: 18px;
    font-size: 12px;
    color: #94a3b8;
    transition: color 0.15s ease;
}

.password-rules li::before {
    content: '○';
    position: absolute;
    left: 0;
    color: #64748b;
}

.password-rules li.is-met {
    color: #a7f3d0;
}

.password-rules li.is-met::before {
    content: '✓';
    color: #34d399;
    font-weight: 700;
}

.password-match-msg {
    min-height: 16px;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
}

.password-match-msg.is-met { color: #6ee7b7; }
.password-match-msg.is-error { color: #fda4af; }

/* Post-activation welcome panel */
.activate-welcome {
    text-align: center;
    padding: 8px 0 4px;
}

.activate-welcome-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(52, 211, 153, 0.5);
    color: #34d399;
    animation: activate-welcome-pop 0.4s ease;
}

.activate-welcome h2 {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px;
}

.activate-welcome p {
    font-size: 14px;
    color: #cbd5e1;
    margin: 0 0 6px;
}

.activate-welcome .activate-welcome-sub {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 22px;
}

.activate-welcome .activate-welcome-redirect {
    font-size: 12px;
    color: #64748b;
    margin: 12px 0 0;
}

@keyframes activate-welcome-pop {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
    .password-rules {
        grid-template-columns: 1fr;
    }
}

/* Robot Security Box (I'm not a robot) */
.robot-security-box {
    margin: 16px 0 18px 0;
    padding: 12px 14px;
    background: rgba(7, 18, 36, 0.85);
    border: 1px solid rgba(51, 65, 85, 0.8);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s ease;
}

.robot-security-box:hover {
    border-color: rgba(71, 85, 105, 1);
    background: rgba(11, 26, 48, 0.9);
}

.robot-security-box.is-verified {
    background: rgba(6, 78, 59, 0.25);
    border-color: rgba(16, 185, 129, 0.55);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.12);
}

.robot-box-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.robot-checkbox {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: 1.5px solid #475569;
    background: #0b1a30;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    color: transparent;
}

.robot-security-box:hover .robot-checkbox {
    border-color: #64748b;
}

.robot-spinner {
    display: none;
    animation: robot-spin 0.8s linear infinite;
    color: #3b82f6;
}

.robot-check {
    display: none;
    color: #ffffff;
}

.robot-security-box.is-verifying .robot-checkbox {
    border-color: #3b82f6;
    background: #071224;
}

.robot-security-box.is-verifying .robot-spinner {
    display: block;
}

.robot-security-box.is-verified .robot-checkbox {
    background: #10b981;
    border-color: #10b981;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.robot-security-box.is-verified .robot-check {
    display: block;
}

.robot-text {
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f0;
}

.robot-box-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: color 0.25s ease;
}

.robot-shield-icon {
    stroke-width: 2;
}

.robot-badge-title {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-top: 2px;
}

.robot-security-box.is-verified .robot-box-right {
    color: #34d399;
}

@keyframes robot-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.auth-card-footer {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid rgba(51, 65, 85, 0.6);
    font-size: 11px;
    color: #64748b;
    text-align: center;
    line-height: 1.5;
}

.auth-card-footer a {
    color: #60a5fa;
    text-decoration: none;
}

.macmanus-auth-bottom-footer {
    position: relative;
    z-index: 10;
    padding: 20px 32px;
    text-align: center;
    font-size: 11px;
    color: #64748b;
}

/* ==========================================================================
   PORTAL APPLICATION SHELL LAYOUT (Matching React AppShell.tsx & Sidebar.tsx)
   ========================================================================== */
.macmanus-portal-layout {
    display: flex;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: var(--surface-muted);
}

/* Desktop Persistent Sidebar */
.macmanus-portal-sidebar {
    width: 256px;
    min-width: 256px;
    background-color: #000C34;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #1e293b;
    height: 100%;
    overflow: hidden;
    user-select: none;
    z-index: 1000;
    box-sizing: border-box;
    transition: transform 0.25s ease-in-out;
}

/* Pinned Brand Header */
.sidebar-brand {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000C34;
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.portal-brand-logo {
    height: 34px;
    width: auto;
    object-fit: contain;
}

.sidebar-mobile-close {
    display: none;
    background: none;
    border: none;
    color: #94a3b8;
    padding: 4px;
    border-radius: 8px;
    cursor: pointer;
}

.sidebar-mobile-close:hover {
    color: #ffffff;
    background: #1e293b;
}

/* Scrollable Nav */
.sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-section-title {
    padding: 0 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #94a3b8;
    text-transform: uppercase;
    margin: 4px 0 6px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.nav-item:hover {
    background: rgba(30, 41, 59, 0.6);
    color: #ffffff;
}

.nav-item.active {
    background: #1d63ed;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(29, 99, 237, 0.35);
    font-weight: 600;
}

.nav-item svg {
    flex-shrink: 0;
    color: #94a3b8;
    transition: color 0.15s ease;
}

.nav-item:hover svg {
    color: #ffffff;
}

.nav-item.active svg {
    color: #ffffff;
}

/* Pinned Bottom Operational Support Panel */
.sidebar-support-panel {
    flex-shrink: 0;
    padding: 14px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(7, 18, 36, 0.5);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-help-card {
    background: #0f2442;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 12px 14px;
}

.help-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.help-card-subtitle {
    font-size: 11px;
    color: #94a3b8;
    margin: 3px 0 6px 0;
}

.help-card-contact {
    font-family: monospace;
    font-size: 11px;
    color: #cbd5e1;
    line-height: 1.4;
}

.help-card-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    background: rgba(29, 99, 237, 0.2);
    border: 1px solid rgba(29, 99, 237, 0.4);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 600;
    padding: 7px 10px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 8px;
    transition: all 0.15s ease;
}

.help-card-btn:hover {
    background: #1d63ed;
    border-color: #1d63ed;
}

.sidebar-signout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.sidebar-signout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

/* Mobile Drawer Overlay Backdrop */
.sidebar-mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 990;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.sidebar-mobile-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* ==========================================================================
   TOP BAR (Matching React Header.tsx)
   ========================================================================== */
.macmanus-portal-main {
    flex: 1;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.macmanus-top-bar {
    height: 64px;
    min-height: 64px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 36px;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: #64748b;
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
}

.mobile-toggle-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.top-bar-search {
    position: relative;
    display: flex;
    align-items: center;
    width: 280px;
}

.top-bar-search .search-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    pointer-events: none;
}

.top-bar-search input {
    width: 100%;
    box-sizing: border-box;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 12px 8px 36px;
    font-size: 13px;
    color: #0f172a;
    font-family: inherit;
    transition: all 0.15s ease;
}

.top-bar-search input:focus {
    outline: none;
    background: #ffffff;
    border-color: #1d63ed;
    box-shadow: 0 0 0 3px rgba(29, 99, 237, 0.12);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.top-bar-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    background: #1d63ed;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(29, 99, 237, 0.25);
    font-family: inherit;
}

.top-bar-cta-btn:hover {
    background: #154ec4;
}

.top-bar-cta-btn.admin-cta-btn {
    background: #0f172a;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.top-bar-cta-btn.admin-cta-btn:hover {
    background: #1e293b;
}

.top-bar-notif-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid var(--border);
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
}

.top-bar-notif-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.notif-badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #1d63ed;
    border: 1.5px solid #ffffff;
}

.top-bar-divider {
    height: 24px;
    width: 1px;
    background: var(--border);
}

.top-bar-user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: background 0.15s ease;
}

.top-bar-user-menu:hover {
    background: #f1f5f9;
}

.user-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #1d63ed;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(29, 99, 237, 0.25);
    flex-shrink: 0;
}

.user-info-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.25;
}

.user-info-text .user-name {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.user-info-text .user-company {
    font-size: 11px;
    color: #64748b;
}

.chevron-icon {
    color: #94a3b8;
}

/* User Menu Popover */
.user-dropdown-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 220px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    padding: 8px 0;
    z-index: 200;
    display: none;
}

.user-dropdown-popover.active {
    display: block;
    animation: popoverFadeIn 0.15s ease-out;
}

@keyframes popoverFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

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

.popover-header {
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.popover-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.popover-email {
    font-size: 11px;
    color: #64748b;
    margin: 2px 0 6px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popover-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #eef4ff;
    color: #1d63ed;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.popover-links {
    padding: 4px 0 0 0;
}

.popover-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 12.5px;
    color: #475569;
    text-decoration: none;
    transition: background 0.1s ease;
}

.popover-link:hover {
    background: #f8fafc;
    color: #0f172a;
}

.popover-signout {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 12.5px;
    color: #ef4444;
    background: none;
    border: none;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.1s ease;
}

.popover-signout:hover {
    background: #fef2f2;
}

/* Notification Bell Dropdown Popover */
.notif-dropdown-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 340px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
    z-index: 300;
    display: none;
    overflow: hidden;
    cursor: default;
    text-align: left;
}

.notif-dropdown-popover.active {
    display: block;
    animation: popoverFadeIn 0.15s ease-out;
}

.notif-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: #ffffff;
}

.notif-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-title-text {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
}

.notif-pill-count {
    font-size: 10px;
    font-weight: 700;
    background: #eef4ff;
    color: #1d63ed;
    padding: 2px 7px;
    border-radius: 9999px;
}

.notif-mark-read-btn {
    background: none;
    border: none;
    font-size: 11px;
    font-weight: 600;
    color: #1d63ed;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 6px;
    font-family: inherit;
    transition: background-color 0.15s;
}

.notif-mark-read-btn:hover {
    background-color: #f1f5f9;
}

.notif-popover-body {
    max-height: 300px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f8fafc;
    transition: background-color 0.15s;
    cursor: pointer;
    text-decoration: none;
}

.notif-item:hover {
    background-color: #f8fafc;
}

.notif-item.unread {
    background-color: #fbfcfe;
}

.notif-item.unread:hover {
    background-color: #f1f5f9;
}

.notif-icon-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.bg-amber-soft { background: #fffbeb; }
.bg-blue-soft { background: #eef4ff; }
.bg-emerald-soft { background: #ecfdf5; }

.notif-item-content {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.35;
}

.notif-item-desc {
    font-size: 11.5px;
    color: #64748b;
    margin: 3px 0 0 0;
    line-height: 1.35;
}

.notif-item-time {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
    display: block;
}

.notif-popover-footer {
    padding: 10px 16px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    background: #f8fafc;
}

.notif-footer-link {
    font-size: 11.5px;
    font-weight: 600;
    color: #1d63ed;
    text-decoration: none;
    cursor: pointer;
}

.notif-footer-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   SCROLLABLE CONTENT AREA & FOOTER
   ========================================================================== */
.macmanus-scrollable-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--surface-muted);
}

.macmanus-view-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 32px 36px 48px;
    flex: 1;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .macmanus-view-container {
        padding: 24px 20px 36px;
    }
}

@media (max-width: 640px) {
    .macmanus-view-container {
        padding: 16px 14px 28px;
    }
}

.macmanus-portal-footer {
    padding: 18px 36px;
    border-top: 1px solid rgba(226, 232, 240, 0.8);
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    background: #ffffff;
    width: 100%;
    box-sizing: border-box;
}

.portal-view {
    display: none;
    width: 100%;
}

.portal-view.active {
    display: block;
}

/* Titles */
.portal-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--sp-primary);
    margin: 0 0 4px 0;
}

.portal-subtitle {
    color: var(--sp-text-muted);
    font-size: 14px;
    margin: 0;
}

.dashboard-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.header-action-buttons {
    display: flex;
    gap: 12px;
}

/* Stat Cards */
.stat-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: #ffffff;
    border-radius: var(--sp-radius);
    padding: 22px;
    border: 1px solid var(--sp-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-number {
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-blue {
    color: var(--sp-accent);
}

.stat-red {
    color: var(--sp-danger);
}

.stat-green {
    color: var(--sp-success);
}

.stat-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--sp-text-muted);
}

/* Content Cards */
.portal-content-card {
    background: #ffffff;
    border-radius: var(--sp-radius);
    border: 1px solid var(--sp-border);
    padding: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
}

.portal-content-card h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--sp-primary);
    margin: 0 0 6px 0;
}

.card-desc {
    color: var(--sp-text-muted);
    font-size: 14px;
    margin: 0 0 24px 0;
}

.card-header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.view-all-link {
    color: var(--sp-accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.15s, transform 0.15s;
}

.view-all-link:hover {
    color: var(--sp-accent-hover);
    transform: translateX(2px);
    text-decoration: none;
}

/* Deal Activity List (Screen 2) */
.deal-activity-list {
    display: flex;
    flex-direction: column;
}

.deal-activity-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 12px;
    border-bottom: 1px solid var(--sp-border);
    transition: background-color 0.15s;
    cursor: pointer;
    border-radius: 8px;
}

.deal-activity-row:hover {
    background-color: #f8fafc;
}

.deal-activity-row:last-child {
    border-bottom: none;
}

.deal-activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.badge-amber {
    background: #fef3c7;
    color: #b45309;
}

.badge-green {
    background: #dcfce7;
    color: #15803d;
}

.badge-blue {
    background: #e0f2fe;
    color: #0369a1;
}

.deal-activity-details {
    flex: 1;
    min-width: 0;
}

.deal-activity-details .customer-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--sp-primary);
}

.deal-activity-details .customer-sub {
    font-size: 13px;
    color: var(--sp-text-muted);
    margin-top: 2px;
}

.deal-activity-time {
    font-size: 12px;
    color: var(--sp-text-muted);
    white-space: nowrap;
}

.empty-state-box {
    padding: 36px 20px;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed var(--sp-border);
    border-radius: 10px;
    color: var(--sp-text-muted);
    font-size: 14px;
}

/* ==========================================================================
   QUOTE WIZARD & FINANCE CALCULATOR DESIGN SYSTEM
   ========================================================================== */

/* Step Container Wrappers */
.quote-step-container {
    width: 100%;
    margin: 0 auto;
}

.max-w-700 {
    max-width: 700px;
}

.max-w-800 {
    max-width: 820px;
}

/* Header Navigation & Step Progress */
.quote-calc-header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-back-link:hover {
    background: #f8fafc;
    color: var(--text-primary);
    border-color: #cbd5e1;
    transform: translateX(-2px);
}

.quote-step-pills {
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    background: #ffffff;
    border: 1px solid var(--border);
}

.step-pill.done {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.step-pill.active {
    background: var(--brand-navy);
    color: #ffffff;
    border-color: var(--brand-navy);
    box-shadow: 0 2px 8px rgba(0, 12, 52, 0.15);
}

/* Card Header Section */
.quote-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.calc-icon-badge {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eef4ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(29, 99, 237, 0.1);
}

.calc-header-text {
    flex: 1;
}

.calc-step-tag {
    display: inline-block;
    padding: 3px 9px;
    background: #eff6ff;
    color: #1d63ed;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.quote-calc-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--brand-navy);
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.quote-calc-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.45;
}

/* Selection Cards (Wizard Step 1 & 2) */
.business-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 24px 0 28px 0;
}

.homeowner-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 24px 0 28px 0;
}

.selection-card {
    position: relative;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 24px 20px;
    text-align: left;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.selection-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 8px 24px -4px rgba(29, 99, 237, 0.12);
}

.selection-card.selected {
    border-color: var(--brand-blue);
    background: #f8faff;
    box-shadow: 0 0 0 1px var(--brand-blue), 0 8px 20px -4px rgba(29, 99, 237, 0.15);
}

.selection-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.selection-card-header .selection-icon {
    margin-bottom: 0;
}

.selection-card-indicator {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.selection-card.selected .selection-card-indicator {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
}

.indicator-check {
    display: none;
    color: #ffffff;
}

.selection-card.selected .indicator-check {
    display: flex;
    align-items: center;
    justify-content: center;
}

.selection-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--brand-navy);
    transition: all 0.15s ease;
}

.selection-card:hover .selection-icon,
.selection-card.selected .selection-icon {
    background: #eef4ff;
    color: var(--brand-blue);
}

.selection-label {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.selection-subtext {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.45;
    flex: 1;
    margin-bottom: 14px;
}

.selection-badge {
    align-self: flex-start;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: #ecfdf5;
    color: #065f46;
    letter-spacing: 0.02em;
}

.selection-badge.badge-neutral {
    background: #f1f5f9;
    color: #475569;
}

.green-icon {
    color: #059669 !important;
}

.red-icon {
    color: #dc2626 !important;
}

.selection-card-yes.selected {
    border-color: #10b981;
    background: #f0fdf4;
}

.selection-card-yes.selected .selection-card-indicator {
    background: #10b981;
    border-color: #10b981;
}

.selection-card-no.selected {
    border-color: #ef4444;
    background: #fef2f2;
}

.selection-card-no.selected .selection-card-indicator {
    background: #ef4444;
    border-color: #ef4444;
}

/* ==========================================================================
   SPLIT-SCREEN CALCULATOR LAYOUT
   ========================================================================== */
.quote-calc-split-layout {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 28px;
    align-items: start;
}

.quote-calc-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}

/* Form Controls Inside Calculator */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .field-icon {
    position: absolute;
    left: 14px;
    pointer-events: none;
    color: #64748b;
    z-index: 2;
}

.input-with-icon .form-control {
    padding-left: 42px !important;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.input-currency-wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
}

.input-currency-wrapper .currency-symbol {
    position: absolute;
    left: 1px;
    top: 1px;
    bottom: 1px;
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-right: 1px solid var(--border);
    border-radius: 9px 0 0 9px;
    font-weight: 700;
    color: #475569;
    font-size: 15px;
    pointer-events: none;
    z-index: 2;
}

.input-currency-wrapper .currency-input {
    padding-left: 52px !important;
    font-weight: 700;
    font-size: 15.5px;
    color: var(--brand-navy);
}

.quote-finance-balance-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0effe 100%);
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    margin-top: 12px;
    font-size: 13px;
    color: #1e40af;
}

.quote-finance-balance-bar strong {
    font-size: 15.5px;
    font-weight: 800;
    color: #1d63ed;
}

/* Term Pill Selector */
.term-pill-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.term-pill-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 13px 8px;
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.term-pill-btn .term-months {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.term-pill-btn .term-years {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 3px;
}

.term-pill-btn:hover {
    border-color: #93c5fd;
    background: #f8fafc;
    transform: translateY(-2px);
}

.term-pill-btn.active {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-dark) 100%);
    border-color: var(--brand-navy);
    box-shadow: 0 4px 14px rgba(0, 12, 52, 0.25);
    transform: translateY(-2px);
}

.term-pill-btn.active .term-months {
    color: #ffffff;
}

.term-pill-btn.active .term-years {
    color: #93c5fd;
}

/* Facility Type Cards */
.facility-type-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 8px;
}

.facility-choice-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.facility-choice-card:hover {
    border-color: #93c5fd;
    background: #fafbff;
}

.facility-choice-card.active {
    border-color: var(--brand-blue);
    background: #f8faff;
    box-shadow: 0 2px 10px rgba(29, 99, 237, 0.08);
}

.facility-choice-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.facility-choice-radio .radio-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: transparent;
    transition: background 0.15s ease;
}

.facility-choice-card.active .facility-choice-radio {
    border-color: var(--brand-blue);
    background: var(--brand-blue);
}

.facility-choice-card.active .facility-choice-radio .radio-dot {
    background: #ffffff;
}

.facility-choice-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.facility-choice-desc {
    display: block;
    font-size: 11.5px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ==========================================================================
   RIGHT COLUMN: LIVE ESTIMATE & SUMMARY CARD
   ========================================================================== */
.quote-calc-summary-column {
    position: sticky;
    top: 24px;
}

.quote-live-summary-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08);
}

.summary-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #047857;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.pulsing-green-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: livePulse 1.8s infinite;
}

@keyframes livePulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.summary-monthly-figure-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.summary-monthly-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 6px;
}

.summary-monthly-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    font-size: 42px;
    font-weight: 800;
    color: var(--brand-navy);
    letter-spacing: -0.03em;
    line-height: 1;
}

.summary-currency {
    font-size: 26px;
    font-weight: 700;
    color: var(--brand-blue);
}

.summary-vat-suffix {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 4px;
}

.summary-monthly-sub {
    display: block;
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 8px;
    font-weight: 500;
}

/* Breakdown Table */
.summary-breakdown-table {
    margin-bottom: 20px;
    border-top: 1px solid #f1f5f9;
    padding-top: 14px;
}

.summary-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 13px;
}

.breakdown-lbl {
    color: var(--text-secondary);
    font-weight: 500;
}

.breakdown-val {
    color: var(--text-primary);
    font-weight: 700;
}

.summary-breakdown-row.highlight-row {
    background: #f0f7ff;
    margin: 4px -8px;
    padding: 8px 8px;
    border-radius: 6px;
}

.summary-breakdown-row.total-row {
    border-top: 1px dashed #cbd5e1;
    margin-top: 6px;
    padding-top: 10px;
    font-size: 14px;
}

.text-blue {
    color: var(--brand-blue) !important;
}

/* Trust Perks */
.summary-trust-perks {
    background: #fafbfc;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 20px;
    border: 1px solid #f1f5f9;
}

.trust-perk-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #334155;
    margin-bottom: 8px;
}

.trust-perk-item:last-child {
    margin-bottom: 0;
}

.summary-card-cta .btn-block {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
}

.summary-disclaimer {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin: 10px 0 0 0;
    line-height: 1.4;
}

/* ==========================================================================
   QUOTE RESULT VIEW STYLES
   ========================================================================== */
.quote-ref-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #f1f5f9;
    color: var(--brand-navy);
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: monospace;
}

.result-monthly-hero-banner {
    background: linear-gradient(135deg, #000C34 0%, #0f2442 100%);
    border-radius: 14px;
    padding: 24px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 8px 24px -4px rgba(0, 12, 52, 0.2);
}

.result-hero-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    display: block;
    margin-bottom: 4px;
}

.result-hero-price {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.result-hero-sub {
    font-size: 12px;
    color: #cbd5e1;
    margin-top: 4px;
    display: block;
}

.result-hero-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
}

.quote-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.detail-cell {
    display: flex;
    flex-direction: column;
}

.detail-cell .lbl {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.detail-cell .val {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 3px;
}

.quote-guarantee-strip {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.quote-guarantee-strip .strip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #166534;
}

.result-footer-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .quote-calc-split-layout {
        grid-template-columns: 1fr;
    }

    .quote-calc-summary-column {
        position: static;
    }
}

@media (max-width: 640px) {
    .business-type-grid,
    .homeowner-grid,
    .facility-type-cards-grid,
    .form-grid-2,
    .quote-details-grid {
        grid-template-columns: 1fr;
    }

    .term-pill-selector {
        grid-template-columns: repeat(2, 1fr);
    }

    .quote-calc-card {
        padding: 20px 16px;
    }
}

/* Gate Screens (Sole Trader & Declined) */
.max-w-600 {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.gate-icon-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

.gate-icon-circle.blue-circle {
    background: #eff6ff;
    color: var(--brand-blue);
    border: 2px solid #bfdbfe;
}

.gate-icon-circle.red-circle {
    background: #fef2f2;
    color: #ef4444;
    border: 2px solid #fecaca;
}

.gate-desc {
    font-size: 14.5px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 12px auto 26px auto;
    max-width: 480px;
}

/* ==========================================================================
   LINKED QUOTE DESIGN SYSTEM (Referral Modal & Deal Details)
   ========================================================================== */
.modal-linked-quote-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1.5px solid #a7f3d0;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

.linked-quote-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.linked-quote-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: #065f46;
}

.linked-quote-tag strong {
    font-family: monospace;
    font-size: 14px;
    color: #047857;
    background: #d1fae5;
    padding: 2px 7px;
    border-radius: 5px;
}

.btn-unlink-quote {
    background: none;
    border: none;
    color: #059669;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s;
}

.btn-unlink-quote:hover {
    color: #dc2626;
    background: #fee2e2;
}

.linked-quote-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.lq-metric {
    display: flex;
    flex-direction: column;
}

.lq-metric .lbl {
    font-size: 11px;
    color: #047857;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.lq-metric .val {
    font-size: 14px;
    font-weight: 800;
    color: #065f46;
    margin-top: 2px;
}

.linked-quote-footer-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #059669;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(16, 185, 129, 0.25);
}

/* Deal Table & Row Badges */
.deal-quote-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: #1d63ed;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 2px 7px;
    border-radius: 6px;
}

.quote-converted-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    color: #065f46;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 3px 9px;
    border-radius: 6px;
}

.quote-link-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: #eff6ff;
    color: #1d63ed;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

.btn-xs {
    padding: 4px 10px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
}

.quote-available-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    color: #1e40af;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 3px 9px;
    border-radius: 6px;
}

.btn-outline-danger {
    background: transparent !important;
    border: 1.5px solid #ef4444 !important;
    color: #dc2626 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-outline-danger:hover {
    background: #fef2f2 !important;
    border-color: #dc2626 !important;
    color: #b91c1c !important;
}

.btn-danger {
    background: #dc2626 !important;
    border: 1.5px solid #dc2626 !important;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-danger:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
}


/* Deal Details: Linked Quote Schedule Banner */
.deal-linked-quote-summary-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1.5px solid #a7f3d0;
    border-radius: 14px;
    padding: 18px 22px;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.08);
}

.dlq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
}

.dlq-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #065f46;
}

.dlq-title strong {
    font-family: monospace;
    background: #d1fae5;
    color: #047857;
    padding: 2px 7px;
    border-radius: 5px;
}

.dlq-status-tag {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #059669;
    color: #ffffff;
    padding: 3px 9px;
    border-radius: 12px;
}

.dlq-metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.dlq-metric {
    display: flex;
    flex-direction: column;
}

.dlq-metric .lbl {
    font-size: 11px;
    color: #047857;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dlq-metric .val {
    font-size: 14.5px;
    font-weight: 800;
    color: #065f46;
    margin-top: 3px;
}

.dlq-metric.highlight-metric .val {
    color: var(--brand-navy) !important;
}

.text-navy {
    color: var(--brand-navy) !important;
}

.docs-file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-file-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
}

.doc-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1d63ed;
    text-decoration: none;
}

.doc-link:hover {
    text-decoration: underline;
}

.doc-type-tag {
    font-size: 11.5px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .linked-quote-metrics-grid,
    .dlq-metrics {
        grid-template-columns: 1fr 1fr;
    }
}

/* Dropzone */
.file-dropzone {
    border: 2px dashed var(--sp-border);
    border-radius: 10px;
    padding: 28px;
    text-align: center;
    cursor: pointer;
    background: #fafafa;
    position: relative;
    transition: border-color 0.15s;
}

.file-dropzone:hover {
    border-color: var(--sp-accent);
}

.file-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.dropzone-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--sp-text-muted);
    font-size: 14px;
}

.dropzone-selected-file {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sp-accent);
}

/* Stepper */
.milestone-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 32px 0 24px 0;
    overflow-x: auto;
    padding-bottom: 8px;
}

.step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 80px;
    text-align: center;
}

.node-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--sp-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.step-node.completed .node-circle {
    background: var(--sp-success);
    color: #ffffff;
}

.step-node.active .node-circle {
    background: var(--sp-accent);
    color: #ffffff;
}

.node-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--sp-text-muted);
}

.step-node.active .node-label,
.step-node.completed .node-label {
    color: var(--sp-primary);
}

.step-connector {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 4px 20px 4px;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
}

.status-submitted {
    background: #e0f2fe;
    color: #0369a1;
}

.status-reviewing {
    background: #fef3c7;
    color: #b45309;
}

.status-with-lender {
    background: #e0e7ff;
    color: #4338ca;
}

.status-draft {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.status-information-required {
    background: #fee2e2;
    color: #b91c1c;
}

.status-approved {
    background: #dcfce7;
    color: #15803d;
}

.status-documents {
    background: #f3e8ff;
    color: #7e22ce;
}

.status-completed {
    background: #dcfce7;
    color: #15803d;
}

.status-unable-to-proceed {
    background: #f1f5f9;
    color: #64748b;
}

/* Table */
.macmanus-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 14px;
}

.macmanus-table th {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid var(--sp-border);
    color: var(--sp-text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
}

.macmanus-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--sp-border);
}

.deal-row:hover {
    background-color: #f8fafc;
}

/* Deals Tabs & Filters */
.deals-tabs-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--sp-border);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.tabs-group {
    display: flex;
    gap: 8px;
}

.tab-btn {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--sp-text-muted);
}

.tab-btn.active {
    background: var(--sp-primary);
    color: #ffffff;
}

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

.deals-filters-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.table-search-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 250px;
}

.table-search-wrap .table-search-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.15s ease;
}

.table-search-wrap:focus-within .table-search-icon {
    color: #1d63ed;
}

.table-search-input {
    width: 100%;
    height: 38px;
    padding: 8px 12px 8px 36px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    color: #0f172a;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 12, 52, 0.04);
}

.table-search-input:focus {
    outline: none;
    background: #ffffff;
    border-color: #1d63ed;
    box-shadow: 0 0 0 3px rgba(29, 99, 237, 0.15);
}

.table-search-input::placeholder {
    color: #94a3b8;
}

.table-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 170px;
}

.table-select-filter {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    height: 38px;
    padding: 8px 32px 8px 12px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 12, 52, 0.04);
}

.table-select-filter:focus {
    outline: none;
    border-color: #1d63ed;
    box-shadow: 0 0 0 3px rgba(29, 99, 237, 0.15);
}

.table-select-chevron {
    position: absolute;
    right: 11px;
    color: #64748b;
    pointer-events: none;
}

/* Latest Update Card */
.latest-update-card {
    background: #f8fafc;
    border-left: 4px solid var(--sp-accent);
    padding: 18px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}

.latest-update-card h3 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--sp-primary);
}

.update-date {
    font-size: 12px;
    color: var(--sp-text-muted);
    margin: 0 0 6px 0;
}

.update-text {
    margin: 0;
    font-size: 14px;
    color: var(--sp-text);
}

/* Individual Deal Detail (Screen 11) */
.deal-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--sp-border);
    padding-bottom: 16px;
}

.back-link {
    color: var(--sp-accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 8px;
    transition: transform 0.15s;
}

.back-link:hover {
    transform: translateX(-3px);
    text-decoration: none;
}

.action-required-banner {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 20px 0;
}

.action-banner-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f59e0b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
}

.action-banner-body {
    flex: 1;
}

.action-banner-body h3 {
    margin: 0 0 2px 0;
    font-size: 15px;
    font-weight: 700;
    color: #92400e;
}

.action-banner-body p {
    margin: 0;
    font-size: 13px;
    color: #b45309;
}

.deal-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    background: #f8fafc;
    border: 1px solid var(--sp-border);
    border-radius: 10px;
    padding: 18px 20px;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .deal-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.info-block {
    display: flex;
    flex-direction: column;
}

.info-block .lbl {
    font-size: 12px;
    color: var(--sp-text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.info-block .val {
    font-size: 15px;
    font-weight: 700;
    color: var(--sp-primary);
    margin-top: 4px;
}

.detail-subtabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--sp-border);
    margin: 24px 0 16px 0;
}

.subtab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--sp-text-muted);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s;
}

.subtab-btn.active {
    color: var(--sp-accent);
    border-bottom-color: var(--sp-accent);
}

.subtab-content {
    padding: 10px 0;
}

/* Quote Result Header & Ref Badge (Screen 6) */
.max-w-700 {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.result-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.quote-ref-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #e2e8f0;
    color: var(--sp-primary);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    font-family: monospace, sans-serif;
    margin-top: 4px;
}

.result-action-links {
    display: flex;
    gap: 12px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--sp-accent);
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background-color 0.15s;
    font-family: inherit;
}

.btn-link:hover {
    background-color: rgba(29, 99, 237, 0.08);
}

/* Resources & Help Cards (Screen 12) */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 24px 0 32px 0;
}

.resource-card {
    background: #f8fafc;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: 24px 20px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
    background: #ffffff;
}

.resource-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.purple-icon {
    background: #f3e8ff;
    color: #7e22ce;
}

.green-icon {
    background: #dcfce7;
    color: #15803d;
}

.orange-icon {
    background: #ffedd5;
    color: #c2410c;
}

.blue-icon {
    background: #e0f2fe;
    color: #0284c7;
}

.resource-card h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--sp-primary);
}

.resource-card p {
    margin: 0;
    font-size: 13px;
    color: var(--sp-text-muted);
    line-height: 1.5;
}

.need-help-banner {
    background: linear-gradient(135deg, #000c34 0%, #0d2259 100%);
    color: #ffffff;
    border-radius: var(--sp-radius);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 24px;
}

.need-help-banner h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
}

.need-help-banner p {
    margin: 0;
    font-size: 14px;
    color: #94a3b8;
}

.need-help-actions {
    display: flex;
    gap: 12px;
}

.need-help-banner .btn-outline {
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.need-help-banner .btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

/* Responsive */
@media (max-width: 900px) {
    .macmanus-portal-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 9999;
        width: 260px;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }

    .macmanus-portal-sidebar.mobile-open {
        display: flex;
    }

    .mobile-toggle-btn {
        display: block;
    }

    .macmanus-view-container {
        padding: 20px;
    }
}

/* ==========================================================================
   MacManus Administration & Visual Components (Screens 13 to 17)
   ========================================================================== */

.nav-section-title {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    color: #475569;
    padding: 10px 16px 4px 16px;
}

.admin-dashboard-container,
.admin-all-deals-container,
.admin-introducers-container,
.admin-reports-container,
.dashboard-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.portal-heading {
    font-size: 26px;
    font-weight: 800;
    color: var(--sp-primary);
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.portal-subheading {
    font-size: 14px;
    color: var(--sp-text-muted);
    margin: 4px 0 0 0;
}

.admin-welcome-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.admin-quick-actions {
    display: flex;
    gap: 10px;
}

/* Metrics Grid & Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

.metric-card {
    background: #ffffff;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: 22px 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.07);
}

.metric-val {
    font-size: 32px;
    font-weight: 800;
    color: var(--sp-primary);
    line-height: 1.1;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.metric-lbl {
    font-size: 13px;
    font-weight: 600;
    color: var(--sp-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-delta {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.1);
}

.metric-card-danger {
    border-left: 4px solid var(--sp-danger);
}

.metric-card-warning {
    border-left: 4px solid var(--sp-warning);
}

.metric-card-success {
    border-left: 4px solid var(--sp-success);
}

.text-danger {
    color: var(--sp-danger) !important;
}

.text-warning {
    color: #d97706 !important;
}

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

.text-primary {
    color: var(--sp-accent) !important;
}

/* Portal Card & Header Components */
.portal-card {
    background: #ffffff;
    border: 1px solid var(--sp-border);
    border-radius: var(--sp-radius);
    padding: 24px 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--sp-primary);
    margin: 0 0 4px 0;
}

.card-subtitle {
    font-size: 13px;
    color: var(--sp-text-muted);
    margin: 0;
}

.link-action {
    font-size: 13px;
    font-weight: 700;
    color: var(--sp-accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s, transform 0.15s;
}

.link-action:hover {
    color: var(--sp-accent-hover);
    transform: translateX(2px);
    text-decoration: none;
}

/* Empty State */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    background: #f8fafc;
    border: 1px dashed var(--sp-border);
    border-radius: 10px;
    margin-top: 14px;
}

.empty-icon {
    font-size: 24px;
    margin: 0 auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ecfdf5;
}

.empty-state p {
    font-size: 14px;
    color: var(--sp-text-muted);
    margin: 0;
}

/* Stale Deal Work Queue (Screen 13) */
.stale-deals-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.stale-deal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f8fafc;
    border: 1px solid var(--sp-border);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.stale-deal-item:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

.stale-deal-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stale-indicator {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: #ffffff;
    flex-shrink: 0;
}

.indicator-red {
    background-color: var(--sp-danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.indicator-amber {
    background-color: var(--sp-warning);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.stale-customer-name strong {
    font-size: 15px;
    color: var(--sp-primary);
}

.stale-ref {
    font-size: 13px;
    color: var(--sp-text-muted);
    font-weight: 600;
    margin-left: 4px;
}

.stale-subtext {
    font-size: 13px;
    color: var(--sp-text-muted);
    margin-top: 2px;
}

.stale-deal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stale-dot {
    display: inline-block;
    color: var(--sp-danger);
    font-size: 18px;
    vertical-align: middle;
    margin-left: 2px;
}

/* Status Pills */
.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: capitalize;
}

.status-submitted {
    background: #e0f2fe;
    color: #0369a1;
}

.status-reviewing {
    background: #eff6ff;
    color: #1d4ed8;
}

.status-with-lender {
    background: #fef3c7;
    color: #92400e;
}

.status-information-required {
    background: #fee2e2;
    color: #b91c1c;
}

.status-approved {
    background: #dcfce7;
    color: #15803d;
}

.status-documents {
    background: #ede9fe;
    color: #6d28d9;
}

.status-awaiting-completion {
    background: #fdf4ff;
    color: #a21caf;
}

.status-completed {
    background: #ecfdf5;
    color: #047857;
}

.status-unable-to-proceed {
    background: #f1f5f9;
    color: #475569;
}

/* Admin Central Filters (Screen 14) */
.admin-filters-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-item label {
    font-size: 12px;
    font-weight: 700;
    color: var(--sp-text-muted);
}

.filter-item.search-filter {
    flex: 1 1 240px;
}

.search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrap svg {
    position: absolute;
    left: 12px;
    color: var(--sp-text-muted);
}

.search-input-wrap input {
    padding-left: 38px;
    width: 100%;
}

.filter-actions {
    display: flex;
    align-items: flex-end;
}

.form-control {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid var(--sp-border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    background: #ffffff;
    color: var(--sp-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--sp-accent);
    box-shadow: 0 0 0 3px rgba(29, 99, 237, 0.12);
}

/* Portal Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.portal-table thead th {
    background: #f8fafc;
    color: var(--sp-text-muted);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 14px;
    border-bottom: 2px solid var(--sp-border);
    white-space: nowrap;
}

.portal-table tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--sp-border);
    color: var(--sp-text);
    vertical-align: middle;
}

.portal-table tbody tr:hover {
    background: #f8fafc;
}

.portal-table tbody tr:last-child td {
    border-bottom: none;
}

.table-subtext {
    font-size: 12px;
    color: var(--sp-text-muted);
    margin-top: 3px;
}

.table-empty {
    text-align: center;
    padding: 32px 16px;
    color: var(--sp-text-muted);
}

/* Modal Window (Screen 15) */
.portal-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 30, 51, 0.65);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.portal-modal-card {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 12, 52, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.06);
    padding: 28px 32px 32px 32px;
    box-sizing: border-box;
    position: relative;
    animation: modalCardPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-modal-card.portal-modal-lg {
    max-width: 680px;
    width: 95%;
}

.modal-section-heading {
    font-size: 11.5px;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin: 0 0 14px 0;
    padding-bottom: 6px;
    border-bottom: 1.5px solid #f1f5f9;
}

@keyframes modalCardPopIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.portal-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 22px;
    gap: 16px;
}

.modal-title {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: #000C34;
    letter-spacing: -0.3px;
    line-height: 1.3;
}

.modal-subtitle {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.modal-close-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    box-sizing: border-box;
}

.modal-close-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
    transform: scale(1.05);
}

/* Modal Form Groups, Labels & Grid */
.portal-modal-card .form-group,
.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.portal-modal-card label,
.portal-modal-card .form-group label,
.form-group label {
    display: block;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 0 7px 0 !important;
    letter-spacing: -0.1px;
    text-transform: none !important;
    line-height: 1.3 !important;
}

.portal-modal-card label strong,
.form-group label strong {
    font-weight: 700 !important;
    font-size: 12.5px !important;
    color: #1e293b !important;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 0;
}

@media (max-width: 560px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Form Controls inside Modals */
.portal-modal-card .form-control,
.form-control {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13.5px;
    font-family: inherit;
    background-color: #ffffff;
    color: #0f172a;
    transition: all 0.15s ease-in-out;
    line-height: 1.4;
    outline: none;
}

.portal-modal-card .form-control:focus,
.form-control:focus {
    border-color: #1d63ed;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(29, 99, 237, 0.12);
}

.portal-modal-card select.form-control,
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.portal-modal-card textarea.form-control,
textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.4;
}

.form-group-checkbox {
    margin: 16px 0;
}

.form-group-checkbox label {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #334155 !important;
    cursor: pointer;
    margin: 0 !important;
}

.form-group-checkbox input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: #1d63ed;
    border-radius: 4px;
    cursor: pointer;
    margin: 0;
}

/* Modal Actions Bar */
.modal-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
    gap: 12px;
}

.modal-actions-bar .right-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Summary Strip in Deal Modal */
.modal-deal-summary-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 0 0 20px 0;
}

.summary-item {
    display: flex;
    flex-direction: column;
}

.summary-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.summary-value {
    font-size: 14px;
    font-weight: 800;
    color: #000C34;
    margin-top: 2px;
}

/* Reports & MI Charts (Screen 17) */
.reports-charts-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 20px;
}

@media (max-width: 992px) {
    .reports-charts-grid {
        grid-template-columns: 1fr;
    }
}

.bar-chart-container {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    height: 220px;
    padding: 30px 12px 0 12px;
    border-bottom: 2px solid var(--sp-border, #e2e8f0);
    margin-top: 20px;
    position: relative;
    background: #fcfdfe;
    border-radius: 8px 8px 0 0;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    position: relative;
}

.bar-fill {
    width: 100%;
    max-width: 38px;
    background: linear-gradient(180deg, #bfdbfe 0%, #dbeafe 100%);
    border: 1px solid #93c5fd;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

.bar-fill:hover {
    background: linear-gradient(180deg, #60a5fa 0%, #93c5fd 100%);
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 99, 237, 0.15);
}

.bar-fill.active {
    background: linear-gradient(180deg, #1d63ed 0%, #3b82f6 100%);
    border-color: #1d4ed8;
    box-shadow: 0 4px 14px rgba(29, 99, 237, 0.25);
}

.bar-col span {
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    margin-top: 10px;
}

.bar-col.active span {
    color: #1d63ed;
    font-weight: 700;
}

.donut-chart-flex {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.donut-visual {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.donut-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut-center-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-total {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: var(--sp-primary, #000C34);
    line-height: 1.1;
}

.donut-sub {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.05em;
    margin-top: 2px;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 180px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: #1e293b;
    font-weight: 500;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-row strong {
    margin-left: auto;
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
}

/* WP Admin integration wrap */
.macmanus-portal-admin-wrap {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 20px 20px 20px 0;
    color: var(--sp-text);
}

.macmanus-portal-admin-wrap * {
    box-sizing: border-box;
}

.macmanus-portal-admin-wrap .portal-heading {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    color: var(--sp-primary);
    letter-spacing: -0.5px;
}

.macmanus-portal-admin-wrap .portal-subheading {
    margin: 4px 0 0 0;
    font-size: 14px;
    color: var(--sp-text-muted);
}

.macmanus-portal-admin-wrap .btn {
    font-family: inherit;
    line-height: normal;
    text-decoration: none;
    outline: none;
}

.macmanus-portal-admin-wrap select,
.macmanus-portal-admin-wrap input[type="text"],
.macmanus-portal-admin-wrap textarea {
    font-family: inherit;
}

/* ==========================================================================
   RESPONSIVE ADAPTATIONS (Desktop / Tablet / Mobile)
   ========================================================================== */
@media (max-width: 1024px) {
    .macmanus-portal-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        box-shadow: none;
    }

    .macmanus-portal-sidebar.mobile-open {
        left: 0;
        box-shadow: 15px 0 35px rgba(0, 0, 0, 0.4);
    }

    .sidebar-mobile-close {
        display: block;
    }

    .mobile-toggle-btn {
        display: block;
    }

    .macmanus-auth-grid {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 16px 20px;
    }

    .auth-hero-title {
        font-size: 32px;
    }

    .auth-card-col {
        justify-self: center;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .macmanus-top-bar {
        padding: 0 16px;
    }

    .top-bar-search {
        display: none;
    }

    .top-bar-user-menu .user-info-text {
        display: none;
    }

    .macmanus-view-container {
        padding: 16px;
    }

    .auth-hero-col {
        display: none;
    }

    .auth-card-col {
        max-width: 100%;
    }

    .macmanus-auth-top-header {
        padding: 16px 20px;
    }

    .macmanus-auth-card {
        padding: 24px 20px;
    }
}

/* Quote Selection & Mandatory Quote UX */
.btn-change-quote {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-change-quote:hover {
    background: #a7f3d0;
    color: #047857;
}

.quotes-selection-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.quote-picker-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.quote-picker-card:hover {
    border-color: #1d63ed;
    background: #f8faff;
    box-shadow: 0 6px 16px rgba(29, 99, 237, 0.1);
    transform: translateY(-1px);
}

.quote-picker-ref {
    font-family: monospace;
    font-weight: 700;
    font-size: 13.5px;
    color: #1d63ed;
    background: #eff6ff;
    padding: 2px 7px;
    border-radius: 5px;
}

.quote-picker-pill {
    font-size: 11.5px;
    font-weight: 600;
    color: #059669;
    background: #ecfdf5;
    border-radius: 4px;
    padding: 2px 7px;
    border: 1px solid #a7f3d0;
}

.quote-picker-meta {
    font-size: 12.5px;
    color: #64748b;
    margin-top: 4px;
}

.quote-picker-repayment {
    font-size: 15px;
    font-weight: 800;
    color: #000C34;
}

.spinner-small {
    width: 22px;
    height: 22px;
    border: 2.5px solid #e2e8f0;
    border-top-color: #1d63ed;
    border-radius: 50%;
    animation: spSpin 0.75s linear infinite;
}

@keyframes spSpin {
    to { transform: rotate(360deg); }
}

/* Company / Trading Name Autocomplete Dropdown */
.company-autocomplete-wrap {
    position: relative;
}

.company-autocomplete-spinner {
    position: absolute;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #1d63ed;
    border-radius: 50%;
    animation: spSpin 0.75s linear infinite;
    pointer-events: none;
    z-index: 5;
}

.company-autocomplete-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    z-index: 5;
    transition: color 0.15s ease;
}

.company-autocomplete-clear-btn:hover {
    color: #ef4444;
}

.company-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1050;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 12, 52, 0.15), 0 8px 10px -6px rgba(0, 12, 52, 0.1);
    margin: 0;
    padding: 4px 0;
    list-style: none;
    max-height: 260px;
    overflow-y: auto;
}

.company-suggestions-dropdown li {
    padding: 9px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.company-suggestions-dropdown li:last-child {
    border-bottom: none;
}

.company-suggestions-dropdown li:hover,
.company-suggestions-dropdown li.active {
    background: #eff6ff;
}

.company-suggestions-dropdown .company-item-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: #000C34;
}

.company-suggestions-dropdown .company-number {
    font-family: monospace;
    font-size: 11.5px;
    font-weight: 600;
    color: #1d63ed;
    background: #eff6ff;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid #bfdbfe;
    white-space: nowrap;
}

.company-suggestions-dropdown .company-item-address {
    font-size: 11.5px;
    color: #64748b;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.company-suggestions-dropdown .company-empty-hint {
    padding: 12px 14px;
    font-size: 12.5px;
    color: #64748b;
    text-align: center;
}

/* ==========================================================================
   Quote Dashboard & Inline Referral Enhancements
   ========================================================================== */

.qpd-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.qpd-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary, #000C34);
    letter-spacing: -0.02em;
    margin: 4px 0 6px 0;
}

.qpd-subtitle {
    font-size: 14px;
    color: var(--text-secondary, #64748b);
    margin: 0;
}

.qpd-empty-state {
    text-align: center;
    padding: 60px 24px;
    background: #ffffff;
    border: 1px dashed var(--border, #cbd5e1);
    border-radius: 12px;
}

.qpd-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #eff6ff;
    color: var(--primary, #1d63ed);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.qpd-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary, #000C34);
    margin: 0 0 8px 0;
}

.qpd-empty-desc {
    font-size: 14px;
    color: var(--text-secondary, #64748b);
    max-width: 440px;
    margin: 0 auto 24px auto;
    line-height: 1.5;
}

.quote-converted-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
}

.quote-available-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    background: #eff6ff;
    color: #1d63ed;
    border: 1px solid #bfdbfe;
    border-radius: 9999px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.2;
}

.qpd-tab-btn {
    transition: all 0.15s ease;
}

.qpd-tab-btn:hover {
    background: #f1f5f9;
    color: var(--text-primary, #000C34);
}

.qpd-tab-btn.active {
    background: #000C34 !important;
    color: #ffffff !important;
}

.quote-ref-mono {
    font-family: monospace;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: var(--text-primary, #000C34);
}

.btn.btn-xs,
.btn-xs {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    line-height: 1.3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-outline-danger {
    background: transparent;
    border: 1px solid #fca5a5;
    color: #dc2626;
    transition: all 0.15s ease;
}

.btn-outline-danger:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #b91c1c;
}

.qpd-quote-row:hover {
    background-color: #f8fafc;
}

.wizard-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--sp-border, #e2e8f0);
}

.qpd-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.qpd-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--brand-navy, #000C34);
    margin: 0 0 4px 0;
    letter-spacing: -0.02em;
}

.qpd-subtitle {
    font-size: 13.5px;
    color: var(--text-secondary, #64748b);
    margin: 0;
}

.quote-actions-cell {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}

.quote-actions-cell .btn {
    box-shadow: 0 1px 2px rgba(0, 12, 52, 0.04);
}

/* ==========================================================================
   Dashboard Analytics Grid & Interactive Performance Graph
   ========================================================================== */

.dashboard-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .dashboard-analytics-grid {
        grid-template-columns: 1fr;
    }
}

.analytics-chart-card,
.analytics-donut-card {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.analytics-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.analytics-eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1d63ed;
    margin-bottom: 2px;
}

.analytics-title {
    font-size: 18px;
    font-weight: 800;
    color: #000C34;
    margin: 0 0 4px 0;
    letter-spacing: -0.01em;
}

.analytics-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.analytics-metrics-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.analytics-metric-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    flex-direction: column;
}

.analytics-metric-pill .pill-label {
    font-size: 10.5px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.analytics-metric-pill .pill-val {
    font-size: 14.5px;
    font-weight: 800;
    color: #000C34;
    margin-top: 1px;
}

.chart-container {
    position: relative;
    width: 100%;
    margin-top: 6px;
}

.pipeline-chart-svg {
    width: 100%;
    height: auto;
    min-height: 200px;
    max-height: 250px;
    overflow: visible;
}

.chart-point-target {
    cursor: pointer;
}

.chart-point-dot {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-point-target:hover .chart-point-dot {
    r: 7.5;
    stroke-width: 3.5;
    fill: #ffffff;
    stroke: #1d63ed;
    filter: drop-shadow(0 2px 6px rgba(29, 99, 237, 0.4));
}

@keyframes pointPulse {
    0% { r: 6px; opacity: 0.4; }
    50% { r: 12px; opacity: 0.1; }
    100% { r: 6px; opacity: 0.4; }
}

.chart-point-pulse {
    animation: pointPulse 2.4s infinite ease-in-out;
}

.chart-tooltip {
    position: absolute;
    background: #000C34;
    color: #ffffff;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    pointer-events: none;
    box-shadow: 0 10px 25px -5px rgba(0, 12, 52, 0.35);
    z-index: 10;
    transition: transform 0.15s ease, opacity 0.15s ease;
    transform: translate(-50%, -115%);
}

.chart-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0 5px;
    border-style: solid;
    border-color: #000C34 transparent transparent transparent;
}

.tooltip-month {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
}

.tooltip-val {
    font-size: 14px;
    font-weight: 800;
    color: #60a5fa;
    margin: 2px 0;
}

.tooltip-deals {
    font-size: 11px;
    color: #e2e8f0;
}

.chart-legend-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    margin-top: 14px;
    font-size: 12px;
    color: #64748b;
    flex-wrap: wrap;
    gap: 12px;
}

.legend-items {
    display: flex;
    gap: 18px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
}

.legend-line-indicator {
    width: 14px;
    height: 3.5px;
    background: #1d63ed;
    border-radius: 2px;
}

.legend-bar-indicator {
    width: 10px;
    height: 10px;
    background: #bfdbfe;
    border-radius: 3px;
}

.legend-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #059669;
    font-weight: 600;
}

/* Donut Chart Styling */
.donut-chart-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.donut-svg {
    width: 130px;
    height: 130px;
}

.donut-breakdown-list {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.donut-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    margin-bottom: 6px;
}

.donut-row-info {
    display: flex;
    align-items: center;
    gap: 7px;
}

.donut-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.donut-status-name {
    color: #334155;
    font-weight: 600;
}

.donut-row-stats {
    font-size: 12px;
}

.donut-count {
    color: #0f172a;
    font-weight: 700;
}

.donut-pct {
    color: #64748b;
}

.donut-progress-track {
    width: 100%;
    height: 5px;
    background: #f1f5f9;
    border-radius: 9999px;
    overflow: hidden;
}

.donut-progress-bar {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Unified 3-Phase Stage Selector & Requirement Chips (Deal Status Modal)
   ========================================================================== */

.modal-stage-selector-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stage-phase-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stage-phase-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
}

.stage-phase-grid {
    display: grid;
    gap: 6px;
}

.stage-phase-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stage-phase-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.stage-phase-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 580px) {
    .stage-phase-grid.cols-4,
    .stage-phase-grid.cols-3,
    .stage-phase-grid.cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.quick-stage-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-stage-btn:hover {
    border-color: #93c5fd;
    background: #f0f7ff;
    color: #1d63ed;
}

.quick-stage-btn.active {
    background: #ffffff !important;
    color: #1d63ed !important;
    border-color: #1d63ed !important;
    box-shadow: 0 0 0 2px rgba(29, 99, 237, 0.2);
    font-weight: 700;
}

.stage-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-left: 6px;
}

.dot-blue { background: #3b82f6; }
.dot-amber { background: #f59e0b; }
.dot-indigo { background: #6366f1; }
.dot-rose { background: #f43f5e; }
.dot-emerald { background: #10b981; }
.dot-purple { background: #a855f7; }
.dot-cyan { background: #06b6d4; }
.dot-green { background: #059669; }
.dot-slate { background: #94a3b8; }

.quick-stage-btn.active .stage-dot {
    box-shadow: 0 0 0 2px #bfdbfe;
}

/* Common Requirements Chips */
.modal-req-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.modal-req-chip {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.modal-req-chip:hover {
    background: #eff6ff;
    color: #1d63ed;
    border-color: #bfdbfe;
}
/* My Profile (supplier users) */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 20px;
    align-items: start;
}

@media (max-width: 960px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

.profile-page .form-control[readonly] {
    background: #f1f5f9;
    color: #64748b;
    cursor: not-allowed;
}

.profile-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    margin: 8px 0 20px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.profile-meta dt {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin: 0 0 2px;
}

.profile-meta dd {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.profile-meta-sub {
    font-weight: 500;
    color: #64748b;
}

.profile-actions {
    display: flex;
    justify-content: flex-end;
}

.profile-page .password-rules li {
    color: #64748b;
}

.profile-page .password-rules li::before {
    color: #94a3b8;
}

.profile-page .password-rules li.is-met {
    color: #047857;
}

.profile-page .password-rules li.is-met::before {
    color: #059669;
}

.profile-page .macmanus-alert {
    margin: 0 0 16px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
}

.profile-page .macmanus-alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
}

.profile-page .macmanus-alert-error {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
}

/* ==========================================================================
   MULTI-TERM QUOTE COMPARISON CARDS & WEEKLY REPAYMENTS
   ========================================================================== */
.quote-term-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 8px;
}

@media (max-width: 991px) {
    .quote-term-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .quote-term-cards-grid {
        grid-template-columns: 1fr;
    }
}

.quote-term-card {
    background: #ffffff;
    border: 1.5px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 14px 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    user-select: none;
}

.quote-term-card:hover {
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(29, 99, 237, 0.08);
}

.quote-term-card.active {
    border-color: #1d63ed;
    background: #f8faff;
    box-shadow: 0 4px 16px rgba(29, 99, 237, 0.14);
}

.term-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.term-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
}

.term-card-badge {
    font-size: 10.5px;
    font-weight: 700;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
}

.quote-term-card.active .term-card-badge {
    background: #e0f2fe;
    color: #0284c7;
}

.term-card-body {
    margin: 4px 0 10px 0;
}

.term-card-monthly {
    font-size: 17px;
    font-weight: 800;
    color: #1d63ed;
    line-height: 1.2;
}

.term-card-monthly .currency {
    font-size: 13px;
    font-weight: 700;
}

.term-card-monthly .suffix {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}

.term-card-weekly {
    font-size: 12px;
    color: #059669;
    margin-top: 5px;
    font-weight: 600;
}

.term-card-footer {
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
    text-align: center;
}

.term-select-tag {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    transition: color 0.15s ease;
}

.quote-term-card.active .term-select-tag {
    color: #1d63ed;
}

.status-badge.status-draft,
.status-pill.status-draft {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

/* Rate Tier Badges (Visual Parity with macmanusassetfinanceportal) */
.portal-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
    white-space: nowrap;
    vertical-align: middle;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.15s ease-in-out;
}

.portal-tier-badge .tier-badge-icon {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* TOP TIER: Gold / Amber Gradient with Crown */
.portal-tier-badge.tier-top {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #d97706 100%);
    color: #ffffff;
    border: 1px solid rgba(252, 211, 77, 0.5);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}
.portal-tier-badge.tier-top .tier-badge-icon {
    fill: #ffffff;
}

/* MID TIER: MacManus Royal Blue with Award */
.portal-tier-badge.tier-mid {
    background: #1d63ed;
    color: #ffffff;
    border: 1px solid #60a5fa;
    box-shadow: 0 2px 6px rgba(29, 99, 237, 0.2);
}
.portal-tier-badge.tier-mid .tier-badge-icon {
    stroke: #ffffff;
}

/* LOW TIER: Slate / Charcoal with Layers */
.portal-tier-badge.tier-low {
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid #475569;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.15);
}
.portal-tier-badge.tier-low .tier-badge-icon {
    stroke: #cbd5e1;
}

/* CUSTOM TIER: Teal / Cyan Accent */
.portal-tier-badge.tier-custom {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    color: #ffffff;
    border: 1px solid #38bdf8;
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.2);
}
.portal-tier-badge.tier-custom .tier-badge-icon {
    stroke: #ffffff;
}



/* ==========================================================================
   SUPPORT & OPERATIONS HUB STYLING
   ========================================================================== */
.portal-support-hub-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.support-hub-header {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

@media (min-width: 768px) {
    .support-hub-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.support-hub-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #1d63ed;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 4px 10px;
    border-radius: 9999px;
    margin-bottom: 8px;
}

.hub-status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 9999px;
    animation: pulse 2s infinite;
}

.support-hub-title {
    font-size: 22px;
    font-weight: 800;
    color: #000C34;
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.support-hub-subtitle {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
    max-width: 680px;
}

.support-hub-header-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.hub-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
}

.hub-meta-pill.rm-pill {
    background: #faf5ff;
    border-color: #e9d5ff;
    color: #6b21a8;
}

/* Grid Layout */
.support-hub-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 992px) {
    .support-hub-grid {
        grid-template-columns: 1fr 340px;
    }
}

.support-hub-main-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.support-hub-side-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Cards */
.support-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.support-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.card-header-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-header-icon.history-icon {
    background: #f1f5f9;
}

.support-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 2px 0;
}

.support-card-desc {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

/* Ticket Form Controls */
.support-ticket-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ticket-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.category-radio-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.category-radio-btn input {
    display: none;
}

.category-radio-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.category-radio-btn.active {
    background: #eff6ff;
    border-color: #1d63ed;
    box-shadow: 0 0 0 1px #1d63ed;
}

.category-radio-btn .cat-icon {
    font-size: 14px;
}

.category-radio-btn .cat-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #1e293b;
}

.category-radio-btn.active .cat-label {
    color: #1d63ed;
}

.form-row-dual {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 640px) {
    .form-row-dual {
        grid-template-columns: 1fr 1fr;
    }
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.form-label .required {
    color: #ef4444;
}

.form-input-text,
.form-input-select,
.form-input-textarea {
    width: 100%;
    padding: 9px 13px;
    font-size: 13px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.form-input-text:focus,
.form-input-select:focus,
.form-input-textarea:focus {
    outline: none;
    border-color: #1d63ed;
    box-shadow: 0 0 0 3px rgba(29, 99, 237, 0.12);
}

.form-input-textarea {
    resize: vertical;
    line-height: 1.5;
}

/* Feedback alert */
.ticket-feedback-box {
    margin-top: 4px;
}

.feedback-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.4;
}

.feedback-alert.success-alert {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.feedback-alert.error-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.portal-sync-tag {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 700;
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 9999px;
}

/* Action Row */
.form-action-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    margin-top: 4px;
}

@media (min-width: 640px) {
    .form-action-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.btn-submit-ticket {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: #1d63ed;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    box-shadow: 0 1px 2px rgba(29, 99, 237, 0.2);
}

.btn-submit-ticket:hover {
    background: #154ec4;
}

.btn-submit-ticket:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.form-submit-footnote {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #64748b;
}

/* Tickets History Table */
.tickets-history-list {
    margin-top: 10px;
}

.tickets-empty-state {
    text-align: center;
    padding: 32px 16px;
}

.tickets-empty-state .empty-title {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin: 8px 0 4px 0;
}

.tickets-empty-state .empty-desc {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
    max-width: 400px;
    margin: 0 auto;
}

.tickets-table-wrap {
    overflow-x: auto;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.tickets-table th {
    background: #f8fafc;
    padding: 10px 14px;
    font-size: 10.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e2e8f0;
}

.tickets-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

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

.ticket-ref-badge {
    font-family: monospace;
    font-weight: 700;
    font-size: 11.5px;
    color: #1d63ed;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    padding: 2px 7px;
    border-radius: 6px;
}

.ticket-subject-text {
    font-weight: 600;
    color: #0f172a;
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-deal-chip {
    display: inline-block;
    font-size: 10.5px;
    color: #64748b;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
    margin-top: 3px;
}

.ticket-cat-badge {
    display: inline-block;
    font-size: 11px;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 2px 8px;
    border-radius: 6px;
}

.ticket-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 9999px;
}

.ticket-status-pill.status-open {
    background: #eff6ff;
    color: #1d63ed;
    border: 1px solid #bfdbfe;
}

.ticket-status-pill .pill-dot {
    width: 5px;
    height: 5px;
    border-radius: 9999px;
    background: currentColor;
}

.tick-col-date {
    color: #64748b;
    font-size: 11.5px;
    white-space: nowrap;
}

/* Right Side Column Cards */
.side-callout-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.side-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.side-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.side-icon-circle.phone-circle {
    background: #ecfdf5;
    color: #059669;
}

.side-icon-circle.email-circle {
    background: #eff6ff;
    color: #1d63ed;
}

.side-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.side-card-subtitle {
    font-size: 11.5px;
    color: #64748b;
    margin: 2px 0 0 0;
}

.side-phone-display {
    margin-bottom: 14px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
}

.phone-number-big {
    font-size: 18px;
    font-weight: 800;
    color: #000C34;
    letter-spacing: -0.01em;
}

.side-email-display {
    margin-bottom: 14px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
}

.email-address-text {
    font-size: 13.5px;
    font-weight: 700;
    color: #000C34;
    word-break: break-all;
}

.btn-call-now,
.btn-email-now {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
    box-sizing: border-box;
}

.btn-call-now {
    background: #059669;
    color: #ffffff;
}

.btn-call-now:hover {
    background: #047857;
    color: #ffffff;
}

.btn-email-now {
    background: #1d63ed;
    color: #ffffff;
}

.btn-email-now:hover {
    background: #154ec4;
    color: #ffffff;
}

/* Info Side Card */
.side-info-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon.sla-icon {
    background: #ecfdf5;
}

.info-icon.rm-icon {
    background: #faf5ff;
}

.info-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.info-value {
    font-size: 12.5px;
    font-weight: 600;
    color: #0f172a;
    margin-top: 2px;
}

.rm-highlight-row {
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}


/* ==========================================================================
   UPGRADED CONTACT MACMANUS & INTERACTIVE TICKETS STYLING
   ========================================================================== */
.rm-featured-card {
    background: linear-gradient(135deg, #0b1a30 0%, #172a4d 100%);
    border-radius: 16px;
    padding: 22px 24px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(11, 26, 48, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (min-width: 768px) {
    .rm-featured-card {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }
}

.rm-featured-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1d63ed 0%, #3b82f6 100%);
    color: #ffffff;
    font-size: 20px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    shrink-0: 0;
    box-shadow: 0 4px 12px rgba(29, 99, 237, 0.35);
}

.rm-featured-info {
    flex: 1;
    min-width: 0;
}

.rm-badge-tag {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #93c5fd;
    margin-bottom: 4px;
}

.rm-featured-name {
    font-size: 19px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.rm-featured-desc {
    font-size: 12.5px;
    color: #cbd5e1;
    margin: 0;
    line-height: 1.4;
}

.rm-featured-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    shrink-0: 0;
}

.btn-rm-call, .btn-rm-email {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-rm-call {
    background: #1d63ed;
    color: #ffffff;
}

.btn-rm-call:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 99, 237, 0.3);
}

.btn-rm-email {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-rm-email:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Category Grid Improvements */
.ticket-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.category-radio-btn {
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    user-select: none;
}

.category-radio-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    transform: translateY(-1px);
}

.category-radio-btn.active {
    border-color: #1d63ed;
    background: #f0f7ff;
    box-shadow: 0 2px 8px rgba(29, 99, 237, 0.12);
}

.category-radio-btn input[type="radio"] {
    display: none;
}

.cat-icon-badge {
    font-size: 18px;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    shrink-0: 0;
}

.cat-blue { background: #eff6ff; }
.cat-amber { background: #fef3c7; }
.cat-emerald { background: #ecfdf5; }
.cat-purple { background: #f3e8ff; }
.cat-indigo { background: #e0e7ff; }

.cat-details {
    display: flex;
    flex-direction: column;
}

.cat-label {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.cat-subtext {
    font-size: 10.5px;
    color: #64748b;
    margin-top: 2px;
}

/* Quick Subject Chips */
.subject-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.quick-subject-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.chip-hint {
    font-size: 10.5px;
    color: #94a3b8;
    font-weight: 600;
}

.quick-chip {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.quick-chip:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d63ed;
}

/* Right Sidebar Phone Card: NO GREEN, Brand Navy */
.side-callout-card.phone-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #1d63ed;
    border-radius: 14px;
    padding: 20px;
}

.side-callout-card.email-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #0b1a30;
    border-radius: 14px;
    padding: 20px;
}

.phone-circle {
    background: #eff6ff;
    color: #1d63ed;
}

.email-circle {
    background: #f8fafc;
    color: #0b1a30;
}

.btn-call-now {
    background: #1d63ed !important;
    color: #ffffff !important;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-call-now:hover {
    background: #164ec9 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 99, 237, 0.25);
}

.btn-email-now {
    background: #0b1a30 !important;
    color: #ffffff !important;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-email-now:hover {
    background: #162a4d !important;
    transform: translateY(-1px);
}

/* Interactive Ticket Threads */
.tickets-items-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-interactive-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ticket-interactive-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.ticket-interactive-card.thread-open {
    border-color: #bfdbfe;
    box-shadow: 0 4px 14px rgba(29, 99, 237, 0.08);
}

.ticket-card-main-row {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    flex-wrap: wrap;
}

.ticket-badge-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 90px;
}

.ticket-ref-badge {
    font-size: 11px;
    font-weight: 800;
    color: #1d63ed;
    background: #eff6ff;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    width: fit-content;
}

.ticket-cat-badge {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.ticket-info-cell {
    flex: 1;
    min-width: 200px;
}

.ticket-subject-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.ticket-submeta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: #64748b;
}

.ticket-deal-chip {
    background: #f1f5f9;
    color: #334155;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 600;
}

.ticket-status-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-toggle-ticket-thread {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.btn-toggle-ticket-thread:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d63ed;
}

/* Thread Expanded Feed */
.ticket-thread-expandable {
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    padding: 18px 20px;
}

.ticket-messages-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
    margin-bottom: 14px;
}

.thread-msg-bubble {
    border-radius: 12px;
    padding: 12px 16px;
    max-width: 85%;
    font-size: 12.5px;
    line-height: 1.5;
}

.thread-msg-bubble.is-supplier {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    align-self: flex-start;
}

.thread-msg-bubble.is-staff {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    align-self: flex-end;
}

.msg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    font-size: 11px;
}

.msg-author {
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.staff-role-badge {
    background: #1d63ed;
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 4px;
}

.msg-time {
    color: #94a3b8;
}

.msg-body {
    color: #334155;
    word-break: break-word;
}

/* Quick Reply Input */
.ticket-quick-reply-form .reply-input-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ticket-reply-input {
    flex: 1;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 12.5px;
    color: #0f172a;
    transition: all 0.15s ease;
}

.ticket-reply-input:focus {
    outline: none;
    border-color: #1d63ed;
    box-shadow: 0 0 0 3px rgba(29, 99, 237, 0.12);
}

.btn-reply-send {
    padding: 10px 18px;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1d63ed;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-reply-send:hover {
    background: #164ec9;
}

.desk-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.live-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.desk-status-text {
    display: flex;
    flex-direction: column;
}

.status-live-bold {
    font-size: 11.5px;
    font-weight: 700;
    color: #0f172a;
}

.status-live-sub {
    font-size: 10.5px;
    color: #64748b;
}


/* ==========================================================================
   INTERACTIVE ON-SITE GUIDED TOUR STYLES
   ========================================================================== */
.tour-nav-pill {
    background: #eff6ff;
    color: #1d63ed;
    font-size: 9.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 9999px;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid rgba(29, 99, 237, 0.2);
}

.portal-tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 99998;
    pointer-events: auto;
}

.portal-tour-spotlight {
    position: fixed;
    z-index: 100001;
    box-shadow: 0 0 0 9999px rgba(11, 22, 44, 0.78), 0 0 0 3px rgba(37, 99, 235, 0.5);
    border: 2px solid #2563eb;
    border-radius: 12px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-tour-popover {
    position: fixed;
    z-index: 100002;
    width: 380px;
    max-width: calc(100vw - 28px);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 20px 45px rgba(11, 22, 44, 0.32);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: top 0.25s cubic-bezier(0.16, 1, 0.3, 1), left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    animation: tourPopFadeIn 0.25s ease-out;
}

/* Modal layering when interactive tour is active */
body.portal-tour-active #new-referral-modal {
    z-index: 100005 !important;
    background: transparent !important;
    backdrop-filter: none !important;
}

body.portal-tour-active #new-referral-modal .portal-modal-card {
    position: relative;
    z-index: 100006 !important;
    box-shadow: 0 25px 60px rgba(0, 12, 52, 0.45), 0 0 0 2px #2563eb !important;
}

body.portal-tour-active #portal-tour-popover {
    z-index: 100010 !important;
}

.tour-detail-list {
    margin: 10px 0 12px 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.tour-detail-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    color: #334155;
    line-height: 1.45;
}

.tour-detail-list li svg,
.tour-detail-list li .tour-check-icon {
    flex-shrink: 0;
    color: #10b981;
    margin-top: 2px;
}

.tour-detail-list strong {
    color: #0f172a;
    font-weight: 700;
}

.tour-tip-box {
    background: #f8fafc;
    border-left: 3px solid #1d63ed;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 11.5px;
    color: #475569;
    line-height: 1.45;
    margin-top: 10px;
}

.tour-tip-box strong {
    color: #1d63ed;
}

.tour-pill-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    background: #eff6ff;
    color: #1d63ed;
    border: 1px solid #dbeafe;
    margin-left: 4px;
    vertical-align: middle;
}

@keyframes tourPopFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    cursor: grab;
    user-select: none;
}

.portal-tour-popover.is-dragging {
    cursor: grabbing !important;
    user-select: none !important;
    transition: none !important;
}

.portal-tour-popover.is-dragging * {
    user-select: none !important;
}

.popover-drag-hint {
    color: #94a3b8;
    font-size: 13px;
    letter-spacing: 1px;
    margin-left: 6px;
    display: inline-flex;
    align-items: center;
    cursor: grab;
}

.popover-step-badge {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #eff6ff;
    color: #1d63ed;
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid #bfdbfe;
}

.btn-tour-close {
    background: none;
    border: none;
    font-size: 16px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.btn-tour-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.popover-title {
    font-size: 16.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.popover-text {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 18px 0;
}

.popover-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.popover-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tour-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tour-dot:hover {
    background: #94a3b8;
}

.tour-dot.active {
    width: 18px;
    border-radius: 4px;
    background: #1d63ed;
}

.popover-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-tour-skip {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    text-decoration: underline;
    padding: 6px 8px;
    transition: color 0.15s ease;
}

.btn-tour-skip:hover {
    color: #475569;
}

.btn-tour-prev {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 7px 13px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-tour-prev:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.btn-tour-next {
    background: #1d63ed;
    border: none;
    border-radius: 8px;
    padding: 7px 15px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(29, 99, 237, 0.25);
}

.btn-tour-next:hover {
    background: #164ec9;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(29, 99, 237, 0.35);
}

/* Welcome Prompt Toast */
.portal-tour-welcome-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99990;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 36px rgba(11, 26, 48, 0.18);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    max-width: 480px;
    animation: toastSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toastSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.toast-sparkle-icon {
    font-size: 26px;
    line-height: 1;
    shrink-0: 0;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 2px;
}

.toast-desc {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.toast-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    shrink-0: 0;
}

.btn-toast-start {
    background: #1d63ed;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-toast-start:hover {
    background: #164ec9;
    box-shadow: 0 2px 8px rgba(29, 99, 237, 0.3);
}

.btn-toast-dismiss {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 10px;
    transition: color 0.15s ease;
    white-space: nowrap;
}

.btn-toast-dismiss:hover {
    color: #475569;
}

@media (max-width: 640px) {
    .portal-tour-welcome-toast {
        left: 14px;
        right: 14px;
        bottom: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .toast-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
