/* ===================================================== */
/* GLOBAL RESET */
/* ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    line-height: 1.6;
}

/* ===================================================== */
/* ANIMATED BACKGROUND (LOGIN) */
/* ===================================================== */

.bg-animation {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, #7c3aed22, transparent 40%),
        radial-gradient(circle at 80% 70%, #06b6d422, transparent 40%);
    animation: moveBg 12s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes moveBg {
    from { transform: translateY(-30px) scale(1); }
    to { transform: translateY(30px) scale(1.05); }
}

/* ===================================================== */
/* HEADER */
/* ===================================================== */

header {
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(15px);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.6rem;
    font-weight: 600;
    background: linear-gradient(45deg, #7c3aed, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    margin-left: 1.5rem;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #7c3aed;
}

/* ===================================================== */
/* CONTAINER */
/* ===================================================== */

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* ===================================================== */
/* LOGIN PAGE */
/* ===================================================== */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 0 60px rgba(124, 58, 237, 0.25);
    animation: fadeSlide 0.8s ease forwards;
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* Input */

.input-group {
    position: relative;
    margin-bottom: 1.8rem;
}

.input-group input {
    width: 100%;
    padding: 1rem 0.8rem;
    background: transparent;
    border: 1px solid #334155;
    border-radius: 10px;
    outline: none;
    color: #e2e8f0;
    font-size: 0.95rem;
    transition: 0.3s ease;
}

.input-group input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 15px rgba(124,58,237,0.4);
}

/* Floating Label */

.input-group label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #0f172a;
    padding: 0 6px;
    color: #94a3b8;
    font-size: 0.85rem;
    transition: 0.3s ease;
    pointer-events: none;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    top: -8px;
    font-size: 0.7rem;
    color: #7c3aed;
}

/* Toggle */

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
}

.toggle-password:hover {
    opacity: 1;
}

/* Login Button */

.login-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    background: linear-gradient(45deg, #7c3aed, #06b6d4);
    color: white;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(124,58,237,0.5);
}

.login-btn.loading .btn-text {
    opacity: 0;
}

.loader {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    opacity: 0;
}

.login-btn.loading .loader {
    opacity: 1;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================================== */
/* BUTTONS */
/* ===================================================== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(45deg, #7c3aed, #06b6d4);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(124,58,237,0.5);
}

.btn-secondary {
    background: #334155;
}

.btn-secondary:hover {
    background: #475569;
}

/* ===================================================== */
/* DASHBOARD */
/* ===================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.dashboard-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 40px rgba(124,58,237,0.25);
}

.dashboard-card h3 {
    margin-bottom: 1rem;
    color: #7c3aed;
}

/* ===================================================== */
/* TABLES */
/* ===================================================== */

.table-responsive {
    overflow-x: auto;
}

.leads-table {
    width: 100%;
    background: rgba(30, 41, 59, 0.9);
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
}

.leads-table th {
    background: #111827;
    padding: 1rem;
    text-align: left;
}

.leads-table td {
    padding: 1rem;
    border-bottom: 1px solid #334155;
}

.leads-table tr:hover {
    background: #273449;
}

/* ===================================================== */
/* BADGES */
/* ===================================================== */

.disposition {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.disposition-new { background: #2563eb; }
.disposition-sale { background: #16a34a; }
.disposition-declined { background: #dc2626; }
.disposition-call-back { background: #f59e0b; }
.disposition-follow-up { background: #9333ea; }

/* ===================================================== */
/* ALERTS */
/* ===================================================== */

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.alert.success {
    background: rgba(22,163,74,0.2);
    color: #4ade80;
}

.alert.error {
    background: rgba(220,38,38,0.15);
    color: #f87171;
}

/* ===================================================== */
/* MODAL */
/* ===================================================== */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
}

.modal-content {
    background: #1e293b;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
}

/* ===================================================== */
/* FOOTER */
/* ===================================================== */

footer {
    text-align: center;
    padding: 2rem;
    background: #111827;
    color: #94a3b8;
    margin-top: 2rem;
}

/* ===================================================== */
/* RESPONSIVE */
/* ===================================================== */

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
/* ============================= */
/* GLASS FORM (DISPOSITION PAGE) */
/* ============================= */

.glass-form-wrapper {
    max-width: 500px;
    margin: 5rem auto;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(25px);
    border-radius: 20px;
    padding: 3rem;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 0 50px rgba(124,58,237,0.25);
    animation: fadeSlide 0.8s ease forwards;
}

.glass-form-wrapper h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.glass-form {
    margin-top: 2rem;
}

/* Select Styling */
.glass-form select {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 0.95rem;
    appearance: none;
    outline: none;
    transition: 0.3s;
}

.glass-form select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 15px rgba(124,58,237,0.4);
}

/* Dropdown Arrow Fix */
.glass-form select {
    background-image:
        linear-gradient(45deg, transparent 50%, #7c3aed 50%),
        linear-gradient(135deg, #7c3aed 50%, transparent 50%);
    background-position:
        calc(100% - 20px) calc(1.2em),
        calc(100% - 15px) calc(1.2em);
    background-size:
        5px 5px,
        5px 5px;
    background-repeat: no-repeat;
}
/* ============================= */
/* CLEAN ADD LEAD FORM (PRO UI) */
/* ============================= */

.clean-form {
    max-width: 720px;
    margin: 3rem auto 0;
}

/* Sections */
.form-section {
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a5b4fc;
    margin-bottom: 1.8rem;
    border-left: 3px solid #7c3aed;
    padding-left: 0.75rem;
}

/* Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.2rem;
}

/* Fields */
.form-field {
    display: flex;
    flex-direction: column;
}

.form-field.full {
    grid-column: 1 / -1;
}

.form-field label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

/* Inputs */
.form-field input,
.form-field select,
.form-field textarea {
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    color: #e5e7eb;
    font-size: 0.95rem;
    transition: 0.25s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124,58,237,0.25);
    outline: none;
}

/* Select arrow */
.form-field select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #7c3aed 50%),
        linear-gradient(135deg, #7c3aed 50%, transparent 50%);
    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 13px) 50%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}

/* Textarea */
.form-field textarea {
    resize: none;
    min-height: 130px;
}

/* Buttons */
.form-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.primary-btn {
    background: linear-gradient(45deg, #7c3aed, #06b6d4);
    color: #fff;
    padding: 0.9rem 2rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124,58,237,0.4);
}

.secondary-btn {
    background: transparent;
    border: 1px solid #334155;
    color: #cbd5f5;
    padding: 0.9rem 1.8rem;
    border-radius: 12px;
    text-decoration: none;
}

/* Mobile */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}
