/* =========================================
   VARIABLES & RESETS
   ========================================= */
:root {
    --pup-maroon: #800000;
    --pup-maroon-dark: #5a0000;
    --pup-gold: #ffd700;
    --ink: #0f172a;
    --muted: #4b5563;
    --card: rgba(255, 255, 255, 0.97);
    --border: rgba(128, 0, 0, 0.08);
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.18);
    --transition: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { 
    box-sizing: border-box; 
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    color: var(--ink);
    min-height: 100vh;
    /* Merged Background Styles */
    background:
        linear-gradient(135deg, rgba(128, 0, 0, 0.55), rgba(90, 0, 0, 0.4)),
        radial-gradient(circle at 14% 16%, rgba(255, 215, 0, 0.14), transparent 28%),
        radial-gradient(circle at 82% 12%, rgba(128, 0, 0, 0.18), transparent 32%),
        url("../images/PUP_bg.jpg") center/cover no-repeat;
    background-attachment: fixed;
}

a { 
    color: inherit; 
    text-decoration: none; 
}

/* =========================================
   LAYOUT & GLOW EFFECTS
   ========================================= */
.page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    position: relative;
}

.glow { 
    position: absolute; 
    width: 420px; 
    height: 420px; 
    border-radius: 50%; 
    filter: blur(140px); 
    opacity: 0.45; 
    z-index: 0; 
    animation: drift 18s ease-in-out infinite alternate; 
}
.glow.maroon { 
    background: rgba(128, 0, 0, 0.55); 
    top: 5%; 
    left: 5%; 
}
.glow.gold { 
    background: rgba(255, 215, 0, 0.48); 
    bottom: 8%; 
    right: 4%; 
    animation-delay: 4s; 
}

@keyframes drift { 
    from { transform: translate3d(0,0,0); } 
    to { transform: translate3d(35px, -25px, 0); } 
}

/* =========================================
   LEFT SIDEBAR (BRANDING & INFO)
   ========================================= */
.left {
    position: relative;
    color: #fdfdfd;
    padding: 90px 64px;
    display: grid;
    gap: 36px;
    align-content: center;
    backdrop-filter: blur(8px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
    font-size: 19px;
    animation: slideInLeft 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}
.brand img { 
    width: 52px; 
    height: 52px; 
    object-fit: contain; 
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3)); 
    transition: transform 0.3s ease; 
}
.brand:hover img { 
    transform: scale(1.08) rotate(-2deg); 
}

@keyframes slideInLeft { 
    from { opacity: 0; transform: translateX(-30px); } 
    to { opacity: 1; transform: translateX(0); } 
}

.headline { 
    margin: 0; 
    font-size: 46px; 
    line-height: 1.15; 
    font-weight: 800; 
    letter-spacing: -1px; 
    animation: slideInLeft 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both; 
}
.lede { 
    margin: 14px 0 0; 
    color: #f1f5f9; 
    max-width: 560px; 
    font-size: 16px; 
    line-height: 1.7; 
    font-weight: 400; 
    animation: slideInLeft 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both; 
}

.status-strip { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); 
    gap: 14px; 
    margin-top: 16px; 
    animation: slideInLeft 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both; 
}
.status-pill { 
    background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06)); 
    border: 1.5px solid rgba(255,255,255,0.28); 
    border-radius: 16px; 
    padding: 13px 16px; 
    font-size: 13px; 
    font-weight: 700; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); 
    backdrop-filter: blur(12px); 
    cursor: pointer; 
    letter-spacing: 0.2px; 
}
.status-pill:hover { 
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.12)); 
    border-color: rgba(255,215,0,0.5); 
    transform: translateY(-3px); 
    box-shadow: 0 8px 24px rgba(0,0,0,0.2); 
}
.dot { 
    width: 12px; 
    height: 12px; 
    border-radius: 50%; 
    background: var(--pup-gold); 
    box-shadow: 0 0 0 8px rgba(255,215,0,0.25); 
    animation: pulse 2.5s ease-in-out infinite; 
}

@keyframes pulse { 
    0%, 100% { box-shadow: 0 0 0 8px rgba(255,215,0,0.25); } 
    50% { box-shadow: 0 0 0 14px rgba(255,215,0,0.1); } 
}

.metric-card { 
    background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06)); 
    border: 1.5px solid rgba(255,255,255,0.28); 
    padding: 20px 22px; 
    border-radius: 16px; 
    display: grid; 
    gap: 6px; 
    max-width: 280px; 
    backdrop-filter: blur(12px); 
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); 
    animation: slideInLeft 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s both; 
}
.metric-card:hover { 
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.12)); 
    border-color: rgba(255,215,0,0.4); 
    transform: translateY(-4px); 
    box-shadow: 0 12px 32px rgba(0,0,0,0.25); 
}
.metric-label { 
    font-size: 11px; 
    opacity: 0.85; 
    font-weight: 700; 
    letter-spacing: 0.5px; 
    text-transform: uppercase; 
}
.metric-value { 
    font-size: 26px; 
    font-weight: 800; 
    letter-spacing: -0.5px; 
    background: linear-gradient(135deg, #ffd700, #ffffff); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    background-clip: text; 
}

/* =========================================
   RIGHT SIDEBAR (LOGIN CARD)
   ========================================= */
.right {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    z-index: 1;
}

.card {
    width: 100%;
    max-width: 500px;
    background: var(--card);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 44px;
    border-radius: 28px;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(128,0,0,0.06));
    z-index: 0;
    pointer-events: none;
}
.card::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, transparent 70%);
    animation: shimmer 8s ease-in-out infinite;
    z-index: 0;
}

@keyframes shimmer { 
    0%, 100% { transform: translate(0, 0); opacity: 0.3; } 
    50% { transform: translate(-30px, -30px); opacity: 0.6; } 
}

.card > * { 
    position: relative; 
    z-index: 1; 
}

.card h2 { 
    margin: 0 0 10px; 
    font-size: 32px; 
    color: var(--ink); 
    font-weight: 800; 
    letter-spacing: -0.5px; 
    background: linear-gradient(135deg, var(--pup-maroon), var(--ink)); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
    background-clip: text; 
}
.card p { 
    margin: 0 0 28px; 
    color: var(--muted); 
    font-size: 15px; 
    line-height: 1.6; 
    font-weight: 500; 
}

/* =========================================
   FORMS & INPUTS
   ========================================= */
label { 
    display: block; 
    font-size: 11px; 
    font-weight: 800; 
    color: var(--ink); 
    margin: 22px 0 10px; 
    letter-spacing: 0.8px; 
    text-transform: uppercase; 
    opacity: 0.85; 
}

input, select {
    width: 100%;
    padding: 16px 16px;
    border-radius: 14px;
    border: 2px solid rgba(128, 0, 0, 0.08);
    font-size: 15px;
    outline: none;
    transition: all var(--transition);
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,250,240,0.95));
    font-family: 'Montserrat', sans-serif;
    color: var(--ink);
    font-weight: 500;
    position: relative;
}
input::placeholder { 
    color: rgba(75, 85, 99, 0.45); 
    font-weight: 400; 
}
input:focus, select:focus {
    border-color: var(--pup-maroon);
    box-shadow: 0 0 0 4px rgba(128, 0, 0, 0.1), inset 0 2px 8px rgba(128, 0, 0, 0.03);
    transform: translateY(-3px);
    background: linear-gradient(135deg, #fff, rgba(255,240,220,0.95));
    filter: drop-shadow(0 4px 12px rgba(128, 0, 0, 0.12));
}
input:hover:not(:focus), select:hover:not(:focus) {
    border-color: rgba(128, 0, 0, 0.15);
    background: linear-gradient(135deg, #fefdfb, #fef5f0);
}

.inline-field { 
    position: relative; 
    display: flex; 
    align-items: center; 
}
.toggle-eye { 
    position: absolute; 
    right: 16px; 
    background: none; 
    border: none; 
    cursor: pointer; 
    color: var(--pup-maroon); 
    font-weight: 700; 
    font-size: 12px; 
    padding: 8px 12px; 
    transition: all var(--transition); 
    font-family: 'Montserrat', sans-serif; 
}
.toggle-eye:hover { 
    transform: scale(1.1); 
    opacity: 0.8; 
}

/* =========================================
   BUTTONS & LINKS
   ========================================= */
.actions { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 10px; 
    margin-top: 20px; 
    margin-bottom: 6px; 
}

.link { 
    font-size: 13px; 
    color: var(--pup-maroon); 
    font-weight: 700; 
    transition: all var(--transition); 
    position: relative; 
    display: inline-block; 
}
.link::after { 
    content: ''; 
    position: absolute; 
    bottom: -2px; 
    left: 0; 
    width: 0; 
    height: 2px; 
    background: linear-gradient(90deg, var(--pup-maroon), var(--pup-gold)); 
    transition: width var(--transition); 
}
.link:hover::after { width: 100%; }
.link:hover { transform: translateX(2px); }

.btn {
    width: 100%;
    padding: 16px 20px;
    border-radius: 14px;
    border: none;
    font-weight: 800;
    letter-spacing: 0.6px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--pup-maroon) 0%, var(--pup-maroon-dark) 100%);
    color: #fff;
    box-shadow: 0 12px 32px rgba(128, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-primary:hover::before { left: 100%; }
.btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 48px rgba(128, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, #6a0000 0%, #420000 100%);
}
.btn-primary:active { 
    transform: translateY(-2px); 
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--pup-maroon);
    background: linear-gradient(135deg, rgba(128, 0, 0, 0.06), rgba(128, 0, 0, 0.03));
    padding: 11px 16px;
    border-radius: 11px;
    border: 1.5px solid rgba(128, 0, 0, 0.12);
    margin-bottom: 24px;
    cursor: pointer;
    transition: all var(--transition);
}
.back-btn:hover { 
    color: #fff;
    background: linear-gradient(135deg, var(--pup-maroon), var(--pup-maroon-dark));
    border-color: var(--pup-maroon);
    transform: translateX(-4px);
    box-shadow: 0 8px 20px rgba(128, 0, 0, 0.28);
}

/* =========================================
   FOOTER & TERMS TEXT
   ========================================= */
.auth-footer {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
    font-size: 0.9rem;
}
.auth-footer a {
    font-weight: bold;
    color: var(--pup-maroon-dark); 
    text-decoration: none;
}

.terms-text {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
    color: #333;
    line-height: 1.6;
}
.terms-text a {
    color: #3182ce; 
    text-decoration: none;
}
.terms-text a:hover {
    text-decoration: underline;
}

.role-hint { 
    margin-top: 12px; 
    font-size: 13px; 
    color: #a16207; 
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 215, 0, 0.06)); 
    border: 2px solid rgba(255, 215, 0, 0.25); 
    padding: 13px 15px; 
    border-radius: 11px; 
    font-weight: 500; 
    line-height: 1.6; 
    backdrop-filter: blur(8px); 
    transition: all var(--transition); 
}

/* =========================================
   UTILITIES & ANIMATIONS
   ========================================= */
.animate { 
    opacity: 0; 
    transform: translateY(14px); 
    transition: opacity 0.5s ease, transform 0.5s ease; 
}
.in-view { 
    opacity: 1; 
    transform: translateY(0); 
}

/* =========================================
   MEDIA QUERIES
   ========================================= */
@media (max-width: 900px) {
    .left { display: none; }
    .right { padding: 96px 26px; }
}