/* ============================================
   Authentication Pages Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #075e54;
    --primary-dark: #054d44;
    --primary-light: #128c7e;
    --secondary-color: #25d366;
    --accent-color: #34b7f1;
    --bg-gradient-start: #075e54;
    --bg-gradient-end: #128c7e;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --error-color: #ef4444;
    --success-color: #10b981;
    --border-color: #e5e7eb;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: float 20s infinite ease-in-out;
}

body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.auth-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.auth-box {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.auth-box:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 5px 20px rgba(7, 94, 84, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.logo-circle i {
    font-size: 40px;
    color: var(--white);
}

.auth-header h1 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-weight: 700;
}

.auth-header p {
    color: var(--text-light);
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

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

.input-icon i {
    position: absolute;
    left: 15px;
    color: var(--text-light);
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-icon input {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.input-icon input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(7, 94, 84, 0.1);
}

.input-icon input:focus + i,
.input-icon input:focus ~ i {
    color: var(--primary-color);
}

.toggle-password {
    position: absolute;
    right: 15px;
    cursor: pointer;
    z-index: 2;
}

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

.file-upload {
    display: flex;
    align-items: center;
    padding: 14px 15px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9fafb;
}

.file-upload:hover {
    border-color: var(--primary-color);
    background: var(--white);
}

.file-upload i {
    margin-right: 10px;
    color: var(--text-light);
    font-size: 18px;
}

.file-upload span {
    color: var(--text-light);
    font-size: 14px;
}

.file-upload input[type="file"] {
    display: none;
}

.image-preview {
    margin-top: 15px;
    text-align: center;
}

.image-preview img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    object-fit: cover;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox input {
    margin-right: 8px;
    cursor: pointer;
}

.checkbox span {
    font-size: 14px;
    color: var(--text-dark);
}

.forgot-link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.error-message,
.success-message {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
    animation: slideDown 0.3s ease;
}

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

.error-message {
    background: #fee2e2;
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.success-message {
    background: #d1fae5;
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.error-message.show,
.success-message.show {
    display: block;
}

.btn-primary {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(7, 94, 84, 0.4);
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary i {
    transition: all 0.3s ease;
}

.btn-primary:hover i {
    transform: translateX(5px);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-light);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.demo-credentials {
    margin-top: 20px;
    padding: 15px;
    background: #fef3c7;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #f59e0b;
}

.demo-credentials p {
    font-size: 13px;
    color: #92400e;
    margin: 3px 0;
}

.demo-credentials strong {
    color: #78350f;
}

@media (max-width: 480px) {
    .auth-box {
        padding: 30px 25px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .logo-circle {
        width: 70px;
        height: 70px;
    }
    
    .logo-circle i {
        font-size: 35px;
    }
}

.loading {
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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