/* ============================================
   FINTRA ADMIN PANEL - AUTHENTICATION STYLES
   ============================================ */

/* Auth Pages Layout */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #003366 0%, #001a33 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Background Pattern */
.auth-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(
            circle at 20% 50%,
            rgba(0, 168, 107, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(0, 168, 107, 0.1) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 40% 20%,
            rgba(255, 255, 255, 0.03) 0%,
            transparent 50%
        );
    pointer-events: none;
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 1200px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease;
}

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

/* Auth Illustration Side */
.auth-illustration {
    flex: 1;
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.auth-illustration::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle,
        rgba(0, 168, 107, 0.2) 0%,
        transparent 70%
    );
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.illustration-content {
    text-align: center;
    color: #ffffff;
    position: relative;
    z-index: 1;
}

.illustration-content img {
    max-width: 100%;
    height: auto;
    margin-bottom: 30px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.illustration-content h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.illustration-content p {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.6;
}

/* Auth Form Side */
.auth-form-section {
    flex: 1;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
}

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

.auth-logo {
    margin-bottom: 25px;
}

.auth-logo img {
    max-height: 80px;
    width: auto;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #003366;
    margin-bottom: 10px;
}

.auth-header p {
    color: #6c757d;
    font-size: 15px;
}

/* Auth Form */
.auth-form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #003366;
    font-size: 14px;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 16px;
    z-index: 10;
    transition: color 0.3s ease;
}

.form-control {
    height: 50px;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-control:focus {
    border-color: #00a86b;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 168, 107, 0.1);
    outline: none;
}

.form-control:focus + .input-icon,
.input-group:focus-within .input-icon {
    color: #00a86b;
}

.form-control.is-invalid {
    border-color: #dc3545;
    background: #fff8f8;
}

.form-control.is-valid {
    border-color: #00a86b;
    background: #f8fff8;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    transition: color 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: #003366;
}

/* Validation Messages */
.invalid-feedback {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.invalid-feedback::before {
    content: "\f071";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 12px;
}

.valid-feedback {
    color: #00a86b;
    font-size: 13px;
    margin-top: 5px;
}

/* Checkbox & Remember Me */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #00a86b;
    border-color: #00a86b;
}

.form-check-label {
    color: #6c757d;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

/* Auth Links */
.auth-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.forgot-link {
    color: #00a86b;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #008855;
    text-decoration: underline;
}

/* Auth Button */
.btn-auth {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #00a86b 0%, #008855 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    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-auth::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

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

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 168, 107, 0.3);
}

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

.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-auth i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.btn-auth:hover i {
    transform: translateX(3px);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #f0f0f0;
}

.auth-footer p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

.auth-footer a {
    color: #00a86b;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #008855;
    text-decoration: underline;
}

/* Social Login */
.social-login {
    margin-top: 25px;
}

.social-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    color: #6c757d;
    font-size: 14px;
}

.social-divider::before,
.social-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.social-divider span {
    padding: 0 15px;
}

.social-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-social {
    flex: 1;
    height: 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #ffffff;
    color: #6c757d;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-social:hover {
    border-color: #003366;
    color: #003366;
    background: #f8f9fa;
}

/* Back to Login Link */
.back-to-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 25px;
    transition: color 0.3s ease;
}

.back-to-login:hover {
    color: #00a86b;
}

.back-to-login i {
    transition: transform 0.3s ease;
}

.back-to-login:hover i {
    transform: translateX(-3px);
}

/* Success/Error States */
.auth-success {
    text-align: center;
    padding: 40px 20px;
}

.auth-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #00a86b 0%, #008855 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.auth-success-icon i {
    font-size: 40px;
    color: #ffffff;
}

.auth-success h3 {
    color: #003366;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.auth-success p {
    color: #6c757d;
    margin-bottom: 25px;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
}

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

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

/* Tablet */
@media (max-width: 991px) {
    .auth-container {
        max-width: 500px;
    }

    .auth-illustration {
        display: none;
    }

    .auth-form-section {
        padding: 50px 40px;
    }
}

/* Mobile */
@media (max-width: 575px) {
    .auth-wrapper {
        padding: 0;
        background: #ffffff;
    }

    .auth-container {
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }

    .auth-form-section {
        padding: 40px 25px;
        justify-content: flex-start;
        padding-top: 60px;
    }

    .auth-header h1 {
        font-size: 22px;
    }

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

    .form-control {
        height: 48px;
    }

    .btn-auth {
        height: 48px;
    }

    .social-buttons {
        flex-direction: column;
    }

    .btn-social {
        width: 100%;
    }
}

/* Small Mobile */
@media (max-width: 375px) {
    .auth-form-section {
        padding: 30px 20px;
        padding-top: 40px;
    }

    .auth-header {
        margin-bottom: 30px;
    }

    .auth-logo img {
        max-height: 40px;
    }

    .auth-header h1 {
        font-size: 20px;
    }
}

/* ============================================
   BLOCKUI CUSTOMIZATION
   ============================================ */
.blockUI {
    border: none !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
    padding: 30px !important;
}

.blockUI h1 {
    color: #003366 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-top: 15px !important;
}

/* SweetAlert2 Customization */
.swal2-popup {
    border-radius: 16px !important;
    padding: 30px !important;
}

.swal2-title {
    color: #003366 !important;
    font-size: 24px !important;
    font-weight: 600 !important;
}

.swal2-html-container {
    color: #6c757d !important;
    font-size: 15px !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, #00a86b 0%, #008855 100%) !important;
    border-radius: 10px !important;
    padding: 12px 30px !important;
    font-weight: 600 !important;
}

.swal2-cancel {
    border-radius: 10px !important;
    padding: 12px 30px !important;
    font-weight: 600 !important;
}

.swal2-icon.swal2-success {
    border-color: #00a86b !important;
    color: #00a86b !important;
}

.swal2-icon.swal2-error {
    border-color: #dc3545 !important;
    color: #dc3545 !important;
}

.swal2-icon.swal2-warning {
    border-color: #ffc107 !important;
    color: #ffc107 !important;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-primary {
    color: #003366 !important;
}

.text-accent {
    color: #00a86b !important;
}

.bg-primary {
    background-color: #003366 !important;
}

.bg-accent {
    background-color: #00a86b !important;
}

/* Animation Utilities */
.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

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

/* Focus Styles */
*:focus-visible {
    outline: 2px solid #00a86b;
    outline-offset: 2px;
}

/* Password Requirements */
.password-requirements {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
}

.requirements-title {
    font-size: 13px;
    font-weight: 600;
    color: #003366;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.requirements-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.requirements-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 13px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.requirements-list li i {
    font-size: 10px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.requirements-list li.valid {
    color: #00a86b;
}

.requirements-list li.valid i {
    background: #e6f7f1;
    color: #00a86b;
    font-size: 10px;
}

.requirements-list li:not(.valid) i {
    color: #c1c1c1;
    font-size: 6px;
}

/* Print Styles */
@media print {
    .auth-illustration {
        display: none;
    }

    .auth-container {
        box-shadow: none;
    }
}

/* ============================================
   SELECT CLIENT STYLES
   ============================================ */

/* Client List Container */
.client-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Custom Scrollbar */
.client-list::-webkit-scrollbar {
    width: 6px;
}

.client-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.client-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.client-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Client Card */
.client-card {
    position: relative;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    overflow: hidden;
}

.client-card:hover {
    border-color: #00a86b;
    background: #ffffff;
    box-shadow: 0 5px 20px rgba(0, 168, 107, 0.15);
    transform: translateY(-2px);
}

.client-card.selected {
    border-color: #00a86b;
    background: linear-gradient(
        135deg,
        rgba(0, 168, 107, 0.05) 0%,
        rgba(0, 136, 85, 0.05) 100%
    );
    box-shadow: 0 5px 20px rgba(0, 168, 107, 0.2);
}

.client-card.selected::after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #00a86b;
    font-size: 18px;
    background: #e6f7f1;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.client-card.is-invalid {
    border-color: #dc3545;
}

/* Hidden Radio Button */
.client-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* client Label */
.client-label {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    cursor: pointer;
    width: 100%;
}

/* client Logo */
.client-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.client-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.client-logo i {
    font-size: 24px;
    color: #6c757d;
}

/* client Info */
.client-info {
    flex: 1;
    min-width: 0;
}

.client-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #003366;
    margin: 0 0 5px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.client-initial {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

/* client Email */
.client-email {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
    display: block;
    margin-bottom: 8px;
}

/* client Role */
.client-role {
    flex-shrink: 0;
}

.role-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #e6f7f1 0%, #d4f0e6 100%);
    color: #00a86b;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Error Message */
.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-bottom: 15px;
    text-align: center;
    min-height: 20px;
}

.error-message:empty {
    display: none;
}

/* Client List Empty State */
.client-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.client-list-empty i {
    font-size: 48px;
    color: #e0e0e0;
    margin-bottom: 15px;
}

.client-list-empty h4 {
    color: #003366;
    font-size: 18px;
    margin-bottom: 10px;
}

.client-list-empty p {
    font-size: 14px;
    margin: 0;
}
