:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #333333;
    --border-color: #444444;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

canvas#net-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
    backdrop-filter: blur(5px);
}

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

.logo-img {
    height: 72px;
    width: auto;
    display: block;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

nav a.btn {
    border: 1px solid var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

nav a:hover {
    opacity: 1;
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.auth-title {
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: 1.6rem;
    letter-spacing: 0.02em;
}

.auth-subtitle {
    margin: 0 0 2rem;
    text-align: center;
    font-size: 0.95rem;
    color: #9a9a9a;
}

.auth-form .form-field {
    margin-bottom: 1rem;
}

.auth-container form p {
    margin-bottom: 1rem;
}

.auth-container label {
    display: block;
    font-size: 0.85rem;
    color: #b5b5b5;
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em;
}

input {
    width: 100%;
    padding: 0.8rem;
    margin-top: 0.5rem;
    background: #111;
    border: 1px solid var(--border-color);
    color: white;
    box-sizing: border-box;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    padding: 0;
    margin-top: 0;
    background: transparent;
}

input:focus {
    outline: none;
    border-color: #f0f0f0;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.field-help {
    color: #6e6e6e;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.field-help ul {
    padding-left: 1rem;
    margin: 0.4rem 0 0;
}

.field-error {
    color: #ff6b6b;
    font-size: 0.8rem;
    margin-top: 0.4rem;
}

.auth-alt {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
}

.auth-alt a {
    color: white;
    text-decoration: underline;
}

button[type="submit"] {
    display: block;
    width: 100%;
    padding: 1rem;
    background: white;
    color: black;
    border: none;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: background 0.2s;
}

button[type="submit"]:hover {
    background: #e0e0e0;
}

/* Dashboard */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

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

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: #111;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tr:hover {
    background: #111;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    border: 1px solid var(--border-color);
}

.status-NEW {
    color: #fff;
    border-color: #fff;
}

.status-CONTACTED {
    color: #ccc;
    border-color: #ccc;
}

.status-QUALIFIED {
    color: #fff;
    background: #333;
    border-color: #fff;
}

.status-CLOSED {
    color: #888;
    border-color: #444;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.btn-primary {
    background: white;
    color: black;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.ghost-btn {
    background: transparent;
    color: #cfcfcf;
    border: 1px solid #2b2b2b;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85rem;
}

.ghost-btn:hover {
    border-color: #3a3a3a;
    color: #fff;
}

.dashboard {
    display: grid;
    gap: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    flex-wrap: wrap;
}

.eyebrow {
    margin: 0 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.7rem;
    color: #8b8b8b;
}

.subtext {
    color: #909090;
    font-size: 0.95rem;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
}

.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    border: 1px solid #262626;
    border-radius: 14px;
    padding: 1.6rem;
    background: rgba(8, 8, 8, 0.85);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.chart-subtitle {
    font-size: 0.8rem;
    color: #8f8f8f;
}

.bar-chart {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.8rem;
    align-items: end;
    min-height: 180px;
}

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

.bar::before {
    content: "";
    width: 100%;
    height: var(--value);
    background: linear-gradient(180deg, #f0f0f0, #8c8c8c);
    border-radius: 999px 999px 8px 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.bar span {
    position: absolute;
    bottom: -1.4rem;
    font-size: 0.75rem;
    color: #8b8b8b;
}

.donut-chart {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: conic-gradient(#ffffff 0 40%, #8d8d8d 40% 65%, #5a5a5a 65% 85%, #2d2d2d 85% 100%);
    margin: 0 auto 1.2rem;
    position: relative;
}

.donut-chart::after {
    content: "";
    position: absolute;
    inset: 18px;
    background: #070707;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px #1f1f1f;
}

.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #cfcfcf;
    z-index: 1;
}

.legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 1rem;
    font-size: 0.8rem;
    color: #a5a5a5;
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-new {
    background: #ffffff;
}

.dot-contacted {
    background: #8d8d8d;
}

.dot-qualified {
    background: #5a5a5a;
}

.dot-closed {
    background: #2d2d2d;
}

.metric-card {
    border: 1px solid #262626;
    border-radius: 12px;
    padding: 1.4rem;
    background: rgba(10, 10, 10, 0.7);
}

.metric-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #8b8b8b;
    margin-bottom: 0.6rem;
}

.metric-value {
    font-size: 1.6rem;
}

.dashboard-table {
    background: rgba(0, 0, 0, 0.75);
    border-radius: 12px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.table-header h3 {
    margin: 0;
}

.table-header p {
    margin: 0.3rem 0 0;
    color: #8d8d8d;
    font-size: 0.85rem;
}

.table-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-form {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-input,
.filter-select {
    background: #0b0b0b;
    border: 1px solid #2b2b2b;
    color: #f1f1f1;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    width: auto;
    margin-top: 0;
}

.filter-input {
    min-width: 180px;
}

.bulk-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.5rem 0;
    flex-wrap: wrap;
}

.bulk-hint {
    color: #7f7f7f;
    font-size: 0.8rem;
}

.bulk-form table {
    margin-top: 0.6rem;
}

.bulk-form input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #ffffff;
}

.bulk-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bulk-submit {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    font-weight: 600;
}

.bulk-submit:hover:not(:disabled) {
    background: #e6e6e6;
    border-color: #e6e6e6;
}

.table-link {
    color: #f1f1f1;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.table-link:hover {
    border-bottom-color: #f1f1f1;
}

.status-form {
    margin: 0;
}

.status-select {
    background: #0b0b0b;
    border: 1px solid #2b2b2b;
    color: #f1f1f1;
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
}

.status-save {
    margin-left: 0.6rem;
    font-size: 0.75rem;
    color: #8b8b8b;
}

.table-empty {
    text-align: center;
    padding: 3rem;
    color: #888;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-top: 1px solid #1e1e1e;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-link {
    color: #f1f1f1;
    text-decoration: none;
    border: 1px solid #2b2b2b;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
}

.page-link:hover {
    border-color: #3a3a3a;
}

.page-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.page-status {
    color: #8d8d8d;
    font-size: 0.85rem;
}

.lead-detail {
    display: grid;
    gap: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.detail-card {
    border: 1px solid #262626;
    border-radius: 12px;
    padding: 1.6rem;
    background: rgba(10, 10, 10, 0.7);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 0;
    border-bottom: 1px solid #1e1e1e;
}

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

.detail-label {
    color: #8b8b8b;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.detail-value {
    font-size: 1rem;
    color: #f1f1f1;
}

.btn-secondary {
    color: white;
    text-decoration: none;
    border: 1px solid #2b2b2b;
    padding: 0.7rem 1.4rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.5);
}

/* Landing */
.hero {
    text-align: center;
    padding: 6rem 0;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -0.05em;
}

.hero p {
    font-size: 1.25rem;
    color: #888;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.landing {
    position: relative;
}

.landing::before {
    content: "";
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 780px;
    height: 380px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
    filter: blur(2px);
    pointer-events: none;
    z-index: 0;
}

.hero-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    text-align: left;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: 5rem 0 4rem;
}

.hero-copy h1 {
    font-size: 3.6rem;
    line-height: 1.05;
    margin: 1rem 0 1.5rem;
    letter-spacing: -0.04em;
}

.hero-copy p {
    font-size: 1.1rem;
    color: #b0b0b0;
    max-width: 520px;
}

.hero-badge {
    display: inline-flex;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #2b2b2b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #bfbfbf;
}

.hero-actions {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-panel {
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    padding: 2rem;
    background: linear-gradient(140deg, rgba(15, 15, 15, 0.95), rgba(0, 0, 0, 0.8));
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.signal-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.signal-item {
    border: 1px solid #2b2b2b;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4);
}

.signal-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #777;
    margin-bottom: 0.5rem;
}

.signal-value {
    font-size: 1.4rem;
    color: #f2f2f2;
}

.hero-queue {
    border-top: 1px solid #222;
    padding-top: 1.5rem;
    display: grid;
    gap: 0.9rem;
}

.queue-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: #cfcfcf;
}

.queue-pill {
    border: 1px solid #3a3a3a;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}

.landing-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0 3rem;
}

.stat-card {
    border: 1px solid #262626;
    border-radius: 12px;
    padding: 1.6rem;
    background: rgba(0, 0, 0, 0.6);
}

.stat-card h3 {
    font-size: 2rem;
    margin: 0 0 0.5rem;
}

.stat-card p {
    margin: 0;
    color: #9b9b9b;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.feature-card {
    border: 1px solid #262626;
    border-radius: 12px;
    padding: 1.6rem;
    background: rgba(12, 12, 12, 0.8);
}

.feature-card h4 {
    margin: 0 0 0.6rem;
    font-size: 1.1rem;
}

.feature-card p {
    margin: 0;
    color: #9c9c9c;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-copy,
.hero-panel,
.stat-card,
.feature-card {
    animation: riseIn 0.8s ease forwards;
}

.hero-panel {
    animation-delay: 0.08s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.12s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.18s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.12s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.18s;
}

@media (max-width: 720px) {
    .hero-copy h1 {
        font-size: 2.8rem;
    }

    .hero-panel {
        padding: 1.5rem;
    }

    .signal-list {
        grid-template-columns: 1fr;
    }

    .landing::before {
        width: 420px;
        height: 260px;
    }

    .dashboard-charts {
        grid-template-columns: 1fr;
    }

    .bar-chart {
        gap: 0.5rem;
    }
}
