* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.container { max-width: 100%; margin: 0 auto; padding: 0 20px; }
.main { padding: 20px; }

/* Header */
.header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    min-height: 56px;
    gap: 16px;
    position: relative;
}
.logo {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 17px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    justify-self: start;
}
.nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    justify-self: center;
}
.nav-link {
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color .2s;
    white-space: nowrap;
}
.nav-link:hover,
.nav-link.active { color: #fff; }
.nav-link.active { position: relative; }
.nav-link.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    background: #4a6cf7;
    border-radius: 1px;
}
.user {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,.75);
    font-size: 14px;
    justify-self: end;
}
.btn-header-logout {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.25);
    color: #fff;
}
.btn-header-logout:hover {
    background: rgba(255,255,255,.2);
    border-color: rgba(255,255,255,.35);
}
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    justify-self: end;
}
.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
    transition: transform .25s, opacity .25s;
}
.nav-user-mobile { display: none; }

@media (max-width: 900px) {
    .header-inner {
        grid-template-columns: 1fr auto;
        padding: 10px 0;
    }
    .nav-toggle { display: flex; }
    .user-desktop { display: none; }
    .nav {
        display: none;
        grid-column: 1 / -1;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(0,0,0,.15);
        border-radius: 10px;
        overflow: hidden;
        margin-top: 4px;
    }
    .header.nav-open .nav { display: flex; }
    .nav-link {
        font-size: 16px;
        padding: 14px 16px;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }
    .nav-link:last-of-type { border-bottom: none; }
    .nav-link.active::after { display: none; }
    .nav-link.active { background: rgba(74,108,247,.25); }
    .nav-user-mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 16px;
        border-top: 1px solid rgba(255,255,255,.12);
        background: rgba(0,0,0,.1);
    }
    .nav-username { font-size: 14px; color: rgba(255,255,255,.8); }
    .btn-nav-logout {
        background: rgba(255,255,255,.15);
        border-color: rgba(255,255,255,.3);
        color: #fff;
    }
    .header.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .header.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
    .header.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Typography */
h1 { font-size: 24px; font-weight: 700; color: #1a1a2e; }
h2 { font-size: 16px; font-weight: 600; color: #333; }

.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-header h1 { margin-bottom: 0; }
.page-actions { display: flex; gap: 10px; align-items: center; }
.section-header { display: flex; align-items: center; gap: 12px; margin: 28px 0 16px; flex-wrap: wrap; }
.section-header h2 { margin: 0; font-size: 18px; }
.section-header-scan { justify-content: space-between; align-items: flex-start; }
.section-header-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.section-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.scan-actions-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.batch-toolbar {
    background: #f0f4ff;
    border: 1px solid #c5d4fc;
    border-radius: 10px;
    padding: 8px 12px;
    flex-shrink: 1;
    min-width: 0;
}
.batch-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    color: #4a6cf7;
    background: #f0f4ff;
    border: 1px solid #c5d4fc;
    transition: all .15s;
}
.filter-pill:hover {
    background: #e0e9ff;
    border-color: #4a6cf7;
}
.filter-pill.active {
    background: #4a6cf7;
    color: #fff;
    border-color: #4a6cf7;
}
.filter-pill-clear {
    color: #888;
    background: #f5f5f5;
    border-color: #e0e0e0;
}
.filter-pill-clear:hover {
    color: #666;
    background: #eee;
}

.stats-scan { align-items: stretch; }
.stat-card-filter {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s, transform .15s;
}
.stat-card-filter:hover {
    border-color: #4a6cf7;
    box-shadow: 0 2px 8px rgba(74,108,247,.15);
}
.stat-card-filter.active {
    border-color: #4a6cf7;
    background: #f0f4ff;
    box-shadow: 0 0 0 2px rgba(74,108,247,.15);
}
.stat-card-filter.active .stat-num { color: #4a6cf7; }
.stat-card-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100px;
}
.stat-card-clear .stat-label { margin-top: 0; color: #666; }
.result-card-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.batch-count {
    font-size: 13px;
    font-weight: 600;
    color: #4a6cf7;
    white-space: nowrap;
    flex-shrink: 0;
}
.batch-note { width: 140px; min-width: 100px; flex-shrink: 1; }
.batch-select-all {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 10px;
}
.batch-select-all-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    user-select: none;
}
.batch-item-check {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 4px;
    font-size: 12px;
    color: #888;
    cursor: pointer;
    user-select: none;
}
.batch-item-check input,
.batch-select-all-label input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #4a6cf7;
}
.batch-item-check-text { white-space: nowrap; }

/* Cards */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
    border: 1px solid #eef0f3;
}
.card-form .card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f2f5;
}
.card-icon { font-size: 20px; width: 36px; height: 36px; background: #f0f4ff; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.card-title h2 { margin: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* Forms */
.form-styled .form-group { margin-bottom: 16px; }
.form-styled label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: #555; }
.form-styled input[type=text],
.form-styled input[type=url],
.form-styled input[type=number],
.form-styled input[type=password],
.form-styled select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dde1e6;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fafbfc;
    transition: border-color .2s, box-shadow .2s;
}
.form-styled input:focus,
.form-styled select:focus {
    outline: none;
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74,108,247,.12);
    background: #fff;
}
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-row .flex-2 { flex: 2; }
.form-row .flex-1 { flex: 1; }
.form-compact { margin-bottom: 16px; }
.required { color: #e74c3c; }
.field-hint { display: block; font-size: 12px; color: #999; margin-top: 4px; }
.hint-text { font-size: 13px; color: #999; }

/* Switch — 参照 Element 风格：关=白底灰字，开=绿底白字 */
.switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #606266;
    padding: 6px 0;
    vertical-align: middle;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.switch-track {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 22px;
    border-radius: 11px;
    background: #fff;
    border: 1px solid #dcdfe6;
    transition: background .25s, border-color .25s;
    flex-shrink: 0;
    vertical-align: middle;
}
.switch-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #dcdfe6;
    transition: transform .25s, background .25s;
    box-shadow: 0 1px 3px rgba(0,0,0,.12);
    z-index: 2;
}
.switch-text-on,
.switch-text-off {
    position: absolute;
    top: 0;
    height: 20px;
    line-height: 20px;
    font-size: 12px;
    font-weight: 500;
    pointer-events: none;
    transition: opacity .2s;
}
.switch-text-on {
    left: 8px;
    color: #fff;
    opacity: 0;
}
.switch-text-off {
    right: 6px;
    color: #909399;
    opacity: 1;
}
/* 开启状态 */
.switch input:checked + .switch-track {
    background: #13ce66;
    border-color: #13ce66;
}
.switch input:checked + .switch-track .switch-knob {
    transform: translateX(34px);
    background: #fff;
}
.switch input:checked + .switch-track .switch-text-on { opacity: 1; }
.switch input:checked + .switch-track .switch-text-off { opacity: 0; }
.switch-label { line-height: 1.5; color: #303133; }
.switch-lg .switch-track { width: 60px; height: 24px; border-radius: 12px; }
.switch-lg .switch-knob { width: 18px; height: 18px; top: 2px; left: 2px; }
.switch-lg input:checked + .switch-track .switch-knob { transform: translateX(36px); }
.switch-lg .switch-text-on,
.switch-lg .switch-text-off { line-height: 22px; height: 22px; font-size: 12px; }

.form-options {
    margin: 16px 0 20px;
}
.form-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
}
.form-option-item {
    display: flex;
    align-items: center;
    min-height: 36px;
}
.form-options .switch,
.form-option-item .switch { display: flex; align-items: center; width: 100%; }
@media (max-width: 768px) {
    .form-options-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; gap: 0; }
}
.modal-body .switch { margin-bottom: 10px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1px solid #dde1e6;
    border-radius: 8px;
    background: #fff;
    color: #444;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}
.btn:hover { background: #f5f7fa; border-color: #c8cdd4; }
.btn-primary { background: #4a6cf7; color: #fff; border-color: #4a6cf7; }
.btn-primary:hover { background: #3a5ce5; border-color: #3a5ce5; }
.btn-outline { background: #fff; border-color: #4a6cf7; color: #4a6cf7; }
.btn-outline:hover { background: #f0f4ff; }
.btn-danger { color: #e74c3c; border-color: #f5c6c3; }
.btn-danger:hover { background: #fdf0ef; }
.btn:disabled,
.btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    background: #f0f2f5;
    color: #aaa;
    border-color: #e4e7ed;
}
.btn-primary:disabled,
.btn-primary[disabled] { background: #a8b8f8; border-color: #a8b8f8; color: #fff; }
.btn-outline:disabled,
.btn-outline[disabled] { background: #fafbfc; color: #bbb; border-color: #e4e7ed; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-xs { padding: 6px 10px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn-icon { font-size: 16px; }
.inline-form { display: inline; }

/* Category list */
.category-list { margin-top: 16px; border-top: 1px solid #f0f2f5; padding-top: 12px; }
.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background .15s;
}
.category-item:hover { background: #f8f9fb; }
.category-name { font-weight: 500; flex: 1; }
.category-meta { font-size: 12px; color: #999; }
.category-actions { display: flex; gap: 6px; }

/* Help panel */
.help-panel {
    background: #f8f9fc;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
}
.help-title { font-size: 14px; font-weight: 600; color: #555; margin-bottom: 14px; }
.help-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 768px) { .help-grid { grid-template-columns: 1fr; } }
.help-item {
    background: #fff;
    border-radius: 8px;
    padding: 14px 16px;
    border: 1px solid #eef0f3;
}
.help-item strong { display: block; font-size: 14px; color: #333; margin-bottom: 6px; }
.help-item p { font-size: 13px; color: #666; margin-bottom: 4px; line-height: 1.5; }
.help-example { color: #888 !important; font-size: 12px !important; }
.help-item code { background: #f0f2f5; padding: 1px 6px; border-radius: 4px; font-size: 12px; color: #c0392b; }

/* Tables */
.table-wrap { border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); border: 1px solid #eef0f3; }
.table {
    width: 100%;
    background: #fff;
    border-collapse: collapse;
    font-size: 14px;
}
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #f0f2f5; }
.table th { background: #fafbfc; font-weight: 600; color: #666; font-size: 13px; }
.table-hover tbody tr:hover { background: #f8f9fc; }
.table tr:last-child td { border-bottom: none; }
.url-cell { max-width: 280px; word-break: break-all; }
.url-cell a { color: #4a6cf7; text-decoration: none; }
.url-cell a:hover { text-decoration: underline; }
.context-cell { max-width: 280px; font-size: 13px; color: #666; }
.site-link { color: #333; font-weight: 500; text-decoration: none; }
.site-link:hover { color: #4a6cf7; }
.text-muted { color: #999; font-size: 13px; }

/* Tags & badges */
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.tag-info { background: #e8f0fe; color: #3367d6; }
.tag-default { background: #f0f2f5; color: #666; }
.tag-success { background: #e8f8f0; color: #1a7a42; }
.tag-warning { background: #fff8e6; color: #b8860b; }
.tag-danger { background: #fde8e8; color: #c0392b; }
.badge { background: #f0f2f5; color: #666; padding: 4px 12px; border-radius: 20px; font-size: 12px; }
.word-tag { font-weight: 600; color: #c0392b; }
.risk-badge { background: #fde8e8; color: #c0392b; padding: 2px 10px; border-radius: 12px; font-weight: 600; font-size: 13px; }
.safe-badge { color: #1a7a42; font-size: 13px; }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.status-on { background: #2ecc71; }
.status-off { background: #ccc; }

/* Stats */
.stats { display: flex; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px 24px;
    min-width: 160px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    border: 1px solid #eef0f3;
}
.stat-num { font-size: 28px; font-weight: 700; color: #1a1a2e; }
.stat-num.danger { color: #e74c3c; }
.stat-label { font-size: 13px; color: #888; margin-top: 4px; }
.stat-sub { font-size: 12px; color: #aaa; margin-top: 2px; }

/* Modal */
.modal { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.modal-box {
    position: relative;
    background: #fff;
    border-radius: 14px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    animation: modalIn .25s ease;
}
.modal-sm { max-width: 400px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: none; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid #f0f2f5; }
.modal-header h3 { font-size: 16px; margin: 0; }
.modal-close { background: none; border: none; font-size: 24px; color: #999; cursor: pointer; line-height: 1; }
.modal-close:hover { color: #333; }
.modal-body { padding: 20px 24px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid #f0f2f5; }

/* Upload zone */
.upload-zone { position: relative; margin-bottom: 16px; }
.upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px 20px;
    border: 2px dashed #dde1e6;
    border-radius: 10px;
    background: #fafbfc;
    text-align: center;
    font-size: 14px;
    color: #666;
    transition: border-color .2s, background .2s;
}
.upload-zone:hover .upload-label { border-color: #4a6cf7; background: #f0f4ff; }
.upload-icon { font-size: 32px; }
.upload-hint { font-size: 12px; color: #999; }
.import-format { background: #f8f9fc; border-radius: 8px; padding: 14px; margin-bottom: 16px; font-size: 13px; }
.format-table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 12px; }
.format-table th, .format-table td { padding: 6px 10px; border: 1px solid #e8ecf1; text-align: left; }
.format-table th { background: #eef0f3; }

/* Auth pages */
.body-auth { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); min-height: 100vh; }
.body-auth .main { max-width: none; padding: 0; }
.auth-page { min-height: calc(100vh - 48px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 880px;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,.35);
}
@media (max-width: 768px) { .auth-card { grid-template-columns: 1fr; } }
.auth-brand {
    background: linear-gradient(160deg, #4a6cf7, #6c5ce7);
    color: #fff;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.auth-logo {
    width: 56px; height: 56px;
    background: rgba(255,255,255,.2);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 800; margin-bottom: 20px;
}
.auth-brand h1 { color: #fff; font-size: 22px; margin-bottom: 8px; }
.auth-brand p { color: rgba(255,255,255,.85); font-size: 14px; }
.auth-form-wrap { padding: 48px 40px; }
.auth-form-wrap h2 { font-size: 22px; margin-bottom: 28px; color: #1a1a2e; }
.auth-link { text-align: center; margin-top: 20px; font-size: 14px; color: #666; }
.auth-link a { color: #4a6cf7; font-weight: 500; text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }
.btn-lg { padding: 12px 24px; font-size: 16px; }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding: 14px 18px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #eef0f3;
}
.pagination-info { font-size: 13px; color: #888; }
.pagination-links { display: flex; gap: 6px; flex-wrap: wrap; }
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #444;
    text-decoration: none;
    border: 1px solid #dde1e6;
    background: #fff;
    transition: all .15s;
}
a.page-link:hover { background: #f0f4ff; border-color: #4a6cf7; color: #4a6cf7; }
.page-link.active { background: #4a6cf7; color: #fff; border-color: #4a6cf7; font-weight: 600; }
.page-link.disabled { color: #ccc; border-color: #eee; background: #fafafa; cursor: default; }

/* Scan results extras */
.hit-line { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed #eee; }
.hit-line:last-child { border-bottom: none; margin-bottom: 0; }
.ai-tag { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 4px; font-size: 11px; }
.ai-risk { background: #fde8e8; color: #c0392b; }
.ai-safe { background: #e8f8f0; color: #1a7a42; }
.status-badge { padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.status-open { background: #fff3cd; color: #856404; }
.status-resolved { background: #d4edda; color: #155724; }
.status-confirmed { background: #e2e3e5; color: #383d41; }
.status-false_positive { background: #f8f9fa; color: #6c757d; }
.resolve-form-inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.resolve-note { width: 100px; padding: 8px 8px; font-size: 12px; border: 1px solid #ddd; border-radius: 4px; }
.mt-20 { margin-top: 20px; }
.page-header .btn-sm { flex-shrink: 0; }

/* 扫描结果卡片 */
.result-list { display: flex; flex-direction: column; gap: 14px; }
.result-card {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.result-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}
.result-url-wrap { flex: 1; min-width: 0; }
.result-site { display: block; font-size: 12px; color: #909399; margin-bottom: 4px; }
.result-url {
    display: block;
    font-size: 14px;
    color: #4a6cf7;
    word-break: break-all;
    text-decoration: none;
    line-height: 1.4;
}
.result-url:hover { text-decoration: underline; }
.result-words { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.result-context {
    font-size: 13px;
    color: #606266;
    line-height: 1.6;
    background: #f8f9fc;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    max-height: 4.8em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.result-ai { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.result-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}
.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f0f2f5;
}
.stats-compact .stat-card { min-width: 120px; padding: 12px 18px; text-decoration: none;}

/* Legacy auth-box */
.auth-box {
    max-width: 400px;
    margin: 80px auto;
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

/* Alerts & empty */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-success { background: #e8f8f0; color: #1a7a42; border: 1px solid #b8e6cc; }
.alert-error { background: #fdf0ef; color: #c0392b; border: 1px solid #f5c6c3; }
.alert-warning { background: #fff8e6; color: #8a6d00; border: 1px solid #ffe9a8; }
.empty { padding: 48px 20px; text-align: center; color: #999; background: #fff; border-radius: 12px; border: 1px solid #eef0f3; }
.empty-icon { font-size: 40px; margin-bottom: 12px; }
.danger { color: #e74c3c; font-weight: 600; }

/* Legacy compat */
.actions { display: flex; gap: 8px; }
.action-bar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 24px;
    margin-bottom: 20px;
}
@media (max-width: 768px) { .action-bar { grid-template-columns: 1fr; } }
.action-item .inline-form { margin-bottom: 8px; }
.action-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
    margin: 0;
    max-width: 420px;
}
.action-item-danger .action-desc { color: #c0392b; opacity: 0.75; }

/* Data panels */
.panel {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eef0f3;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
    margin-bottom: 24px;
    overflow: hidden;
}
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #f0f2f5;
    background: #fafbfc;
}
.panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.panel-title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
}
.panel-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4ff;
    border-radius: 8px;
    font-size: 16px;
}
.panel .table-wrap {
    border: none;
    border-radius: 0;
    box-shadow: none;
}
.panel .table-wrap-flat { margin: 0; }
.panel .empty-panel {
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
}
.empty-panel {
    padding: 56px 24px;
    text-align: center;
    color: #999;
    background: #fff;
}
.empty-panel .empty-icon { font-size: 44px; margin-bottom: 14px; opacity: .7; }
.empty-panel p { font-size: 15px; color: #666; margin-bottom: 6px; }
.cell-id { font-weight: 600; color: #888; font-size: 13px; }

.form-group { margin-bottom: 14px; }
.form-inline { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
