/* Import Inter Font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-blue: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-dark: #0f172a;
    --primary-light: #f8fafc;
    --secondary-blue: #3b82f6;
    --accent-blue: #eff6ff;
    --border-color: #e2e8f0;
    --text-color: #334155;
    --text-muted: #64748b;
    --success-green: #10b981;
    --warning-orange: #f59e0b;
    --danger-red: #ef4444;
    --card-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --card-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --sidebar-width: 260px;
    --transition-speed: 0.25s;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    background-color: #f1f5f9;
    line-height: 1.6;
}

/* ==========================================
   FRONTEND WIZARD LAYOUT
   ========================================== */
.navbar-brand {
    font-weight: 800;
    color: var(--primary-dark) !important;
    letter-spacing: -0.025em;
}
.navbar-brand span {
    color: var(--primary-blue);
}

.wizard-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: box-shadow var(--transition-speed);
}
.wizard-card:hover {
    box-shadow: var(--card-shadow-hover);
}

.step-title {
    font-weight: 800;
    font-size: 1.75rem;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}
.step-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.selection-card {
    border: 2px solid #f1f5f9;
    border-radius: 1rem;
    padding: 1.5rem;
    cursor: pointer;
    text-align: center;
    background-color: #ffffff;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}
.selection-card:hover {
    border-color: var(--border-color);
    transform: translateY(-4px);
    box-shadow: var(--card-shadow);
}
.selection-card.active {
    border-color: var(--primary-blue);
    background-color: var(--accent-blue);
}
.selection-card .card-icon {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    transition: transform var(--transition-speed);
}
.selection-card:hover .card-icon {
    transform: scale(1.1);
}
.selection-card .card-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 0;
}

.sub-service-container {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease-out;
}
.sub-service-container.show {
    opacity: 1;
    max-height: 500px;
    margin-top: 1.5rem;
}

.progress {
    height: 0.5rem;
    background-color: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}
.progress-bar {
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    transition: width 0.4s ease;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}
.wizard-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-wizard {
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all var(--transition-speed);
}
.btn-primary-wizard {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: #ffffff;
}
.btn-primary-wizard:hover, .btn-primary-wizard:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.btn-secondary-wizard {
    background-color: #ffffff;
    border-color: var(--border-color);
    color: var(--text-color);
}
.btn-secondary-wizard:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.form-control, .form-select {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    font-family: 'Inter', sans-serif;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}
.form-group label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}
.is-invalid {
    border-color: var(--danger-red) !important;
}
.invalid-feedback {
    color: var(--danger-red);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.96);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 1.25rem;
}
.spinner-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 2rem;
}
.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid var(--accent-blue);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
.spinner-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.75rem;
    color: var(--primary-blue);
    animation: pulse 1.5s ease-in-out infinite;
}
.processing-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}
.processing-subtext {
    color: var(--text-muted);
    font-size: 0.875rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

.tcpa-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.25rem;
    font-size: 0.825rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-height: 200px;
    overflow-y: auto;
}

/* ==========================================
   PREMIUM ADMIN PANEL LAYOUT
   ========================================== */
.admin-body {
    background-color: #f8fafc;
}

/* Sidebar structure */
.admin-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--primary-dark);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform var(--transition-speed) ease-in-out;
}
.admin-sidebar .sidebar-header {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-sidebar .sidebar-menu {
    padding: 1.5rem 0.75rem;
    flex-grow: 1;
    overflow-y: auto;
}
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    transition: all var(--transition-speed);
}
.sidebar-link i {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    transition: color var(--transition-speed);
}
.sidebar-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}
.sidebar-link.active {
    color: #ffffff;
    background-color: var(--primary-blue);
}
.sidebar-link.active i {
    color: #ffffff;
}

/* User profile section inside sidebar footer */
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(0, 0, 0, 0.2);
}

/* Content Area structural wrapper */
.admin-content {
    margin-left: var(--sidebar-width);
    padding: 2.25rem 2.5rem;
    min-height: 100vh;
    transition: margin-left var(--transition-speed) ease-in-out;
}

/* Stats dashboard cards */
.admin-kpi-card {
    background-color: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    height: 100%;
}
.admin-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.kpi-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.kpi-title {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0;
}

/* Status Indicator Dot elements */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    border-radius: 9999px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.status-pill.status-sold {
    background-color: #d1fae5;
    color: #065f46;
}
.status-pill.status-disqualified {
    background-color: #fee2e2;
    color: #991b1b;
}
.status-pill.status-new {
    background-color: #dbeafe;
    color: #1e40af;
}
.status-pill.status-contacted {
    background-color: #ecfeff;
    color: #155e75;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
}
.status-sold .status-dot {
    background-color: var(--success-green);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
    animation: pulse-success 2s infinite;
}
.status-disqualified .status-dot {
    background-color: var(--danger-red);
}
.status-new .status-dot {
    background-color: var(--primary-blue);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5);
    animation: pulse-primary 2s infinite;
}
.status-contacted .status-dot {
    background-color: #06b6d4;
}

@keyframes pulse-success {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@keyframes pulse-primary {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(37, 99, 235, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* Glass panel boxes */
.admin-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
}
.admin-card-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
    background-color: transparent;
}

/* Mobile top menu display bar */
.admin-mobile-header {
    display: none;
    background-color: var(--primary-dark);
    padding: 1rem 1.25rem;
    align-items: center;
    justify-content: space-between;
    z-index: 101;
    position: sticky;
    top: 0;
    width: 100%;
}

/* ==========================================
   RESPONSIVE LAYOUTS ADJUSTMENTS
   ========================================== */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    .admin-sidebar.show-sidebar {
        transform: translateX(0);
    }
    .admin-content {
        margin-left: 0;
        padding: 1.5rem 1.25rem;
    }
    .admin-mobile-header {
        display: flex;
    }
}
