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

/* Global Variables */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #818cf8;
    --primary-focus: rgba(79, 70, 229, 0.15);
    
    --secondary: #6d28d9;
    --secondary-hover: #5b21b6;
    
    --dark-bg: #0f172a;
    --dark-surface: #1e293b;
    --dark-border: #334155;
    
    --light-bg: #f8fafc;
    --light-surface: #ffffff;
    --light-border: #e2e8f0;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 25px -5px rgba(79, 70, 229, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Auth Pages: Hotmart split panel design */
.auth-container {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .auth-container {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

.auth-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 24px;
    background-color: var(--light-surface);
}

@media (min-width: 640px) {
    .auth-form-panel {
        padding: 60px 80px;
    }
}

.auth-form-wrapper {
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
}

.auth-logo {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-logo-dot {
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border-radius: 50%;
}

.auth-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.auth-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.auth-hero-panel {
    display: none;
    background: linear-gradient(135deg, #1e1b4b 0%, #311054 100%);
    position: relative;
    overflow: hidden;
    padding: 40px;
}

@media (min-width: 1024px) {
    .auth-hero-panel {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
}

.auth-hero-img {
    max-width: 85%;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: var(--shadow-premium);
    margin-bottom: 40px;
    animation: float 6s ease-in-out infinite;
}

.auth-hero-text {
    text-align: center;
    color: #ffffff;
    max-width: 460px;
}

.auth-hero-text h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #f8fafc;
}

.auth-hero-text p {
    font-size: 14px;
    opacity: 0.85;
    line-height: 1.6;
}

/* Floating Animation */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 15px;
    border: 1px solid var(--light-border);
    background-color: #f8fafc;
    border-radius: 8px;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px var(--primary-focus);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.form-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.form-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    color: var(--text-primary);
}

.btn-block {
    width: 100%;
}

.btn-loading {
    pointer-events: none !important;
    opacity: 0.65;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* System Layout (Dashboard) */
.dashboard-layout {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 260px;
    background-color: var(--dark-bg);
    color: #ffffff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
}

.sidebar-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 40px;
    color: #ffffff;
    text-decoration: none;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
    gap: 12px;
}

.sidebar-link:hover, .sidebar-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-link.active {
    background-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #e2e8f0;
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-family: 'Outfit', sans-serif;
}

/* Main Content Panel */
.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100vh;
}

.topbar {
    height: 70px;
    background-color: var(--light-surface);
    border-bottom: 1px solid var(--light-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    flex-shrink: 0;
}

.topbar-title {
    font-size: 20px;
    color: var(--text-primary);
}

.content-body {
    padding: 40px;
    background-color: var(--light-bg);
    flex-grow: 1;
}

/* Cards & Glassmorphism Dashboard widgets */
.card {
    background-color: var(--light-surface);
    border: 1px solid var(--light-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.card-title {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.glass-widget {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-premium);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.metric-card {
    background-color: var(--light-surface);
    border: 1px solid var(--light-border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.metric-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    margin-top: 4px;
}

.metric-card-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.metric-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* Dynamic Questionnaire Slideshow styles */
.quiz-container {
    max-width: 720px;
    margin: 40px auto;
}

.quiz-slide {
    background-color: var(--light-surface);
    border: 1px solid var(--light-border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.quiz-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quiz-progress-bar {
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    width: 100%;
    margin-bottom: 32px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 4px;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quiz-question {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 28px;
    line-height: 1.4;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 36px;
}

.quiz-option-card {
    border: 2px solid var(--light-border);
    border-radius: 10px;
    padding: 16px 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
}

.quiz-option-card:hover {
    border-color: var(--primary-light);
    background-color: rgba(79, 70, 229, 0.02);
}

.quiz-option-card.selected {
    border-color: var(--primary);
    background-color: rgba(79, 70, 229, 0.05);
}

.quiz-option-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--light-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.quiz-option-card.selected .quiz-option-indicator {
    border-color: var(--primary);
    background-color: var(--primary);
}

.quiz-option-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ffffff;
    display: none;
}

.quiz-option-card.selected .quiz-option-indicator-dot {
    display: block;
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--light-border);
    padding-top: 24px;
}

/* Premium styled Table */
.table-container {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--light-border);
    border-radius: 10px;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background-color: var(--light-surface);
}

.premium-table th {
    background-color: #f8fafc;
    padding: 14px 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--light-border);
}

.premium-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--light-border);
}

.premium-table tr:last-child td {
    border-bottom: none;
}

.premium-table tr:hover td {
    background-color: #f8fafc;
}

/* Badge tags */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: #dcfce7;
    color: #15803d;
}

.badge-danger {
    background-color: #fee2e2;
    color: #b91c1c;
}

.badge-info {
    background-color: #ecfeff;
    color: #0891b2;
}

.badge-warning {
    background-color: #fef3c7;
    color: #b45309;
}

/* Form Builder CRUD layout */
.builder-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 1024px) {
    .builder-grid {
        grid-template-columns: 1.2fr 0.8fr;
    }
}
