:root {
    /* Colors */
    --primary: #137fec;
    --primary-hover: #0d6ad8;
    --primary-light: rgba(19, 127, 236, 0.1);
    --primary-dark: rgba(19, 127, 236, 0.2);
    --secondary: #22c55e;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Text Colors */
    --text-primary: #111418;
    --text-secondary: #617589;
    --text-tertiary: #7b8794;
    --text-light: #9ca3af;
    --text: var(--text-primary);

    /* Background Colors */
    --bg-light: #f6f7f8;
    --bg-default: #f6f7f8;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-subtle: #f8fafc;
    --bg-secondary: #f8fafc;
    --bg-input: #ffffff;
    --background: var(--bg-subtle);

    /* Border Colors */
    --border-default: #dbe0e6;
    --border-subtle: #f0f2f4;
    --border-focus: var(--primary);
    --border: var(--border-default);

    /* Shadows */
    --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-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    --radius: var(--radius-lg);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* Dark mode support (optional for future) */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;

        --text-primary: #f8fafc;
        --text-secondary: #cbd5e1;
        --text-tertiary: #94a3b8;
        --text-light: #64748b;
        --text: var(--text-primary);

        --bg-light: #101922;
        --bg-default: #101922;
        --bg-white: #1A2633;
        --bg-card: #1A2633;
        --bg-subtle: #0f1419;
        --bg-secondary: #0f1419;
        --bg-input: #1e293b;
        --background: var(--bg-subtle);

        --border-default: #334155;
        --border-subtle: #1e293b;
        --border: var(--border-default);

        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
        --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.45), 0 2px 4px -1px rgba(0, 0, 0, 0.35);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.55), 0 4px 6px -2px rgba(0, 0, 0, 0.45);
        --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.45);
        --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    }
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html,
body,
#app {
    min-height: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    color: inherit;
}

.table,
table {
    color: var(--text-primary);
}

input,
select,
textarea {
    color-scheme: inherit;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-sm {
    max-width: 800px;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-default);
    padding: 0.75rem var(--space-xl);
}

/* Dark mode header */
@media (prefers-color-scheme: dark) {
    .header {
        background-color: rgba(26, 38, 51, 0.9);
    }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 960px;
    margin: 0 auto;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    text-decoration: none;
    color: var(--text-primary);
}

.header-logo h2 {
    font-size: var(--font-size-lg);
    font-weight: 700;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.header-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.header-nav a:hover {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    font-size: var(--font-size-sm);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--primary-light);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary-dark);
}

.btn-lg {
    height: 3rem;
    padding: 0 2rem;
    font-size: var(--font-size-base);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-default);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-subtle);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--bg-subtle);
    color: var(--primary);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: var(--space-xl);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transition: box-shadow var(--transition-base);
}

/* Form Elements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.form-label {
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.form-label-required::after {
    content: " *";
    color: #ef4444;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem var(--space-md);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(19, 127, 236, 0.1);
}

.form-input::placeholder {
    color: var(--text-secondary);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Input with icon */
.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    font-size: 1.25rem;
}

/* Progress Indicator */
.progress-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.progress-text {
    font-size: var(--font-size-base);
    font-weight: 500;
}

.progress-subtext {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.progress-bar {
    height: 0.5rem;
    background: var(--border-default);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-steps .active {
    color: var(--primary);
    font-weight: 700;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-cols-1 {
    grid-template-columns: 1fr;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Responsive */
@media (max-width: 768px) {
    .header-nav a:not(.btn) {
        display: none;
    }

    .grid-cols-2,
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 var(--space-sm);
    }

    .container-fluid {
        padding: 1rem !important;
    }

    .hide-mobile {
        display: none !important;
    }
}

/* Material Icons Support */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
}

/* Icon colors */
.icon-primary {
    color: var(--primary);
}

.icon-secondary {
    color: var(--text-secondary);
}

/* Badge on Overlay */
.badge-on-overlay {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: var(--font-size-xs);
    background: rgba(255, 255, 255, 0.577);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

@media (prefers-color-scheme: dark) {
    .badge-on-overlay {
        background: rgba(255, 255, 255, 0.314);
        border: 1px solid rgba(255, 255, 255, 0.4);
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.mt-auto {
    margin-top: auto;
}

.w-full {
    width: 100%;
}

.max-w-2xl {
    max-width: 672px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Validation Styles - Global */
.form-input-error,
.form-textarea-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.error-message {
    color: #ef4444;
    font-size: var(--font-size-sm);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

@media (prefers-color-scheme: dark) {

    .form-input-error,
    .form-textarea-error {
        background-color: rgba(239, 68, 68, 0.1) !important;
    }
}