/* ==========================================================================
   auth-glass.css — Unified Frosted Glass Authentication System
   CheckTicket.pk — Sleek, High-Security Glassmorphism UI over Ambient Video
   ========================================================================== */

/* ── Reset & Core Theme ── */
html, body.auth-login-glass {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background-color: #0b0f19;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Viewport Wrap (Pushed slightly down for perfect visual balance) ── */
.glass-page-wrap {
    position: relative;
    width: 100%;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 55px 18px 35px 18px;
    box-sizing: border-box;
    overflow: hidden;
}

/* ── Fullscreen Ambient Background Video ── */
.glass-video-bg {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%) translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

/* ── Cinematic Radial Vignette & Backdrop Filter ── */
.glass-video-overlay {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.40) 0%, rgba(11, 15, 25, 0.85) 100%);
    z-index: 1;
    pointer-events: none;
    transform: translateZ(0);
}

/* ── Floating Frosted Glass Card ── */
.glass-card {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 395px;
    margin-top: 22px; /* Slightly down as requested */
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: 24px;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    padding: 32px 28px 26px 28px;
    color: #ffffff;
    box-sizing: border-box;
    text-align: center;
    transform: translateZ(0);
    will-change: transform;
    animation: glassCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Strict Max Width */
.glass-card--medium {
    max-width: 440px;
}
.glass-card--wide {
    max-width: 980px;
    padding: 38px 36px 30px 36px;
}

/* ── Multi-Step Wizard Components ── */
.glass-steps-header {
    margin-bottom: 16px;
    text-align: center;
}
.glass-steps-progress {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.glass-step-dot {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    transition: all 0.3s ease;
}
.glass-step-dot.active {
    background: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}
.glass-step-dot.completed {
    background: #10b981;
}
.glass-steps-badge {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #38bdf8;
}
.glass-step-pane {
    display: none;
    animation: fadeInStep 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.glass-step-pane.active {
    display: block;
}
@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.glass-btn-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    margin-bottom: 12px;
}
.glass-btn-row .glass-btn {
    margin-bottom: 0;
    flex: 1;
}
.glass-btn-back {
    flex: 0 0 78px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #ffffff;
    height: 44px;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.86rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.glass-btn-back:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

@keyframes glassCardIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Brand Logo & Typography ── */
.glass-logo {
    display: inline-block;
    margin-bottom: 16px;
    transition: transform 0.25s ease;
}
.glass-logo:hover {
    transform: scale(1.03);
}
.glass-logo img {
    height: 48px;
    max-width: 200px;
    object-fit: contain;
}

.glass-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 5px 0;
    letter-spacing: -0.02em;
    line-height: 1.25;
}
.glass-subtitle {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 20px 0;
    line-height: 1.45;
}

/* ── Translucent Alerts ── */
.glass-alert {
    padding: 11px 14px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    line-height: 1.4;
}
.glass-alert svg, .glass-alert i {
    flex-shrink: 0;
}
.glass-alert--error {
    background: rgba(239, 68, 68, 0.25);
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #fecaca;
}
.glass-alert--success {
    background: rgba(16, 185, 129, 0.25);
    border: 1px solid rgba(52, 211, 153, 0.45);
    color: #a7f3d0;
}
.glass-alert--info {
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #bae6fd;
}

/* ── Form Fields & Labels ── */
.glass-field {
    margin-bottom: 15px;
    text-align: left;
}
.glass-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.glass-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.2px;
}
.glass-label .req {
    color: #f87171;
    margin-left: 2px;
}
.glass-forgot-link {
    font-size: 0.8rem;
    color: #38bdf8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}
.glass-forgot-link:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

/* ── Input Controls ── */
.glass-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.glass-input-icon {
    position: absolute;
    left: 14px;
    color: rgba(255, 255, 255, 0.55);
    width: 17px;
    height: 17px;
    pointer-events: none;
}
.glass-input, .glass-select, .glass-textarea {
    width: 100%;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    padding: 0 38px 0 40px;
    color: #ffffff;
    font-size: 0.92rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.glass-input::placeholder, .glass-textarea::placeholder {
    color: rgba(255, 255, 255, 0.45);
}
.glass-input:focus, .glass-select:focus, .glass-textarea:focus {
    background: rgba(255, 255, 255, 0.16);
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.28);
    outline: none;
}
.glass-select {
    padding-right: 30px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.7)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    cursor: pointer;
}
.glass-select option {
    background: #0f172a;
    color: #ffffff;
}
.glass-textarea {
    height: auto;
    min-height: 70px;
    padding: 10px 14px;
    resize: vertical;
}

/* File Upload Style for Glass */
.glass-file-wrap {
    position: relative;
    border: 1px dashed rgba(255, 255, 255, 0.28);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.glass-file-wrap:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #38bdf8;
}
.glass-file-wrap input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}
.glass-file-text {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.glass-file-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: 0.3px;
}

.glass-toggle-pw {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s ease;
}
.glass-toggle-pw:hover {
    color: #ffffff;
}

/* ── Checkbox & Remember Me ── */
.glass-remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    text-align: left;
}
.glass-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    user-select: none;
}
.glass-checkbox-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: #38bdf8;
    border-radius: 4px;
    cursor: pointer;
}

/* ── Primary Pill Submit Button ── */
.glass-btn {
    width: 100%;
    height: 44px;
    border-radius: 9999px;
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 18px;
    text-decoration: none;
}
.glass-btn:hover {
    background: #f8fafc;
    transform: translateY(-1.5px);
    box-shadow: 0 12px 28px rgba(255, 255, 255, 0.22);
    color: #0f172a;
}
.glass-btn:active {
    transform: translateY(0);
}
.glass-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Secondary Button (Ghost/Outline) */
.glass-btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    box-shadow: none;
}
.glass-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Link-style Button */
.glass-btn-text {
    background: none;
    border: none;
    color: #38bdf8;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
    text-decoration: none;
}
.glass-btn-text:hover {
    color: #7dd3fc;
    text-decoration: underline;
}
.glass-btn-text:disabled {
    color: rgba(255, 255, 255, 0.4);
    cursor: not-allowed;
    text-decoration: none;
}

/* ── Switch Links & Security Footer ── */
.glass-switch {
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 18px 0;
}
.glass-switch a {
    color: #38bdf8;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}
.glass-switch a:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

.glass-security-note {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    letter-spacing: 0.2px;
}

/* ── OTP Verification Blocks ── */
.glass-otp-wrap {
    margin: 18px 0 22px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.glass-otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 14px 0 18px 0;
}
.glass-otp-box {
    width: 44px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    text-align: center;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    font-family: 'Outfit', monospace;
    transition: all 0.2s ease;
}
.glass-otp-box:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
    background: rgba(255, 255, 255, 0.2);
}
.glass-otp-single {
    font-family: monospace;
    font-size: 1.5rem !important;
    letter-spacing: 8px;
    text-align: center;
    font-weight: 800;
    color: #38bdf8;
}

/* Optional Password Box in Reset Code screen */
.glass-subbox {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 16px 0 18px 0;
    text-align: left;
}
.glass-subbox-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 6px 0;
}
.glass-subbox-desc {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 12px 0;
}

/* ── Grid Layout for Signup Form ── */
.glass-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 600px) {
    .glass-grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ── Password Strength Bar & Rules for Glass ── */
.pw-strength-bar, .glass-pw-strength-bar {
    display: flex;
    gap: 4px;
    margin-top: 6px;
    height: 4px;
}
.pw-strength-bar span, .glass-pw-strength-bar span {
    flex: 1;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 2px;
    transition: background 0.2s ease;
}
.pw-strength-bar span.weak, .glass-pw-strength-bar span.weak   { background: #ef4444; }
.pw-strength-bar span.fair, .glass-pw-strength-bar span.fair   { background: #f59e0b; }
.pw-strength-bar span.good, .glass-pw-strength-bar span.good   { background: #10b981; }
.pw-strength-bar span.strong, .glass-pw-strength-bar span.strong { background: #059669; }

.pw-strength-label, .glass-pw-strength-label {
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
}
.pw-strength-label.weak, .glass-pw-strength-label.weak   { color: #f87171; }
.pw-strength-label.fair, .glass-pw-strength-label.fair   { color: #fbbf24; }
.pw-strength-label.good, .glass-pw-strength-label.good   { color: #34d399; }
.pw-strength-label.strong, .glass-pw-strength-label.strong { color: #10b981; }

.pw-rules, .glass-pw-rules {
    list-style: none;
    margin: 8px 0 14px 0;
    padding: 0;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.6);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
}
.pw-rules li, .glass-pw-rules li {
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.pw-rules li::before, .glass-pw-rules li::before {
    content: "○";
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}
.pw-rules li.met, .glass-pw-rules li.met {
    color: #34d399;
    font-weight: 600;
}
.pw-rules li.met::before, .glass-pw-rules li.met::before {
    content: "✓";
    color: #34d399;
    font-weight: 800;
}

/* ── Agent Registration 3-Column Grid & Elements ── */
.auth-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px 16px;
    margin-bottom: 14px;
    text-align: left;
}

@media (max-width: 860px) {
    .auth-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .auth-grid-3 {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.auth-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
    margin-bottom: 18px;
    text-align: left;
}

@media (max-width: 640px) {
    .auth-grid-2 {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.glass-input-badge {
    position: absolute;
    left: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}

.auth-file-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px dashed rgba(255, 255, 255, 0.28);
    border-radius: 14px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.auth-file-box:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: #38bdf8;
}

.auth-file-box input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 5;
}

.auth-file-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.18);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.auth-file-details {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.auth-file-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-file-name {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.auth-file-badge {
    background: rgba(255, 255, 255, 0.14);
    color: #38bdf8;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-pw-strength-bar {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    height: 4px;
}
.auth-pw-strength-bar span {
    flex: 1;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 2px;
    transition: background 0.2s ease;
}
.auth-pw-strength-bar span.weak   { background: #ef4444; }
.auth-pw-strength-bar span.fair   { background: #f59e0b; }
.auth-pw-strength-bar span.good   { background: #10b981; }
.auth-pw-strength-bar span.strong { background: #059669; }

.auth-pw-strength-label {
    font-size: 0.76rem;
    font-weight: 600;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
}
.auth-pw-strength-label.weak   { color: #f87171; }
.auth-pw-strength-label.fair   { color: #fbbf24; }
.auth-pw-strength-label.good   { color: #34d399; }
.auth-pw-strength-label.strong { color: #10b981; }

/* ── Responsive Mobile Adjustments ── */
@media (max-width: 480px) {
    .glass-page-wrap {
        padding: 40px 14px 25px 14px;
    }
    .glass-card {
        padding: 28px 20px 22px 20px;
        border-radius: 20px;
        margin-top: 10px;
    }
    .glass-card--wide {
        padding: 26px 18px 20px 18px;
    }
    .glass-title {
        font-size: 1.5rem;
    }
    .glass-logo img {
        height: 42px;
    }
    .glass-otp-box {
        width: 38px;
        height: 48px;
        font-size: 19px;
    }
}


