:root {
    --primary: #FF8A00;
    --primary-dark: #cc6b00;
    --secondary: #0B63FF;
    --secondary-10: rgba(11, 99, 255, 0.06);
    --secondary-dark: #084ECC;
    --primary-10: rgba(255, 138, 0, 0.08);
    --dark: #0b0b0b;
    --text: #374151;
    --light: #EDF3FF;
    --page-pattern: url('/static/assets/world-dots-bg.svg?v=5');
    --white: #FFFFFF;
    --border: #E5E7EB;
    --shadow: 0 10px 30px rgba(11, 12, 11, 0.08);
    --radius: 28px;
    --navbar-height: 72px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: transparent;
    color: var(--dark);
    padding-top: var(--navbar-height);
    position: relative;
}

html {
    scroll-padding-top: var(--navbar-height);
    background-color: #FFFFFF;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-color: #FFFFFF;
    background-image:
        radial-gradient(ellipse 84% 68% at 50% 38%, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 64%, rgba(255, 255, 255, 0.5) 87%, #FFFFFF 95%),
        var(--page-pattern);
    background-size: 100% 100%, min(1220px, 95vw);
    background-repeat: no-repeat, no-repeat;
    background-position: center, center 36%;
    background-attachment: fixed;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo img {
    height: 64px;
    width: auto;
    max-width: none;
    min-height: 64px;
    object-fit: contain;
}

.logo-text h2 {
    font-size: 20px;
    line-height: 1.1;
}

.logo-text h2 span.blue {
    color: var(--secondary);
}

.logo-text small {
    color: var(--text);
    font-size: 11px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 22px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user {
    font-size: 13px;
    color: var(--text);
}

.apply-btn {
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

.apply-btn:hover {
    background: var(--primary-dark);
}

.logout-btn {
    background: var(--secondary);
}

.php-footer {
    padding: 28px 0 40px;
    text-align: center;
    color: var(--text);
    font-size: 13px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.flash {
    border-radius: 12px;
    padding: 12px 14px;
    margin: 16px auto;
    width: min(1200px, 92%);
    font-size: 14px;
}

.flash.success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.flash.error {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.nav-lead-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 999px;
    background: #EF4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.lead-toast-stack {
    position: fixed;
    top: calc(var(--navbar-height, 72px) + 16px);
    right: 16px;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.lead-toast {
    pointer-events: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
    transform: translateX(110%);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.lead-toast.is-visible { transform: translateX(0); opacity: 1; }
.lead-toast.is-leaving { transform: translateX(110%); opacity: 0; }

.lead-toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 138, 0, 0.12);
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 18px;
}

.lead-toast-body strong {
    display: block;
    font-size: 14px;
    color: var(--dark);
    margin-bottom: 4px;
}

.lead-toast-body p {
    font-size: 13px;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 10px;
}

.lead-toast-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lead-toast-view,
.lead-toast-dismiss {
    border: none;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.lead-toast-view { background: var(--primary); color: #fff; }
.lead-toast-dismiss { background: #F3F4F6; color: var(--text); }

.lead-toast-close {
    border: none;
    background: transparent;
    color: #9CA3AF;
    cursor: pointer;
    padding: 2px;
    font-size: 14px;
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
}
