/* ========================================
   运维兔门户 - 统一样式表 portal.css
   ======================================== */

/* ===== CSS 变量 ===== */
:root {
    --portal-primary: #2563eb;
    --portal-primary-dark: #1d4ed8;
    --portal-bg: #f5f7fa;
    --portal-sidebar-bg: #1e293b;
    --portal-sidebar-hover: #334155;
    --portal-sidebar-active: #2563eb;
    --portal-text: #1e293b;
    --portal-text-light: #64748b;
    --portal-border: #e2e8f0;
    --portal-card-bg: #ffffff;
    --portal-radius: 6px;
}

/* ===== 基础 ===== */
* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background: var(--portal-bg);
    color: var(--portal-text);
    margin: 0;
}
.portal-wrapper { display: flex; min-height: 100vh; }

/* ===== 侧边栏 ===== */
.portal-sidebar {
    width: 220px;
    background: var(--portal-sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
}
.portal-sidebar .logo {
    padding: 18px 20px;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.portal-sidebar .user-panel {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.portal-sidebar .user-panel img {
    width: 38px; height: 38px; border-radius: 50%;
    object-fit: cover;
}
.portal-sidebar .user-panel .info p {
    margin: 0; font-size: 14px; color: #f1f5f9; font-weight: 500;
}
.portal-sidebar .user-panel .info small {
    color: #94a3b8; font-size: 12px;
}
.portal-menu { list-style: none; padding: 8px 0; margin: 0; }
.portal-menu .menu-header {
    padding: 14px 20px 6px;
    font-size: 13px;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.portal-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.portal-menu li a:hover {
    background: var(--portal-sidebar-hover);
    color: #fff;
}
.portal-menu li.active a {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
    border-left-color: var(--portal-sidebar-active);
    font-weight: 500;
}
.portal-menu li a i { width: 18px; text-align: center; font-size: 14px; flex-shrink: 0; }

/* ===== 主区域 ===== */
.portal-main {
    flex: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.portal-topbar {
    background: #fff;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--portal-border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.portal-topbar .breadcrumb {
    font-size: 15px;
    font-weight: 600;
    color: var(--portal-text);
    margin: 0;
}
.portal-topbar .user-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}
.portal-topbar .user-dropdown img {
    width: 32px; height: 32px; border-radius: 50%;
    object-fit: cover;
}
.portal-topbar .user-dropdown span { font-size: 14px; color: var(--portal-text); }
.portal-topbar .user-dropdown .dropdown-menu {
position: absolute;
top: 100%; right: 0;
min-width: 160px;
background: #fff;
border: 1px solid var(--portal-border);
border-radius: var(--portal-radius);
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
display: none;
z-index: 200;
overflow: hidden;
}
.portal-topbar .user-dropdown:hover .dropdown-menu { display: block; }
.portal-topbar .user-dropdown .dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--portal-text);
    text-decoration: none;
    font-size: 14px;
}
.portal-topbar .user-dropdown .dropdown-menu a:hover { background: #f1f5f9; }

.portal-content { flex: 1; padding: 24px; }

/* ===== 卡片 ===== */
.portal-card {
    background: var(--portal-card-bg);
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    padding: 20px;
    margin-bottom: 16px;
}

/* ===== 统计卡片 ===== */
.stat-card {
    background: #fff;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.stat-card .stat-icon {
    width: 44px; height: 44px;
    border-radius: var(--portal-radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.stat-card .stat-info { flex: 1; }
.stat-card .stat-number {
    font-size: 24px; font-weight: 700; color: var(--portal-text); line-height: 1.2;
}
.stat-card .stat-label { font-size: 13px; color: var(--portal-text-light); }

/* ===== 网格布局 ===== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 768px) {
    .stat-grid, .quick-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .stat-grid, .quick-grid { grid-template-columns: 1fr; }
}

/* ===== 欢迎横幅 ===== */
.welcome-banner {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    border-radius: 10px;
    padding: 24px 28px;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.welcome-banner .welcome-text h2 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.welcome-banner .welcome-text p { margin: 0; font-size: 14px; opacity: 0.9; }
.welcome-banner .welcome-date { text-align: right; font-size: 14px; opacity: 0.85; }
.welcome-banner .welcome-date .date-num { font-size: 28px; font-weight: 700; line-height: 1.2; }

/* ===== 最近卡片 ===== */
.recent-card {
    background: #fff;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    padding: 20px;
}
.recent-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.recent-card .card-header h4 {
    margin: 0; font-size: 16px; font-weight: 600; color: var(--portal-text);
}
.recent-card .card-header a {
    color: var(--portal-primary); font-size: 13px; text-decoration: none;
}

/* ===== 表格 ===== */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-wrap table { min-width: 480px; }

.portal-table {
    width: 100%;
    border-collapse: collapse;
}
.portal-table th {
    background: #f8fafc;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--portal-text-light);
    border-bottom: 1px solid var(--portal-border);
    text-align: left;
}
.portal-table td {
    padding: 10px 12px;
    font-size: 14px;
    border-bottom: 1px solid var(--portal-border);
}
.portal-table tbody tr:hover { background: #f8fafc; }

/* ===== 表单 ===== */
.portal-form .form-group { margin-bottom: 18px; }
.portal-form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--portal-text);
    margin-bottom: 6px;
}
.portal-form .form-control {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    outline: none;
    transition: border-color 0.15s;
}
.portal-form .form-control:focus { border-color: var(--portal-primary); }

/* ===== 报修表单 ===== */
.form-group-repair { margin-bottom: 16px; }
.form-label-repair {
    display: block; font-size: 14px; font-weight: 600; color: #374151; margin-bottom: 6px;
}
.form-input-repair, .form-select-repair {
    width: 100%; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 14px; color: #1f2937; outline: none; transition: border-color 0.2s;
    font-family: inherit; background: #fff;
}
.form-input-repair:focus, .form-select-repair:focus { border-color: #2563eb; }
.form-textarea-repair {
    width: 100%; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 14px; color: #1f2937; outline: none; transition: border-color 0.2s;
    font-family: inherit; resize: vertical; line-height: 1.6;
}
.form-textarea-repair:focus { border-color: #2563eb; }
.form-row-repair { display: flex; gap: 16px; }
@media (max-width: 768px) {
    .form-row-repair { flex-direction: column; gap: 0; }
}

/* ===== 按钮 ===== */
.btn-portal-primary {
    background: var(--portal-primary);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: var(--portal-radius);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-portal-primary:hover { background: var(--portal-primary-dark); }

.btn-portal-outline {
    background: #fff;
    color: var(--portal-primary);
    border: 1px solid var(--portal-primary);
    padding: 8px 20px;
    border-radius: var(--portal-radius);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-portal-outline:hover { background: var(--portal-primary); color: #fff; }

.btn-submit-repair {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 28px;
    background: #2563eb; color: #fff; border: none; border-radius: 8px;
    font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
    transition: background 0.2s;
}
.btn-submit-repair:hover { background: #1d4ed8; }
.btn-submit-repair:disabled { background: #94a3b8; cursor: not-allowed; }

.btn-cancel-repair {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 24px;
    background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; border-radius: 8px;
    font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
    font-family: inherit;
}
.btn-cancel-repair:hover { background: #e2e8f0; }

/* ===== 标签 ===== */
.portal-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}
.portal-tag-warning { background: #fef3c7; color: #92400e; }
.portal-tag-primary { background: #dbeafe; color: #1e40af; }
.portal-tag-success { background: #d1fae5; color: #065f46; }
.portal-tag-default  { background: #f1f5f9; color: #475569; }
.portal-tag-info     { background: #e0e7ff; color: #3730a3; }

/* ===== 分页 ===== */
.portal-pagination { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 16px; }
.portal-pagination a, .portal-pagination span {
    padding: 6px 12px;
    border: 1px solid var(--portal-border);
    border-radius: 4px;
    font-size: 13px;
    color: var(--portal-text);
    text-decoration: none;
    cursor: pointer;
}
.portal-pagination a:hover { background: #f1f5f9; }
.portal-pagination .active { background: var(--portal-primary); color: #fff; border-color: var(--portal-primary); }
.portal-pagination .disabled { color: #cbd5e1; cursor: not-allowed; }

.pagination-wrapper { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; }
.pagination-info { color: #64748b; font-size: 13px; }
.pagination-wrapper .pagination { display: flex !important; flex-wrap: wrap; }
.pagination-wrapper .pagination > li { float: none !important; }
.pagination-wrapper .pagination > li > a,
.pagination-wrapper .pagination > li > span { float: none !important; }

/* ===== 页脚 ===== */
.portal-footer {
    text-align: center;
    padding: 16px 24px;
    font-size: 13px;
    color: var(--portal-text-light);
    border-top: 1px solid var(--portal-border);
    background: #fff;
}
.portal-footer a { color: var(--portal-primary); text-decoration: none; }

/* ===== 搜索栏 ===== */
.portal-search {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.portal-search input, .portal-search select {
    padding: 7px 12px;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    font-size: 14px;
    outline: none;
}
.portal-search input:focus, .portal-search select:focus { border-color: var(--portal-primary); }

/* ===== 状态按钮组 ===== */
.portal-tabs { display: flex; gap: 2px; }
.portal-tabs button {
    padding: 7px 14px;
    border: 1px solid var(--portal-border);
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    color: var(--portal-text);
    transition: all 0.15s;
}
.portal-tabs button:first-child { border-radius: var(--portal-radius) 0 0 var(--portal-radius); }
.portal-tabs button:last-child { border-radius: 0 var(--portal-radius) var(--portal-radius) 0; }
.portal-tabs button.active { background: var(--portal-primary); color: #fff; border-color: var(--portal-primary); }

/* ===== 空状态 ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}
.empty-state i {
    font-size: 36px;
    margin-bottom: 10px;
    color: #cbd5e1;
}

/* ===== 移动端按钮 ===== */
.portal-mobile-toggle { display: none; }

/* ===== 设备卡片（我的设备页面） ===== */
.device-card-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 768px) { .device-card-list { grid-template-columns: 1fr; } }
.device-card {
    background: #fff; border: 1px solid var(--portal-border); border-radius: 10px; padding: 20px;
    transition: box-shadow 0.2s ease;
    display: flex; flex-direction: column;
    height: 100%;
}
.device-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
.device-card-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px;
}
.device-card-name { font-size: 16px; font-weight: 600; color: #1e293b; }
.device-card-alias { font-size: 13px; color: #64748b; margin-left: 8px; }
.device-card-scrap { background: #fee2e2; color: #dc2626; font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.device-card-info { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.device-card-info-item { font-size: 13px; color: #64748b; line-height: 1.6; }
.device-card-info-item span { color: #94a3b8; margin-right: 4px; }
.device-card-actions { display: flex; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #f1f5f9; }
.device-card-actions a, .device-card-actions button {
    display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: 6px;
    font-size: 13px; text-decoration: none; cursor: pointer; border: none; font-family: inherit;
}
.btn-repair { background: #eff6ff; color: #2563eb; }
.btn-repair:hover { background: #dbeafe; }
.btn-unbind { background: #fef2f2; color: #dc2626; margin-left: auto; }
.btn-unbind:hover { background: #fee2e2; }
.device-empty { text-align: center; padding: 50px 20px; color: #94a3b8; }
.device-empty i { font-size: 48px; margin-bottom: 12px; display: block; }

/* ===== 知识库页面 ===== */
.knowledge-toolbar {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.knowledge-categories {
    display: flex; flex-wrap: wrap; gap: 8px; flex: 1;
}
.knowledge-search {
    display: flex; gap: 8px; align-items: center; flex-shrink: 0;
}
.knowledge-search input {
    padding: 7px 12px; border: 1px solid var(--portal-border); border-radius: var(--portal-radius);
    font-size: 14px; outline: none; width: 240px;
}
.knowledge-search input:focus { border-color: var(--portal-primary); }
.cat-tab {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 16px; border-radius: 20px; font-size: 13px;
    color: #475569; background: #f1f5f9; text-decoration: none;
    transition: all 0.15s; cursor: pointer; border: 1px solid transparent;
}
.cat-tab:hover { background: #e0e7ff; color: #3730a3; }
.cat-tab.active { background: var(--portal-primary); color: #fff; }
.cat-tab.active:hover { background: var(--portal-primary-dark); color: #fff; }
.knowledge-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px;
}
.knowledge-grid .knowledge-grid-empty { grid-column: 1 / -1; }
.knowledge-card {
    background: #fff; border: 1px solid var(--portal-border); border-radius: var(--portal-radius);
    overflow: hidden; transition: all 0.2s ease;
    height: 100%; display: flex; flex-direction: column;
}
.knowledge-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.knowledge-card .cover { width: 100%; height: 150px; object-fit: cover; background: #f1f5f9; }
.knowledge-card .no-cover {
    width: 100%; height: 150px; display: flex; align-items: center; justify-content: center;
    background: #f8fafc; color: #cbd5e1; font-size: 40px;
}
.knowledge-card .card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.knowledge-card .card-title {
    font-size: 14px; font-weight: 600; color: #1e293b; margin-bottom: 6px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.knowledge-card .card-desc {
    font-size: 13px; color: #64748b; line-height: 1.5; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 10px;
}
.knowledge-card .card-meta { font-size: 12px; color: #94a3b8; display: flex; justify-content: space-between; align-items: center; }
.knowledge-empty { text-align: center; padding: 60px 20px; color: #94a3b8; }
.knowledge-empty i { font-size: 40px; margin-bottom: 12px; color: #cbd5e1; }
@media (max-width: 991px) { .knowledge-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .knowledge-grid { grid-template-columns: 1fr; } }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .portal-sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    .portal-sidebar.show { transform: translateX(0); }
    .portal-main { margin-left: 0; }
    .portal-mobile-toggle {
        display: flex; align-items: center; justify-content: center;
        width: 36px; height: 36px; border: 1px solid var(--portal-border);
        border-radius: var(--portal-radius); background: #fff; cursor: pointer;
        margin-right: 12px; font-size: 18px;
    }
}

/* ===== 通用动画 ===== */
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 登录页面 ===== */
.login-body {
    margin: 0; padding: 20px;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
}
.login-visual {
    flex: 0 0 42%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 25%, #60a5fa 50%, #93c5fd 75%, #bfdbfe 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px 40px;
    z-index: 1;
}
.login-visual::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
    animation: wave 20s ease-in-out infinite;
    z-index: 1;
}
.login-visual::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at top left, rgba(59, 130, 246, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(96, 165, 250, 0.4) 0%, transparent 50%);
    animation: wave2 15s ease-in-out infinite reverse;
    z-index: 1;
}
@keyframes wave {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, -20px) rotate(180deg); }
}
@keyframes wave2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, 20px) scale(1.1); }
}
.visual-content { position: relative; z-index: 2; text-align: center; color: #ffffff; }
.visual-logo {
    width: 100px; height: 100px; margin: 0 auto 30px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.2); border-radius: 50%;
    backdrop-filter: blur(10px); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
.visual-logo img { width: 70px; height: auto; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2)); }
.visual-title { font-size: 32px; font-weight: 700; margin-bottom: 15px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); letter-spacing: 1px; }
.visual-subtitle { font-size: 16px; margin-bottom: 30px; opacity: 0.95; line-height: 1.6; text-shadow: 0 1px 5px rgba(0, 0, 0, 0.15); }
.visual-features { list-style: none; text-align: left; max-width: 300px; margin: 0 auto; padding-left: 10px; }
.visual-features li {
    padding: 10px 0; font-size: 14px; display: flex; align-items: center;
    opacity: 0.95; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.visual-features li::before {
    content: '✓'; display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 50%;
    margin-right: 12px; font-weight: bold; font-size: 12px; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.login-form-wrapper {
    flex: 1; padding: 50px;
    display: flex; flex-direction: column; justify-content: center; background: #ffffff;
}
.form-title { font-size: 28px; font-weight: 700; color: #1a1a1a; margin-bottom: 8px; text-align: center; }
.form-subtitle { font-size: 14px; color: #6b7280; margin-bottom: 24px; text-align: center; }
.error-msg {
    background: #fef2f2; border-radius: 6px;
    padding: 10px 14px; color: #dc2626; font-size: 13px; line-height: 1.5;
    margin-bottom: 18px; display: none;
}
.error-msg.show { display: block; }
.qrcode-area {
    position: relative; width: 200px; height: 200px; margin: 0 auto 16px;
    border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.qrcode-area img { width: 180px; height: 180px; object-fit: contain; }
.qrcode-loading { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #94a3b8; font-size: 13px; }
.spinner {
    width: 32px; height: 32px; border: 3px solid #e2e8f0;
    border-top-color: #2563eb; border-radius: 50%; animation: spin 0.8s linear infinite;
}
.qrcode-mask {
    position: absolute; inset: 0; background: rgba(255,255,255,0.92);
    display: none; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.qrcode-mask.show { display: flex; }
.qrcode-mask .mask-icon { font-size: 32px; color: #94a3b8; }
.qrcode-mask .mask-text { font-size: 13px; color: #64748b; }
.qrcode-mask .refresh-btn {
    padding: 6px 18px; background: #2563eb; color: #fff;
    border: none; border-radius: 6px; font-size: 13px; cursor: pointer;
}
.qrcode-mask .refresh-btn:hover { background: #1d4ed8; }
.status-tip {
    font-size: 13px; color: #64748b; margin-bottom: 16px;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.status-tip .dot { width: 8px; height: 8px; border-radius: 50%; background: #2563eb; animation: pulse 1.5s ease-in-out infinite; }
.status-tip.scanned .dot { background: #f59e0b; }
.status-tip.scanned { color: #d97706; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.confirm-tip {
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
    padding: 12px; margin-bottom: 14px; display: none; text-align: center;
}
.confirm-tip.show { display: block; }
.confirm-tip .confirm-title { font-size: 14px; font-weight: 600; color: #92400e; margin-bottom: 4px; }
.confirm-tip .confirm-desc { font-size: 12px; color: #b45309; line-height: 1.5; }
.scan-tips { background: #eff6ff; border-radius: 8px; padding: 12px; text-align: left; margin-top: 8px; }
.scan-tips p { font-size: 12px; color: #64748b; line-height: 1.8; }
.scan-tips p i { color: #2563eb; margin-right: 4px; width: 16px; text-align: center; }
.success-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.3);
    display: none; align-items: center; justify-content: center; z-index: 9999;
}
.success-overlay.show { display: flex; }
.success-box { background: #fff; border-radius: 12px; padding: 30px 40px; text-align: center; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.success-icon {
    width: 52px; height: 52px; margin: 0 auto 12px; background: #d1fae5; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 26px; color: #059669;
}
.success-text { font-size: 16px; font-weight: 600; color: #1e293b; }
.success-sub { font-size: 13px; color: #64748b; margin-top: 4px; }
@media (max-width: 768px) {
    .login-body { padding: 15px; }
    .login-container { flex-direction: column; max-width: 100%; }
    .login-visual { flex: none; min-height: 200px; padding: 30px 25px; }
    .visual-logo { width: 80px; height: 80px; margin-bottom: 20px; }
    .visual-logo img { width: 55px; }
    .visual-title { font-size: 24px; margin-bottom: 12px; }
    .visual-subtitle { font-size: 14px; margin-bottom: 20px; }
    .visual-features { display: none; }
    .login-form-wrapper { padding: 35px 30px; }
    .form-title { font-size: 24px; }
}
@media (max-width: 480px) {
    .login-form-wrapper { padding: 30px 25px; }
}

/* ===== 注销页面 ===== */
.logout-card {
    background: #fff; border-radius: 16px; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px 36px; width: 100%; max-width: 360px; text-align: center;
}
.logout-icon {
    width: 64px; height: 64px; margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    background: #fef3c7; border-radius: 50%; font-size: 28px; color: #f59e0b;
}
.logout-title { font-size: 22px; font-weight: 700; color: #1a1a1a; margin-bottom: 8px; }
.logout-subtitle { font-size: 14px; color: #6b7280; line-height: 1.6; margin-bottom: 28px; }
.btn-group { display: flex; flex-direction: column; gap: 12px; }
.btn-logout-confirm {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 12px 24px; border: none; border-radius: 10px;
    font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s ease;
    text-decoration: none; font-family: inherit;
}
.btn-logout-confirm.logout { background: #ef4444; color: #fff; }
.btn-logout-confirm.logout:hover { background: #dc2626; }
.btn-logout-confirm.cancel { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.btn-logout-confirm.cancel:hover { background: #e2e8f0; }
.loading-spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: #fff;
    border-radius: 50%; animation: spin 0.8s linear infinite;
}

/* ===== 右侧悬浮菜单 ===== */
.portal-float-menu {
    position: fixed;
    right: 24px;
    bottom: 120px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
.float-menu-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    overflow: visible;
}
.float-menu-item:first-child {
    border-radius: 14px 14px 0 0;
}
.float-menu-item:last-child {
    border-radius: 0 0 14px 14px;
    border-bottom: none;
}
.float-menu-item i {
    font-size: 20px;
    color: #64748b;
    margin-bottom: 3px;
    transition: all 0.25s ease;
}
.float-menu-text {
    font-size: 11px;
    color: #64748b;
    white-space: nowrap;
    transition: all 0.25s ease;
}
.float-menu-item:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}
.float-menu-item:hover i,
.float-menu-item:hover .float-menu-text {
    color: #fff;
}
/* 在线咨询 - 橙色主题 */
.float-menu-item:nth-child(1):hover {
    background: linear-gradient(135deg, #ff8f70 0%, #ff3d6a 100%);
}
/* 电话咨询 - 绿色主题 */
.float-menu-phone:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
/* 扫码报修 - 蓝色主题 */
.float-menu-qrcode:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}
/* 返回顶部 - 灰色主题 */
.float-menu-top:hover {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

/* 悬浮提示框 */
.float-menu-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    padding: 14px 20px;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 9999;
}
.float-menu-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 6px solid #fff;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}
.float-menu-tooltip i {
    color: #10b981 !important;
    margin-right: 6px;
}
.float-menu-item:hover .float-menu-tooltip {
    opacity: 1;
    visibility: visible;
    right: calc(100% + 8px);
}

/* 二维码提示框 */
.float-menu-qr-tooltip {
    padding: 16px;
    text-align: center;
    white-space: normal;
}
.float-menu-qr-tooltip img {
    width: 140px;
    height: 140px;
    border-radius: 8px;
    display: block;
    margin: 0 auto 8px;
}
.float-menu-qr-tooltip p {
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
    margin: 0;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .portal-float-menu {
        right: 12px;
        bottom: 20px;
    }
    .float-menu-item {
        width: 52px;
        height: 52px;
    }
    .float-menu-item i { font-size: 17px; }
    .float-menu-text { font-size: 10px; }
    .float-menu-qr-tooltip img { width: 120px; height: 120px; }
}
