/* ============================================
   Online Voting System – Modern Auth Stylesheet
   ============================================ */

* { box-sizing: border-box; }

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #6dd5fa 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    overflow: hidden;
    position: relative;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating background blobs */
.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
    z-index: 0;
    animation: floatBlob 14s ease-in-out infinite;
}
.blob-1 { width: 380px; height: 380px; background: #ff6ec4; top: -80px;   left: -80px;  animation-delay: 0s; }
.blob-2 { width: 320px; height: 320px; background: #7873f5; bottom: -60px; right: -60px; animation-delay: 3s; }
.blob-3 { width: 260px; height: 260px; background: #4ade80; bottom: 30%;   left: 40%;    animation-delay: 6s; }

@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, -30px) scale(1.1); }
}

/* Wrapper */
.auth-wrapper {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 920px;
    min-height: 560px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    display: flex;
    animation: cardEnter 0.8s cubic-bezier(.2,.9,.3,1.2);
}

@keyframes cardEnter {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* =========================
   LEFT HERO (image slider)
   ========================= */
.auth-hero {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: #fff;
}

.hero-slider {
    position: absolute;
    inset: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 1s ease, transform 6s ease;
}
.hero-slide.slide-active {
    opacity: 1;
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.78), rgba(106, 17, 203, 0.62));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-logo-wrap {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: #fff;
    padding: 6px;
    margin-bottom: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    animation: pulseRing 2.5s ease-in-out infinite;
}
.hero-logo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}
@keyframes pulseRing {
    0%, 100% { box-shadow: 0 10px 30px rgba(0,0,0,0.35), 0 0 0 0 rgba(255,255,255,0.5); }
    50%      { box-shadow: 0 10px 30px rgba(0,0,0,0.35), 0 0 0 18px rgba(255,255,255,0); }
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: 0.5px;
    animation: slideUp 0.8s ease 0.3s both;
}
.hero-tagline {
    font-size: 15px;
    opacity: 0.92;
    line-height: 1.5;
    max-width: 320px;
    animation: slideUp 0.8s ease 0.5s both;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-dots {
    margin-top: 28px;
    display: flex;
    gap: 10px;
}
.dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
}
.dot.dot-active {
    background: #fff;
    width: 30px;
    border-radius: 6px;
}

/* =========================
   RIGHT FORM PANEL
   ========================= */
.auth-panel {
    flex: 1;
    min-width: 0;
    padding: 40px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.panel-header {
    text-align: center;
    margin-bottom: 22px;
}
.panel-logo-wrap {
    display: none; /* logo already shown in hero on desktop */
}
.panel-title {
    font-size: 26px;
    color: #1e3c72;
    margin: 0 0 6px;
    font-weight: 700;
    animation: slideUp 0.6s ease both;
}
.panel-sub {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
    animation: slideUp 0.6s ease 0.1s both;
}

.auth-form {
    animation: slideUp 0.7s ease 0.2s both;
}

/* Floating input */
.floating-input {
    position: relative;
    margin-bottom: 14px;
}
.floating-input .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #2a5298;
    font-size: 14px;
    pointer-events: none;
}
.floating-input .form-control {
    height: 46px;
    padding: 0 14px 0 40px;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    background: #f9fafb;
    transition: all 0.25s ease;
    font-size: 14px;
}
.floating-input .form-control:focus {
    border-color: #2a5298;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(42, 82, 152, 0.12);
    outline: none;
}

/* Role selector */
.role-label {
    display: block;
    margin: 6px 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}
.role-selector input[type="radio"] {
    display: none;
}
.role-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.25s ease;
    margin: 0;
}
.role-option i {
    font-size: 22px;
    color: #6b7280;
    margin-bottom: 6px;
    transition: all 0.25s ease;
}
.role-option span {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.role-option:hover {
    border-color: #2a5298;
    transform: translateY(-2px);
}
.role-selector input[type="radio"]:checked + .role-option {
    border-color: #2a5298;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    box-shadow: 0 8px 18px rgba(42, 82, 152, 0.35);
    transform: translateY(-2px);
}
.role-selector input[type="radio"]:checked + .role-option i,
.role-selector input[type="radio"]:checked + .role-option span {
    color: #fff;
}

/* Auth button */
.auth-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: #fff !important;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 8px 20px rgba(30, 60, 114, 0.35);
    position: relative;
    overflow: hidden;
}
.auth-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2a5298, #6dd5fa);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.auth-btn span, .auth-btn i {
    position: relative;
    z-index: 1;
}
.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(30, 60, 114, 0.45);
}
.auth-btn:hover::before {
    opacity: 1;
}
.auth-btn i {
    transition: transform 0.3s ease;
}
.auth-btn:hover i {
    transform: translateX(4px);
}

/* Footer links */
.auth-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: #6b7280;
}
.auth-footer a {
    color: #2a5298;
    font-weight: 600;
    text-decoration: none;
}
.auth-footer a:hover {
    text-decoration: underline;
}
.auth-footer .forgot {
    margin-top: 6px;
}

/* Alert messages */
.alert-msg {
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: shake 0.4s ease;
}
.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger  { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-6px); }
    75%      { transform: translateX(6px); }
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 820px) {
    .auth-card {
        flex-direction: column;
        max-width: 460px;
        min-height: 0;
    }
    .auth-hero {
        min-height: 220px;
    }
    .hero-content {
        padding: 24px;
    }
    .hero-title { font-size: 22px; }
    .hero-logo-wrap { width: 80px; height: 80px; margin-bottom: 14px; }
    .auth-panel { padding: 28px 24px; }
}

/* Legacy class shims (keep older snippets safe) */
.user_card { display: none; }
