﻿/* ================= LOGIN MODERN CSS ================= */
/* Standalone CSS for modern login page - independent from SmartAdmin */

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #1abc9c;
    --success-color: #27ae60;
    --warning-color: #e74c3c;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset and Base Styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    /*   background: #000;*/
     /*background: #ffffff;*/
}

/* ================= VIDEO BACKGROUND ================= */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    overflow: hidden;
}

#bgVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.6), rgba(0,0,0,0.35));
    z-index: 1;
}

.video-fallback {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    z-index: -1;
    background-size: cover;
    background-position: center;
    transition: background 1s ease;
}

/* ================= LOGIN CONTAINER ================= */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* ================= LOGIN CARD ================= */
.login-card {
    width: 100%;
    max-width: 440px;
    padding: 42px 36px;
    border-radius: 18px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
    color: #fff;
    animation: fadeUp 0.6s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= HEADER STYLES ================= */
.login-header {
    text-align: center;
    margin-bottom: 32px;
    margin-top: -80px;
}

.circle-logo {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .circle-logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.main-logo {
    margin-bottom: 12px;
}

    .main-logo img {
        max-width: 100px;
        height: auto;
        filter: brightness(1.1);
    }

.project-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    display: inline-block;
}

/* ================= FORM STYLES ================= */
.form-label {
    font-weight: 500;
    color: #f1f1f1;
    margin-bottom: 8px;
    display: block;
}

.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: rgba(255,255,255,0.18);
    border: none;
    color: #fff;
    font-size: 14px;
    border-radius: 8px 0 0 8px;
}

.form-control {
    display: block;
    width: 100%;
    height: 52px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    background: rgba(255,255,255,0.22);
    border: none;
    color: #fff;
    transition: var(--transition);
}

    .form-control::placeholder {
        color: rgba(255,255,255,0.7);
    }

    .form-control:focus {
        background: rgba(255,255,255,0.3);
        box-shadow: 0 0 0 3px rgba(255,255,255,0.2);
        color: #fff;
        outline: none;
    }

    .form-control:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .form-control.is-valid {
        border-right: 2px solid #28a745;
    }

    .form-control.is-invalid {
        border-right: 2px solid #dc3545;
    }

.input-wrapper {
    position: relative;
}

.validation-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    font-size: 18px;
    z-index: 5;
}

.fa-check-circle {
    color: #28a745;
}

.fa-exclamation-circle {
    color: #dc3545;
}

.error-message {
    font-size: 12px;
    color: #ffd1d1;
    margin-top: 6px;
    display: none;
}

/* ================= CAPTCHA STYLES ================= */
.captcha-container {
    margin: 20px 0;
    text-align: center;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.captcha-image-wrapper {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255,255,255,0.2);
}

.captcha-image {
    max-width: 100%;
    height: 40px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: var(--transition);
    background: #fff;
}

    .captcha-image:hover {
        transform: scale(1.02);
        border-color: var(--accent-color);
    }

.refresh-captcha {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 16px;
    background: rgba(255,255,255,0.15);
    border-radius: 30px;
    transition: var(--transition);
    margin-top: 10px;
    border: 1px solid rgba(255,255,255,0.2);
}

    .refresh-captcha:hover {
        background: rgba(255,255,255,0.25);
        transform: translateY(-2px);
    }

    .refresh-captcha i {
        font-size: 16px;
    }

/* ================= ATTEMPTS WARNING ================= */
.attempts-warning {
    color: #ffd966;
    font-size: 13px;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(255, 193, 7, 0.15);
    border-radius: 8px;
    border-left: 3px solid #ffc107;
    text-align: left;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.account-locked {
    color: #ff8a8a;
    font-size: 14px;
    font-weight: 500;
    margin: 15px 0;
    padding: 15px;
    background: rgba(220, 53, 69, 0.2);
    border-radius: 10px;
    border-left: 4px solid #dc3545;
    text-align: center;
    backdrop-filter: blur(5px);
}

    .account-locked i {
        font-size: 24px;
        margin-bottom: 10px;
        display: block;
    }

.lock-countdown {
    margin-top: 10px;
    font-size: 20px;
    font-weight: 600;
}

/* ================= CHECKBOX STYLES ================= */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--accent-color);
}

.form-check-label {
    color: #f1f1f1;
    font-size: 14px;
    cursor: pointer;
    margin: 0;
}

/* ================= BUTTON STYLES ================= */
.btn-primary {
    display: inline-block;
    height: 54px;
    font-weight: 600;
    font-size: 16px;
    border-radius: 14px;
    border: none;
    /*    background: linear-gradient(135deg, #667eea, #764ba2);*/
    /*    background: linear-gradient(135deg, #1F5A7A, #3A84B4);*/
    /*    background: linear-gradient(135deg, #1F5A7A, #2E6F95);*/

    background: linear-gradient(135deg, #1F5A7A 0%, #2E6F95 50%, #4FA3D1 100%);
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    width: 100%;
    position: relative;
}

    .btn-primary:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 16px 40px rgba(0,0,0,0.55);
    }

    .btn-primary:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        background: linear-gradient(135deg, #667eea, #764ba2);
    }

.btn-loading {
    pointer-events: none;
    opacity: 0.8;
}

.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

.btn-loading .loader {
    display: inline-block;
}

.btn-loading .btn-text {
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================= LINKS ================= */
.forgot-password {
    font-size: 14px;
    color: #cdd9ff;
    text-decoration: none;
    transition: var(--transition);
}

    .forgot-password:hover:not(.disabled-link) {
        text-decoration: underline;
        color: #fff;
    }

.disabled-link {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* ================= FOOTER STYLES ================= */
.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

    .footer-links a {
        color: rgba(255,255,255,0.7);
        text-decoration: none;
        font-size: 12px;
        transition: var(--transition);
    }

        .footer-links a:hover {
            color: #fff;
            text-decoration: underline;
        }

.footer-text {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    margin: 0;
}

/* ================= PASSWORD TOGGLE ================= */
.toggle-password {
    background: rgba(255,255,255,0.18);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
}

    .toggle-password:hover {
        background: rgba(255,255,255,0.3);
    }

/* ================= VALIDATION SUMMARY ================= */
.validation-summary-errors {
    background: rgba(220, 53, 69, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #dc3545;
}

    .validation-summary-errors ul {
        margin: 0;
        padding-left: 20px;
    }

    .validation-summary-errors li {
        color: #ffd1d1;
        font-size: 13px;
    }

.field-validation-error {
    color: #ffd1d1;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

/* ================= RESPONSIVE DESIGN ================= */
@media (max-width: 768px) {
    .login-card {
        padding: 32px 24px;
        margin: 20px;
    }

    .login-header {
        margin-top: -60px;
    }

    .circle-logo {
        width: 60px;
        height: 60px;
    }

    .main-logo img {
        max-width: 180px;
    }

    .project-title {
        font-size: 18px;
    }

    .form-control {
        height: 48px;
    }

    .btn-primary {
        height: 48px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
    }

    .login-header {
        margin-top: -50px;
    }

    .circle-logo {
        width: 50px;
        height: 50px;
    }

    .captcha-image {
        max-width: 200px;
    }
}

/* ================= UTILITY CLASSES ================= */
.text-center {
    text-align: center;
}

.text-light {
    color: rgba(255,255,255,0.7);
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 16px;
}

.mt-4 {
    margin-top: 24px;
}

.mb-3 {
    margin-bottom: 16px;
}

.mb-4 {
    margin-bottom: 24px;
}

.me-2 {
    margin-right: 8px;
}

.ms-2 {
    margin-left: 8px;
}

.pt-3 {
    padding-top: 16px;
}

.border-top {
    border-top: 1px solid rgba(255,255,255,0.2);
}

.w-100 {
    width: 100%;
}

.d-block {
    display: block;
}

.d-none {
    display: none;
}

/* ================= ANIMATIONS ================= */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}
