/* Auth Pages Styles - Theme-aware Login/Register Pages */

:root {
    /* Default theme variables (will be overridden by JS based on selected theme) */
    --auth-bg: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 50%, #ffffff 100%);
    --auth-primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --auth-success-gradient: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
 --auth-text-color: #2c3e50;
    --auth-card-bg: rgba(255, 255, 255, 0.98);
    --auth-border-color: rgba(102, 126, 234, 0.2);
    --auth-line-color: #667eea;
    --auth-muted-color: #6c757d;
    --auth-input-bg: #f8f9fa;
    --auth-input-border: #e9ecef;
    
    /* Legacy variables for backwards compatibility */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    --pink-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* ============================================
   THEME-SPECIFIC OVERRIDES
   ============================================ */

/* Dark themes - card and text adjustments */
[data-auth-theme="arcade"],
[data-auth-theme="neo3d"],
[data-auth-theme="christmas"],
[data-auth-theme="newyear"],
[data-auth-theme="sakura"],
[data-auth-theme="cyberpunk"],
[data-auth-theme="forest"] {
    --auth-input-bg: rgba(255, 255, 255, 0.08);
    --auth-input-border: rgba(255, 255, 255, 0.15);
    --auth-muted-color: rgba(255, 255, 255, 0.7);
}

[data-auth-theme="arcade"] .auth-card-modern,
[data-auth-theme="neo3d"] .auth-card-modern,
[data-auth-theme="christmas"] .auth-card-modern,
[data-auth-theme="newyear"] .auth-card-modern,
[data-auth-theme="sakura"] .auth-card-modern,
[data-auth-theme="cyberpunk"] .auth-card-modern,
[data-auth-theme="forest"] .auth-card-modern {
    background: var(--auth-card-bg);
    border: 1px solid var(--auth-border-color);
}

[data-auth-theme="arcade"] .auth-title,
[data-auth-theme="neo3d"] .auth-title,
[data-auth-theme="christmas"] .auth-title,
[data-auth-theme="newyear"] .auth-title,
[data-auth-theme="sakura"] .auth-title,
[data-auth-theme="cyberpunk"] .auth-title,
[data-auth-theme="forest"] .auth-title {
    color: var(--auth-text-color);
}

[data-auth-theme="arcade"] .auth-subtitle,
[data-auth-theme="neo3d"] .auth-subtitle,
[data-auth-theme="christmas"] .auth-subtitle,
[data-auth-theme="newyear"] .auth-subtitle,
[data-auth-theme="sakura"] .auth-subtitle,
[data-auth-theme="cyberpunk"] .auth-subtitle,
[data-auth-theme="forest"] .auth-subtitle,
[data-auth-theme="arcade"] .form-label-modern,
[data-auth-theme="neo3d"] .form-label-modern,
[data-auth-theme="christmas"] .form-label-modern,
[data-auth-theme="newyear"] .form-label-modern,
[data-auth-theme="sakura"] .form-label-modern,
[data-auth-theme="cyberpunk"] .form-label-modern,
[data-auth-theme="forest"] .form-label-modern {
    color: var(--auth-muted-color);
}

[data-auth-theme="arcade"] .form-control-modern,
[data-auth-theme="neo3d"] .form-control-modern,
[data-auth-theme="christmas"] .form-control-modern,
[data-auth-theme="newyear"] .form-control-modern,
[data-auth-theme="sakura"] .form-control-modern,
[data-auth-theme="cyberpunk"] .form-control-modern,
[data-auth-theme="forest"] .form-control-modern {
    background: var(--auth-input-bg);
    border-color: var(--auth-input-border);
    color: var(--auth-text-color);
}

[data-auth-theme="arcade"] .form-control-modern:focus,
[data-auth-theme="neo3d"] .form-control-modern:focus,
[data-auth-theme="christmas"] .form-control-modern:focus,
[data-auth-theme="newyear"] .form-control-modern:focus,
[data-auth-theme="sakura"] .form-control-modern:focus,
[data-auth-theme="cyberpunk"] .form-control-modern:focus,
[data-auth-theme="forest"] .form-control-modern:focus {
    border-color: var(--auth-line-color);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1);
}

[data-auth-theme="arcade"] .form-control-modern::placeholder,
[data-auth-theme="neo3d"] .form-control-modern::placeholder,
[data-auth-theme="christmas"] .form-control-modern::placeholder,
[data-auth-theme="newyear"] .form-control-modern::placeholder,
[data-auth-theme="sakura"] .form-control-modern::placeholder,
[data-auth-theme="cyberpunk"] .form-control-modern::placeholder,
[data-auth-theme="forest"] .form-control-modern::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

[data-auth-theme="arcade"] .form-check-label-modern,
[data-auth-theme="neo3d"] .form-check-label-modern,
[data-auth-theme="christmas"] .form-check-label-modern,
[data-auth-theme="newyear"] .form-check-label-modern,
[data-auth-theme="sakura"] .form-check-label-modern,
[data-auth-theme="cyberpunk"] .form-check-label-modern,
[data-auth-theme="forest"] .form-check-label-modern,
[data-auth-theme="arcade"] .auth-footer-text,
[data-auth-theme="neo3d"] .auth-footer-text,
[data-auth-theme="christmas"] .auth-footer-text,
[data-auth-theme="newyear"] .auth-footer-text,
[data-auth-theme="sakura"] .auth-footer-text,
[data-auth-theme="cyberpunk"] .auth-footer-text,
[data-auth-theme="forest"] .auth-footer-text {
  color: var(--auth-muted-color);
}

[data-auth-theme="arcade"] .auth-footer,
[data-auth-theme="neo3d"] .auth-footer,
[data-auth-theme="christmas"] .auth-footer,
[data-auth-theme="newyear"] .auth-footer,
[data-auth-theme="sakura"] .auth-footer,
[data-auth-theme="cyberpunk"] .auth-footer,
[data-auth-theme="forest"] .auth-footer {
    border-top-color: var(--auth-border-color);
}

[data-auth-theme="arcade"] .auth-link,
[data-auth-theme="neo3d"] .auth-link,
[data-auth-theme="christmas"] .auth-link,
[data-auth-theme="newyear"] .auth-link,
[data-auth-theme="sakura"] .auth-link,
[data-auth-theme="cyberpunk"] .auth-link,
[data-auth-theme="forest"] .auth-link {
    color: var(--auth-line-color);
}

/* Light themes */
[data-auth-theme="clean"],
[data-auth-theme="gold"],
[data-auth-theme="pastel"] {
    --auth-input-bg: #f8f9fa;
    --auth-input-border: #e9ecef;
}

/* ============================================
   PARTICLE BACKGROUND - USES THEME BG
   ============================================ */

#particles-js-login {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: var(--auth-bg);
    transition: background 0.5s ease;
}

/* ============================================
   BACK TO HOME BUTTON - THEME AWARE
   ============================================ */

.back-to-home-btn {
    position: fixed;
    top: 2rem;
    left: 2rem;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--auth-card-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--auth-border-color);
    border-radius: 50px;
    color: var(--auth-line-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-home-btn:hover {
    background: var(--auth-primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.back-to-home-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.back-to-home-btn:hover i {
    transform: translateX(-4px);
}

/* ============================================
   MODERN TOGGLE SWITCH AT TOP
   ============================================ */

.login-toggle-container {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    padding: 0 2rem;
}

.login-toggle-wrapper {
    position: relative;
    display: inline-flex;
    background: var(--auth-card-bg);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--auth-border-color);
}

.login-toggle-input {
position: absolute;
    opacity: 0;
    width: 0;
 height: 0;
}

.login-toggle-label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--auth-muted-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    user-select: none;
}

.login-toggle-label i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.login-toggle-slider {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    width: calc(50% - 0.5rem);
    height: calc(100% - 1rem);
    background: var(--auth-primary-gradient);
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Admin selected (default) */
#adminToggle:checked ~ .login-toggle-slider {
    left: 0.5rem;
  background: var(--auth-primary-gradient);
}

#adminToggle:checked + .login-toggle-label {
    color: white;
}

/* Surveyor selected */
#surveyorToggle:checked ~ .login-toggle-slider {
  left: calc(50%);
    background: var(--auth-success-gradient);
}

#surveyorToggle:checked + .login-toggle-label + input + .login-toggle-label {
    color: white;
}

.login-toggle-label:hover {
    transform: scale(1.05);
}

.login-toggle-label:active {
    transform: scale(0.98);
}

/* ============================================
   AUTH CONTAINER
   ============================================ */

.auth-container-modern {
    position: relative;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
padding: 2rem;
    padding-top: 6rem;
    z-index: 1;
    overflow: hidden;
}

/* ============================================
   DUAL PANEL LAYOUT WITH ROTATING ANIMATION
   ============================================ */

.login-dual-panel {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    max-width: 1400px;
    width: 100%;
    height: 650px;
    overflow: visible;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
}

/* ============================================
   INFO BOOK CONTAINER - ROTATES 180deg
   ============================================ */

.info-book-container {
  position: relative;
    width: 100%;
    height: 100%;
    grid-column: 1;
    grid-row: 1;
    z-index: 2;
    transform-origin: center center;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* When flipped, rotate 180deg and move to right column */
.login-dual-panel.flipped .info-book-container {
    transform: rotateY(180deg);
    grid-column: 2;
}

.info-book-container .book-page {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* ============================================
   LOGIN BOOK CONTAINER - STAYS IN PLACE
   ============================================ */

.login-book-container {
    position: relative;
    width: 100%;
    height: 100%;
    grid-column: 2;
    grid-row: 1;
    z-index: 1;
    transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* When flipped, form moves to left */
.login-dual-panel.flipped .login-book-container {
    grid-column: 1;
}

/* Book Pages */
.book-page {
  position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    opacity: 1;
    transition: opacity 0.4s ease-in-out 0.5s;
}

/* Admin/Surveyor visibility control */
.login-dual-panel:not(.flipped) .book-front {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

.login-dual-panel:not(.flipped) .book-back {
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.login-dual-panel.flipped .book-front {
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.login-dual-panel.flipped .book-back {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

/* ============================================
   INFO CARD STYLES WITH COLOR TRANSITION
   ============================================ */

.info-panel {
    width: 100%;
    height: 100%;
}

.info-card {
    background: var(--auth-primary-gradient);
    padding: 3rem;
    width: 100%;
    height: 100%;
  position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    color: white;
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
    transition: background 1.2s cubic-bezier(0.4, 0, 0.2, 1), clip-path 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Admin info (default - left side, purple, diagonal right) */
.admin-info {
    background: var(--auth-primary-gradient);
  clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
}

/* Surveyor info (default - hidden on back, green) */
.surveyor-info {
    background: var(--auth-success-gradient);
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
}

/* When flipped, info container rotates 180deg which flips the card */
/* The back face (surveyor) becomes visible on the right */
.login-dual-panel.flipped .info-book-container .book-page {
    transform: rotateY(180deg);
}

/* Adjust clip-path and alignment when on right side */
.login-dual-panel.flipped .admin-info {
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
}

.login-dual-panel.flipped .surveyor-info {
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0 100%);
    /* Align content to the right side when flipped */
    align-items: flex-end;
    text-align: right;
}

/* Decorative diagonal overlay */
.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    clip-path: polygon(70% 0, 100% 0, 100% 100%, 40% 100%);
    pointer-events: none;
}

.info-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.info-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.5rem;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 100%;
}

.info-subtitle {
    font-size: 1.3rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.info-description {
font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 90%;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info-features {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
    width: 100%;
    max-width: 450px;
}

.feature-item-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.feature-item-info:hover {
    transform: translateX(10px);
}

.feature-item-info i {
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.9;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ============================================
 AUTH CARD - THEME AWARE
   ============================================ */

.auth-card-modern {
    background: var(--auth-card-bg);
    padding: 2.5rem;
    width: 100%;
    height: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
 flex-direction: column;
    justify-content: center;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--auth-border-color);
    transition: background 0.5s ease, border-color 0.5s ease;
}

/* Hide scrollbar but keep functionality */
.auth-card-modern::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.auth-card-modern {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.auth-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--auth-primary-gradient);
    border-radius: 24px 24px 0 0;
}

.surveyor-card::before {
    background: var(--auth-success-gradient);
}

/* ============================================
   ELEMENT ANIMATION STYLES
   ============================================ */

.animation {
    opacity: 1;
    transform: translateX(0%) translateY(0);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: calc(0.08s * var(--li));
}

/* Slide out animation */
.login-dual-panel.flipped .login-book-container .book-front .animation,
.login-dual-panel:not(.flipped) .login-book-container .book-back .animation {
    opacity: 0;
    transform: translateX(-50px) translateY(20px);
    transition-delay: 0s;
}

/* Slide in animation */
.login-dual-panel:not(.flipped) .login-book-container .book-front .animation,
.login-dual-panel.flipped .login-book-container .book-back .animation {
    opacity: 1;
    transform: translateX(0%) translateY(0);
    transition-delay: calc(0.08s * var(--li) + 0.7s);
}

/* ============================================
   AUTH ICON - THEME AWARE
   ============================================ */

.auth-icon {
    width: 80px;
    height: 80px;
  margin: 0 auto 1.25rem;
    border-radius: 18px;
    background: var(--auth-primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: background 0.5s ease;
}

.auth-icon-success {
    background: var(--auth-success-gradient);
}

/* ============================================
   AUTH TITLE & SUBTITLE - THEME AWARE
   ============================================ */

.auth-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--auth-text-color);
    text-align: center;
    margin-bottom: 0.5rem;
    transition: color 0.5s ease;
}

.auth-subtitle {
 font-size: 0.95rem;
    color: var(--auth-muted-color);
    text-align: center;
  margin-bottom: 1.75rem;
    transition: color 0.5s ease;
}

/* ============================================
   MODERN ALERTS
   ============================================ */

.alert-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem;
    border-radius: 12px;
    border: none;
    margin-bottom: 1.25rem;
    background: rgba(220, 53, 69, 0.1);
}

.alert-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
  align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.alert-danger .alert-icon {
background: var(--pink-gradient);
    color: white;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 700;
    font-size: 0.95rem;
margin-bottom: 0.25rem;
    color: var(--auth-text-color);
}

.alert-message {
    font-size: 0.85rem;
    opacity: 0.9;
    color: var(--auth-muted-color);
}

/* ============================================
   FORM STYLES - THEME AWARE
   ============================================ */

.auth-form {
    margin-bottom: 1.5rem;
}

.form-group-modern {
    margin-bottom: 1.25rem;
}

.form-label-modern {
    display: block;
    font-weight: 600;
    color: var(--auth-text-color);
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    transition: color 0.5s ease;
}

.form-control-modern {
    width: 100%;
    padding: 0.8rem 0.95rem;
    border-radius: 12px;
  border: 2px solid var(--auth-input-border);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--auth-input-bg);
    color: var(--auth-text-color);
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--auth-line-color);
    background: white;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.1);
}

.form-control-modern::placeholder {
    color: var(--auth-muted-color);
opacity: 0.6;
}

.form-check-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-check-input-modern {
    width: 18px;
    height: 18px;
    border-radius: 6px;
border: 2px solid var(--auth-input-border);
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--auth-input-bg);
}

.form-check-input-modern:checked {
    background: var(--auth-primary-gradient);
    border-color: var(--auth-line-color);
}

.form-check-label-modern {
    font-size: 0.85rem;
    color: var(--auth-muted-color);
 cursor: pointer;
    user-select: none;
    transition: color 0.5s ease;
}

/* ============================================
   AUTH BUTTON - THEME AWARE
   ============================================ */

.btn-auth {
    width: 100%;
    padding: 0.9rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
position: relative;
 overflow: hidden;
}

.btn-auth::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-auth:hover::before {
    width: 300px;
    height: 300px;
}

.btn-auth-primary {
    background: var(--auth-primary-gradient);
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-auth-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.btn-auth-success {
    background: var(--auth-success-gradient);
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-auth-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.btn-auth span,
.btn-auth i {
    position: relative;
    z-index: 1;
}

.btn-auth i {
    transition: transform 0.3s ease;
}

.btn-auth:hover i {
    transform: translateX(5px);
}

/* ============================================
   AUTH FOOTER - THEME AWARE
   ============================================ */

.auth-footer {
    text-align: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--auth-border-color);
    transition: border-color 0.5s ease;
}

.auth-footer-text {
    color: var(--auth-muted-color);
    font-size: 0.85rem;
 margin-bottom: 0.65rem;
    transition: color 0.5s ease;
}

.auth-link {
    color: var(--auth-line-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  transition: all 0.3s ease;
    background: none;
    border: none;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.auth-link:hover {
    background: rgba(102, 126, 234, 0.1);
}

.flip-trigger {
    position: relative;
}

.flip-trigger i {
    transition: transform 0.3s ease;
}

.flip-trigger:hover i {
    transform: rotate(180deg);
}

/* ============================================
   FLOATING ICONS
   ============================================ */

.floating-icons-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.floating-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    pointer-events: auto;
}

.floating-icon:hover {
  transform: scale(1.5) !important;
    opacity: 1 !important;
    filter: drop-shadow(0 5px 15px rgba(102, 126, 234, 0.5));
    z-index: 999 !important;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets and below */
@media (max-width: 992px) {
    .login-dual-panel {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
        min-height: auto;
        overflow: visible;
    }
    
    .info-book-container {
        display: none;
    }
    
    .login-book-container {
        grid-column: 1 !important;
        grid-row: 1;
        height: auto;
    }
    
    .book-page {
        position: relative;
        height: auto;
    }
    
    .auth-container-modern {
        padding: 1.5rem;
        padding-top: 5.5rem;
        padding-bottom: 2rem;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }
    
    .auth-card-modern {
        height: auto;
        min-height: auto;
        padding: 2rem 1.75rem;
        max-height: none;
        overflow: visible;
    }
    
    .login-dual-panel {
        box-shadow: none;
        background: transparent;
    }
}

/* Mobile landscape and small tablets */
@media (max-width: 768px) {
    .back-to-home-btn {
        top: 1rem;
        left: 1rem;
        padding: 0.6rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .back-to-home-btn span {
        display: none;
    }
    
    .back-to-home-btn {
        width: 45px;
        height: 45px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }
    
    .back-to-home-btn i {
        margin: 0;
    }
    
    .login-toggle-container {
        top: 1rem;
        padding: 0 1rem;
    }
    
    .auth-container-modern {
        padding: 1rem;
        padding-top: 5rem;
        padding-bottom: 2rem;
        min-height: 100vh;
        height: auto;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    .auth-card-modern {
        padding: 1.75rem 1.5rem;
        max-width: 100%;
        height: auto;
        min-height: auto;
        overflow: visible;
    }
    
    .auth-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .auth-subtitle {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }
    
    .form-group-modern {
        margin-bottom: 1rem;
    }
    
    .form-label-modern {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }
    
    .form-control-modern {
        padding: 0.75rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .btn-auth {
        padding: 0.85rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .alert-modern {
        padding: 0.75rem;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .alert-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .alert-title {
        font-size: 0.875rem;
    }
    
    .alert-message {
        font-size: 0.8rem;
    }
}

/* Small mobile devices */
@media (max-width: 576px) {
    .login-toggle-container {
        top: 0.75rem;
        padding: 0 0.5rem;
    }
    
    .login-toggle-wrapper {
        padding: 0.4rem;
    }
    
    .login-toggle-label {
        padding: 0.65rem 1.25rem;
        font-size: 0.875rem;
        gap: 0.4rem;
    }
    
    .login-toggle-label span {
        display: none;
    }
    
    .login-toggle-label i {
        font-size: 1.1rem;
        margin: 0;
    }
    
    .login-toggle-slider {
        top: 0.4rem;
        left: 0.4rem;
        width: calc(50% - 0.4rem);
        height: calc(100% - 0.8rem);
    }
    
    #adminToggle:checked ~ .login-toggle-slider {
        left: 0.4rem;
    }
    
    #surveyorToggle:checked ~ .login-toggle-slider {
        left: calc(50%);
    }
    
    .auth-container-modern {
        padding: 0.75rem;
        padding-top: 4.5rem;
        padding-bottom: 1.5rem;
        min-height: 100vh;
        height: auto;
        display: block;
    }
    
    .login-dual-panel {
        height: auto;
        min-height: auto;
    }
    
    .login-book-container {
        height: auto;
        min-height: auto;
    }
    
    .book-page {
        position: relative;
        height: auto;
        min-height: auto;
    }
    
    .auth-card-modern {
        padding: 1.5rem 1.25rem;
        border-radius: 20px;
        height: auto;
        min-height: auto;
        max-height: none;
        overflow: visible;
        display: block;
    }
    
    .auth-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
        margin-bottom: 0.875rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
        margin-bottom: 0.4rem;
    }
    
    .auth-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1.25rem;
    }
    
    .form-group-modern {
        margin-bottom: 0.875rem;
    }
    
    .form-label-modern {
        font-size: 0.8rem;
        margin-bottom: 0.35rem;
    }
    
    .form-label-modern i {
        font-size: 0.85rem;
    }
    
    .form-control-modern {
        padding: 0.7rem 0.8rem;
        font-size: 0.875rem;
        border-radius: 10px;
    }
    
    .form-check-modern {
        margin-bottom: 1rem;
    }
    
    .form-check-input-modern {
        width: 16px;
        height: 16px;
    }
    
    .form-check-label-modern {
        font-size: 0.8rem;
    }
    
    .btn-auth {
        padding: 0.8rem 1.25rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    .auth-footer {
        padding-top: 1rem;
        margin-top: 0.5rem;
    }
    
    .auth-footer-text {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .auth-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .alert-modern {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.7rem;
        gap: 0.5rem;
    }
    
    .alert-icon {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .alert-title {
        font-size: 0.825rem;
    }
    
    .alert-message {
        font-size: 0.75rem;
    }
    
    .login-dual-panel {
        border-radius: 20px;
    }
}

/* Extra small devices (320px and below) */
@media (max-width: 375px) {
    .back-to-home-btn {
        width: 40px;
        height: 40px;
        top: 0.75rem;
        left: 0.75rem;
    }
    
    .back-to-home-btn i {
        font-size: 0.9rem;
    }
    
    .login-toggle-container {
        top: 0.5rem;
    }
    
    .login-toggle-label {
        padding: 0.6rem 1rem;
    }
    
    .auth-container-modern {
        padding: 0.5rem;
        padding-top: 4rem;
        padding-bottom: 1rem;
    }
    
    .auth-card-modern {
        padding: 1.25rem 1rem;
        border-radius: 16px;
    }
    
    .auth-icon {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
    
    .auth-title {
        font-size: 1.35rem;
    }
    
    .auth-subtitle {
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .form-control-modern {
        padding: 0.65rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .btn-auth {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Landscape mobile orientation */
@media (max-height: 600px) and (orientation: landscape) {
    .auth-container-modern {
        padding-top: 4rem;
        padding-bottom: 1rem;
        height: auto;
        min-height: 100vh;
    }
    
    .auth-card-modern {
        padding: 1.5rem 1.25rem;
        height: auto;
        min-height: auto;
    }
    
    .auth-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
        margin-bottom: 0.35rem;
    }
    
    .auth-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .form-group-modern {
        margin-bottom: 0.75rem;
    }
    
    .form-check-modern {
        margin-bottom: 0.75rem;
    }
    
    .auth-footer {
        padding-top: 0.75rem;
    }
}

/* Ensure mobile screens have proper scrolling */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    #particles-js-login {
        position: fixed;
        overflow: hidden;
    }
    
    /* Disable flip animations on mobile */
    .login-dual-panel.flipped .info-book-container {
        transform: none;
    }
    
    /* Make sure both forms are accessible on mobile */
    .login-dual-panel:not(.flipped) .book-back,
    .login-dual-panel.flipped .book-back {
        opacity: 1;
        z-index: 2;
        pointer-events: auto;
        display: block;
    }
    
    .login-dual-panel:not(.flipped) .book-front {
        opacity: 1;
        z-index: 2;
        pointer-events: auto;
        display: block;
    }
    
    /* Hide the non-active form on mobile */
    .login-dual-panel:not(.flipped) .book-back {
        display: none;
    }
    
    .login-dual-panel.flipped .book-front {
        display: none;
    }
}
