* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(145deg, #f0f4f8 0%, #e6ecf5 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #1e293b;
}

#root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Bar */
.top-bar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.top-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-dot {
    width: 28px;
    height: 28px;
    background: #2563eb;
    border-radius: 6px;
}

.company-name {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.top-links {
    display: flex;
    gap: 24px;
}

.top-links a {
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.top-links a:hover {
    color: #2563eb;
}

/* Main Container */
.main-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

/* Sign In Card - Clean and Simple */
.signin-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px -15px rgba(0, 0, 0, 0.15);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    border: 1px solid #edf2f7;
}

.signin-header {
    text-align: center;
    margin-bottom: 32px;
}

.signin-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.signin-header p {
    color: #64748b;
    font-size: 15px;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
}

.form-control {
    width: 100%;
    padding: 14px 14px 14px 42px;
    font-size: 15px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #1e293b;
    transition: all 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-control:read-only {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

/* Password Field Specific */
.password-field {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
}

.password-toggle:hover {
    color: #2563eb;
}

/* Field Hint */
.field-hint {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
}

/* Remember Me & Forgot Password */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
}

.forgot-link {
    color: #2563eb;
    font-size: 14px;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Sign In Button */
.signin-btn {
    width: 100%;
    background: #2563eb;
    border: none;
    border-radius: 12px;
    padding: 14px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
    height: 52px;
}

.signin-btn:hover {
    background: #1d4ed8;
}

.signin-btn:active {
    background: #1e40af;
}

.btn-text {
    transition: opacity 0.2s;
}

.btn-loader {
    display: none;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
    left: calc(50% - 11px);
    top: calc(50% - 11px);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.signin-btn.show-loading .btn-text {
    opacity: 0;
}

.signin-btn.show-loading .btn-loader {
    display: block;
}

/* Error Message */
.error-message {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #b91c1c;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-top: 20px;
}

/* Help Link Below Form */
.help-section {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #64748b;
}

.help-section a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.help-section a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 20px 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: #64748b;
    font-size: 13px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: #475569;
    font-size: 13px;
    text-decoration: none;
}

.footer-links a:hover {
    color: #2563eb;
}

/* Debug Panel */
#debugPanel {
    font-family: 'Monaco', monospace;
    line-height: 1.5;
    border: 1px solid #333;
}

/* Responsive */
@media (max-width: 480px) {
    .signin-card {
        padding: 32px 24px;
        border-radius: 20px;
    }
    
    .signin-header h1 {
        font-size: 24px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .top-links {
        display: none;
    }
}