/* Auth Page — Login / Register */

/* Blurred background fills the space between header and footer */
.auth-body {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 70px);
    padding: 40px 24px;
    position: relative;
    overflow: hidden;
}

/* Background image layer */
.auth-body::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../Images/Login-Register/Login-RegisterBg.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(2px) brightness(0.85);
    z-index: 0;
}

/* Purple tint overlay */
.auth-body::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(107, 46, 120, 0.45);
    z-index: 1;
}

/* The card */
.auth-panel {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 860px;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}

/* ── Left image side ── */
.auth-left {
    position: relative;
    min-height: 460px;
}

.auth-left-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.auth-left-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(80, 20, 90, 0.25) 0%,
        rgba(60, 10, 70, 0.65) 100%
    );
}

.auth-left .auth-left-brand {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
}

.auth-left .logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: contain;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    padding: 6px;
    border: 1px solid rgba(255,255,255,0.25);
}

.auth-left .caption {
    position: absolute;
    bottom: 28px;
    left: 24px;
    z-index: 2;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    letter-spacing: 0.02em;
}

.auth-left .caption span {
    color: #c8ff00;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ── Right form side ── */
.auth-right {
    background: #6b2e6e;
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #fff;
}

.auth-title {
    font-size: 34px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px;
    letter-spacing: -0.01em;
}

/* Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-bottom: 7px;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    background: rgba(255,255,255,0.92);
    border: 1px solid transparent;
    color: #1a1a2e;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: #c8ff00;
    box-shadow: 0 0 0 3px rgba(200, 255, 0, 0.15);
    background: #fff;
}

.password-input-container {
    position: relative;
}

.password-input-container input {
    padding-right: 42px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.toggle-password:hover { color: #374151; }

/* Submit button */
.btn.primary {
    width: 100%;
    padding: 13px;
    background: #1a0a1e;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    margin-top: 4px;
}

.btn.primary:hover {
    background: #2d1040;
    transform: translateY(-1px);
}

.btn.primary:active { transform: translateY(0); }

/* Divider */
.divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.4);
    font-size: 12px;
    margin: 14px 0 10px;
}

.divider::before,
.divider::after {
    content: "";
    height: 1px;
    background: rgba(255,255,255,0.15);
    display: block;
}

/* Alt links */
.alt-actions {
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.alt-actions a {
    color: rgba(255,255,255,0.85);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.alt-actions a:hover { color: #c8ff00; }

/* Messages */
.message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 10px;
    display: none;
}

.message.error {
    display: block;
    background: rgba(239,68,68,0.15);
    color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.3);
}

.message.success {
    display: block;
    background: rgba(22,163,74,0.15);
    color: #86efac;
    border: 1px solid rgba(22,163,74,0.3);
}

/* Responsive */
@media (max-width: 700px) {
    .auth-panel { grid-template-columns: 1fr; max-width: 100%; }
    .auth-left { display: none; }
    .auth-right { padding: 36px 28px; width: 100%; box-sizing: border-box; }
}

/* ── Register extras ── */
.auth-panel--register {
    max-width: 1020px;
    grid-template-columns: 0.75fr 1fr;
}

.form-row--3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.form-group small {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

.form-group select {
    width: 100%;
    background: rgba(255,255,255,0.92);
    border: 1px solid transparent;
    color: #1a1a2e;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
    cursor: pointer;
    appearance: auto;
}

.form-group select:focus {
    border-color: #c8ff00;
    box-shadow: 0 0 0 3px rgba(200,255,0,0.15);
    background: #fff;
}

.req { color: #ff6b8a; }

/* Password match states */
input.is-match   { border-color: #16a34a !important; box-shadow: 0 0 0 3px rgba(22,163,74,.25) !important; }
input.is-mismatch { border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.20) !important; }

@media (max-width: 700px) {
    .form-row--3 { grid-template-columns: 1fr; }
    .auth-panel--register {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    .auth-panel--register .auth-right {
        padding: 32px 20px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Full-width submit button */
.btn-full {
    width: 100%;
}

/* Alt actions with top margin */
.alt-actions--top {
    margin-top: 10px;
}

/* ── Custom Select (Auth forms) ── */
.auth-right .custom-select {
    position: relative;
    font-size: 14px;
    user-select: none;
}

.auth-right .cs-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 11px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(255,255,255,0.92);
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-size: 14px;
    font-family: inherit;
}

.auth-right .custom-select.cs-open .cs-trigger {
    border-color: #c8ff00;
    box-shadow: 0 0 0 3px rgba(200,255,0,0.15);
    background: #fff;
    border-radius: 10px 10px 0 0;
}

.auth-right .cs-value {
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-right .custom-select.cs-has-value .cs-value {
    color: #1a1a2e;
}

.auth-right .cs-arrow {
    flex-shrink: 0;
    margin-left: 0.5rem;
    transition: transform 0.2s;
}

.auth-right .custom-select.cs-open .cs-arrow {
    transform: rotate(180deg);
}

.auth-right .cs-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #c8ff00;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 999;
    list-style: none;
    margin: 0;
    padding: 0;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.auth-right .custom-select.cs-open .cs-dropdown {
    display: block;
}

.auth-right .cs-dropdown li {
    padding: 10px 14px;
    cursor: pointer;
    color: #1a1a2e;
    font-size: 14px;
    transition: background 0.15s;
}

.auth-right .cs-dropdown li.cs-placeholder {
    color: #9ca3af;
}

.auth-right .cs-dropdown li:hover {
    background: #f4eaff;
}

.auth-right .cs-dropdown li.cs-selected {
    background: #ede0ff;
    font-weight: 600;
    color: #440043;
}
