/* ============================================
   STOCKBERGER ONBOARDING - MODERN DESIGN SYSTEM
   Premium, Sexy, Professional AF
   ============================================ */

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

/* ============================================
   ROOT VARIABLES
   ============================================ */
:root {
    /* Brand Colors */
    --primary-blue: #071c82;
    --primary-blue-dark: #05155e;
    --primary-blue-light: #0a2399;
    --accent-yellow: #f7cf5d;
    --accent-yellow-light: #ffda6a;
    --text-dark: #221f20;
    --text-gray: #666;
    --text-light: #999;
    
    /* Status Colors */
    --success-green: #10b981;
    --success-green-light: #d1fae5;
    --warning-yellow: #f59e0b;
    --warning-yellow-light: #fef3c7;
    --error-red: #ef4444;
    --error-red-light: #fee2e2;
    --info-blue: #3b82f6;
    --info-blue-light: #dbeafe;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* 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);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   GLOBAL RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   HEADER STYLES
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: var(--white);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    height: 50px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform var(--transition-base);
}

.logo:hover {
    transform: scale(1.05);
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-details {
    text-align: right;
}

.user-name {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.user-role {
    font-size: 13px;
    color: var(--accent-yellow);
    font-weight: 500;
    margin-top: 2px;
}

.logout-btn, .back-link-btn {
    background: var(--accent-yellow);
    color: var(--text-dark);
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all var(--transition-base);
    box-shadow: 0 4px 12px rgba(247, 207, 93, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover, .back-link-btn:hover {
    background: var(--accent-yellow-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 207, 93, 0.4);
}

.logout-btn:active, .back-link-btn:active {
    transform: translateY(0);
}

/* ============================================
   CONTENT CONTAINER
   ============================================ */
.content {
    flex: 1;
    padding: 60px 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    animation: fadeIn var(--transition-smooth);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-header {
    text-align: center;
    margin-bottom: 50px;
}

.content-header h2 {
    font-size: 42px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.content-header p {
    color: var(--text-gray);
    font-size: 18px;
    font-weight: 400;
}

/* ============================================
   CARD STYLES
   ============================================ */
.card, .tool-card, .form-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.card::before, .tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-yellow));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.card:hover::before, .tool-card:hover::before {
    opacity: 1;
}

.card:hover, .tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--gray-200);
}

/* ============================================
   DASHBOARD GRID
   ============================================ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-card {
    padding: 40px 32px;
    text-align: center;
    cursor: pointer;
    background: var(--white);
}

.tool-card.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

.tool-card.disabled:hover {
    transform: none;
    box-shadow: var(--shadow-md);
}

.tool-icon {
    font-size: 64px;
    margin-bottom: 24px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform var(--transition-base);
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
}

.tool-card h3 {
    color: var(--primary-blue);
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.tool-card p {
    color: var(--text-gray);
    font-size: 15px;
    line-height: 1.6;
}

.tool-card.admin-card::before {
    background: linear-gradient(90deg, var(--accent-yellow), var(--primary-blue));
}

.tool-card.admin-card h3 {
    color: var(--text-dark);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(7, 28, 130, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 28, 130, 0.4);
}

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

.btn-primary:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: var(--accent-yellow);
    color: var(--text-dark);
    box-shadow: 0 4px 12px rgba(247, 207, 93, 0.3);
}

.btn-secondary:hover {
    background: var(--accent-yellow-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 207, 93, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-green) 0%, #059669 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-red) 0%, #dc2626 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
}

/* ============================================
   FORM STYLES
   ============================================ */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 3px solid var(--accent-yellow);
}

.form-header h1 {
    color: var(--primary-blue);
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.8px;
}

.form-header p {
    color: var(--text-gray);
    font-size: 16px;
}

.form-group {
    margin-bottom: 28px;
    position: relative;
}

label {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: -0.1px;
}

label .required {
    color: var(--error-red);
    margin-left: 3px;
}

.helper-text {
    color: var(--text-gray);
    font-size: 13px;
    margin-top: 6px;
    line-height: 1.5;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all var(--transition-base);
    background: var(--white);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(7, 28, 130, 0.1);
}

input.error {
    border-color: var(--error-red);
}

input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: var(--error-red);
    font-size: 13px;
    margin-top: 6px;
    display: none;
    font-weight: 500;
}

/* Email Input Group */
.email-input-group {
    display: flex;
    align-items: center;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-base);
    background: var(--white);
}

.email-input-group:focus-within {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(7, 28, 130, 0.1);
}

.email-input-group input {
    border: none;
    padding: 12px 16px;
    flex: 1;
}

.email-input-group input:focus {
    outline: none;
    box-shadow: none;
}

.email-domain {
    background: var(--gray-50);
    padding: 12px 16px;
    color: var(--text-gray);
    font-size: 15px;
    border-left: 1px solid var(--gray-200);
    font-weight: 500;
}

/* Radio & Checkbox Styles */
.radio-group,
.checkbox-group {
    margin-top: 12px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 2px solid transparent;
}

.radio-option:hover,
.checkbox-option:hover {
    background: var(--gray-50);
    border-color: var(--gray-200);
}

input[type="radio"],
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.radio-option label,
.checkbox-option label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    flex: 1;
}

/* Section Titles */
.section-title {
    color: var(--primary-blue);
    font-size: 22px;
    font-weight: 700;
    margin: 36px 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--accent-yellow);
    letter-spacing: -0.3px;
}

.section-helper {
    color: var(--text-gray);
    font-size: 14px;
    margin-top: 8px;
    margin-bottom: 16px;
    line-height: 1.6;
}

/* Button Groups */
.button-group {
    display: flex;
    gap: 16px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 2px solid var(--gray-200);
}

.button-group .btn {
    flex: 1;
    padding: 14px 32px;
    font-size: 16px;
}

/* ============================================
   MODAL STYLES
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn var(--transition-base);
}

.modal-overlay.active {
    display: flex;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: 48px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-2xl);
    animation: modalSlideIn var(--transition-smooth);
    position: relative;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    animation: iconPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes iconPop {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.modal-icon.success {
    background: linear-gradient(135deg, var(--success-green-light) 0%, #d1fae5 100%);
    color: var(--success-green);
}

.modal-icon.error {
    background: linear-gradient(135deg, var(--error-red-light) 0%, #fee2e2 100%);
    color: var(--error-red);
}

.modal-icon.warning {
    background: linear-gradient(135deg, var(--warning-yellow-light) 0%, #fef3c7 100%);
    color: var(--warning-yellow);
}

.modal-icon.info {
    background: linear-gradient(135deg, var(--info-blue-light) 0%, #dbeafe 100%);
    color: var(--info-blue);
}

.modal-title {
    color: var(--text-dark);
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.modal-message {
    color: var(--text-gray);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 32px;
}

.modal-btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: var(--white);
    border: none;
    padding: 14px 48px;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 12px rgba(7, 28, 130, 0.3);
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(7, 28, 130, 0.4);
}

/* ============================================
   BADGE STYLES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-success {
    background: var(--success-green-light);
    color: var(--success-green);
}

.badge-warning {
    background: var(--warning-yellow-light);
    color: var(--warning-yellow);
}

.badge-danger {
    background: var(--error-red-light);
    color: var(--error-red);
}

.badge-info {
    background: var(--info-blue-light);
    color: var(--info-blue);
}

.badge-primary {
    background: rgba(7, 28, 130, 0.1);
    color: var(--primary-blue);
}

/* ============================================
   STATS & METRICS
   ============================================ */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-label {
    color: var(--text-gray);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    color: var(--primary-blue);
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
}

/* ============================================
   LOADING STATES
   ============================================ */
.loading-spinner {
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-blue);
    border-radius: var(--radius-full);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    text-align: center;
    color: var(--text-gray);
    font-size: 14px;
    margin-top: 12px;
}

/* ============================================
   BACK LINK
   ============================================ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition-base);
    padding: 8px 16px;
    border-radius: var(--radius-md);
}

.back-link:hover {
    background: var(--gray-50);
    transform: translateX(-4px);
}

.back-link::before {
    content: "←";
    font-size: 18px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .header {
        padding: 16px 20px;
        flex-direction: column;
        gap: 16px;
    }
    
    .content {
        padding: 32px 20px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-container {
        padding: 32px 24px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .content-header h2 {
        font-size: 32px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none; }
.flex { display: flex; }
.flex-column { flex-direction: column; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
