@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');

/* --- PREMIUM CSS DESIGN SYSTEM --- */
:root {
    /* Color Palette */
    --bg-base: #090b11;
    --bg-surface: rgba(17, 22, 37, 0.7);
    --bg-surface-hover: rgba(26, 32, 53, 0.85);
    --bg-card: rgba(22, 28, 45, 0.5);
    
    --primary-color: #6366f1; /* Indigo */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --secondary-color: #14b8a6; /* Teal */
    --secondary-gradient: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
    
    --success-color: #10b981; /* Emerald */
    --danger-color: #ef4444; /* Rose */
    --warning-color: #f59e0b; /* Amber */
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --border-light: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(99, 102, 241, 0.4);
    
    --glow-primary: rgba(99, 102, 241, 0.25);
    
    /* Layout & Spacing */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: clip;
    position: relative;
}

/* Background Gradients & Glows */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.08) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: #ffffff;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.4rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: #a855f7;
}

/* Layout Utilities */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Flex/Grid Helper classes */
.grid-cols-12 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.flex-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Premium Card Layout (Glassmorphism) */
.glass-card {
    background: var(--bg-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    pointer-events: none;
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 12px 40px 0 rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

/* Buttons & CTA Actions */
.btn-primary, .btn-secondary, .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.75rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-bounce);
    position: relative;
    color: #ffffff;
}

.btn-primary {
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px var(--glow-primary);
}

.btn-primary:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--secondary-gradient);
    box-shadow: 0 4px 15px rgba(20, 184, 166, 0.2);
}

.btn-secondary:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(20, 184, 166, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    color: #ffffff;
}

/* Inputs & Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100% !important;
    padding: 0.7rem 0.9rem !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 8px !important;
    outline: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    transition: border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
}

.form-control::placeholder {
    color: #94a3b8 !important;
}

.form-control:hover {
    border-color: #94a3b8 !important;
}

.form-control:focus {
    border-color: #34A853 !important;
    box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.15) !important;
    background-color: #ffffff !important;
}

.form-control[readonly] {
    background-color: #f1f5f9 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    border-color: #cbd5e1 !important;
}

textarea.form-control {
    min-height: 100px !important;
    resize: vertical !important;
    line-height: 1.5 !important;
}

select.form-control {
    cursor: pointer !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.9rem center !important;
    padding-right: 2.5rem !important;
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
    -webkit-text-fill-color: #0f172a !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* Metric Widgets */
.metric-card {
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.metric-card:hover {
    border-color: rgba(20, 184, 166, 0.3);
}

.metric-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Onboarding Steps UI */
.step-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.step-indicator {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 2px solid var(--border-light);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: var(--transition-smooth);
}

.step-indicator.active .step-number {
    background: var(--primary-gradient);
    border-color: transparent;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
}

.step-indicator.completed .step-number {
    background: var(--success-color);
    border-color: transparent;
    color: #ffffff;
}

/* Star rating widget */
.stars-wrapper {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 2rem 0;
}

.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 3rem;
    color: var(--text-muted);
    transition: var(--transition-bounce);
}

.star-btn:hover, .star-btn.active {
    color: var(--warning-color);
    transform: scale(1.15);
    text-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

/* Autocomplete Suggestion Dropdown */
.autocomplete-suggestions {
    position: absolute;
    background: var(--bg-surface-hover);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-sm);
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: rgba(99, 102, 241, 0.15);
}

.suggestion-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #ffffff;
}

.suggestion-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Status Indicator Dot */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
    margin-right: 0.5rem;
}

.status-indicator.active {
    background-color: var(--success-color);
    box-shadow: 0 0 8px var(--success-color);
}

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

.animate-fade {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Mobile Responsiveness Rules */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .grid-cols-12 {
        display: flex;
        flex-direction: column;
    }
}

/* --- SIDEBAR LAYOUT STYLES --- */
.layout-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: #0d1222;
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 1.5rem;
    align-self: flex-start;
}

.sidebar-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.3rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2.5rem;
    text-align: center;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.sidebar-item a:hover {
    background-color: rgba(99, 102, 241, 0.08);
    color: #ffffff;
}

.sidebar-item.active a {
    background: var(--primary-gradient);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.main-content {
    flex-grow: 1;
    padding: 2rem 2.5rem;
}

@media (max-width: 768px) {
    .layout-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border-light);
    }
    .sidebar-logo {
        margin-bottom: 1rem;
        text-align: center;
    }
    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.25rem;
    }
    .sidebar-item a {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    .main-content {
        padding: 1.5rem 1rem;
    }
}
