/* customer-ui/css/customer.css - 客户端网站样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #1989fa; --primary-dark: #0d6cd6; --success: #07c160;
  --warning: #ff976a; --danger: #ee0a24; --text: #303133; --text-2: #606266;
  --text-3: #909399; --border: #dcdfe6; --border-l: #e4e7ed; --bg: #f0f2f5;
  --radius: 6px; --header-h: 56px;
}
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

/* 登录页 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0d6cd6, #1989fa); }
.login-box { width: 400px; max-width: 90vw; background: #fff; border-radius: 12px; padding: 40px; box-shadow: 0 8px 32px rgba(0,0,0,.15); }
.login-title { text-align: center; font-size: 22px; font-weight: 600; color: var(--primary); }
.login-sub { text-align: center; color: var(--text-2); font-size: 13px; margin: 8px 0 24px; }
.tabs { display: flex; margin-bottom: 24px; border-bottom: 2px solid var(--border-l); }
.tab { flex: 1; text-align: center; padding: 12px; cursor: pointer; font-size: 15px; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.form-item { margin-bottom: 18px; }
.form-item label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-2); }
.form-item input { width: 100%; height: 42px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; outline: none; }
.form-item input:focus { border-color: var(--primary); }
.code-row .code-input { display: flex; gap: 8px; }
.code-input input { flex: 1; }
.send-btn { white-space: nowrap; padding: 0 16px; border: 1px solid var(--primary); background: #fff; color: var(--primary); border-radius: var(--radius); font-size: 13px; }
.send-btn:disabled { color: var(--text-3); border-color: var(--border-l); }
.login-btn { width: 100%; height: 42px; background: var(--primary); color: #fff; border: none; border-radius: var(--radius); font-size: 15px; }
.login-btn:disabled { background: #a0c4f5; }
.login-tip { margin-top: 16px; text-align: center; font-size: 12px; color: var(--text-3); }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 200px; background: #001529; color: #fff; flex-shrink: 0; position: fixed; top: 0; bottom: 0; left: 0; overflow-y: auto; z-index: 100; }
.sidebar-logo { height: var(--header-h); display: flex; align-items: center; padding: 0 20px; font-size: 16px; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.1); white-space: nowrap; }
.sidebar-logo .logo-icon { width: 30px; height: 30px; background: var(--primary); border-radius: 6px; display: flex; align-items: center; justify-content: center; margin-right: 10px; font-size: 13px; }
.menu { padding: 8px 0; }
.menu-item { display: flex; align-items: center; padding: 12px 24px; color: rgba(255,255,255,.75); cursor: pointer; font-size: 14px; border-left: 3px solid transparent; }
.menu-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.menu-item.active { color: #fff; background: var(--primary); border-left-color: #fff; }
.menu-item .icon { width: 20px; margin-right: 10px; text-align: center; }
.main { flex: 1; margin-left: 200px; display: flex; flex-direction: column; }
.header { height: var(--header-h); background: #fff; box-shadow: 0 1px 4px rgba(0,21,41,.08); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; position: sticky; top: 0; z-index: 50; }
.header-left { font-size: 16px; font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 16px; }
.user-dropdown { position: relative; cursor: pointer; }
.user-info { display: flex; align-items: center; gap: 8px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.dropdown-menu { position: absolute; top: 42px; right: 0; background: #fff; border: 1px solid var(--border-l); border-radius: var(--radius); box-shadow: 0 4px 12px rgba(0,0,0,.1); min-width: 140px; z-index: 200; display: none; }
.dropdown-menu.show { display: block; }
.dropdown-item { padding: 10px 16px; cursor: pointer; font-size: 13px; }
.dropdown-item:hover { background: #f5f7fa; color: var(--primary); }
.content { flex: 1; padding: 20px 24px; }

/* 卡片 */
.card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.04); margin-bottom: 20px; }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.04); position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; background: var(--primary); }
.stat-card.green::before { background: var(--success); }
.stat-card.orange::before { background: var(--warning); }
.stat-card.red::before { background: var(--danger); }
.stat-label { font-size: 13px; color: var(--text-2); margin-bottom: 8px; }
.stat-value { font-size: 24px; font-weight: 600; }
.stat-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { background: #fafafa; padding: 12px 16px; text-align: left; font-weight: 600; color: var(--text-2); border-bottom: 1px solid var(--border-l); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid #f0f2f5; }
.table tbody tr:hover { background: #fafafa; }
.text-mono { font-family: Consolas, Monaco, monospace; }

/* 标签 */
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag-primary { background: #e6f4ff; color: var(--primary); }
.tag-success { background: #e7f8ee; color: var(--success); }
.tag-warning { background: #fff3e8; color: var(--warning); }
.tag-danger { background: #ffeceb; color: var(--danger); }
.tag-info { background: #f4f4f5; color: var(--text-3); }

/* 按钮 */
.btn { display: inline-flex; align-items: center; gap: 4px; padding: 8px 16px; border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: var(--radius); font-size: 13px; white-space: nowrap; }
.btn:hover { color: var(--primary); border-color: var(--primary); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-text { border: none; background: transparent; padding: 4px 8px; }
.btn-text.primary { color: var(--primary); }
.btn-text.danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 表单 */
.form-inline { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.form-group { display: flex; align-items: center; gap: 6px; }
.form-group label { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.input, .select { height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; outline: none; }
.input:focus { border-color: var(--primary); }
.input { width: 200px; }
.form-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.form-field { flex: 1; min-width: 200px; margin-bottom: 16px; }
.form-field label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-2); }
.form-field .input, .form-field .select, .form-field textarea { width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; outline: none; }
.form-field textarea { height: auto; padding: 8px 12px; min-height: 80px; resize: vertical; }

/* 分页 */
.pagination { display: flex; gap: 4px; justify-content: flex-end; align-items: center; margin-top: 16px; font-size: 13px; }
.pagination .pg-info { margin-right: 12px; color: var(--text-2); }
.pagination .btn { min-width: 32px; justify-content: center; }

/* 空状态 */
.empty { text-align: center; padding: 40px; color: var(--text-3); }
.empty-icon { font-size: 40px; margin-bottom: 8px; }
.loading { text-align: center; padding: 40px; color: var(--text-3); }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; display: none; align-items: center; justify-content: center; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 8px; width: 560px; max-width: 90vw; max-height: 85vh; overflow: hidden; display: flex; flex-direction: column; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border-l); display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-close { cursor: pointer; font-size: 20px; color: var(--text-3); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--border-l); text-align: right; }
.modal-footer .btn { margin-left: 8px; }

/* 勾选卡列表 */
.card-check-item { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--border-l); border-radius: var(--radius); margin-bottom: 12px; cursor: pointer; transition: all .2s; }
.card-check-item:hover { border-color: var(--primary); }
.card-check-item.checked { border-color: var(--primary); background: #f0f7ff; }
.card-check-item input[type="checkbox"] { width: 18px; height: 18px; }
.card-check-info { flex: 1; }
.card-check-iccid { font-family: Consolas, Monaco, monospace; font-size: 15px; font-weight: 600; }
.card-check-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }

/* 详情 */
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; }
.detail-item { display: flex; }
.detail-label { width: 110px; color: var(--text-2); flex-shrink: 0; }
.detail-value { color: var(--text); flex: 1; }

.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13px; }
.alert-info { background: #e6f4ff; color: var(--primary); }
.alert-warning { background: #fff7e8; color: var(--warning); }
.hidden { display: none !important; }
.mt16 { margin-top: 16px; }
.text-center { text-align: center; }
