/* ============================================
   活码系统 - 样式表
   设计风格：现代、简洁、专业
   ============================================ */

/* ============ 设计令牌 ============ */
:root {
    /* 主色调 - 靛蓝到紫罗兰渐变 */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-hover: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);

    /* 中性色 */
    --bg: #f0f2f5;
    --bg-alt: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* 功能色 */
    --success: #10b981;
    --success-bg: #ecfdf5;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --info: #3b82f6;
    --info-bg: #eff6ff;

    /* 字体 */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;

    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.10);

    /* 过渡 */
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ 重置 & 基础 ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ============ 布局 ============ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main {
    padding: 2rem 1.5rem 4rem;
}

/* ============ 头部 ============ */
.header {
    background: var(--gradient);
    color: #fff;
    padding: 2.5rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* 使用指南 */
.guide {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.guide-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    backdrop-filter: blur(4px);
}

.guide-step-num {
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ============ 封面横幅 ============ */
.cover-banner {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--gradient);
}

.cover-banner.cover-fallback {
    background: var(--gradient);
}

.cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.75) 0%, rgba(139, 92, 246, 0.65) 100%);
    display: flex;
    align-items: center;
}

.cover-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.cover-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cover-logo {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    flex-shrink: 0;
}

.cover-logo svg {
    width: 30px;
    height: 30px;
}

.cover-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.cover-subtitle {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.125rem;
}

.logout-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
    backdrop-filter: blur(8px);
    flex-shrink: 0;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transform: translateY(-1px);
}

/* ============ 登录表单增强 ============ */
.login-input-wrap {
    position: relative;
}

.login-input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-light);
    pointer-events: none;
}

.login-input {
    padding-left: 2.625rem !important;
    text-align: left !important;
}

.login-remember {
    text-align: left;
    margin-bottom: 1.25rem;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--text-muted);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}

.checkbox-custom::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform var(--transition);
    margin-top: -1px;
}

.checkbox-label input:checked ~ .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked ~ .checkbox-custom::after {
    transform: rotate(45deg) scale(1);
}

.checkbox-label input:focus ~ .checkbox-custom {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ============ 封面横幅 ============ */
/* 顶部栏（退出登录） */
.top-bar {
    text-align: right;
    padding: 0.625rem 1.5rem;
    background: var(--card);
    border-bottom: 1px solid var(--border-light);
}

.top-logout {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
}

.top-logout:hover {
    color: var(--danger);
}

/* ============ 统计卡片 ============ */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius-xl);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

.stat-icon.indigo {
    background: #eef2ff;
    color: #6366f1;
}

.stat-icon.green {
    background: #ecfdf5;
    color: #10b981;
}

.stat-icon.amber {
    background: #fffbeb;
    color: #f59e0b;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ============ 双栏布局 ============ */
.layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* ============ 卡片 ============ */
.card {
    background: var(--card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.card-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* ============ 创建表单 ============ */
.create-card {
    position: sticky;
    top: 1.5rem;
}

.create-card .card-header {
    background: var(--gradient);
    color: #fff;
}

.create-card .card-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============ 表单元素 ============ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--text);
}

.form-label .required {
    color: var(--danger);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg-alt);
    transition: all var(--transition);
    outline: none;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-light);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ============ 按钮 ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    user-select: none;
}

.btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--gradient-hover);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-alt);
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border-light);
    border-color: var(--text-light);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-icon:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #eef2ff;
}

.btn-icon.danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-bg);
}

.btn-icon.success {
    border-color: var(--success);
    color: var(--success);
    background: var(--success-bg);
}

/* ============ 二维码列表 ============ */
.list-section {
    min-height: 400px;
}

.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.list-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.list-count {
    background: var(--bg-alt);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-weight: 500;
}

.search-box {
    position: relative;
}

.search-box svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-light);
    pointer-events: none;
}

.search-input {
    padding: 0.5rem 0.875rem 0.5rem 2.25rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-family: var(--font-sans);
    background: var(--card);
    width: 220px;
    transition: all var(--transition);
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    width: 260px;
}

/* ============ 二维码卡片网格 ============ */
.qrcode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.qrcode-card {
    background: var(--card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.qrcode-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.qrcode-card-body {
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
}

.qrcode-image-wrap {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    background: #fff;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    position: relative;
}

.qrcode-image-wrap img,
.qrcode-image-wrap canvas {
    width: 100% !important;
    height: 100% !important;
    border-radius: var(--radius-sm);
}

.qrcode-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-light);
}

.qrcode-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.qrcode-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qrcode-target {
    font-size: 0.8125rem;
    color: var(--primary);
    font-family: var(--font-mono);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.qrcode-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.qrcode-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: var(--bg-alt);
    color: var(--text-muted);
}

.qrcode-tag.scans {
    background: var(--info-bg);
    color: var(--info);
}

.qrcode-tag.updated {
    background: var(--success-bg);
    color: var(--success);
}

.qrcode-card-footer {
    padding: 0.625rem 1.25rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 0.375rem;
    justify-content: flex-end;
    background: var(--bg-alt);
}

/* ============ 空状态 ============ */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    background: var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.empty-state-icon svg {
    width: 32px;
    height: 32px;
}

.empty-state h3 {
    font-size: 1.125rem;
    color: var(--text);
    margin-bottom: 0.375rem;
}

.empty-state p {
    font-size: 0.875rem;
}

/* ============ 加载状态 ============ */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* ============ 模态框 ============ */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity var(--transition);
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95) translateY(10px);
    transition: transform var(--transition);
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.modal-close:hover {
    background: var(--danger-bg);
    color: var(--danger);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
}

/* 编辑模态框中的二维码预览 */
.edit-qr-preview {
    text-align: center;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
}

.edit-qr-preview .qrcode-image-wrap {
    margin: 0 auto;
}

.edit-qr-hint {
    font-size: 0.8125rem;
    color: var(--success);
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

/* ============ Toast 通知 ============ */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    pointer-events: none;
}

.toast {
    background: var(--card);
    border-radius: var(--radius-md);
    padding: 0.75rem 1.125rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 280px;
    max-width: 400px;
    pointer-events: auto;
    animation: toastIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--text-muted);
}

.toast.removing {
    animation: toastOut 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.info { border-left-color: var(--info); }
.toast.warning { border-left-color: var(--warning); }

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info .toast-icon { color: var(--info); }
.toast.warning .toast-icon { color: var(--warning); }

.toast-message {
    font-size: 0.875rem;
    color: var(--text);
    flex: 1;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ============ 卡片入场动画 ============ */
@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qrcode-card {
    animation: cardIn 0.35s ease-out backwards;
}

/* ============ 确认弹窗 ============ */
.confirm-modal .modal-content {
    max-width: 380px;
}

.confirm-text {
    text-align: center;
    padding: 0.5rem 0;
}

.confirm-text p {
    font-size: 0.9375rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.confirm-text .confirm-sub {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ============ 登录页 ============ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    padding: 2rem;
}

.login-card {
    background: var(--card);
    border-radius: var(--radius-2xl);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.login-card .logo {
    justify-content: center;
    margin-bottom: 1.5rem;
}

.login-card h1 {
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.login-card .subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    opacity: 1;
}

/* ============ 响应式 ============ */
@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .create-card {
        position: static;
    }

    .guide {
        gap: 0.5rem;
    }

    .guide-step {
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
    }
}

@media (max-width: 600px) {
    .header {
        padding: 2rem 0 2.5rem;
    }

    .logo h1 {
        font-size: 1.375rem;
    }

    .subtitle {
        font-size: 0.875rem;
    }

    .guide {
        flex-direction: column;
    }

    /* 封面横幅移动端适配 */
    .cover-banner {
        height: 160px;
    }

    .cover-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .cover-left {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 0.5rem;
    }

    .cover-logo {
        width: 40px;
        height: 40px;
    }

    .cover-logo svg {
        width: 24px;
        height: 24px;
    }

    .cover-title {
        font-size: 1.25rem;
    }

    .cover-subtitle {
        font-size: 0.75rem;
    }

    .logout-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    .container {
        padding: 0 1rem;
    }

    .main {
        padding: 1.5rem 1rem 3rem;
    }

    .qrcode-grid {
        grid-template-columns: 1fr;
    }

    .qrcode-card-body {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .qrcode-image-wrap {
        width: 140px;
        height: 140px;
    }

    .qrcode-info {
        align-items: center;
    }

    .qrcode-meta {
        justify-content: center;
    }

    .qrcode-card-footer {
        justify-content: center;
    }

    .search-input {
        width: 100%;
    }

    .search-input:focus {
        width: 100%;
    }

    .search-box {
        flex: 1;
    }

    .toast-container {
        top: 0.75rem;
        right: 0.75rem;
        left: 0.75rem;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* ============ 工具类 ============ */
.hidden {
    display: none !important;
}

.text-mono {
    font-family: var(--font-mono);
}

.fade-in {
    animation: cardIn 0.3s ease-out;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* 选中文本 */
::selection {
    background: rgba(99, 102, 241, 0.2);
}
