文件
OmniCard/mpuniapp/pages/owner/nfc/security.uvue
wikiboss 62e0ae4435 feat: 同步管理端、用户端与后端业务,并接通线上 Web 接口
补齐平台订阅、外部登录、CRM 同步与用户端页面;Nginx 转发用户端接口,登录页使用 Google 与 Apple 标志。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 18:01:47 +08:00

1457 行
34 KiB
Plaintext

<template>
<view class="security-page" :class="pageRtlClass" :style="pageTheme">
<!-- Ambient Aurora Glow Behind Header -->
<view class="security-aurora-glow"></view>
<scroll-view class="security-scroll" :scroll-y="true">
<view class="security-content">
<!-- Top Brand & Header Section -->
<view class="header-section">
<view class="header-top-row">
<text class="page-title">{{ t('title') }}</text>
<view class="vault-status-pill" :class="shieldStatusClass">
<view class="vault-status-dot" :class="shieldDotClass"></view>
<text class="vault-status-text">
{{ isCurrentActive ? 'SHIELD ACTIVE' : 'FROZEN LOCK' }}
</text>
</view>
</view>
<text class="page-desc">{{ t('desc') }}</text>
</view>
<!-- Empty Device State -->
<view v-if="state.devices.length === 0" class="empty-card">
<view class="empty-icon-shield"></view>
<text class="empty-text">{{ t('deviceEmpty') }}</text>
</view>
<view v-else class="security-body">
<!-- Bento Pod 1: Security Shield Overview (安全盾牌与实时防护总览舱) -->
<view
class="bento-shield-card"
:class="isCurrentActive ? 'shield-card-active' : 'shield-card-frozen'"
>
<view class="shield-main-row">
<view
class="shield-badge-wrap"
:class="isCurrentActive ? 'shield-badge-active' : 'shield-badge-frozen'"
>
<view class="shield-glyph-outer">
<view class="shield-glyph-inner"></view>
</view>
</view>
<view class="shield-text-col">
<text class="shield-pod-title">
{{ isCurrentActive ? t('shieldTitleActive') : t('shieldTitleFrozen') }}
</text>
<text class="shield-pod-desc">
{{ isCurrentActive ? t('shieldDescActive') : t('shieldDescFrozen') }}
</text>
</view>
</view>
<!-- Mini Metrics 3-Col Bento Grid -->
<view class="shield-metrics-grid">
<view class="metric-col">
<text class="metric-label">{{ t('antiCounterfeitValid') }}</text>
<view class="metric-value-row">
<view
class="metric-dot"
:class="isUidValid(currentDeviceUid) ? 'dot-valid' : 'dot-invalid'"
></view>
<text class="metric-val-text">
{{ isUidValid(currentDeviceUid) ? '正品芯片' : '格式异常' }}
</text>
</view>
</view>
<view class="metric-col-divider"></view>
<view class="metric-col">
<text class="metric-label">近场触碰</text>
<text
class="metric-val-text"
:class="isCurrentActive ? 'val-text-success' : 'val-text-danger'"
>
{{ isCurrentActive ? '正常联通' : '已阻断' }}
</text>
</view>
<view class="metric-col-divider"></view>
<view class="metric-col">
<text class="metric-label">云端数据</text>
<text class="metric-val-text val-text-primary">隔离保护</text>
</view>
</view>
</view>
<!-- Bento Pod 2: Physical Smart Card Simulator (拟物化实体卡微展台) -->
<view
class="bento-card-showcase"
:class="isCurrentActive ? 'card-surface-active' : 'card-surface-frozen'"
>
<!-- Card Metallic Header -->
<view class="card-meta-header">
<view class="card-brand-tag-wrap">
<text class="card-brand-symbol">OMNICARD</text>
<text class="card-batch-badge">{{ currentDevice?.batchNo || 'OMNI-PRO-2026' }}</text>
</view>
<view
class="card-state-pill"
:class="isCurrentActive ? 'pill-active' : 'pill-frozen'"
>
<view
class="pill-dot"
:class="isCurrentActive ? 'pill-dot-active' : 'pill-dot-frozen'"
></view>
<text
class="pill-text"
:class="isCurrentActive ? 'pill-text-active' : 'pill-text-frozen'"
>
{{ isCurrentActive ? t('statusActive') : t('statusFrozen') }}
</text>
</view>
</view>
<!-- Card Chip Graphic & Locked Watermark -->
<view class="card-chip-container">
<view class="chip-plate">
<view class="chip-line-h"></view>
<view class="chip-line-v"></view>
<view class="chip-core"></view>
</view>
<view v-if="!isCurrentActive" class="card-frozen-watermark">
<text class="watermark-text">LOCKED</text>
</view>
</view>
<!-- Monospace UID Display -->
<view class="card-uid-container">
<text class="card-uid-label">{{ t('uidLabel') }}</text>
<text class="card-uid-value">{{ formattedUid }}</text>
</view>
<!-- Card Bottom Spec Badges -->
<view class="card-footer-specs">
<view class="spec-pill">
<text class="spec-pill-text">{{ currentDevice?.material || 'Titanium Metal' }}</text>
</view>
<view class="spec-pill">
<text class="spec-pill-text">ISO/IEC 14443-A</text>
</view>
</view>
</view>
<!-- Bento Pod 3: Device Selector (名下 NFC 资产矩阵) -->
<view class="bento-section">
<view class="section-title-row">
<text class="section-title">{{ t('cardListTitle') }}</text>
<text class="section-count">{{ state.devices.length }} 枚硬件已绑定</text>
</view>
<view class="devices-grid">
<view
v-for="item in state.devices"
:key="item.id"
class="device-item-card"
:class="{ 'device-item-selected': state.selectedId === item.id }"
@click="handleSelect(item.id)"
>
<view class="device-item-left">
<view
class="device-item-radio"
:class="{ 'radio-checked': state.selectedId === item.id }"
>
<view v-if="state.selectedId === item.id" class="radio-inner"></view>
</view>
<view class="device-item-meta">
<text class="device-item-uid">{{ item.uid }}</text>
<text class="device-item-batch">
{{ item.batchNo || 'NFC-CORE' }} · {{ item.material || 'Metal' }}
</text>
</view>
</view>
<view
class="device-status-tag"
:class="item.status === 'active' ? 'tag-active' : 'tag-frozen'"
>
<text
class="tag-text"
:class="item.status === 'active' ? 'tag-text-active' : 'tag-text-frozen'"
>
{{ item.status === 'active' ? t('statusActive') : t('statusFrozen') }}
</text>
</view>
</view>
</view>
</view>
<!-- Bento Pod 4: Cryptographic Proof & Tech Specs (芯片防伪与技术参数舱) -->
<view class="bento-section">
<text class="section-title">{{ t('chipDetailsTitle') }}</text>
<view class="specs-grid-card">
<view class="spec-row">
<text class="spec-name">{{ t('uidLabel') }}</text>
<text class="spec-val-mono">{{ currentDeviceUid }}</text>
</view>
<view class="spec-divider"></view>
<view class="spec-row">
<text class="spec-name">{{ t('securityHashLabel') }}</text>
<text class="spec-val-mono spec-val-truncate">{{ currentSecurityHash }}</text>
</view>
<view class="spec-divider"></view>
<view class="spec-row">
<text class="spec-name">{{ t('protocolLabel') }}</text>
<text class="spec-val">NXP NTAG216 (14443-A)</text>
</view>
<view class="spec-divider"></view>
<view class="spec-row">
<text class="spec-name">{{ t('antiCounterfeitValid') }}</text>
<view class="spec-status-pill">
<view
class="spec-dot"
:class="isUidValid(currentDeviceUid) ? 'dot-valid' : 'dot-invalid'"
></view>
<text class="spec-status-text">
{{ isUidValid(currentDeviceUid) ? t('antiCounterfeitValid') : t('antiCounterfeitInvalid') }}
</text>
</view>
</view>
</view>
</view>
<!-- Bento Pod 5: Security Policy & Whitepaper Box (安全保护机制说明舱) -->
<view class="bento-policy-card">
<view class="policy-header">
<view class="policy-badge-icon">
<view class="policy-badge-dot"></view>
</view>
<text class="policy-title">{{ t('warningTitle') }}</text>
</view>
<view class="policy-list">
<view class="policy-item">
<view class="policy-bullet"></view>
<text class="policy-text">{{ t('policyPoint1') }}</text>
</view>
<view class="policy-item">
<view class="policy-bullet"></view>
<text class="policy-text">{{ t('policyPoint2') }}</text>
</view>
<view class="policy-item">
<view class="policy-bullet"></view>
<text class="policy-text">{{ t('policyPoint3') }}</text>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<!-- Floating Single Primary CTA Bar -->
<view class="security-cta-bar">
<button
class="primary-cta-btn"
:class="ctaBtnClass"
:disabled="state.submitting || state.selectedId === null"
:aria-label="ctaBtnText"
@click="handleToggleSecurity"
>
<text class="primary-cta-btn-text">{{ ctaBtnText }}</text>
</button>
</view>
<!-- Double-Confirmation Dialog Modal (防误触二次确认弹层) -->
<view v-if="showConfirmModal" class="modal-backdrop" @click="closeConfirmModal">
<view class="modal-dialog" @click.stop="">
<view class="modal-handle-bar"></view>
<view
class="modal-icon-wrap"
:class="isCurrentActive ? 'modal-icon-freeze' : 'modal-icon-unfreeze'"
>
<view class="modal-alert-symbol"></view>
</view>
<text class="modal-title">
{{ isCurrentActive ? t('confirmFreezeTitle') : t('confirmUnfreezeTitle') }}
</text>
<text class="modal-desc">
{{ isCurrentActive ? t('confirmFreezeDesc') : t('confirmUnfreezeDesc') }}
</text>
<view class="modal-actions-row">
<view class="modal-btn-cancel" @click="closeConfirmModal">
<text class="modal-btn-cancel-text">{{ t('cancelBtn') }}</text>
</view>
<view
class="modal-btn-confirm"
:class="isCurrentActive ? 'btn-confirm-freeze' : 'btn-confirm-unfreeze'"
@click="handleExecuteSecurity"
>
<text class="modal-btn-confirm-text">{{ t('confirmBtn') }}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script setup lang="uts">
import { getCurrentLocale, isRtl } from '../../../common/locale.uts';
import { utsLightColors, utsRadius, utsSpacing, utsTypography } from '../../../common/tokens.uts';
import {
createSecurityState,
selectDevice,
freezeDevice,
unfreezeDevice,
validateNfcUid,
computeSecurityHash,
resolveSecurityText,
NfcSecurityDevice,
SecurityState,
SecurityCopyKey,
} from './useSecurity.uts';
const pageTheme: Record<string, string> = {
'--oc-primary': utsLightColors.primary,
'--oc-primary-soft': utsLightColors.primarySoft,
'--oc-ai': utsLightColors.ai,
'--oc-bg': utsLightColors.bg,
'--oc-surface': utsLightColors.surface,
'--oc-border': utsLightColors.border,
'--oc-text': utsLightColors.text,
'--oc-text-2': utsLightColors.text2,
'--oc-success': utsLightColors.success,
'--oc-warning': utsLightColors.warning,
'--oc-error': utsLightColors.error,
'--oc-radius-btn': utsRadius.button,
'--oc-radius-card': utsRadius.card,
'--oc-radius-modal': utsRadius.modal,
'--oc-shadow': utsTypography.shadow,
'--oc-shadow-card': utsTypography.shadowCard,
'--oc-shadow-cta': utsTypography.shadowCta,
'--oc-space-8': utsSpacing.space8,
'--oc-space-12': utsSpacing.space12,
'--oc-space-16': utsSpacing.space16,
'--oc-space-24': utsSpacing.space24,
'--oc-space-32': utsSpacing.space32,
};
const initialDevices: NfcSecurityDevice[] = [
{
id: 1,
uid: '04A32B1C8E5F90',
cardId: 101,
status: 'active',
batchNo: 'OMNI-PRO-2026',
material: 'Titanium Metal',
},
];
const state: SecurityState = reactive(createSecurityState(initialDevices));
const showConfirmModal = ref<boolean>(false);
const pageRtlClass = computed((): string => {
return isRtl(getCurrentLocale()) ? 'security-rtl' : '';
});
function t(key: SecurityCopyKey): string {
return resolveSecurityText(key);
}
function isUidValid(uid: string): boolean {
return validateNfcUid(uid).valid;
}
const currentDevice = computed((): NfcSecurityDevice | null => {
if (state.selectedId === null) {
return null;
}
const found = state.devices.find((d: NfcSecurityDevice): boolean => d.id === state.selectedId);
return found || null;
});
const isCurrentActive = computed((): boolean => {
return currentDevice.value?.status === 'active';
});
const currentDeviceUid = computed((): string => {
return currentDevice.value?.uid || '';
});
const formattedUid = computed((): string => {
const uid = currentDeviceUid.value;
if (!uid) {
return '0000 0000 0000 00';
}
const parts: string[] = [];
for (let i = 0; i < uid.length; i += 4) {
parts.push(uid.substring(i, Math.min(i + 4, uid.length)));
}
return parts.join(' ');
});
const currentSecurityHash = computed((): string => {
const uid = currentDeviceUid.value;
if (!uid) {
return '0000000000000000';
}
return computeSecurityHash(uid);
});
const shieldStatusClass = computed((): string => {
return isCurrentActive.value ? 'vault-status-active' : 'vault-status-frozen';
});
const shieldDotClass = computed((): string => {
return isCurrentActive.value ? 'dot-active' : 'dot-frozen';
});
const ctaBtnText = computed((): string => {
if (state.submitting) {
return t('submitting');
}
if (!currentDevice.value) {
return t('freezeBtn');
}
return currentDevice.value.status === 'active' ? t('freezeBtn') : t('unfreezeBtn');
});
const ctaBtnClass = computed((): Record<string, boolean> => {
const isFrozen = currentDevice.value?.status === 'frozen';
return {
'primary-cta-btn-disabled': state.submitting || state.selectedId === null,
'cta-btn-danger': currentDevice.value?.status === 'active',
'cta-btn-primary': isFrozen,
};
});
function handleSelect(id: number): void {
selectDevice(state, id);
}
function handleToggleSecurity(): void {
if (!currentDevice.value || state.submitting) {
return;
}
showConfirmModal.value = true;
}
function closeConfirmModal(): void {
showConfirmModal.value = false;
}
async function handleExecuteSecurity(): Promise<void> {
if (!currentDevice.value || state.submitting) {
return;
}
showConfirmModal.value = false;
const device = currentDevice.value;
try {
if (device.status === 'active') {
await freezeDevice(state, device.id);
uni.showToast({
title: t('freezeSuccess'),
icon: 'none',
});
} else {
await unfreezeDevice(state, device.id);
uni.showToast({
title: t('unfreezeSuccess'),
icon: 'none',
});
}
} catch (err) {
const msg = err instanceof Error ? err.message : t('operationError');
uni.showToast({
title: msg,
icon: 'none',
});
}
}
</script>
<style scoped>
.security-page {
position: relative;
display: flex;
flex-direction: column;
flex: 1;
width: 100%;
min-height: 100%;
background-color: var(--oc-bg, #F5F8FC);
box-sizing: border-box;
}
.security-rtl {
direction: rtl;
}
.security-aurora-glow {
position: absolute;
top: -120px;
left: 0;
right: 0;
height: 280px;
background: linear-gradient(135deg, rgba(0, 210, 255, 0.08) 0%, rgba(0, 136, 255, 0.07) 50%, rgba(99, 102, 241, 0.05) 100%);
filter: blur(40px);
pointer-events: none;
z-index: 0;
}
.security-scroll {
flex: 1;
width: 100%;
z-index: 1;
}
.security-content {
display: flex;
flex-direction: column;
padding-inline: var(--oc-space-16, 16px);
padding-block: var(--oc-space-20, 20px);
padding-block-end: calc(96px + env(safe-area-inset-bottom, 0px));
box-sizing: border-box;
}
.header-section {
display: flex;
flex-direction: column;
margin-block-end: var(--oc-space-16, 16px);
}
.header-top-row {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-block-end: 6px;
}
.page-title {
font-size: 22px;
font-weight: 700;
color: var(--oc-text, #101828);
line-height: 1.25;
}
.vault-status-pill {
display: flex;
flex-direction: row;
align-items: center;
padding: 4px 10px;
border-radius: 9999px;
border-width: 1px;
}
.vault-status-active {
background-color: #ECFDF3;
border-color: #D1FADF;
}
.vault-status-frozen {
background-color: #FEF3F2;
border-color: #FECDCA;
}
.vault-status-dot {
width: 6px;
height: 6px;
border-radius: 3px;
margin-inline-end: 6px;
}
.dot-active {
background-color: var(--oc-success, #12B76A);
}
.dot-frozen {
background-color: var(--oc-error, #F04438);
}
.vault-status-text {
font-size: 11px;
font-weight: 600;
letter-spacing: 0.5px;
}
.vault-status-active .vault-status-text {
color: var(--oc-success, #12B76A);
}
.vault-status-frozen .vault-status-text {
color: var(--oc-error, #F04438);
}
.page-desc {
font-size: 13px;
color: var(--oc-text-2, #64748B);
line-height: 1.6;
}
.empty-card {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: var(--oc-space-32, 32px) var(--oc-space-16, 16px);
background-color: var(--oc-surface, #FFFFFF);
border-radius: var(--oc-radius-card, 20px);
border-width: 1px;
border-color: var(--oc-border, #EBF1F7);
box-shadow: var(--oc-shadow-card, 0 8px 30px rgba(0, 0, 0, 0.04));
margin-block-end: var(--oc-space-16, 16px);
}
.empty-icon-shield {
width: 44px;
height: 44px;
border-radius: 12px;
background-color: var(--oc-primary-soft, #EBF5FF);
margin-block-end: 12px;
}
.empty-text {
font-size: 14px;
color: var(--oc-text-2, #64748B);
line-height: 1.6;
}
.security-body {
display: flex;
flex-direction: column;
}
/* Bento Pod 1: Shield Card */
.bento-shield-card {
background-color: var(--oc-surface, #FFFFFF);
border-radius: var(--oc-radius-card, 20px);
border-width: 1px;
border-color: var(--oc-border, #EBF1F7);
box-shadow: var(--oc-shadow-card, 0 8px 30px rgba(0, 0, 0, 0.04));
padding: var(--oc-space-16, 16px);
margin-block-end: var(--oc-space-16, 16px);
}
.shield-card-active {
border-color: #D1FADF;
}
.shield-card-frozen {
border-color: #FECDCA;
}
.shield-main-row {
display: flex;
flex-direction: row;
align-items: flex-start;
margin-block-end: var(--oc-space-16, 16px);
}
.shield-badge-wrap {
width: 44px;
height: 44px;
border-radius: 14px;
display: flex;
align-items: center;
justify-content: center;
margin-inline-end: var(--oc-space-12, 12px);
flex-shrink: 0;
}
.shield-badge-active {
background-color: #ECFDF3;
}
.shield-badge-frozen {
background-color: #FEF3F2;
}
.shield-glyph-outer {
width: 22px;
height: 24px;
border-width: 2px;
border-radius: 6px 6px 11px 11px;
display: flex;
align-items: center;
justify-content: center;
}
.shield-badge-active .shield-glyph-outer {
border-color: var(--oc-success, #12B76A);
}
.shield-badge-frozen .shield-glyph-outer {
border-color: var(--oc-error, #F04438);
}
.shield-glyph-inner {
width: 8px;
height: 8px;
border-radius: 2px;
}
.shield-badge-active .shield-glyph-inner {
background-color: var(--oc-success, #12B76A);
}
.shield-badge-frozen .shield-glyph-inner {
background-color: var(--oc-error, #F04438);
}
.shield-text-col {
display: flex;
flex-direction: column;
flex: 1;
}
.shield-pod-title {
font-size: 15px;
font-weight: 600;
color: var(--oc-text, #101828);
line-height: 1.35;
margin-block-end: 4px;
}
.shield-pod-desc {
font-size: 12px;
color: var(--oc-text-2, #64748B);
line-height: 1.5;
}
.shield-metrics-grid {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background-color: var(--oc-bg, #F5F8FC);
border-radius: 14px;
padding: 10px 12px;
}
.metric-col {
display: flex;
flex-direction: column;
flex: 1;
align-items: center;
}
.metric-col-divider {
width: 1px;
height: 24px;
background-color: var(--oc-border, #EBF1F7);
}
.metric-label {
font-size: 11px;
color: var(--oc-text-2, #64748B);
margin-block-end: 4px;
}
.metric-value-row {
display: flex;
flex-direction: row;
align-items: center;
}
.metric-dot {
width: 6px;
height: 6px;
border-radius: 3px;
margin-inline-end: 4px;
}
.dot-valid {
background-color: var(--oc-success, #12B76A);
}
.dot-invalid {
background-color: var(--oc-error, #F04438);
}
.metric-val-text {
font-size: 12px;
font-weight: 600;
color: var(--oc-text, #101828);
}
.val-text-success {
color: var(--oc-success, #12B76A);
}
.val-text-danger {
color: var(--oc-error, #F04438);
}
.val-text-primary {
color: var(--oc-primary, #0088FF);
}
/* Bento Pod 2: Physical Smart Card Simulator */
.bento-card-showcase {
position: relative;
border-radius: var(--oc-radius-card, 20px);
padding: var(--oc-space-16, 16px);
margin-block-end: var(--oc-space-16, 16px);
box-shadow: 0 12px 36px rgba(16, 24, 40, 0.12);
display: flex;
flex-direction: column;
overflow: hidden;
box-sizing: border-box;
}
.card-surface-active {
background: linear-gradient(135deg, #0F172A 0%, #1E293B 60%, #334155 100%);
border-width: 1px;
border-color: rgba(255, 255, 255, 0.15);
}
.card-surface-frozen {
background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
border-width: 1px;
border-color: rgba(240, 68, 56, 0.35);
opacity: 0.82;
}
.card-meta-header {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-block-end: 18px;
}
.card-brand-tag-wrap {
display: flex;
flex-direction: row;
align-items: center;
}
.card-brand-symbol {
font-size: 13px;
font-weight: 800;
letter-spacing: 1.5px;
color: #FFFFFF;
margin-inline-end: 8px;
}
.card-batch-badge {
font-size: 10px;
font-weight: 600;
color: rgba(255, 255, 255, 0.7);
background-color: rgba(255, 255, 255, 0.12);
padding: 2px 6px;
border-radius: 4px;
}
.card-state-pill {
display: flex;
flex-direction: row;
align-items: center;
padding: 3px 8px;
border-radius: 9999px;
}
.pill-active {
background-color: rgba(18, 183, 106, 0.2);
border-width: 1px;
border-color: rgba(18, 183, 106, 0.4);
}
.pill-frozen {
background-color: rgba(240, 68, 56, 0.2);
border-width: 1px;
border-color: rgba(240, 68, 56, 0.4);
}
.pill-dot {
width: 6px;
height: 6px;
border-radius: 3px;
margin-inline-end: 5px;
}
.pill-dot-active {
background-color: #32D583;
}
.pill-dot-frozen {
background-color: #F97066;
}
.pill-text {
font-size: 11px;
font-weight: 600;
}
.pill-text-active {
color: #32D583;
}
.pill-text-frozen {
color: #F97066;
}
.card-chip-container {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-block-end: 20px;
}
.chip-plate {
width: 38px;
height: 28px;
border-radius: 5px;
background: linear-gradient(135deg, #FDE68A 0%, #D97706 100%);
position: relative;
overflow: hidden;
box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4);
}
.chip-line-h {
position: absolute;
top: 13px;
left: 0;
right: 0;
height: 1px;
background-color: rgba(0, 0, 0, 0.25);
}
.chip-line-v {
position: absolute;
top: 0;
bottom: 0;
left: 18px;
width: 1px;
background-color: rgba(0, 0, 0, 0.25);
}
.chip-core {
position: absolute;
top: 8px;
left: 13px;
width: 11px;
height: 11px;
border-radius: 2px;
border-width: 1px;
border-color: rgba(0, 0, 0, 0.25);
}
.card-frozen-watermark {
background-color: rgba(240, 68, 56, 0.25);
border-width: 1px;
border-color: rgba(240, 68, 56, 0.6);
padding: 4px 10px;
border-radius: 6px;
transform: rotate(-6deg);
}
.watermark-text {
color: #F97066;
font-size: 12px;
font-weight: 800;
letter-spacing: 2px;
}
.card-uid-container {
display: flex;
flex-direction: column;
margin-block-end: 18px;
}
.card-uid-label {
font-size: 10px;
color: rgba(255, 255, 255, 0.6);
letter-spacing: 1px;
margin-block-end: 4px;
}
.card-uid-value {
font-size: 18px;
font-weight: 700;
color: #FFFFFF;
font-family: monospace;
letter-spacing: 1.5px;
}
.card-footer-specs {
display: flex;
flex-direction: row;
align-items: center;
}
.spec-pill {
background-color: rgba(255, 255, 255, 0.1);
padding: 3px 8px;
border-radius: 6px;
margin-inline-end: 8px;
}
.spec-pill-text {
font-size: 10px;
color: rgba(255, 255, 255, 0.75);
}
/* Bento Pod 3: Device Selector */
.bento-section {
display: flex;
flex-direction: column;
margin-block-end: var(--oc-space-16, 16px);
}
.section-title-row {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
margin-block-end: 10px;
}
.section-title {
font-size: 15px;
font-weight: 600;
color: var(--oc-text, #101828);
}
.section-count {
font-size: 12px;
color: var(--oc-text-2, #64748B);
}
.devices-grid {
display: flex;
flex-direction: column;
}
.device-item-card {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
background-color: var(--oc-surface, #FFFFFF);
border-radius: 14px;
border-width: 1px;
border-color: var(--oc-border, #EBF1F7);
box-shadow: var(--oc-shadow-card, 0 8px 30px rgba(0, 0, 0, 0.04));
padding: 12px var(--oc-space-16, 16px);
margin-block-end: 8px;
transition: opacity 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.device-item-card:active {
opacity: 0.85;
}
.device-item-selected {
border-color: var(--oc-primary, #0088FF);
background-color: #F8FAFC;
}
.device-item-left {
display: flex;
flex-direction: row;
align-items: center;
flex: 1;
}
.device-item-radio {
width: 18px;
height: 18px;
border-radius: 9px;
border-width: 1.5px;
border-color: var(--oc-border, #EBF1F7);
display: flex;
align-items: center;
justify-content: center;
margin-inline-end: 12px;
background-color: var(--oc-surface, #FFFFFF);
}
.radio-checked {
border-color: var(--oc-primary, #0088FF);
}
.radio-inner {
width: 10px;
height: 10px;
border-radius: 5px;
background-color: var(--oc-primary, #0088FF);
}
.device-item-meta {
display: flex;
flex-direction: column;
}
.device-item-uid {
font-size: 14px;
font-weight: 600;
color: var(--oc-text, #101828);
font-family: monospace;
margin-block-end: 2px;
}
.device-item-batch {
font-size: 11px;
color: var(--oc-text-2, #64748B);
}
.device-status-tag {
padding: 3px 8px;
border-radius: 6px;
}
.tag-active {
background-color: #ECFDF3;
}
.tag-frozen {
background-color: #FEF3F2;
}
.tag-text {
font-size: 11px;
font-weight: 500;
}
.tag-text-active {
color: var(--oc-success, #12B76A);
}
.tag-text-frozen {
color: var(--oc-error, #F04438);
}
/* Bento Pod 4: Tech Specs & Proof Card */
.specs-grid-card {
background-color: var(--oc-surface, #FFFFFF);
border-radius: var(--oc-radius-card, 20px);
border-width: 1px;
border-color: var(--oc-border, #EBF1F7);
box-shadow: var(--oc-shadow-card, 0 8px 30px rgba(0, 0, 0, 0.04));
padding: var(--oc-space-16, 16px);
}
.spec-row {
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding-block: 8px;
}
.spec-divider {
width: 100%;
height: 1px;
background-color: var(--oc-border, #EBF1F7);
}
.spec-name {
font-size: 13px;
color: var(--oc-text-2, #64748B);
}
.spec-val {
font-size: 13px;
font-weight: 500;
color: var(--oc-text, #101828);
}
.spec-val-mono {
font-size: 13px;
font-weight: 600;
color: var(--oc-text, #101828);
font-family: monospace;
}
.spec-val-truncate {
max-width: 180px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.spec-status-pill {
display: flex;
flex-direction: row;
align-items: center;
}
.spec-dot {
width: 6px;
height: 6px;
border-radius: 3px;
margin-inline-end: 6px;
}
.spec-status-text {
font-size: 12px;
font-weight: 500;
color: var(--oc-text, #101828);
}
/* Bento Pod 5: Policy Box */
.bento-policy-card {
background-color: var(--oc-surface, #FFFFFF);
border-radius: var(--oc-radius-card, 20px);
border-width: 1px;
border-color: var(--oc-border, #EBF1F7);
box-shadow: var(--oc-shadow-card, 0 8px 30px rgba(0, 0, 0, 0.04));
padding: var(--oc-space-16, 16px);
}
.policy-header {
display: flex;
flex-direction: row;
align-items: center;
margin-block-end: 12px;
}
.policy-badge-icon {
width: 20px;
height: 20px;
border-radius: 10px;
background-color: var(--oc-primary-soft, #EBF5FF);
display: flex;
align-items: center;
justify-content: center;
margin-inline-end: 8px;
}
.policy-badge-dot {
width: 6px;
height: 6px;
border-radius: 3px;
background-color: var(--oc-primary, #0088FF);
}
.policy-title {
font-size: 14px;
font-weight: 600;
color: var(--oc-text, #101828);
}
.policy-list {
display: flex;
flex-direction: column;
}
.policy-item {
display: flex;
flex-direction: row;
align-items: flex-start;
margin-block-end: 8px;
}
.policy-bullet {
width: 4px;
height: 4px;
border-radius: 2px;
background-color: var(--oc-primary, #0088FF);
margin-block-start: 7px;
margin-inline-end: 8px;
flex-shrink: 0;
}
.policy-text {
font-size: 12px;
color: var(--oc-text-2, #64748B);
line-height: 1.6;
flex: 1;
}
/* Floating Primary CTA Bar (Exactly ONE Primary CTA Button) */
.security-cta-bar {
position: fixed;
left: 0;
right: 0;
bottom: var(--window-bottom, 0px);
background-color: var(--oc-surface, #FFFFFF);
border-top-width: 1px;
border-top-color: var(--oc-border, #EBF1F7);
padding: 12px var(--oc-space-16, 16px) calc(16px + env(safe-area-inset-bottom, 0px));
box-sizing: border-box;
z-index: 100;
}
.primary-cta-btn {
height: 48px;
min-height: 44px;
width: 100%;
border-radius: var(--oc-radius-btn, 14px);
background-color: var(--oc-primary, #0088FF);
display: flex;
align-items: center;
justify-content: center;
border-width: 0;
box-shadow: var(--oc-shadow-cta, 0 8px 20px rgba(0, 136, 255, 0.22));
transition: opacity 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.primary-cta-btn:active {
opacity: 0.88;
}
.cta-btn-danger {
background-color: var(--oc-error, #F04438);
box-shadow: 0 8px 20px rgba(240, 68, 56, 0.25);
}
.cta-btn-primary {
background-color: var(--oc-primary, #0088FF);
box-shadow: var(--oc-shadow-cta, 0 8px 20px rgba(0, 136, 255, 0.22));
}
.primary-cta-btn-disabled {
background-color: var(--oc-border, #EBF1F7);
box-shadow: none;
}
.primary-cta-btn-text {
color: #FFFFFF;
font-size: 15px;
font-weight: 600;
letter-spacing: 0.3px;
}
.primary-cta-btn-disabled .primary-cta-btn-text {
color: var(--oc-text-2, #64748B);
}
/* Double Confirmation Modal */
.modal-backdrop {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(16, 24, 40, 0.55);
display: flex;
align-items: flex-end;
justify-content: center;
z-index: 200;
}
.modal-dialog {
width: 100%;
background-color: var(--oc-surface, #FFFFFF);
border-top-left-radius: var(--oc-radius-modal, 24px);
border-top-right-radius: var(--oc-radius-modal, 24px);
padding: 12px var(--oc-space-20, 20px) calc(24px + env(safe-area-inset-bottom, 0px));
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
}
.modal-handle-bar {
width: 36px;
height: 4px;
border-radius: 2px;
background-color: var(--oc-border, #EBF1F7);
margin-block-end: 16px;
}
.modal-icon-wrap {
width: 52px;
height: 52px;
border-radius: 16px;
display: flex;
align-items: center;
justify-content: center;
margin-block-end: 12px;
}
.modal-icon-freeze {
background-color: #FEF3F2;
}
.modal-icon-unfreeze {
background-color: #EBF5FF;
}
.modal-alert-symbol {
width: 18px;
height: 18px;
border-radius: 9px;
border-width: 2px;
}
.modal-icon-freeze .modal-alert-symbol {
border-color: var(--oc-error, #F04438);
}
.modal-icon-unfreeze .modal-alert-symbol {
border-color: var(--oc-primary, #0088FF);
}
.modal-title {
font-size: 17px;
font-weight: 700;
color: var(--oc-text, #101828);
margin-block-end: 8px;
text-align: center;
}
.modal-desc {
font-size: 13px;
color: var(--oc-text-2, #64748B);
line-height: 1.6;
text-align: center;
margin-block-end: 20px;
}
.modal-actions-row {
display: flex;
flex-direction: row;
width: 100%;
gap: 12px;
}
.modal-btn-cancel {
flex: 1;
height: 46px;
border-radius: 12px;
background-color: var(--oc-bg, #F5F8FC);
border-width: 1px;
border-color: var(--oc-border, #EBF1F7);
display: flex;
align-items: center;
justify-content: center;
}
.modal-btn-cancel-text {
font-size: 14px;
font-weight: 600;
color: var(--oc-text-2, #64748B);
}
.modal-btn-confirm {
flex: 1;
height: 46px;
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
}
.btn-confirm-freeze {
background-color: var(--oc-error, #F04438);
}
.btn-confirm-unfreeze {
background-color: var(--oc-primary, #0088FF);
}
.modal-btn-confirm-text {
font-size: 14px;
font-weight: 600;
color: #FFFFFF;
}
@media (prefers-reduced-motion: reduce) {
* {
animation: none !important;
transition: none !important;
}
}
</style>