/* Base Design System */
:root {
    /* Colors - Using modern.css color palette */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    
    --success-50: #f0fdf4;
    --success-100: #dcfce7;
    --success-200: #bbf7d0;
    --success-300: #86efac;
    --success-400: #4ade80;
    --success-500: #22c55e;
    --success-600: #16a34a;
    --success-700: #15803d;
    --success-800: #166534;

    --danger-50: #fef2f2;
    --danger-100: #fee2e2;
    --danger-200: #fecaca;
    --danger-300: #fca5a5;
    --danger-400: #f87171;
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    --danger-700: #b91c1c;
    --danger-800: #991b1b;

    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Typography */
    --font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    --body-font-size: 0.875rem;
    --small-font-size: 0.8125rem;
    --heading-line-height: 1.2;
    --body-line-height: 1.6;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 1rem;
    --space-4: 1.5rem;
    --space-5: 2rem;
    --space-6: 2.5rem;
    --space-8: 3rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition-base: all 0.2s ease-in-out;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Base Styles */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--body-font-size);
    line-height: var(--body-line-height);
    color: var(--gray-700);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

    /* Hide honeypot container without inline style (CSP friendly) */
    .hp-hidden {
        display: none !important;
    }

/* Typography */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
    font-weight: 600;
    line-height: var(--heading-line-height);
    color: var(--gray-900);
    margin-bottom: var(--space-3);
}

h1, .h1 { font-size: 2.5rem; }
h2, .h2 { font-size: 2rem; }
h3, .h3 { font-size: 1.75rem; }
h4, .h4 { font-size: 1.5rem; }
h5, .h5 { font-size: 1.25rem; }
h6, .h6 { font-size: 1rem; }

/* Links */
a {
    color: var(--primary-600);
    text-decoration: none;
    transition: var(--transition-base);
}

a:hover {
    color: var(--primary-700);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: var(--body-font-size);
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    background: linear-gradient(to bottom, rgba(255,255,255,0.1), rgba(255,255,255,0)) padding-box;
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    border: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 
                0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:active {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, var(--success-500), var(--success-600));
    color: white;
    border: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 
                0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-600), var(--success-700));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}

.btn-success:active {
    background: linear-gradient(135deg, var(--success-700), var(--success-800));
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, var(--danger-500), var(--danger-600));
    color: white;
    border: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 
                0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--danger-600), var(--danger-700));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.btn-danger:active {
    background: linear-gradient(135deg, var(--danger-700), var(--danger-800));
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form Elements */
.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--body-font-size);
    font-weight: 400;
    line-height: 1.5;
    color: var(--gray-700);
    background-color: white;
    background-clip: padding-box;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.form-control:focus {
    color: var(--gray-900);
    background-color: white;
    border-color: var(--primary-400);
    outline: 2px solid var(--primary-200);
    outline-offset: 0;
    box-shadow: none;
}

/* Cards */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: white;
    background-clip: border-box;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Utilities */
.text-primary { color: var(--primary-600) !important; }
.text-success { color: var(--success-600) !important; }
.text-danger { color: var(--danger-600) !important; }
.text-muted { 
    color: var(--gray-500) !important; 
    font-size: 0.75rem !important;
    font-weight: 400 !important;
}

/* Invalid feedback styling - smaller font size and normal weight */
.invalid-feedback {
    font-size: 0.7rem !important;
    font-weight: 300 !important;
    line-height: 1.3;
    color: var(--danger-600) !important;
}

.bg-primary-subtle { background-color: var(--primary-50) !important; }
.bg-success-subtle { background-color: var(--success-50) !important; }
.bg-danger-subtle { background-color: var(--danger-50) !important; }

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    html {
        font-size: 15px;
    }

    .btn {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 767.98px) {
    html {
        font-size: 14px;
    }

    h1, .h1 { font-size: 2rem; }
    h2, .h2 { font-size: 1.75rem; }
    h3, .h3 { font-size: 1.5rem; }
    h4, .h4 { font-size: 1.25rem; }
    h5, .h5 { font-size: 1.125rem; }
    h6, .h6 { font-size: 1rem; }

    .btn {
        width: 100%;
        margin-bottom: var(--space-2);
    }
}