﻿.main-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 40px);
    padding: 32px 36px;
    position: relative;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
}

    .main-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #00a8e8 0%, #00d4ff 100%);
    }

.header-section {
    text-align: center;
    margin-bottom: 20px;
}

    .header-section img {
        max-width: 180px;
        height: auto;
        margin-bottom: 12px;
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    }

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.qr-scanner-container {
    width: 100%;
    margin-bottom: 16px;
}

.qr-video-wrapper {
    position: relative;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    border: 3px dashed #00a8e8;
    box-shadow: 0 4px 12px rgba(0, 168, 232, 0.2);
    aspect-ratio: 1 / 1;
    background: #f3f4f6;
    transition: all 0.3s ease;
}

    .qr-video-wrapper.qr-scanned {
        border-color: #10b981;
        border-style: solid;
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
        animation: successPulse 0.6s ease;
    }

@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

#qrVideo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border: 0;
    outline: 0;
    background: transparent;
}

.qr-success-overlay {
    position: absolute;
    inset: 0;
    background: rgba(16, 185, 129, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}

    .qr-success-overlay.show {
        display: flex;
        animation: fadeInOut 0.6s ease;
    }

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }
}

.qr-success-icon {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

    .qr-success-icon svg {
        width: 36px;
        height: 36px;
        stroke: #10b981;
        stroke-width: 3;
    }

.qr-help {
    display: none;
    text-align: center;
    font-size: 12px;
    margin-top: 10px;
    color: #6b7280;
    line-height: 1.35;
}

    .qr-help.is-warn {
        color: #f59e0b;
    }

    .qr-help.is-error {
        color: #ef4444;
    }

    .qr-help.is-success {
        color: #10b981;
        font-weight: 600;
    }

.location-status {
    display: none;
    text-align: center;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 12px;
    padding: 6px 10px;
    background: #f3f4f6;
    border-radius: 8px;
}

    .location-status.show {
        display: block;
    }

    .location-status.success {
        color: #10b981;
        background: #d1fae5;
    }

    .location-status.error {
        color: #ef4444;
        background: #fee2e2;
    }

.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: #9ca3af;
    font-size: 18px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .input-icon svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
    }

.form-input {
    width: 100%;
    padding: 11px 14px 11px 44px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    background: white;
}

    .form-input:hover {
        border-color: #d1d5db;
    }

    .form-input:focus {
        border-color: #00a8e8;
        box-shadow: 0 0 0 4px rgba(0, 168, 232, 0.1);
        transform: translateY(-1px);
    }

    .form-input::placeholder {
        color: #9ca3af;
    }

    .form-input:read-only {
        background: #f9fafb;
        cursor: not-allowed;
    }

.form-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
}

.btn {
    width: 100%;
    padding: 11px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #00a8e8 0%, #0090c8 100%);
    color: white;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 168, 232, 0.3);
}

    .btn-primary:hover:not(:disabled) {
        background: linear-gradient(135deg, #0090c8 0%, #007ba8 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 168, 232, 0.4);
    }

    .btn-primary:active:not(:disabled) {
        transform: translateY(0);
    }

    .btn-primary:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        box-shadow: none;
    }

.btn-secondary {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    margin-bottom: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .btn-secondary:hover {
        background: #f9fafb;
        border-color: #00a8e8;
        color: #00a8e8;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

.btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.btn-link {
    background: transparent;
    color: #00a8e8;
    border: none;
    text-decoration: underline;
    padding: 8px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

    .btn-link:hover {
        color: #0090c8;
    }

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.footer-text {
    text-align: center;
    font-size: 10px;
    color: #9ca3af;
    margin-top: 16px;
    line-height: 1.4;
}

@media (max-width: 600px) {
    body {
        background: #f5f5f5;
        overflow: auto;
    }

    .page-container {
        padding: 0;
        align-items: flex-start;
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .main-card {
        padding: 24px 20px;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        max-height: none;
        border: none;
    }

        .main-card::before {
            display: none;
        }

    .header-section {
        margin-bottom: 28px;
    }

        .header-section img {
            max-width: 160px;
            height: auto;
        }

    .qr-video-wrapper {
        max-width: 100%;
    }
}

.modal-backdropx {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 10000;
    padding: 18px;
}

    .modal-backdropx.active {
        display: flex;
        align-items: center;
        justify-content: center;
    }

.auth-modal {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 60px rgba(0,0,0,.28);
    overflow: hidden;
}

.auth-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
}

.auth-modal__title {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
    letter-spacing: .2px;
}

.auth-modal__close {
    border: 0;
    background: transparent;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 22px;
    color: #9ca3af;
    cursor: pointer;
    display: grid;
    place-items: center;
}

    .auth-modal__close:hover {
        background: #f3f4f6;
        color: #111827;
    }

.auth-modal__body {
    padding: 16px;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

    .auth-grid .form-group {
        margin-bottom: 0;
    }

.auth-actions {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.auth-error, .auth-success {
    display: none;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 12px;
}

    .auth-error.show {
        display: block;
        background: #fee2e2;
        border: 1px solid #fca5a5;
        color: #991b1b;
    }

    .auth-success.show {
        display: block;
        background: #d1fae5;
        border: 1px solid #6ee7b7;
        color: #065f46;
    }

.form-select-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #fff;
    padding-right: 44px;
}

.select-wrapper::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    border-right: 2px solid #9ca3af;
    border-bottom: 2px solid #9ca3af;
    pointer-events: none;
}

.form-select-input:disabled {
    background: #f9fafb;
    color: #9ca3af;
}

@media (max-width: 600px) {
    .modal-backdropx {
        padding: 20px;
    }

        .modal-backdropx.active {
            align-items: center;
            justify-content: center;
        }

    .auth-modal {
        width: 100%;
        max-width: calc(100% - 40px);
        max-height: 85vh;
        border-radius: 20px;
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
        overflow: hidden;
        animation: modalFadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .auth-modal__head {
        padding: 16px 18px;
        background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
        border-bottom: 1px solid #e5e7b7;
    }

    .auth-modal__title {
        font-size: 16px;
    }

    .auth-modal__body {
        max-height: calc(85vh - 65px);
        overflow-y: auto;
        padding: 18px;
        background: white;
    }

    .auth-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    @keyframes modalFadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px) scale(0.95);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .form-input {
        padding: 12px 14px 12px 44px;
        font-size: 16px;
    }

    .btn {
        padding: 13px 20px;
        font-size: 15px;
    }

    .auth-modal .form-input {
        font-size: 16px;
    }

    .auth-modal__body::-webkit-scrollbar {
        width: 6px;
    }

    .auth-modal__body::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .auth-modal__body::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 10px;
    }

        .auth-modal__body::-webkit-scrollbar-thumb:hover {
            background: #9ca3af;
        }
}

@media (min-width: 601px) and (max-width: 900px) {
    .auth-modal {
        max-width: 480px;
    }

    .modal-backdropx {
        padding: 24px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.4;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.main-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: 420px;
    max-height: 98dvh;
    padding: 24px;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

    .main-card::-webkit-scrollbar {
        width: 0;
        background: transparent;
    }

.header-section {
    text-align: center;
    margin-bottom: 15px;
}

    .header-section img {
        max-width: 140px;
        height: auto;
        margin-bottom: 8px;
    }

.page-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.qr-video-wrapper {
    position: relative;
    width: 100%;
    max-width: 220px;
    margin: 0 auto 10px;
    border-radius: 12px;
    overflow: hidden;
    border: 3px dashed #00a8e8;
    aspect-ratio: 1 / 1;
}

.form-group {
    margin-bottom: 10px;
}

.form-input {
    padding: 10px 14px 10px 44px;
    font-size: 14px;
}

.btn {
    padding: 10px 20px;
}

.footer-text {
    margin-top: auto;
    padding-top: 10px;
    font-size: 9px;
}

@media (max-width: 600px) {
    body {
        background: #f5f5f5;
    }

    .page-container {
        padding: 0;
    }

    .main-card {
        border-radius: 0;
        height: 100dvh;
        max-height: 100dvh;
        padding: 20px;
    }

    .qr-video-wrapper {
        max-width: 150px;
    }
}

.footer-text.footer-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.footer-logo {
    width: 90px;
    height: auto;
    opacity: .92;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,.10));
}

.footer-copy {
    text-align: right;
    font-size: 10px;
    color: #9ca3af;
    line-height: 1.4;
}

    .footer-copy a {
        transition: color 0.2s ease;
    }

        .footer-copy a:hover {
            color: #0090c8;
        }