/*==========================================================
  Custom Authentication Page Styles
==========================================================*/

.custom-auth-container {

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
}

.custom-auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.auth-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 4px;
    box-shadow: rgba(52, 73, 94, 0.5) 0px 1px 4px, rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;;
    width: 100%;
    max-width: 500px;
    padding: 40px;
    position: relative;
    z-index: 1;
    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: 30px;
}

.auth-header h1 {
    color: #31708f;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Tab Navigation */
.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-radius: 10px;
    background: #f8f9fa;
    padding: 4px;
    gap:10px
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.tab-btn.active {
    background-color: #31708f !important;
    color: white;
    /* box-shadow: 0 2px 8px rgba(49, 112, 143, 0.3); */
}

.tab-btn:hover:not(.active) {
    background: rgba(49, 112, 143, 0.1);
    color: #31708f;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Form Styles */
.auth-form {
    width: 100%;
}

.form-header {
    text-align: center;
    margin-bottom: 25px;
}

.form-header h2 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Form Groups */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group.half-width {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group select {
    width: 100%;
    padding: 8px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fafbfc;
    box-sizing: border-box;
}

.form-group input[type="password"] {
    padding-right: 45px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #31708f;
    background: white;
    box-shadow: 0 0 0 3px rgba(49, 112, 143, 0.1);
}

/* Custom select dropdown styling */
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    -ms-expand: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    cursor: pointer;
    padding-right: 45px !important;
}

.form-group select::-ms-expand {
    display: none;
}

.form-group select:focus {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2331708f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* SlimSelect Custom Styling */
.ss-main {
    position: relative;
    display: inline-block;
    width: 100%;
}

.ss-main .ss-single-selected {
    display: flex;
    cursor: pointer;
    width: 100%;
    padding: 12px 45px 12px 15px !important;
    border: 2px solid #e1e8ed !important;
    border-radius: 10px !important;
    font-size: 14px;
    background: #fafbfc !important;
    box-sizing: border-box;
    transition: all 0.3s ease;
    min-height: auto !important;
}

.ss-main .ss-single-selected:focus,
.ss-main.ss-open .ss-single-selected {
    outline: none !important;
    border-color: #31708f !important;
    background: white !important;
    box-shadow: 0 0 0 3px rgba(49, 112, 143, 0.1) !important;
}

.ss-main .ss-single-selected .ss-placeholder {
    color: #999 !important;
    font-style: normal !important;
}

.ss-main .ss-single-selected .ss-arrow {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    border: none !important;
    background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat center;
    background-size: 16px;
    width: 16px !important;
    height: 16px !important;
}

.ss-main.ss-open .ss-single-selected .ss-arrow {
    background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2331708f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='18,15 12,9 6,15'%3e%3c/polyline%3e%3c/svg%3e") no-repeat center;
    background-size: 16px;
}

.ss-content {
    border: 2px solid #31708f !important;
    border-top: none !important;
    border-radius: 0 0 10px 10px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    background: white !important;
    z-index: 1000 !important;
}

.ss-content .ss-search {
    padding: 12px 15px !important;
    border-bottom: 1px solid #e1e8ed !important;
}

.ss-content .ss-search input {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid #e1e8ed !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    outline: none !important;
}

.ss-content .ss-search input:focus {
    border-color: #31708f !important;
    box-shadow: 0 0 0 2px rgba(49, 112, 143, 0.1) !important;
}

.ss-content .ss-list {
    max-height: 200px !important;
    overflow-y: auto !important;
}

.ss-content .ss-list .ss-option {
    padding: 12px 15px !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
    border: none !important;
}

.ss-content .ss-list .ss-option:hover,
.ss-content .ss-list .ss-option.ss-highlighted {
    background: #f8f9fa !important;
    color: #31708f !important;
}

.ss-content .ss-list .ss-option.ss-disabled {
    background: #f8f9fa !important;
    color: #999 !important;
    cursor: not-allowed !important;
}

/* Hide the original select when SlimSelect is active */
.form-group .ss-main + select {
    display: none !important;
}

/* Ensure form icon positioning works with SlimSelect */
.form-group .ss-main + .form-icon {
    display: none;
}

.form-group select option {
    padding: 10px;
    background: white;
    color: #333;
}

.form-icon {
    display: none;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 65%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle.cst-password-toggle {
    top: 40% !important;
}

.password-toggle:hover {
    color: #31708f;
}

.form-hint {
    display: block;
    color: #666;
    font-size: 12px;
    margin-top: 5px;
}

/* Password Strength Meter */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: #e1e8ed;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.strength-bar::before {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: #e74c3c;
    transition: all 0.3s ease;
}

.strength-bar.weak::before {
    width: 25%;
    background: #e74c3c;
}

.strength-bar.fair::before {
    width: 50%;
    background: #f39c12;
}

.strength-bar.good::before {
    width: 75%;
    background: #27ae60;
}

.strength-bar.strong::before {
    width: 100%;
    background: #27ae60;
}

.strength-text {
    font-size: 12px;
    color: #666;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.remember-me input[type="checkbox"] {
    display: none;
}

.remember-me .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e1e8ed;
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.remember-me input:checked + .checkmark {
    background: #31708f;
    border-color: #31708f;
}

.remember-me input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.forgot-password {
    color: #31708f;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #2c5d75;
    text-decoration: underline;
}

/* Checkbox Groups */
.checkbox-group {
    margin-bottom: 15px;
}

.custom-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.custom-checkbox input[type="checkbox"] {
    display: none;
}

.custom-checkbox .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e1e8ed;
    border-radius: 4px;
    margin-right: 10px;
    margin-top: 2px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.custom-checkbox input:checked + .checkmark {
    background: #31708f;
    border-color: #31708f;
}

.custom-checkbox input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.custom-checkbox a {
    color: #31708f;
    text-decoration: none;
}

.custom-checkbox a:hover {
    text-decoration: underline;
}

/* Auth Buttons */
.auth-btn {
    width: 100%;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    margin-top:15px;
}

.login-btn {
    
    color: white;
}


.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Form Footer */
.form-footer {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.form-footer a {
    color: #31708f;
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* Messages */
.auth-messages {
    margin-top: 20px;
}

.auth-message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.auth-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-auth-container {
        padding: 10px;
    }
    
    .auth-wrapper {
        padding: 30px 20px;
        max-width: 100%;
        margin: 0 10px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-group.half-width {
        margin-bottom: 20px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .auth-header h1 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .auth-wrapper {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .auth-btn {
        padding: 12px 25px;
        font-size: 15px;
    }
    
    .custom-checkbox {
        font-size: 13px;
    }
}
