@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;700&display=swap');

:root {
    --primary-color: #f7921f;
    --primary-gradient: linear-gradient(135deg, #f7921f 0%, #ffb347 100%);
    --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --text-main: #2d3436;
    --text-muted: #636e72;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #ff7675;
    --radius-lg: 20px;
    --radius-md: 12px;
}

body {
    background: var(--bg-gradient);
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    margin-top: 0;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Glassmorphism Card */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 25px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

.logo-img {
    max-width: 200px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: inline-block;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 10px 0;
}

.dashboard-logo {
    max-height: 50px;
    max-width: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Forms */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"] {
    width: 100%;
    padding: 16px;
    border: 2px solid transparent;
    background: #f1f2f6;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

input:focus {
    background: #fff;
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(247, 146, 31, 0.1);
}

/* Buttons */
.btn {
    display: block;
    width: 100%;
    padding: 18px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(247, 146, 31, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(247, 146, 31, 0.3);
}

.btn:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: #dfe6e9;
    color: var(--text-main);
    box-shadow: none;
}

.btn-danger {
    background: linear-gradient(135deg, #ff7675 0%, #d63031 100%);
    box-shadow: 0 10px 20px rgba(214, 48, 49, 0.2);
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    padding: 15px;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Lead List */
.lead-item {
    background: white;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s;
    animation: fadeIn 0.5s ease forwards;
}

.lead-item:hover {
    transform: scale(1.02);
}

.lead-info h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lead-info p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    transition: transform 0.2s;
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(10deg);
}

/* Badges & Alerts */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(0, 184, 148, 0.15);
    color: #00b894;
}

.badge-warning {
    background: rgba(253, 203, 110, 0.15);
    color: #e17055;
}

.alert {
    padding: 15px;
    border-radius: var(--radius-md);
    background: rgba(0, 184, 148, 0.15);
    color: #00b894;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.alert-error {
    background: rgba(255, 118, 117, 0.15);
    color: #d63031;
}

.text-center {
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Kit Image Container Defaults (Desktop) */
.kit-container {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.kit-img {
    max-width: 100%;
    border-radius: var(--radius-md);
}

@media (min-width: 481px) {
    .kit-container {
        display: block;
    }

    .kit-img {
        max-height: 200px;
        width: auto;
    }
}

/* Mobile Optimization */
@media (max-width: 480px) {

    body,
    html {
        height: 100%;
        margin: 0;
        padding: 0;
        overflow: hidden;
        /* Prevent scrolling */
    }

    .container {
        padding: 15px;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Center vertically */
        align-items: center;
        box-sizing: border-box;
    }

    .logo-container {
        margin-bottom: 15px;
        /* Reduce logo margin */
        flex-shrink: 0;
    }

    .logo-img {
        max-width: 140px;
        max-height: 50px;
    }

    .card {
        width: 100%;
        padding: 20px;
        margin-bottom: 0;
        /* NO GAP between card and image */
        flex-shrink: 0;
        max-height: none;
        overflow-y: visible;
    }

    .form-group {
        margin-bottom: 15px;
        /* Reduce form spacing */
    }

    .btn {
        padding: 15px;
    }

    .kit-container {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        margin-top: 10px;
        /* Tiny margin for visual separation, user said "no gap" but 0 looks broken usually. Let's try 5px or just rely on padding. User said "no gap required" so let's do 0 margin top. */
        margin-top: 0;
        flex-shrink: 1;
        /* Allow shrinking */
        min-height: 0;
    }

    .kit-img {
        width: calc(100% - 40px);
        /* Match input width (Card padding 20px * 2) */
        height: auto;
        max-height: 25vh;
        /* Cap height to fit screen */
        object-fit: contain;
        border-radius: var(--radius-md);
        /* Ensure no extra space below image */
        display: block;
    }

    .dashboard-logo {
        max-height: 40px;
    }
}