/* ============================================
   RCONSOFT SMS PORTAL - CLEAN PROFESSIONAL CSS
   ============================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #ca8a04;
    --info: #0891b2;
    --dark: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f1f5f9;
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.5;
}

/* Main Container */
.main-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Card Main */
.card-main {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 600px;
}

.dashboard-card {
    max-width: 1100px;
}

/* Landing Page */
.landing-content {
    text-align: center;
    padding: 48px 32px;
}

.logo-box {
    width: 64px;
    height: 64px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.logo-box i {
    font-size: 28px;
    color: white;
}

.landing-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.landing-subtitle {
    color: var(--gray-500);
    font-size: 1rem;
    margin-bottom: 32px;
}

/* Stats Grid */
.stats-grid {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 32px;
}

.stat-box {
    text-align: center;
    min-width: 80px;
}

.stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-top: 4px;
}

/* Start Button */
.btn-start {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

/* Dashboard */
.dashboard-body {
    padding: 24px 28px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-small {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-small i {
    font-size: 18px;
    color: white;
}

.header-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.header-subtitle {
    color: var(--gray-500);
    font-size: 0.8rem;
}

.btn-exit {
    background: white;
    color: var(--danger);
    border: 1px solid #fecaca;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

/* Progress */
.progress-section {
    margin-bottom: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.progress-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-600);
}

.progress-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
}

.progress-track {
    background: var(--gray-200);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    
}

/* Tabs */
.nav-tabs {
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    gap: 4px;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gray-500);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 10px 16px;
    border-radius: 0;
    background: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: transparent;
    font-weight: 600;
}

/* Search */
.search-wrap {
    position: relative;
    margin-bottom: 16px;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 0.9rem;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    color: var(--gray-800);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input::placeholder {
    color: var(--gray-400);
}

/* Bulk Actions */
.bulk-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-bulk {
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-sms-bulk {
    background: var(--danger);
    color: white;
}

.btn-wa-bulk {
    background: var(--success);
    color: white;
}

.btn-reset {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--border);
}

/* Candidate Card */
.candidate-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.candidate-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

.candidate-avatar {
    width: 44px;
    height: 44px;
    background: var(--gray-100);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.candidate-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.candidate-phone {
    color: var(--gray-500);
    font-size: 0.8rem;
    font-weight: 500;
}

.candidate-phone i {
    color: var(--success);
    margin-right: 4px;
    font-size: 0.75rem;
}

.candidate-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-sms {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-whatsapp {
    background: var(--success);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-sms.sent,
.btn-whatsapp.sent {
    background: var(--gray-300);
    color: var(--gray-500);
    pointer-events: none;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-sent {
    background: #dcfce7;
    color: #166534;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 9999;
}

.custom-toast {
    background: white;
    border-radius: 6px;
    padding: 14px 18px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    border-left: 4px solid var(--success);
    margin-bottom: 8px;
}

.toast-icon {
    width: 32px;
    height: 32px;
    background: #dcfce7;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    font-size: 1rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--gray-400);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    .landing-title { font-size: 1.4rem; }
    .stats-grid { gap: 20px; }
    .dashboard-body { padding: 16px; }
    .candidate-card { padding: 12px 14px; }
    .candidate-info { min-width: 100%; }
    .candidate-actions { width: 100%; justify-content: flex-start; }
    .btn-bulk { padding: 8px 14px; font-size: 0.8rem; }
}

/* ============================================
   LOADING SCREEN - PROFESSIONAL OVERLAY
   ============================================ */


/* ============================================
   LOADING SCREEN - SIMPLE & RELIABLE
   ============================================ */


/* ============================================
   FAST LOADING SCREEN - INSTANT RESPONSE
   ============================================ */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
}

.loading-screen.active {
    display: flex !important;
}

.loading-content {
    text-align: center;
    padding: 30px 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    min-width: 240px;
}

/* Fast Spinner */
.loading-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Text */
.loading-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.loading-subtext {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

/* Instant Button Feedback */
.btn-start:active,
.btn-sms:active,
.btn-whatsapp:active,
.btn-bulk:active,
.btn-exit:active {
    transform: scale(0.95);
    transition: transform 0.05s ease;
}

/* Page Transitions - Fast */
#landingPage,
#dashboardPage {
    transition: opacity 0.15s ease;
}


