/* 全国车牌查询 - 工具专属样式（通用布局/卡片/按钮等由 common.css 提供） */

/* ============ 错误提示 ============ */
.error-msg {
    margin-top: 4px;
    padding: 10px 14px;
    background: #fee2e2;
    border: 1.5px solid #fca5a5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #dc2626;
}

.error-icon {
    font-size: 16px;
}

/* ============ 查询结果 ============ */
.result-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f3e8ff;
}

.result-item:last-child {
    border-bottom: none;
}

.item-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    min-width: 88px;
}

.item-value {
    font-size: 16px;
    font-weight: 600;
    color: #6b21a8;
}

/* ============ 省份结果 ============ */
.province-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3e8ff;
}

.province-name {
    font-size: 20px;
    font-weight: 600;
    color: #6b21a8;
}

.province-code {
    font-size: 24px;
    font-weight: 700;
    color: #7c3aed;
    background: #f3e8ff;
    padding: 4px 12px;
    border-radius: 8px;
}

.cities-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.city-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.city-code {
    font-size: 16px;
    font-weight: 600;
    color: #6b21a8;
    min-width: 50px;
}

.city-name {
    font-size: 14px;
    color: #374151;
}

/* ============ 省份简称快捷选择 ============ */
.province-selector {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e9d5ff;
}

.province-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.province-row:last-child {
    margin-bottom: 0;
}

.province-btn {
    padding: 6px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

.province-btn:hover {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.province-btn.active {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #8b5cf6, #6b21a8);
    color: white;
}

/* ============ 空状态 ============ */
.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-title {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 6px;
}

.empty-sub {
    font-size: 13px;
    color: #9ca3af;
}

/* ============ 全国车牌对照表 ============ */
.plate-table-wrapper {
    overflow-x: auto;
}

.plate-table {
    width: 100%;
    border-collapse: collapse;
}

.plate-table thead th {
    color: #6b21a8;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 2px solid #e9d5ff;
    white-space: nowrap;
}

.plate-table tbody tr {
    border-bottom: 1px solid #f3e8ff;
    transition: background-color 0.2s;
}

.plate-table tbody tr:hover {
    background-color: #faf5ff;
}

.plate-table tbody td {
    padding: 12px 15px;
    font-size: 14px;
    vertical-align: top;
}

.plate-table .province-code {
    font-size: 18px;
    font-weight: 700;
    color: #6b21a8;
    min-width: 60px;
}

.plate-table .province-name {
    font-weight: 500;
    color: #374151;
    min-width: 100px;
}

.plate-table .cities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.plate-table .city-tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #6b21a8;
    background: #f3e8ff;
    white-space: nowrap;
}

/* ============ 车牌号码规则 ============ */
.rule-title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
}

.rule-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.rule-part {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 18px;
    font-weight: 700;
}

.rule-province {
    background: #f3e8ff;
    border: 1.5px solid #e9d5ff;
    color: #6b21a8;
}

.rule-letter {
    background: #dbeafe;
    border: 1.5px solid #bfdbfe;
    color: #1d4ed8;
}

.rule-serial {
    background: #f9fafb;
    border: 1.5px dashed #d1d5db;
    color: #374151;
    letter-spacing: 2px;
}

.rule-list {
    margin: 0 0 12px;
    padding-left: 20px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.9;
}

.rule-list strong {
    color: #374151;
}

.rule-note {
    margin: 0;
    font-size: 13px;
    color: #9ca3af;
}

/* ============ 对照表交互 ============ */
.plate-row {
    cursor: pointer;
}

.table-hint {
    margin-top: 12px;
    font-size: 12px;
    color: #9ca3af;
}

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

/* ============ 深色模式适配 ============ */
body.dark .error-msg {
    background: #450a0a;
    border-color: #7f1d1d;
    color: #fca5a5;
}

body.dark .item-label,
body.dark .empty-title {
    color: #9ca3af;
}

body.dark .item-value,
body.dark .province-name {
    color: #c4b5fd;
}

body.dark .province-code {
    color: #c4b5fd;
    background: #2e1065;
}

body.dark .city-item {
    background: #1f2937;
    border-color: #374151;
}

body.dark .city-code {
    color: #c4b5fd;
}

body.dark .city-name {
    color: #d1d5db;
}

body.dark .province-btn {
    background: #1f2937;
    border-color: #374151;
    color: #e5e7eb;
}

body.dark .plate-table thead th {
    color: #c4b5fd;
    border-bottom-color: #4c1d95;
}

body.dark .plate-table tbody tr {
    border-bottom-color: #312e81;
}

body.dark .plate-table tbody tr:hover {
    background-color: #2e1065;
}

body.dark .plate-table .province-name,
body.dark .plate-table tbody td {
    color: #d1d5db;
}

body.dark .plate-table .province-code {
    color: #c4b5fd;
}

body.dark .plate-table .city-tag {
    color: #c4b5fd;
    background: #2e1065;
}

body.dark .rule-title {
    color: #e5e7eb;
}

body.dark .rule-list {
    color: #9ca3af;
}

body.dark .rule-list strong {
    color: #e5e7eb;
}

body.dark .rule-province {
    background: #2e1065;
    border-color: #4c1d95;
    color: #c4b5fd;
}

body.dark .rule-letter {
    background: #1e3a8a;
    border-color: #1e40af;
    color: #93c5fd;
}

body.dark .rule-serial {
    background: #1f2937;
    border-color: #4b5563;
    color: #d1d5db;
}

body.dark .rule-note,
body.dark .table-hint {
    color: #9ca3af;
}
