/* 
 * ══════════════════════════════════════════════════════════════════════════════
 * HAC ACCESS - Greeter Component Styles
 * ══════════════════════════════════════════════════════════════════════════════
 * ctOS-style authentication + editable identity card
 */

/* ═══════════════════════════════════════════════════════════════════════════════
 * BAR (top panel)
 * ═══════════════════════════════════════════════════════════════════════════════ */
.bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 37px;
    z-index: 50;
    display: flex;
    align-items: center;
    background: var(--background);
    border-bottom: 1px solid var(--hac-gray);
}

.bar__system-label {
    height: 100%;
    background: var(--hac-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
}

.bar__os-svg {
    height: 18px;
    width: auto;
    display: block;
}

.bar__divider {
    width: 1px;
    height: calc(100% - 2px);
    background: var(--text-secondary);
    margin: 1px 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * TIME (top-left)
 * ═══════════════════════════════════════════════════════════════════════════════ */
.time {
    position: absolute;
    z-index: 10;
    top: 5%;
    left: 5%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    opacity: 0;
}

.time__icon-wrapper {
    width: 90px;
    height: 90px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.time__ascii-clock {
    font-family: var(--font_mono);
    font-size: 6.5px;
    line-height: 1.05;
    color: var(--accent-primary);
    margin: 0;
    letter-spacing: 0.05em;
    white-space: pre;
    text-shadow: 0 0 4px rgba(0, 212, 212, 0.4);
}

.time__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
}

.time__clock {
    font-family: var(--font_main_light);
    font-size: 64px;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.02em;
}

.time__date-badge {
    padding: 4px 8px;
    background: var(--surface-bg);
    border-left: 2px solid var(--accent-primary);
}

.time__date {
    font-family: var(--font_main);
    font-size: 13px;
    color: var(--text-primary-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * STATUS (top-right)
 * ═══════════════════════════════════════════════════════════════════════════════ */
.status {
    position: absolute;
    z-index: 10;
    top: 4.6%;
    right: 3.75%;
    opacity: 0;
}

.surface {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.surface__bar-left,
.surface__bar-right {
    width: 3px;
    background: var(--status-bar);
    transform: scaleY(0);
    transform-origin: center;
}

.surface__content {
    background: var(--surface-bg);
    flex: 1;
    padding: 14px 18px;
    transform: scaleX(0);
    transform-origin: center;
}

.status__row {
    display: flex;
    gap: 12px;
    align-items: baseline;
}

.status__row + .status__row {
    margin-top: 8px;
}

.status__label {
    font-family: var(--font_main);
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    min-width: 40px;
}

.status__value {
    font-family: var(--font_mono);
    font-size: 13px;
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * SPLASH (center progress bar + HAC/OS)
 * ═══════════════════════════════════════════════════════════════════════════════ */
.splash-container {
    position: absolute;
    z-index: 20;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    overflow: hidden;
}

.splash {
    position: relative;
    width: 100%;
    height: 100%;
}

.splash__bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--hac-gray);
    transform-origin: center center;
}

.splash__ct {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    z-index: 2;
    line-height: 0;
}
.splash__ct-svg {
    height: 24px;
    width: auto;
    display: block;
    transition: opacity 0.3s ease;
}
.splash__lockup-svg {
    height: 32px;
    width: auto;
    display: none;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}
.splash__ct.show-lockup .splash__ct-svg {
    opacity: 0;
}
.splash__ct.show-lockup .splash__lockup-svg {
    display: block;
}

.splash__os {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font_main_light);
    font-size: 64px;
    font-weight: 300;
    color: var(--text-primary);
    opacity: 0;
    z-index: 2;
    line-height: 1;
}

.splash__final-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: var(--hac-gray);
    z-index: 3;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * FIELD GROUP (name, email, password, login)
 * ═══════════════════════════════════════════════════════════════════════════════ */
.field-group {
    position: absolute;
    z-index: 20;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    opacity: 0;
}

/* Field Labels */
.field-label {
    display: block;
    font-family: var(--font_main);
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 5px;
}

/* Shared input styling */
.field-input {
    background: transparent;
    border: 2px solid var(--hac-gray);
    height: 44px;
    padding: 0 12px;
    font-family: var(--font_main);
    font-size: 14px;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    outline: none;
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    user-select: text;
    -webkit-user-select: text;
}

.field-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.field-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary-glow);
}

/* Name/Email wrappers */
.name-wrapper,
.email-wrapper {
    display: flex;
    flex-direction: column;
}

/* Password field */
.password-field {
    display: flex;
    flex-direction: column;
}

.password-wrapper {
    position: relative;
    border: 2px solid var(--hac-gray);
    display: flex;
    align-items: center;
    padding: 0 12px;
    height: 44px;
    overflow: hidden;
    cursor: text;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.password-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary-glow);
}

.password-wrapper.state-loading {
    border-color: var(--text-primary-dim);
}

.password-wrapper.state-success {
    border-color: var(--success);
}

.password-display {
    font-family: var(--font_mono);
    font-size: 16px;
    letter-spacing: 5px;
    white-space: nowrap;
    min-height: 1em;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.password-wrapper.state-loading .password-display { color: var(--text-primary-dim); }
.password-wrapper.state-success .password-display { color: var(--success); }

.password-cursor {
    display: inline-block;
    color: inherit;
    animation: cursor-blink 1.1s infinite step-end;
}

.password-hidden-input {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

/* Login button */
.login-btn {
    height: 32px;
    width: 38%;
    align-self: flex-end;
    background: var(--hac-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    user-select: none;
    margin-top: 4px;
    transition: background 0.2s ease;
}

.login-btn:hover {
    background: var(--accent-primary);
}

.login-btn__text {
    font-family: var(--font_title);
    font-size: 13px;
    font-weight: 600;
    color: var(--background);
    letter-spacing: 0.08em;
    transition: opacity 0.15s ease;
}

.login-btn.loading .login-btn__text {
    opacity: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * SPINNER (3×3 grid)
 * ═══════════════════════════════════════════════════════════════════════════════ */
.spinner {
    display: grid;
    grid-template-columns: repeat(3, 5px);
    grid-template-rows: repeat(3, 5px);
    gap: 2px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}

.spinner.active { opacity: 1; }
.spinner__cell { width: 5px; height: 5px; background: var(--background); }
.spinner__cell--center { background: transparent; }
.spinner__cell.lit { background: var(--text-secondary); }

/* ═══════════════════════════════════════════════════════════════════════════════
 * TYPEWRITER HEADER
 * ═══════════════════════════════════════════════════════════════════════════════ */
.typewriter-header {
    position: absolute;
    z-index: 20;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    opacity: 0;
}

.typewriter-text {
    font-family: var(--font_main);
    font-size: 14px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * DISCLAIMER
 * ═══════════════════════════════════════════════════════════════════════════════ */
.disclaimer {
    position: absolute;
    z-index: 10;
    opacity: 0;
}

.disclaimer__inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.disclaimer__text-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.disclaimer__line {
    font-family: var(--font_main);
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * TERMINAL (bottom-left)
 * ═══════════════════════════════════════════════════════════════════════════════ */
.terminal {
    position: absolute;
    z-index: 10;
    bottom: 5%;
    left: 3%;
    opacity: 0;
}

.terminal__log {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 12px;
    max-width: 400px;
}

.terminal__line {
    font-family: var(--font_mono);
    font-size: 11px;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.terminal__line.visible {
    opacity: 1;
    transform: translateX(0);
}

.terminal__line--separator {
    color: var(--accent-primary);
    font-weight: 500;
}

.terminal__version-badge {
    padding: 6px 12px;
    background: var(--surface-bg);
    border-left: 2px solid var(--accent-primary);
    display: inline-block;
}

.terminal__version-text {
    font-family: var(--font_mono);
    font-size: 10px;
    color: var(--text-primary-dim);
    letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * DEVICE ID (bottom-right)
 * ═══════════════════════════════════════════════════════════════════════════════ */
.device-id {
    position: absolute;
    z-index: 10;
    bottom: 5%;
    right: 3%;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    opacity: 0;
}

.device-id__column {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.device-id__text {
    font-family: var(--font_main);
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0;
}

.device-id__rule {
    width: 100%;
    height: 1px;
    background: var(--text-secondary);
    opacity: 0;
}

.device-id__barcode {
    font-size: 48px;
    color: var(--barcode-gray);
    letter-spacing: -0.15em;
    line-height: 1;
    opacity: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * IDENTITY CARD - Dual Mode (View/Printed + Edit)
 * ═══════════════════════════════════════════════════════════════════════════════ */
.identity-card {
    position: fixed;
    z-index: 100;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.identity-card.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.identity-card__inner {
    display: flex;
    flex-direction: column;
    width: 440px;
    background: rgba(14, 14, 14, 0.97);
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 40px var(--accent-primary-glow);
}

.identity-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--accent-primary);
    color: var(--background);
}

.identity-card__badge {
    display: flex;
    align-items: center;
    line-height: 0;
}
.identity-card__badge-svg {
    height: 20px;
    width: auto;
    display: block;
}

.identity-card__badge-text {
    font-family: var(--font_main);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.8;
}

.identity-card__body {
    display: flex;
    gap: 20px;
    padding: 24px 20px;
}

.identity-card__profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.identity-card__qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.identity-card__qr-canvas {
    width: 80px;
    height: 80px;
    border: 1px solid rgba(0, 212, 212, 0.3);
    image-rendering: pixelated;
}

.identity-card__qr-label {
    font-family: var(--font_main);
    font-size: 8px;
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.6;
}

.identity-card__avatar-wrapper {
    width: 100px;
    height: 120px;
    border: 2px solid var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: var(--surface-bg);
}

.identity-card__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.identity-card__avatar-img.visible {
    display: block;
}

.identity-card__avatar-placeholder {
    font-size: 48px;
    color: var(--accent-primary);
    opacity: 0.4;
}

.identity-card__avatar-img.visible + .identity-card__avatar-placeholder {
    display: none;
}

.identity-card__upload-btn {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    padding: 5px 14px;
    font-family: var(--font_main);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.identity-card__upload-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.identity-card__fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.identity-card__field {
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.identity-card__field.visible {
    opacity: 1;
    transform: translateX(0);
}

.identity-card__field-label {
    display: block;
    font-family: var(--font_main);
    font-size: 9px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 4px;
}

.identity-card__field-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--text-secondary);
    color: var(--text-primary);
    font-family: var(--font_main);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 4px 0;
    width: 100%;
    outline: none;
    transition: border-color 0.2s ease;
}

.identity-card__field-input:focus {
    border-color: var(--accent-primary);
}

.identity-card__field-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a7a7a'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 16px;
}

.identity-card__field-select option {
    background: #0E0E0E;
    color: var(--text-primary);
}

/* Field VALUE (read-only display in view mode) */
.identity-card__field-value {
    font-family: var(--font_main);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    padding: 4px 0;
    border-bottom: 1px solid transparent;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── VIEW MODE: show values, hide inputs ────────────────────────────────── */
.identity-card--view .identity-card__field-input,
.identity-card--view .identity-card__field-select {
    display: none;
}

.identity-card--view .identity-card__field-value {
    display: block;
}

.identity-card--view .identity-card__upload-btn {
    display: none;
}

/* ─── EDIT MODE: show inputs, hide values ────────────────────────────────── */
.identity-card--edit .identity-card__field-value {
    display: none;
}

.identity-card--edit .identity-card__field-input,
.identity-card--edit .identity-card__field-select {
    display: block;
}

.identity-card--edit .identity-card__upload-btn {
    display: inline-flex;
}

.identity-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--surface-bg);
}

.identity-card__id {
    font-family: var(--font_mono);
    font-size: 11px;
    color: var(--text-primary-dim);
    letter-spacing: 0.1em;
}

/* Action bar (EDIT + DOWNLOAD + ENTER) */
.identity-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.identity-card__action-btn {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-secondary);
    font-family: var(--font_main);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.identity-card__action-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.identity-card__action-icon {
    font-size: 12px;
    line-height: 1;
}

.identity-card__action-btn--edit.active {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.identity-card__confirm-btn {
    background: var(--accent-primary);
    border: none;
    color: var(--background);
    font-family: var(--font_title);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 8px 20px;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
}

.identity-card__confirm-btn:hover {
    opacity: 0.9;
}

.identity-card__confirm-btn:active {
    transform: scale(0.97);
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * PANELS (decorative, subtle)
 * ═══════════════════════════════════════════════════════════════════════════════ */
.panel {
    position: fixed;
    z-index: 5;
    width: 160px;
    background: rgba(14, 14, 14, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.panel.visible {
    opacity: 1;
    transform: translateY(0);
}

.panel--left {
    left: 3%;
    top: 50%;
    transform: translateY(-50%);
}

.panel--left.visible {
    transform: translateY(-50%);
}

.panel--right {
    right: 3%;
    top: 50%;
    transform: translateY(-50%);
}

.panel--right.visible {
    transform: translateY(-50%);
}

.panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.panel__title {
    font-family: var(--font_main);
    font-size: 9px;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.panel__indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.panel__indicator.active {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}

.panel__content {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.panel__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel__label {
    font-family: var(--font_main);
    font-size: 9px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.panel__value {
    font-family: var(--font_mono);
    font-size: 10px;
    color: var(--text-primary-dim);
    opacity: 0.7;
}

.panel__value.status-ok {
    color: var(--success);
    opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * WIDGETS (decorative ambient info boxes)
 * ═══════════════════════════════════════════════════════════════════════════════ */
.widget {
    position: fixed;
    z-index: 5;
    width: 140px;
    background: rgba(14, 14, 14, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.06);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

.widget.visible {
    opacity: 1;
    transform: translateY(0);
}

.widget--session {
    left: 3%;
    bottom: 22%;
}

.widget--spectrum {
    right: 3%;
    bottom: 22%;
}

.widget__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.widget__title {
    font-family: var(--font_main);
    font-size: 8px;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.7;
}

.widget__dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent-primary);
    opacity: 0.5;
    animation: widget-pulse 2s ease-in-out infinite;
}

@keyframes widget-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.widget__body {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.widget__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget__label {
    font-family: var(--font_main);
    font-size: 8px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.6;
}

.widget__value {
    font-family: var(--font_mono);
    font-size: 9px;
    color: var(--text-primary-dim);
    opacity: 0.6;
}

.widget__bars {
    font-family: var(--font_mono);
    font-size: 10px;
    color: var(--accent-primary);
    opacity: 0.5;
    letter-spacing: 1px;
    line-height: 1;
    text-align: center;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * ZOOM OUT TRANSITION
 * ═══════════════════════════════════════════════════════════════════════════════ */
.hac-access.zoom-out {
    animation: zoomOutTransition 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes zoomOutTransition {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.85); opacity: 0.8; }
    100% { transform: scale(0.5); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * TOAST
 * ═══════════════════════════════════════════════════════════════════════════════ */
.toast {
    position: fixed;
    z-index: 50;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    background: var(--surface-bg);
    border-left: 3px solid var(--accent-primary);
    font-family: var(--font_main);
    font-size: 12px;
    color: var(--text-primary);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * RESPONSIVE
 * ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .time__clock { font-size: 48px; }
    .time__icon-wrapper { width: 60px; height: 60px; }
    .splash__ct-svg { height: 18px; }
    .splash__os { font-size: 48px; }
    .identity-card__inner { width: 340px; }
    .identity-card__body { flex-direction: column; align-items: center; }
    .identity-card__actions { gap: 4px; flex-wrap: wrap; justify-content: center; }
    .identity-card__action-btn { padding: 6px 10px; font-size: 9px; min-height: 36px; }
    .identity-card__confirm-btn { padding: 8px 16px; font-size: 11px; min-height: 44px; }
    .panel { display: none; }
    .widget { display: none; }
    .login-btn { min-height: 44px; }
}

@media (max-width: 480px) {
    .terminal, .device-id { display: none; }
    .time { left: 3%; top: 8%; }
    .status { right: 3%; top: 8%; }
    .identity-card__inner { width: calc(100vw - 2rem); max-width: 320px; }
    .identity-card__footer { flex-direction: column; gap: 10px; align-items: stretch; }
    .identity-card__actions { width: 100%; justify-content: center; }
    .identity-card__action-btn { flex: 1; justify-content: center; min-height: 44px; }
    .identity-card__confirm-btn { width: 100%; text-align: center; min-height: 44px; }
    .identity-card__field-input { font-size: 16px; /* Prevent iOS zoom on focus */ }
    .identity-card__field-select { font-size: 16px; }
    .field-group input { font-size: 16px; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
 * CROSS-BROWSER FIXES
 * ═══════════════════════════════════════════════════════════════════════════════ */

/* Safari input appearance reset */
input, select, button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
}

/* Firefox scrollbar styling */
.terminal__log {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 212, 0.3) transparent;
}

/* Webkit scrollbar (Chrome/Safari/Edge) */
.terminal__log::-webkit-scrollbar {
    width: 4px;
}

.terminal__log::-webkit-scrollbar-track {
    background: transparent;
}

.terminal__log::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 212, 0.3);
}

/* Touch target sizing for interactive elements */
@media (pointer: coarse) {
    .identity-card__action-btn,
    .identity-card__confirm-btn,
    .identity-card__upload-btn,
    .login-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .password-wrapper {
        min-height: 44px;
    }
}
