/* =====================================================================
   LOGIN PAGES - SHARED STYLES
   Per-page backgrounds and card styles
   ===================================================================== */

/* Base Styles */
body {
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

/* =====================================================================
   PAGE-SPECIFIC BACKGROUNDS & CARD STYLES
   ===================================================================== */

/* LOGIN PAGE */
body.loginPage {
    background: url('/modulGiris/login/back (2).webp') center/cover fixed, linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.loginPage .login-card {
    background: rgba(103, 126, 234, 0.25) !important;
}

/* FORGOT PASSWORD PAGE */
body.sifremiUnuttumPage {
    background: url('/modulGiris/login/back (3).webp') center/cover fixed, linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

body.sifremiUnuttumPage .login-card {
    background: rgba(79, 172, 254, 0.25) !important;
}

/* REGISTRATION PAGE */
body.kayitPage {
    background: url('/modulGiris/login/back (5).webp') center/cover fixed, linear-gradient(135deg, #37ca72 0%, #fee140 100%);
}

body.kayitPage .login-card {
    background: rgba(26, 238, 23, 0.25) !important;
}

/* VERIFICATION PAGE */
body.dogrulamaPage {
    background: url('/modulGiris/login/back (7).webp') center/cover fixed, linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

body.dogrulamaPage .login-card {
    background: rgba(168, 237, 234, 0.25) !important;
}

/* LOCK PAGE */
body.kilitPage {
    background: url('/modulGiris/login/back (8).webp') center/cover fixed, linear-gradient(135deg, #434343 0%, #000000 100%);
}

body.kilitPage .login-card {
    background: rgba(67, 67, 67, 0.4) !important;
}

/* ACTIVATION PAGE */
body.aktivasyonPage {
    background: url('/modulGiris/login/back (9).webp') center/cover fixed, linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

body.aktivasyonPage .login-card {
    background: rgba(255, 154, 158, 0.25) !important;
}

/* LOGOUT PAGE */
body.cikisPage {
    background: linear-gradient(135deg, #757676 0%, #330867 100%);
}

body.cikisPage .login-card {
    background: rgba(25, 27, 27, 0.25) !important;
}

/* ===================================================================== */

/* Container Layout */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 20px;
}

.login-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
}

/* Advertisement Area (Hidden on mobile) */
.ad-area {
    flex: 1;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.ad-content {
    max-width: 100%;
    height: auto;
}

@media (min-width: 992px) {
    .ad-area {
        display: flex;
    }
}

/* Form Area - Centered by default */
.form-area {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

/* Only login page has right-aligned form */
@media (min-width: 992px) {
    body.loginPage .form-area {
        margin-left: auto;
        margin-right: 0;
    }
}

/* Card Styles (Glassmorphism) */
.login-card {
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 1.5rem !important;
    padding: 2rem !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

/* Logo */
.login-logo {
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto 1.5rem;
}

/* Form Controls */
.form-control {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #efefef !important;
    border-radius: 0.75rem !important;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

/* Required field indicator */
.form-control[required] {
    border-left: 3px solid #dc3545 !important;
}

.form-control[required]::placeholder {
    color: rgba(255, 255, 255, 0.8) !important;
}

.form-control[required]::placeholder::after {
    content: ' *';
    color: #dc3545;
}

/* Validation feedback */
.form-control.is-invalid,
.was-validated .form-control:invalid {
    border-color: #dc3545 !important;
    border-left-width: 3px !important;
    padding-right: calc(1.5em + 0.75rem);
    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='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%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);
}

.form-control.is-valid,
.was-validated .form-control:valid:not(:placeholder-shown) {
    border-color: #28a745 !important;
    border-left-width: 3px !important;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%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);
}

/* Valid feedback color override for white text */
.was-validated .form-control:valid,
.form-control.is-valid {
    color: #efefef !important;
}

/* Invalid feedback messages */
.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #ff6b6b;
    background: rgba(220, 53, 69, 0.2);
    padding: 0.5rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(5px);
}

.was-validated .form-control:invalid~.invalid-feedback,
.form-control.is-invalid~.invalid-feedback {
    display: block;
}

/* Valid feedback messages */
.valid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6fff6f;
    background: rgba(40, 167, 69, 0.2);
    padding: 0.5rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(5px);
}

.was-validated .form-control:valid~.valid-feedback,
.form-control.is-valid~.valid-feedback {
    display: block;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

/* Buttons */
.btn {
    border-radius: 2rem !important;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Links */
.text-link {
    color: #fff !important;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.text-link:hover {
    opacity: 0.8;
}

/* Message Area */
#mesajAlani {
    border-radius: 0.75rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    display: none;
}

#mesajAlani.alert-success {
    background: rgba(40, 167, 69, 0.3);
    border-color: rgba(40, 167, 69, 0.5);
}

#mesajAlani.alert-danger {
    background: rgba(220, 53, 69, 0.3);
    border-color: rgba(220, 53, 69, 0.5);
}

#mesajAlani.alert-warning {
    background: rgba(255, 193, 7, 0.3);
    border-color: rgba(255, 193, 7, 0.5);
}

/* Form Check */
.form-check-input {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.form-check-label {
    color: #fff;
}

/* Input Groups */
.input-group-text {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

/* Footer */
.footer-links {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
}

.footer-links a {
    color: #fff !important;
    text-decoration: none;
}

.footer-links a:hover {
    opacity: 0.8;
}

.footer-links small {
    color: rgba(255, 255, 255, 0.8);
}

/* =====================================================================
   PAGE-SPECIFIC STYLES
   ===================================================================== */

/* Password Strength Bar */
.password-strength {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    background: #dc3545;
}

/* Info Box - Improved Readability */
.info-box {
    background: rgba(13, 110, 253, 0.25);
    border-left: 4px solid #0d6efd;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    color: #fff;
    font-size: 0.9rem;
    backdrop-filter: blur(5px);
}

/* Verification Code Input */
.verification-input {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5rem;
    padding: 1rem;
}

/* Lock Screen Specific */
.lock-icon {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    display: block;
    text-align: center;
}

.time-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 1rem 0;
    font-family: 'Courier New', monospace;
    text-align: center;
}

.date-display {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    text-align: center;
}

.warning-box {
    background: rgba(255, 193, 7, 0.2);
    border-left: 4px solid #ffc107;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.warning-box h5 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.warning-box ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.warning-box li {
    margin-bottom: 0.25rem;
}

/* Device Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 1rem;
    border-radius: 0.75rem;
    text-align: center;
    color: #fff;
}

.info-item i {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.info-label {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
}

/* Icon Container */
.icon-container {
    text-align: center;
    margin-bottom: 1.5rem;
}

.icon-container i {
    font-size: 3.5rem;
}

/* Colored Icons */
.icon-primary {
    color: #0d6efd !important;
}

.icon-success {
    color: #198754 !important;
}

.icon-danger {
    color: #dc3545 !important;
}

.icon-warning {
    color: #ffc107 !important;
}

.icon-info {
    color: #0dcaf0 !important;
}

.icon-purple {
    color: #6f42c1 !important;
}

.icon-pink {
    color: #d63384 !important;
}

.icon-orange {
    color: #fd7e14 !important;
}

/* Large Colored Icons */
.icon-large {
    font-size: 4rem;
    display: block;
    text-align: center;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

/* Animations */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.rotate-animation {
    animation: rotate 3s linear infinite;
}

.shake-animation {
    animation: shake 0.5s;
}

/* Mobile Adjustments */
@media (max-width: 576px) {
    .login-card {
        padding: 1.5rem !important;
    }

    .verification-input {
        font-size: 1.2rem;
        letter-spacing: 0.3rem;
    }

    .time-display {
        font-size: 2rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Compact mode for smaller screens */
@media (max-height: 700px) {
    .login-card {
        padding: 1rem !important;
    }

    .login-logo {
        max-width: 200px;
        margin-bottom: 0.75rem;
    }

    .form-control {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.5rem;
    }

    .btn {
        padding: 0.5rem 1rem;
    }

    .footer-links {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        font-size: 0.75rem;
    }

    .info-box {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
}