:root {
    /* Προεπιλεγμένα χρώματα Connectline - παρακάμπτονται από το appsettings.json ("Branding") μέσω _Host.cshtml */
    --primary: #179FDA;
    --accent: #45A748;
    --neutral: #838484;
    --danger: #dc3545;
    --success: #198754;
    --bg: #0f1115;
    --panel: #1b1e25;
    --text: #f5f5f5;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.kiosk-root, .kiosk-screen {
    height: 100vh;
    width: 100vw;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.start-overlay {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.start-btn {
    font-size: 2rem;
    padding: 20px 60px;
    border-radius: 16px;
    border: none;
    background: var(--primary);
    color: white;
    cursor: pointer;
}

.top-bar {
    background: var(--primary);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    flex-shrink: 0;
    min-height: 32px;
}

.corner-unlock-zone {
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 100%;
    z-index: 999;
    /* σκόπιμα αόρατο - κρυφός μηχανισμός ξεκλειδώματος */
}

.return-label {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
}

.return-label:active {
    background: rgba(255, 255, 255, 0.15);
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.brand-logo-img {
    height: 36px;
    max-width: 140px;
    object-fit: contain;
}

.brand-logo-fallback {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    flex-shrink: 0;
}

.brand-client-name {
    font-size: 0.95rem;
    color: white;
}

.content-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: var(--primary);
    padding: 20px;
}

.scanner-hidden-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    border: none;
    padding: 0;
    pointer-events: none;
}

.waiting-screen, .loading-screen, .error-screen {
    height: 100%;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    position: absolute;
    top: 0;
    left: 0;
    padding: 20px;
}

.scan-icon {
    color: rgba(255, 255, 255, 0.85);
}

.waiting-text {
    font-size: 1.6rem;
    margin-top: 24px;
}

.spinner {
    width: 70px;
    height: 70px;
    border: 7px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.result-card {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: #eef2f7;
    border-radius: 20px;
    padding: 28px;
    grid-template-columns: 1.3fr 1fr;
    gap: 24px;
    color: #1a1d23;
    text-align: left;
    align-items: start;
    overflow-y: auto;
}

.result-info h1 {
    font-size: 1.9rem;
    font-weight: 600;
    margin: 0 0 8px;
    color: #1a1d23;
}

.result-info .code {
    font-size: 1.1rem;
    color: #5f6268;
    margin: 0 0 20px;
}

.field-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.field-label {
    font-size: 0.95rem;
    color: #5f6268;
}

.field-value {
    color: #1a1d23;
}

.result-image-box {
    background: white;
    border-radius: 14px;
    height: 100%;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.result-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.error-screen .error-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 20px;
}

.error-screen p {
    font-size: 1.6rem;
    max-width: 700px;
}

.unlock-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.unlock-modal {
    background: var(--panel);
    padding: 32px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    min-width: 280px;
}

.unlock-modal input {
    font-size: 1.5rem;
    padding: 10px;
    border-radius: 8px;
    border: none;
    width: 100%;
    text-align: center;
    letter-spacing: 6px;
}

.unlock-error-text {
    color: var(--danger);
    margin: 0;
}

.unlock-actions {
    display: flex;
    gap: 12px;
}

.unlock-actions button {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--danger);
    color: white;
    padding: 12px;
    text-align: center;
    z-index: 3000;
}

#blazor-error-ui .reload,
#blazor-error-ui .dismiss {
    color: white;
    margin-left: 12px;
    cursor: pointer;
}
