/* ===== AUTHENTICATION FORMS CSS ===== */

/* Form Container Styles */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
}

/* Card Styles for Auth Pages */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Form Control Enhancements */
.form-control:focus,
.form-select:focus {
    border-color: #009ef7;
    box-shadow: 0 0 0 0.2rem rgba(0, 158, 247, 0.15);
    background-color: #fff;
}

.form-control.form-control-lg {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border-radius: 0.75rem;
}

/* Required Field Indicator */
.form-label.required::after {
    content: " *";
    color: #f1416c;
    font-weight: bold;
}

/* Input Group Enhancements */
.input-group .form-control {
    border-right: 0;
}

.input-group .btn {
    border-left: 0;
    background: transparent;
    border-color: #e4e6ea;
}

.input-group .btn:hover {
    background: #f5f8fa;
}

/* Password Toggle Button */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a1a5b7;
    cursor: pointer;
    z-index: 10;
}

.password-toggle:hover {
    color: #009ef7;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #009ef7 0%, #0d7377 100%);
    border: none;
    border-radius: 0.75rem;
    padding: 0.875rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0d7377 0%, #009ef7 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 158, 247, 0.3);
}

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

/* Loading State */
.btn .indicator-progress {
    display: none;
}

.btn.loading .indicator-label {
    display: none;
}

.btn.loading .indicator-progress {
    display: inline-flex;
    align-items: center;
}

/* Alert Enhancements */
.alert {
    border: none;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background: linear-gradient(135deg, #f1416c 0%, #e91e63 100%);
    color: white;
}

.alert-success {
    background: linear-gradient(135deg, #50cd89 0%, #4caf50 100%);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #ffc700 0%, #ff9800 100%);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, #7239ea 0%, #673ab7 100%);
    color: white;
}

/* Form Check Styles */
.form-check-input:checked {
    background-color: #009ef7;
    border-color: #009ef7;
}

.form-check-input:focus {
    border-color: #009ef7;
    box-shadow: 0 0 0 0.2rem rgba(0, 158, 247, 0.15);
}

.form-check-label {
    font-size: 0.9rem;
    color: #5e6278;
}

/* Link Styles */
.link-primary {
    color: #009ef7;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.link-primary:hover {
    color: #0d7377;
    text-decoration: underline;
}

/* Validation Styles */
.is-invalid {
    border-color: #f1416c;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23f1416c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4M7.2 4.6l-1.4 1.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #f1416c;
    font-weight: 500;
}

.is-valid {
    border-color: #50cd89;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2350cd89' d='m2.3 6.73.94-.94 2.94-2.94.94-.94L5.66 1.4 3.66 3.4l-.94.94-.94-.94L.34 1.96l.94.94z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        padding: 1rem;
    }
    
    .auth-card {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .btn-primary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .form-control.form-control-lg {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

/* Animation Effects */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Form Field Focus Animation */
.form-control,
.form-select {
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    transform: translateY(-2px);
}

/* Checkbox and Radio Enhancements */
.form-check {
    padding-left: 1.75rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    margin-left: -1.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.form-check-input[type="checkbox"] {
    border-radius: 0.375rem;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

/* Select Enhancement */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* Gender Selection Enhancement */
.gender-selection {
    display: flex;
    gap: 1rem;
}

.gender-option {
    flex: 1;
    position: relative;
}

.gender-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.gender-option label {
    display: block;
    padding: 1rem;
    border: 2px solid #e4e6ea;
    border-radius: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.gender-option input[type="radio"]:checked + label {
    border-color: #009ef7;
    background: #f5f8fa;
    color: #009ef7;
    font-weight: 600;
}

.gender-option label:hover {
    border-color: #009ef7;
    background: #f5f8fa;
}

/* Phone Input Enhancement */
.phone-input {
    position: relative;
}

.phone-input::before {
    content: "+90";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a1a5b7;
    font-weight: 500;
    z-index: 10;
}

.phone-input input {
    padding-left: 50px;
}

/* Terms and Conditions */
.terms-text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #5e6278;
}

.terms-text a {
    color: #009ef7;
    text-decoration: none;
    font-weight: 500;
}

.terms-text a:hover {
    text-decoration: underline;
}

/* Social Login Buttons (if needed) */
.social-login {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.social-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e4e6ea;
    border-radius: 0.75rem;
    background: #fff;
    color: #5e6278;
    text-decoration: none;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: #009ef7;
    color: #009ef7;
    background: #f5f8fa;
}

.social-btn i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e4e6ea;
}

.divider span {
    background: #fff;
    padding: 0 1rem;
    color: #a1a5b7;
    font-size: 0.875rem;
}

/* Member Panel Specific Styles */
.member-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #009ef7 0%, #0d7377 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.member-info {
    text-align: center;
    margin-bottom: 2rem;
}

.member-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #181c32;
    margin-bottom: 0.5rem;
}

.member-email {
    color: #a1a5b7;
    font-size: 1rem;
}

.member-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #50cd89 0%, #4caf50 100%);
    color: white;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Profile Update Form */
.profile-form {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.profile-form .form-label {
    font-weight: 600;
    color: #181c32;
    margin-bottom: 0.5rem;
}

/* Metronic Menu Customizations */
.menu.menu-sub {
    min-width: 220px;
}

.menu .menu-content {
    font-weight: 600;
    color: #a1a5b7;
    font-size: 0.75rem;
}

.menu .menu-link {
    transition: all 0.2s ease;
}

.menu .menu-link:hover {
    background-color: var(--kt-menu-link-hover-bg);
    color: var(--kt-menu-link-hover-color);
}

.menu .menu-link.text-danger:hover {
    background-color: #fff5f8;
    color: #f1416c;
}

.menu .menu-icon {
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #e4e6ea;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f5f8fa 0%, #ffffff 100%);
    border-radius: 1rem 1rem 0 0;
}

.modal-title {
    color: #181c32;
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e4e6ea;
    padding: 1rem 1.5rem;
    background: #f9f9f9;
    border-radius: 0 0 1rem 1rem;
}

/* Scroll Animation */
@keyframes smoothScroll {
    from {
        opacity: 0.7;
    }
    to {
        opacity: 1;
    }
}

.scrolling-to-edit {
    animation: smoothScroll 0.5s ease-in-out;
}

/* Toast Styles */
.toast-container {
    z-index: 9999 !important;
}

.toast {
    min-width: 300px;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: none;
}

.toast.bg-light-success {
    background: linear-gradient(135deg, #e8fff3 0%, #d3f8df 100%) !important;
    border-left: 4px solid #50cd89;
}

.toast.bg-light-danger {
    background: linear-gradient(135deg, #fff5f8 0%, #ffe6ea 100%) !important;
    border-left: 4px solid #f1416c;
}

.toast-body {
    padding: 1rem;
    font-weight: 500;
}

.toast .btn-close {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.toast .btn-close:hover {
    opacity: 1;
}

/* Toast Animation */
.toast.show {
    animation: slideInRight 0.3s ease-out;
}

.toast.hide {
    animation: slideOutRight 0.3s ease-in;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsive Menu */
@media (max-width: 768px) {
    .menu.menu-sub {
        min-width: 200px;
        font-size: 0.9rem;
    }
    
    .toast {
        min-width: 280px;
        margin: 0 1rem;
    }
    
    .toast-container {
        left: 0;
        right: 0;
        top: 1rem !important;
        padding: 0 1rem;
    }
}

/* User Account Button - Simple Metronic Style */
.user-account-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.475rem;
    transition: all 0.15s ease;
    height: auto !important;
    min-height: 38px;
}

.user-account-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.user-account-btn .symbol-label {
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .auth-card {
        background: rgba(30, 32, 37, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .form-control,
    .form-select {
        background-color: #1e2025;
        border-color: #2f3349;
        color: #fff;
    }
    
    .form-control:focus,
    .form-select:focus {
        background-color: #1e2025;
        border-color: #009ef7;
        color: #fff;
    }
    
    .form-label {
        color: #fff;
    }
    
    .text-muted {
        color: #a1a5b7 !important;
    }
    
    .menu.menu-sub {
        background-color: #1e2025;
        border-color: #2f3349;
    }
    
    .menu .menu-content {
        color: #fff;
    }
    
    .menu .menu-link {
        color: #a1a5b7;
    }
    
    .menu .menu-link:hover {
        background-color: #2f3349;
        color: #009ef7;
    }
    
    .modal-content {
        background-color: #1e2025;
        color: #fff;
    }
    
    .modal-header {
        background: linear-gradient(135deg, #2f3349 0%, #1e2025 100%);
        border-bottom-color: #2f3349;
    }
    
    .modal-footer {
        background-color: #2f3349;
        border-top-color: #2f3349;
    }
}
