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

:root {
    /* Primary Colors - Based on KOMISYONSUZ brand */
    --primary-color: #ff4d47;
    --primary-dark: #e63933;
    --primary-light: #ff6b66;
    --secondary-color: #2196F3;
    --secondary-dark: #1976D2;
    
    /* Neutral Colors */
    --background: #F5F7FA;
    --surface: #FFFFFF;
    --text-primary: #212121;
    --text-secondary: #757575;
    --text-disabled: #BDBDBD;
    
    /* Border and Shadow */
    --border-color: #E0E0E0;
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
}

body {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #ff4d47 0%, #e63933 50%, #ff6b66 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    color: var(--text-primary);
    line-height: 1.6;
}

.login-container {
    width: 100%;
    max-width: 440px;
    animation: fadeInUp 0.5s ease-out;
}

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

.login-card {
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.register-card {
    padding: var(--spacing-2xl) var(--spacing-xl);
}

.logo-section {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.logo-link {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

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

.logo {
    max-width: 180px;
    height: auto;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.tab-container {
    margin-bottom: var(--spacing-lg);
}

.tabs {
    display: flex;
    background: var(--background);
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.tab-button {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Quicksand', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-button i {
    font-size: 16px;
}

.tab-button:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.5);
}

.tab-button.active {
    background: var(--surface);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.login-form {
    margin-top: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.form-label i {
    font-size: 14px;
    color: var(--primary-color);
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    font-size: 16px;
    z-index: 1;
    pointer-events: none;
}

.input-with-icon .form-input {
    padding-left: 44px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Quicksand', sans-serif;
    transition: all 0.3s ease;
    background: var(--surface);
    color: var(--text-primary);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 77, 71, 0.1);
}

.input-with-icon:focus-within .input-icon,
.password-input-wrapper:focus-within .input-icon {
    color: var(--primary-color);
}

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

.form-input:disabled {
    background: var(--background);
    cursor: not-allowed;
    opacity: 0.6;
}

select.form-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23757575' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

select.form-input:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ff4d47' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    font-size: 16px;
    z-index: 1;
    pointer-events: none;
}

.password-input-wrapper .form-input {
    padding-left: 44px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.eye-icon {
    font-size: 18px;
    transition: all 0.3s ease;
}

.form-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: var(--spacing-xs);
    font-size: 12px;
    color: var(--text-secondary);
}

.form-hint i {
    font-size: 12px;
}

.form-options {
    margin-bottom: var(--spacing-lg);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    gap: var(--spacing-sm);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.submit-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 77, 71, 0.3);
    margin-top: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-button i {
    font-size: 18px;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 77, 71, 0.4);
}

.submit-button:active {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.form-footer {
    text-align: center;
    margin-top: var(--spacing-lg);
}

.forgot-password-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.forgot-password-link i {
    font-size: 14px;
}

.forgot-password-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.signup-prompt {
    text-align: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.signup-prompt p {
    font-size: 14px;
    color: var(--text-secondary);
}

.signup-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.signup-link i {
    font-size: 14px;
}

.signup-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.info-banner {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: linear-gradient(135deg, rgba(255, 77, 71, 0.1) 0%, rgba(33, 150, 243, 0.1) 100%);
    border-radius: 8px;
    text-align: center;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.info-banner > i {
    font-size: 18px;
    color: var(--primary-color);
    margin-top: 2px;
    flex-shrink: 0;
}

.info-banner p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    flex: 1;
}

.info-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.info-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-card {
        padding: var(--spacing-lg);
    }
    
    .register-card {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .page-title {
        font-size: 24px;
    }
    
    .logo {
        max-width: 150px;
    }
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
}

.loading span {
    opacity: 0;
}

.loading::after {
    content: '\f110';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Messages */
.error-message {
    color: #F44336;
    font-size: 12px;
    margin-top: var(--spacing-xs);
    display: flex;
    align-items: center;
    gap: 6px;
}

.error-message::before {
    content: '\f06a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 14px;
}

.form-input.error {
    border-color: #F44336;
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

/* Success Messages */
.success-message {
    background: #ff4d47;
    color: white;
    padding: var(--spacing-md);
    border-radius: 8px;
    margin-bottom: var(--spacing-lg);
    text-align: center;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.success-message::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 16px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

