:root {

    --bg-primary: #0f172a;
    --bg-secondary: #111827;

    --card-bg: rgba(17, 24, 39, 0.88);

    --border-color: rgba(255,255,255,0.08);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;

    --accent: #3b82f6;
    --accent-hover: #2563eb;

    --success: #10b981;
    --danger: #ef4444;

    --shadow:
        0 10px 40px rgba(0,0,0,0.35);

    --radius: 18px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {

    background:
        radial-gradient(circle at top left, #1e293b, transparent 40%),
        radial-gradient(circle at bottom right, #0f766e, transparent 30%),
        linear-gradient(135deg, #020617, #0f172a);

    min-height: 100vh;

    font-family:
        Inter,
        Segoe UI,
        Arial,
        sans-serif;

    color: var(--text-primary);
}

.login-page {

    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.login-card {

}


/* ============================================================
   LOGIN PREMIUM - RADAR EMPRESARIAL LVAS
============================================================ */

.login-premium-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    background: #020617;
    color: #f8fafc;
    overflow-x: hidden;
}

.login-premium-bg {
    min-height: 100vh;
    position: relative;

    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.42), transparent 34%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.30), transparent 34%),
        linear-gradient(135deg, #020617 0%, #0f172a 48%, #020617 100%);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 34px 18px;
}

.login-premium-wrapper {
    width: 100%;
    max-width: 520px;
    position: relative;
    z-index: 2;
}

.login-premium-card {
    background: rgba(15, 23, 42, 0.78);

    border: 1px solid rgba(96, 165, 250, 0.32);

    border-radius: 28px;

    padding: 38px 42px;

    box-shadow:
        0 30px 85px rgba(0, 0, 0, 0.52),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);

    backdrop-filter: blur(18px);
}

.login-premium-logo-area {
    text-align: center;
    margin-bottom: 24px;
}

.login-premium-logo {
    width: 240px;
    max-width: 82%;
    height: auto;
    display: inline-block;
}

.login-premium-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-premium-header h1 {
    margin: 0;
    font-size: 35px;
    line-height: 1.15;
    letter-spacing: -0.9px;
    color: #ffffff;
    font-weight: 800;
}

.login-premium-header p {
    margin: 14px 0 0;
    color: #aebbd0;
    font-size: 16px;
    line-height: 1.55;
}

.login-premium-form {
    margin-top: 12px;
}

.login-form-group {
    margin-bottom: 20px;
}

.login-form-group label {
    display: block;
    margin-bottom: 9px;
    color: #dbeafe;
    font-weight: 700;
    font-size: 14px;
}

.login-input-box {
    display: flex;
    align-items: center;
    gap: 12px;

    background: rgba(2, 6, 23, 0.47);

    border: 1px solid rgba(148, 163, 184, 0.25);

    border-radius: 14px;

    padding: 0 15px;

    transition: 0.2s ease;
}

.login-input-box:focus-within {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.login-input-icon {
    color: #93c5fd;
    font-size: 15px;
    width: 20px;
    text-align: center;
}

.login-input-box input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #ffffff;
    padding: 15px 0;
    font-size: 15px;
}

.login-input-box input::placeholder {
    color: #64748b;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 27px;
    gap: 14px;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #cbd5e1;
    font-size: 14px;
    cursor: pointer;
}

.login-remember input {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    cursor: pointer;
}

.login-forgot {
    color: #38bdf8;
    text-decoration: none;
    font-size: 14px;
}

.login-forgot:hover {
    text-decoration: underline;
}

.login-premium-button {
    width: 100%;

    border: none;
    border-radius: 15px;

    padding: 16px;

    background: linear-gradient(135deg, #38bdf8, #2563eb);

    color: white;

    font-size: 17px;
    font-weight: 800;

    cursor: pointer;

    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.36);

    transition: 0.2s ease;
}

.login-premium-button span {
    margin-left: 10px;
}

.login-premium-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 55px rgba(37, 99, 235, 0.46);
}

.login-alert-error {
    background: rgba(239, 68, 68, 0.13);
    border: 1px solid rgba(248, 113, 113, 0.28);
    color: #fecaca;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 22px;
    font-size: 14px;
}

.login-secure {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 31px;
    color: #94a3b8;
}

.login-secure-line {
    height: 1px;
    flex: 1;
    background: rgba(148, 163, 184, 0.22);
}

.login-secure-text {
    text-align: center;
    font-size: 14px;
    white-space: nowrap;
}

.login-secure-text small {
    display: block;
    margin-top: 4px;
    color: #64748b;
}

.login-premium-footer {
    text-align: center;
    margin-top: 28px;
    color: #cbd5e1;
}

.login-premium-footer strong {
    display: block;
    font-size: 15px;
    margin-bottom: 10px;
}

.login-premium-footer span {
    display: block;
    font-size: 13px;
    color: #94a3b8;
}

/* ============================================================
   EFEITO RADAR NO FUNDO
============================================================ */

.radar-circle {
    position: absolute;
    width: 470px;
    height: 470px;
    border-radius: 50%;
    border: 1px solid rgba(59, 130, 246, 0.15);
    pointer-events: none;
}

.radar-circle::before,
.radar-circle::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(59, 130, 246, 0.14);
}

.radar-circle::before {
    inset: 60px;
}

.radar-circle::after {
    inset: 135px;
}

.radar-circle-left {
    top: -210px;
    left: -170px;
}

.radar-circle-right {
    right: -210px;
    bottom: -180px;
}

/* pontos luminosos */
.radar-circle-left::marker,
.radar-circle-right::marker {
    display: none;
}

/* ============================================================
   RESPONSIVO
============================================================ */

@media (max-width: 560px) {

    .login-premium-bg {
        padding: 24px 14px;
    }

    .login-premium-card {
        padding: 30px 22px;
        border-radius: 22px;
    }

    .login-premium-logo {
        width: 200px;
    }

    .login-premium-header h1 {
        font-size: 28px;
    }

    .login-premium-header p {
        font-size: 15px;
    }

    .login-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-secure {
        gap: 10px;
    }

    .login-secure-text {
        font-size: 13px;
    }
}


/* ============================================================
   CORREÇÃO FORÇADA DA LOGO DO LOGIN
============================================================ */

.login-premium-logo-area {
    text-align: center !important;
    margin-bottom: 22px !important;
}

.login-premium-logo-area img,
.login-premium-logo {
    width: 240px !important;
    max-width: 82% !important;
    height: auto !important;
    display: inline-block !important;
    object-fit: contain !important;
}



/* ============================================================
   APP LAYOUT - RADAR LVAS
============================================================ */

.app-shell {
    min-height: 100vh;
    display: flex;
    background:
        radial-gradient(circle at top left, rgba(37,99,235,0.20), transparent 30%),
        linear-gradient(135deg, #020617, #0f172a);
    color: #f8fafc;
    font-family: "Segoe UI", Arial, sans-serif;
}

.sidebar {
    width: 250px;
    min-height: 100vh;
    background: rgba(15, 23, 42, 0.96);
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    padding: 24px 18px;
}

.sidebar-brand {
    text-align: center;
    margin-bottom: 32px;
}

.sidebar-brand img {
    width: 170px;
    max-width: 90%;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-menu a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 13px 15px;
    border-radius: 13px;
    transition: 0.2s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(37, 99, 235, 0.20);
    color: #ffffff;
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-x: hidden;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 25px;
}

.page-header h1 {
    margin: 0;
    font-size: 32px;
    letter-spacing: -0.8px;
}

.page-header p {
    margin-top: 8px;
    color: #94a3b8;
}

.user-box {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    padding: 12px 16px;
    color: #cbd5e1;
}

.filter-card,
.summary-bar,
.lead-card,
.detail-card,
.empty-box,
.success-message {
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.28);
}

.filter-card {
    padding: 22px;
    margin-bottom: 18px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.8fr 0.8fr auto;
    gap: 15px;
    align-items: end;
}

.filter-field label {
    display: block;
    margin-bottom: 7px;
    color: #dbeafe;
    font-weight: 600;
    font-size: 13px;
}

.filter-field input,
.filter-field select,
.form-line input,
.form-line select,
.form-line textarea {
    width: 100%;
    background: rgba(2, 6, 23, 0.48);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #ffffff;
    border-radius: 12px;
    padding: 12px 13px;
    outline: none;
}

.filter-field input:focus,
.filter-field select:focus,
.form-line input:focus,
.form-line select:focus,
.form-line textarea:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56,189,248,0.10);
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.filter-actions button,
.filter-actions a,
.btn-details,
.btn-whatsapp,
.btn-save {
    border: none;
    text-decoration: none;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 700;
    white-space: nowrap;
}

.filter-actions button,
.btn-save {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    color: white;
}

.filter-actions a,
.btn-details {
    background: rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.btn-whatsapp.full {
    display: block;
    text-align: center;
    margin-top: 20px;
}

.summary-bar {
    padding: 16px 20px;
    margin-bottom: 18px;
    display: flex;
    justify-content: space-between;
    color: #cbd5e1;
}

.leads-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lead-card {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.lead-main {
    display: flex;
    gap: 18px;
    min-width: 0;
}

.lead-score {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: rgba(37, 99, 235, 0.20);
    border: 1px solid rgba(96, 165, 250, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
    flex-shrink: 0;
}

.lead-score span {
    font-size: 11px;
    color: #93c5fd;
    font-weight: 600;
}

.lead-info h2 {
    margin: 0;
    font-size: 22px;
}

.lead-subtitle {
    margin-top: 5px;
    color: #94a3b8;
}

.lead-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.lead-tags span {
    background: rgba(148, 163, 184, 0.12);
    color: #dbeafe;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
}

.lead-details {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 8px 18px;
    color: #cbd5e1;
    font-size: 14px;
}

.lead-cnae {
    grid-column: 1 / -1;
}

.lead-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 135px;
}

.empty-box,
.success-message {
    padding: 18px;
    margin-bottom: 18px;
}

.success-message {
    border-color: rgba(34, 197, 94, 0.35);
    color: #bbf7d0;
}

.pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 14px;
    align-items: center;
}

.pagination a,
.pagination span {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: #e2e8f0;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 12px;
}

.lead-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.detail-card {
    padding: 24px;
}

.detail-card h2 {
    margin-top: 0;
    margin-bottom: 18px;
}

.crm-card {
    grid-column: 1 / -1;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.detail-row span {
    color: #94a3b8;
}

.detail-row strong {
    text-align: right;
}

.muted-text {
    color: #94a3b8;
    line-height: 1.6;
}

.form-line {
    margin-bottom: 16px;
}

.form-line label {
    display: block;
    margin-bottom: 8px;
    color: #dbeafe;
    font-weight: 700;
}

/* ============================================================
   RESPONSIVO APP
============================================================ */

@media (max-width: 980px) {

    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
    }

    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .field-large {
        grid-column: 1 / -1;
    }

    .lead-card {
        flex-direction: column;
    }

    .lead-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .lead-details {
        grid-template-columns: 1fr;
    }

    .lead-detail-grid {
        grid-template-columns: 1fr;
    }

    .crm-card {
        grid-column: auto;
    }
}

@media (max-width: 600px) {

    .main-content {
        padding: 18px;
    }

    .page-header {
        flex-direction: column;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .lead-main {
        flex-direction: column;
    }

    .lead-score {
        width: 100%;
        height: auto;
        padding: 12px;
    }
}


/* ============================================================
   DASHBOARD - RADAR LVAS
============================================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.dashboard-card {
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 18px 45px rgba(0,0,0,0.28);
}

.dashboard-card span {
    display: block;
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 10px;
}

.dashboard-card strong {
    display: block;
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    margin-bottom: 10px;
}

.dashboard-card small {
    color: #64748b;
    font-size: 13px;
}

.dashboard-actions {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
}

.dashboard-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.btn-primary-dashboard,
.btn-secondary-dashboard {
    display: inline-block;
    text-decoration: none;
    border-radius: 13px;
    padding: 13px 17px;
    font-weight: 800;
    transition: 0.2s ease;
}

.btn-primary-dashboard {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    color: #ffffff;
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.30);
}

.btn-primary-dashboard:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 48px rgba(37, 99, 235, 0.42);
}

.btn-secondary-dashboard {
    background: rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.btn-secondary-dashboard:hover {
    background: rgba(37, 99, 235, 0.20);
    color: #ffffff;
}

.dashboard-hint {
    margin-top: 22px;
    background: rgba(37, 99, 235, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: 15px;
    padding: 16px;
    color: #cbd5e1;
}

.dashboard-hint strong {
    display: block;
    color: #ffffff;
    margin-bottom: 8px;
}

/* Responsivo dashboard */

@media (max-width: 1100px) {

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

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

@media (max-width: 600px) {

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

    .dashboard-buttons {
        flex-direction: column;
    }

    .btn-primary-dashboard,
    .btn-secondary-dashboard {
        width: 100%;
        text-align: center;
    }
}


/* ============================================================
   MAPA E ENDEREÇO DO LEAD
============================================================ */

.map-card {
    grid-column: 1 / -1;
}

.map-frame {
    width: 100%;
    height: 360px;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.45);
    margin-top: 16px;
}

.map-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.map-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

.lead-address {
    grid-column: 1 / -1;
}

@media (max-width: 700px) {
    .map-frame {
        height: 280px;
    }

    .map-actions {
        justify-content: stretch;
    }

    .map-actions a {
        width: 100%;
        text-align: center;
    }
}


.summary-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-summary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 10px;
    background: #1d4ed8;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-summary-action:hover {
    filter: brightness(1.08);
}

.btn-summary-ia {
    background: #7c3aed;
}

.btn-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(1);
    user-select: none;
}