@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');

:root {
    /* Color Palette - Dark Theme (Default) */
    --bg-primary: hsl(222, 47%, 6%);
    --bg-secondary: hsl(223, 47%, 10%);
    --bg-card: rgba(30, 41, 59, 0.45);
    --border-color: rgba(255, 255, 255, 0.08);
    --hover-bg: rgba(255, 255, 255, 0.04);
    
    --text-primary: hsl(210, 40%, 98%);
    --text-secondary: hsl(215, 20%, 65%);
    --text-muted: hsl(215, 15%, 50%);
    
    --primary: hsl(250, 89%, 65%);
    --primary-glow: hsla(250, 89%, 65%, 0.15);
    --secondary: hsl(172, 80%, 45%);
    --accent: hsl(285, 80%, 60%);
    --accent-glow: hsla(285, 80%, 60%, 0.15);
    
    --success: hsl(142, 70%, 45%);
    --success-bg: hsla(142, 70%, 45%, 0.1);
    --danger: hsl(350, 80%, 55%);
    --danger-bg: hsla(350, 80%, 55%, 0.15);
    
    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 30px rgb(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px -10px rgb(0, 0, 0, 0.6);
    
    --glass-bg: rgba(15, 23, 42, 0.5);
    --glass-blur: 16px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    
    --transition-speed: 0.3s;
}

[data-theme="light"] {
    /* Color Palette - Light Theme */
    --bg-primary: hsl(210, 40%, 96%);
    --bg-secondary: hsl(210, 30%, 98%);
    --bg-card: hsl(0, 0%, 100%);
    --border-color: rgba(15, 23, 42, 0.08);
    --hover-bg: rgba(15, 23, 42, 0.04);
    
    --text-primary: hsl(222, 47%, 11%);
    --text-secondary: hsl(215, 25%, 35%);
    --text-muted: hsl(215, 15%, 50%);
    
    --primary: hsl(250, 85%, 55%);
    --primary-glow: hsla(250, 85%, 55%, 0.1);
    --secondary: hsl(172, 85%, 35%);
    --accent: hsl(285, 80%, 50%);
    --accent-glow: hsla(285, 80%, 50%, 0.1);
    
    --shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.1);
    
    --glass-bg: rgba(255, 255, 255, 0.55);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Header / Navigation Bar */
header {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 0 15px var(--primary-glow);
}

.brand-name {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
}

@media (max-width: 968px) {
    .nav-menu {
        display: none; /* simple toggle handled later or layout adaptations */
    }
}

.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Hero Section */
.hero {
    padding: 80px 24px;
    text-align: center;
    background: radial-gradient(circle at 50% 30%, var(--primary-glow) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    max-width: 800px;
}

[data-theme="light"] .hero h1 {
    background: linear-gradient(to right, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 36px;
    line-height: 1.6;
}

/* Page Layout Wrappers */
.main-content {
    flex-grow: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

/* Grid Sections */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
    margin-top: 32px;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Cards & Glassmorphism */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color var(--transition-speed);
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .card:hover {
    border-color: rgba(0, 0, 0, 0.15);
}

.card-title {
    font-size: 20px;
    margin-bottom: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.icon-wrapper {
    width: 48px;
    height: 48px;
    background: var(--primary-glow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 20px;
}

/* Forms & Registration Styles */
.form-card {
    max-width: 800px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

input, textarea, select {
    background: rgba(15, 23, 42, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: all 0.2s ease;
    width: 100%;
}

[data-theme="light"] input, 
[data-theme="light"] textarea,
[data-theme="light"] select {
    background: rgba(255, 255, 255, 0.8);
}

select option {
    background-color: #0f172a;
    color: #ffffff;
}

[data-theme="light"] select option {
    background-color: #ffffff;
    color: #000000;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* File Upload styling */
.file-upload-wrapper {
    position: relative;
    border: 1px dashed var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.1);
    transition: all 0.2s ease;
}

.file-upload-wrapper:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-text {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Button UI */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 15px;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-group {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Theme Toggle Switch */
.theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

/* Footer Section */
footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 48px 24px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto 40px;
    text-align: left;
}

.footer-col h4 {
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col ul a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

@media (max-width: 968px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: transparent;
    border: none;
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.sidebar-btn:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

.sidebar-btn.active {
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* Dashboard Details Layout */
.profile-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.profile-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid var(--secondary);
    object-fit: cover;
    box-shadow: 0 0 20px var(--secondary);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.detail-value {
    color: var(--text-primary);
}

/* Validation styling */
input.is-invalid, select.is-invalid {
    border-color: var(--danger) !important;
}

.error-text {
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
}

/* Toast Alerts */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--border-radius-sm);
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.toast-error {
    border-left-color: var(--danger);
}

@keyframes slideIn {
    from {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}
