@import url('../fonts/kalameh.css');

/* ========== متغیرها ========== */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --dark-color: #1e293b;
    --light-bg: #f8fafc;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== تنظیمات کلی ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kalameh', sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* ========== پس‌زمینه متحرک ========== */
body::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: backgroundMove 20s ease-in-out infinite;
    z-index: 0;
}

@keyframes backgroundMove {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-50px, -50px) rotate(5deg);
    }
}

/* ========== صفحه Home ========== */
.home-background {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.home-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 700px;
    text-align: center;
    animation: slideUp 0.8s ease-out;
}

.home-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    pointer-events: none;
}

.home-title {
    font-size: 52px;
    font-weight: 900;
    color: white;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.home-slogan {
    font-size: 28px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 25px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.home-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin-bottom: 50px;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.home-developer {
    margin-top: 60px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

.home-developer a {
    color: #c4b5fd;
    text-decoration: none;
    transition: all 0.3s;
}

.home-developer a:hover {
    color: #ddd6fe;
    text-decoration: underline;
}

/* ========== Container اصلی (صفحه لاگین) ========== */
.login-container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    max-width: 950px;
    width: 100%;
    display: flex;
    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);
    }
}

/* ========== بخش تصویر ========== */
.login-image {
    flex: 1;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.login-image::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 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;
    }
}

.login-image-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.login-image i {
    font-size: 120px;
    margin-bottom: 30px;
    opacity: 0.95;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    animation: float 3s ease-in-out infinite;
}

.login-image h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.login-image p {
    font-size: 16px;
    opacity: 0.95;
    text-align: center;
    line-height: 1.8;
    max-width: 300px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========== بخش فرم ========== */
.login-form {
    flex: 1;
    padding: 60px 50px;
    background: white;
}

.login-form h3 {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark-color);
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.login-form>p {
    color: #64748b;
    margin-bottom: 40px;
    font-size: 15px;
    font-weight: 500;
}

/* ========== تب‌ها ========== */
.nav-pills {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 4px;
}

.nav-pills .nav-link {
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 600;
    color: #64748b;
    transition: var(--transition);
    border: none;
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-pills .nav-link:hover:not(.active) {
    background: #e2e8f0;
    color: var(--dark-color);
}

/* ========== فرم ========== */
.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 10px;
    font-size: 14px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group-text {
    background: white;
    border: 2px solid #e2e8f0;
    border-left: none;
    border-radius: 12px 0 0 12px;
    padding: 0 18px;
    transition: var(--transition);
}

.input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
}

.input-group-text i {
    color: #94a3b8;
    font-size: 16px;
    transition: var(--transition);
}

.input-group:focus-within .input-group-text i {
    color: var(--primary-color);
}

.form-control {
    height: 56px;
    border-radius: 0 12px 12px 0;
    border: 2px solid #e2e8f0;
    border-right: none;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--dark-color);
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #cbd5e1;
    font-weight: 400;
}

/* ========== Remember Me ========== */
.form-check {
    margin-bottom: 0;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.form-check-input:checked {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.form-check-label {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

/* ========== دکمه‌ها ========== */
.btn-login {
    height: 56px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0 32px;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-login:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
    color: white;
}

.btn-login:active {
    transform: translateY(-1px);
}

.btn-login i {
    position: relative;
    z-index: 1;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.5);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
    color: white;
}

.btn-warning:hover {
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.5);
    color: white;
}

/* ========== Alert ========== */
.alert {
    border-radius: 12px;
    border: none;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    margin-bottom: 25px;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    font-size: 20px;
    flex-shrink: 0;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: #b91c1c;
    border-right: 4px solid #ef4444;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    color: #047857;
    border-right: 4px solid #10b981;
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    color: #1e40af;
    border-right: 4px solid #3b82f6;
}

/* ========== متن امنیت ========== */
.security-text {
    margin-top: 25px;
    text-align: center;
}

.security-text small {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.security-text i {
    color: var(--success-color);
}

/* ========== نسخه ========== */
.version-badge {
    position: fixed;
    bottom: 25px;
    left: 25px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: fadeIn 1s ease-out 0.5s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
    .login-container {
        flex-direction: column;
        max-width: 500px;
    }

    .login-image {
        padding: 50px 40px;
    }

    .login-image i {
        font-size: 80px;
    }

    .login-image h2 {
        font-size: 26px;
    }

    .login-form {
        padding: 50px 40px;
    }

    .login-form h3 {
        font-size: 30px;
    }
}

@media (max-width: 576px) {
    body {
        padding: 15px;
    }

    .login-container {
        border-radius: 20px;
    }

    .login-image {
        padding: 40px 30px;
    }

    .login-image i {
        font-size: 70px;
        margin-bottom: 20px;
    }

    .login-image h2 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .login-image p {
        font-size: 14px;
    }

    .login-form {
        padding: 40px 25px;
    }

    .login-form h3 {
        font-size: 26px;
    }

    .login-form>p {
        font-size: 14px;
        margin-bottom: 30px;
    }

    .form-control,
    .btn-login {
        height: 52px;
    }

    .version-badge {
        bottom: 15px;
        left: 15px;
        padding: 8px 16px;
        font-size: 12px;
    }

    /* Home Responsive */
    .home-content {
        padding: 50px 30px;
    }

    .home-title {
        font-size: 32px;
    }

    .home-slogan {
        font-size: 20px;
    }

    .home-description {
        font-size: 15px;
        margin-bottom: 30px;
    }
}