:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);

    /* Action Colors */
    --status-positive: #10b981;
    /* Green */
    --status-rejected: #ef4444;
    /* Red */
    --status-later: #f59e0b;
    /* Yellow */
    --status-na: #3b82f6;
    /* Blue */
    --status-pending: #64748b;
    /* Gray */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-color);
    background-image: radial-gradient(circle at top right, #1e1b4b, transparent 40%),
        radial-gradient(circle at bottom left, #082f49, transparent 40%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Glassmorphism */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Buttons */
.primary-btn,
.secondary-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.secondary-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.secondary-btn:hover {
    background: rgba(99, 102, 241, 0.1);
}

.icon-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Common form elements */
input,
select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

input:focus,
select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

option {
    background: var(--bg-color);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Utility */
.hidden {
    display: none !important;
}

.active {
    display: flex !important;
}

.w-100 {
    width: 100%;
}

.mt-3 {
    margin-top: 20px;
}

/* Login Section */
#login-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

.logo-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.glow-icon {
    font-size: 2rem;
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px var(--primary-color));
}

.login-card h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.login-card p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-group input {
    padding-left: 45px;
}

.error-text {
    color: var(--status-rejected) !important;
    font-size: 0.85rem;
    margin-bottom: 15px !important;
    min-height: 18px;
}

/* Main App */
#app-section {
    flex-direction: column;
    min-height: 100vh;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-brand i {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    gap: 15px;
}

.dashboard {
    padding: 30px 5%;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.filters-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
}

.filters-bar label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 5px;
}

/* Client Grid */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Client Card */
.client-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-status-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--status-pending);
}

.client-card.status-positive .card-status-indicator {
    background: var(--status-positive);
}

.client-card.status-rejected .card-status-indicator {
    background: var(--status-rejected);
}

.client-card.status-later .card-status-indicator {
    background: var(--status-later);
}

.client-card.status-na .card-status-indicator {
    background: var(--status-na);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.card-category {
    font-size: 0.75rem;
    padding: 4px 8px;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border-radius: 4px;
    font-weight: 500;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.card-body i {
    width: 20px;
    color: var(--primary-color);
}

.card-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.attended-badge {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    padding: 5px 10px;
    border-radius: 12px;
}

.action-trigger-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.3s;
}

.action-trigger-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    transform: translateY(20px);
    transition: 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}

.close-btn:hover {
    color: white;
}

.modal-body {
    padding: 25px;
}

.action-content {
    max-width: 400px;
    text-align: center;
}

.action-buttons-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.status-btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
    opacity: 0.9;
}

.status-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.status-btn.positive {
    background: var(--status-positive);
}

.status-btn.rejected {
    background: var(--status-rejected);
}

.status-btn.call-later {
    background: var(--status-later);
}

.status-btn.not-answered {
    background: var(--status-na);
}

.report-content {
    max-width: 700px;
}

.report-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.report-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.report-card h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.stats {
    display: flex;
    justify-content: space-around;
}

.stats div {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-num {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .report-cards {
        grid-template-columns: 1fr;
    }

    .filters-bar {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .filters-bar {
        grid-template-columns: 1fr;
    }

    .nav-brand span {
        display: none;
    }

    .nav-actions button span {
        display: none;
    }
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 8px;
    margin-top: -5px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.q-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
}

.btn-call {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.btn-call:hover {
    background: #10b981;
    color: white;
}

.btn-wa {
    background: rgba(37, 211, 102, 0.2);
    color: #25d366;
}

.btn-wa:hover {
    background: #25d366;
    color: white;
}

.btn-del {
    flex: 0 0 40px;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.btn-del:hover {
    background: #ef4444;
    color: white;
}

/* Date Reports */
.date-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.9rem;
    border-left: 3px solid var(--primary-color);
}

.date-item strong {
    color: var(--primary-color);
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-box {
    padding: 20px;
    text-align: center;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.stat-box:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.stat-box.positive { border-color: var(--status-positive); background: linear-gradient(to right, rgba(16, 185, 129, 0.05), transparent); }
.stat-box.rejected { border-color: var(--status-rejected); background: linear-gradient(to right, rgba(239, 68, 68, 0.05), transparent); }
.stat-box.call-later { border-color: var(--status-later); background: linear-gradient(to right, rgba(245, 158, 11, 0.05), transparent); }
.stat-box.not-answered { border-color: var(--status-na); background: linear-gradient(to right, rgba(59, 130, 246, 0.05), transparent); }

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 800;
}

/* Category Stats Row */
.category-day-stats {
    padding: 15px 20px;
    margin-bottom: -10px;
}

.category-grid-sm {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-top: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.cat-day-box {
    flex: 0 0 auto;
    background: rgba(255,255,255,0.05);
    padding: 12px 18px;
    border-radius: 10px;
    text-align: center;
    min-width: 120px;
    border: 1px solid var(--border-color);
    transition: 0.2s;
}

.cat-day-box:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--primary-color);
}

.cat-day-box .name {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.cat-day-box .val {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}