/**
 * Domain Table Components v2.0
 * 域名表格、筛选器、分页器样式
 */

/* ---------- Domain Table Container ---------- */
.domain-app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.domain-app-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.domain-app-header .title-area h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.5rem;
}

.domain-app-header .title-area .update-info {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ---------- Toolbar ---------- */
.domain-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.toolbar-left {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.toolbar-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    min-width: 220px;
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--primary-color);
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1rem;
    padding: 0;
    line-height: 1;
}

.filter-select {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    background: #fff;
    outline: none;
    cursor: pointer;
}

.filter-select:focus {
    border-color: var(--primary-color);
}

/* ---------- Domain Table ---------- */
.domain-table-wrap {
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.domain-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 750px;
}

.domain-table th,
.domain-table td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.92rem;
}

.domain-table th {
    background: #f8fafc;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    color: var(--text-main);
    position: relative;
}

.domain-table th:hover {
    background: #f1f5f9;
}

.domain-table th .sort-indicator {
    margin-left: 4px;
    font-size: 0.8em;
}

.domain-table th.sort-asc .sort-indicator::after {
    content: ' ▲';
    color: var(--primary-color);
}

.domain-table th.sort-desc .sort-indicator::after {
    content: ' ▼';
    color: var(--primary-color);
}

.domain-table tbody tr:hover {
    background: #f8fafc;
}

.domain-table tbody tr:last-child td {
    border-bottom: none;
}

.domain-table .domain-name-cell {
    font-weight: 600;
    color: var(--text-main);
    word-break: break-all;
}

.domain-table .domain-name-cell a {
    color: var(--primary-color);
}

.domain-table .domain-name-cell a:hover {
    text-decoration: underline;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-pending { background: #fef3c7; color: #92400e; }
.status-prerelease { background: #dbeafe; color: #1e40af; }
.status-delete { background: #fee2e2; color: #991b1b; }
.status-redemption { background: #f3e8ff; color: #6b21a8; }
.status-expired { background: #e0f2fe; color: #0c4a6e; }
.status-buynow { background: #dcfce7; color: #166534; }

.price-cell {
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

.estimate-cell {
    font-weight: 500;
    white-space: nowrap;
}

.action-btns {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.action-btns .btn-sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.action-btns .btn-sm:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.action-btns .btn-sm.btn-primary-sm {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.action-btns .btn-sm.btn-faved {
    color: #e11d48;
    border-color: #e11d48;
}

/* ---------- Pagination ---------- */
.domain-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    padding: 1.5rem 0;
    flex-wrap: wrap;
}

.domain-pagination button,
.domain-pagination .page-num {
    padding: 0.5rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: all 0.15s;
    min-width: 40px;
    text-align: center;
}

.domain-pagination button:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.domain-pagination .page-num.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.domain-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.domain-pagination .page-info {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0 0.5rem;
}

/* ---------- Loading & Empty States ---------- */
.loading-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.loading-state .spinner {
    display: inline-block;
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 0.75rem;
}

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

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    opacity: 0.4;
}

.error-state {
    text-align: center;
    padding: 2rem;
    color: #991b1b;
    background: #fef2f2;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

/* ---------- Domain Detail Modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: #fff;
    border-radius: var(--radius-lg);
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
    margin: 0;
    word-break: break-all;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.92rem;
}

.modal-body .detail-label {
    color: var(--text-light);
}

.modal-body .detail-value {
    font-weight: 600;
}

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

/* ---------- Admin Panel: CSV Upload Zone ---------- */
.upload-zone {
    display: block; width: 100%; box-sizing: border-box;
    border: 2px dashed #ccc;
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    background: #fafafa;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.04);
}

.upload-zone .upload-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.upload-zone input[type="file"] {
    display: none;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 0.9rem;
    box-shadow: var(--shadow-md);
    animation: slideIn 0.3s ease;
    max-width: 380px;
}

.toast-success { background: #16a34a; }
.toast-error { background: #dc2626; }
.toast-info { background: var(--primary-color); }

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

/* ---------- Responsive ---------- */
/* ---------- Admin Panel Styles ---------- */
.admin-panel { max-width: 1440px; margin: 0 auto; padding: 1.5rem 1.5rem 2rem; display: flex; align-items: flex-start; gap: 1.5rem; }

/* Admin Sidebar Navigation */
.admin-sidenav {
    width: 208px; flex-shrink: 0; position: sticky; top: 1.25rem;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 0.7rem; display: flex; flex-direction: column; gap: 0.15rem;
    max-height: calc(100vh - 2.5rem); overflow-y: auto;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.admin-sidenav-title {
    font-size: 0.72rem; font-weight: 700; color: #6b7280; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 0.4rem 0.7rem 0.55rem;
    border-bottom: 1px solid #f1f5f9; margin-bottom: 0.35rem;
}
.admin-sidenav a {
    display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.7rem;
    border-radius: 8px; color: #475569; font-size: 0.88rem; font-weight: 500;
    text-decoration: none; transition: background 0.15s ease, color 0.15s ease;
    min-height: 40px;
}
.admin-sidenav a svg { flex-shrink: 0; opacity: 0.75; }
.admin-sidenav a:hover { background: rgba(79, 70, 229, 0.07); color: #4f46e5; }
.admin-sidenav a:focus-visible { outline: 2px solid #4f46e5; outline-offset: 1px; }
.admin-sidenav a.active { background: #4f46e5; color: #fff; font-weight: 600; }
.admin-sidenav a.active svg { opacity: 1; }
.admin-sidenav-foot {
    margin-top: 0.35rem; padding-top: 0.55rem; border-top: 1px solid #f1f5f9;
    display: flex; flex-direction: column; gap: 0.15rem;
}
.admin-main { flex: 1; min-width: 0; }

@media (max-width: 1024px) {
    .admin-panel { flex-direction: column; gap: 1rem; }
    .admin-sidenav {
        position: static; width: 100%; flex-direction: row; overflow-x: auto;
        max-height: none; -webkit-overflow-scrolling: touch; padding: 0.5rem;
    }
    .admin-sidenav-title, .admin-sidenav-foot { display: none; }
    .admin-sidenav a { white-space: nowrap; flex-shrink: 0; min-height: 40px; }
}

.panel-header-container { margin-bottom: 1.5rem; }
.panel-header-container h1 { margin: 0 0 0.25rem; font-size: 1.8rem; }
.panel-header-container p { color: #6b7280; margin: 0; font-size: 0.95rem; }

/* Status Bar */
.status-bar {
    display: flex; flex-wrap: wrap; gap: 1rem;
    padding: 1rem 1.5rem; background: #f0f9ff; border: 1px solid #bae6fd;
    border-radius: 8px; margin-bottom: 1.5rem;
}
.status-item { display: flex; flex-direction: column; gap: 0.2rem; min-width: 120px; }
.status-label { font-size: 0.75rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; }
.status-value { font-weight: 600; color: #0369a1; font-size: 0.9rem; }

/* Settings Grid */
.settings-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 2rem; }

/* Cards */
.setting-card { border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.setting-card.full-width { grid-column: 1 / -1; }
.setting-card.card-primary { border-color: #4f46e5; }
.card-title {
    font-size: 1.1rem; font-weight: 700; padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6; display: flex; align-items: center; gap: 0.5rem;
}
.card-title-bo {
    border-left: 4px solid #4f46e5;
    padding-left: calc(1.5rem - 4px);
}
.card-title-sell {
    border-left: 4px solid #059669;
    padding-left: calc(1.5rem - 4px);
}
.card-body { padding: 1.5rem; }

/* Download Strategies */
.download-strategies { display: flex; flex-direction: column; gap: 1rem; }
.strategy-card { border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.strategy-card.strategy-recommended { border-color: #f59e0b; background: #fffbeb; }
.strategy-head {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1rem 1.25rem; background: #f9fafb; border-bottom: 1px solid #e5e7eb;
}
.strategy-recommended .strategy-head { background: #fef3c7; }
.strategy-icon { font-size: 1.5rem; }
.strategy-head h4 { margin: 0 0 0.25rem; font-size: 1rem; }
.strategy-head p { margin: 0; font-size: 0.85rem; color: #6b7280; }
.strategy-body { padding: 1.25rem; }

.badge-recommend { display: inline-block; padding: 0.15rem 0.5rem; background: #f59e0b; color: #fff; border-radius: 4px; font-size: 0.75rem; }

/* Bookmarklet */
.bookmarklet-box { margin: 1rem 0; display: flex; align-items: center; }
.btn-bookmarklet {
    display: inline-block; padding: 0.6rem 1.25rem; background: #f59e0b; color: #fff;
    border-radius: 6px; font-weight: 600; text-decoration: none; cursor: grab;
    border: none; font-size: 0.95rem;
}
.btn-bookmarklet:hover { background: #d97706; }

/* Generic Buttons (Admin Panel) */
.btn { padding: 0.5rem 1rem; border: 1px solid #d1d5db; border-radius: 6px; cursor: pointer; font-size: 0.9rem; background: #fff; transition: all 0.15s; }
.btn:hover { background: #f9fafb; }
.btn-primary { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.btn-primary:hover { background: #4338ca; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }

/* File Table */
.file-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.file-table th { text-align: left; padding: 0.5rem; border-bottom: 2px solid #e5e7eb; background: #f9fafb; }
.file-table td { padding: 0.6rem 0.5rem; border-bottom: 1px solid #f3f4f6; }
.file-link { color: #4f46e5; text-decoration: none; font-family: monospace; }
.file-link:hover { text-decoration: underline; }

/* Form Elements */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.35rem; font-weight: 500; font-size: 0.9rem; }
.form-group input, .form-group select {
    width: 100%; padding: 0.5rem; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.9rem;
}
.form-group input:focus, .form-group select:focus { border-color: #4f46e5; outline: none; }
.form-row { display: flex; gap: 0.75rem; align-items: flex-end; }
.form-group.half { flex: 1; }
.form-group small { display: block; margin-top: 0.25rem; color: #6b7280; font-size: 0.8rem; }
.input-prefix { display: flex; align-items: center; }
.input-prefix .prefix { background: #f3f4f6; border: 1px solid #d1d5db; border-right: none; padding: 0.5rem 0.75rem; border-radius: 6px 0 0 6px; }
.input-prefix input { border-radius: 0 6px 6px 0; }

/* Progress Bar */
.progress-bar { height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; margin-bottom: 0.5rem; }
.progress-fill { height: 100%; background: #4f46e5; width: 0%; transition: width 0.3s; }
/* 冷却中脉冲动画 */
.progress-fill.cooling-down {
    background: #f59e0b;
    animation: cooling-pulse 1s ease-in-out infinite;
}
@keyframes cooling-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.btn-cooling {
    color: #d97706 !important;
    border-color: #f59e0b !important;
    background: #fffbeb !important;
    animation: cooling-pulse 1s ease-in-out infinite;
}

/* Log Viewer */
.log-actions { display: flex; gap: 0.5rem; margin-bottom: 0.75rem; }
.debug-log-box {
    background: #1e293b; color: #e2e8f0; padding: 1rem; border-radius: 6px;
    font-family: 'Consolas','Monaco',monospace; font-size: 0.78rem;
    max-height: 350px; overflow-y: auto; white-space: pre-wrap; word-break: break-all; line-height: 1.6;
    margin: 0;
}

/* Result Table */
.result-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 0.5rem; }
.result-table th { text-align: left; padding: 0.4rem; border-bottom: 1px solid #e5e7eb; }
.result-table td { padding: 0.4rem; border-bottom: 1px solid #f3f4f6; }
.result-success { color: #16a34a; }
.result-blocked { color: #f59e0b; }
.result-failed { color: #dc2626; }

.form-actions { text-align: center; margin-top: 2rem; grid-column: 1 / -1; }
.success-message { background: #d4edda; color: #155724; padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }

/* Sync Panel */
.sync-panel { display: flex; flex-direction: column; gap: 0.75rem; }
.sync-info ul { margin: 0.5rem 0; padding-left: 1.25rem; color: #374151; }
.sync-info li { margin-bottom: 0.25rem; font-size: 0.9rem; }
.sync-actions { margin-top: 0.5rem; }
.sync-icon { display: inline-block; transition: transform 0.3s; }
.btn-sync-now:active .sync-icon { transform: rotate(360deg); }

/* Sync Status Table */
.sync-status-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}
.sync-status-table th {
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-bottom: 2px solid #e5e7eb;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.sync-status-table td {
    padding: 0.65rem 0.6rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}
.sync-status-table tbody tr:hover {
    background: #f9fafb;
}
.sync-status-table tbody tr:last-child td {
    border-bottom: none;
}
.sync-type-icon { margin-right: 0.3rem; }
.sync-num { font-variant-numeric: tabular-nums; font-weight: 600; color: #1e293b; transition: color 0.2s; }
/* 加载中：小旋转圈 */
.sync-num.loading { opacity: 0.7; }
.sync-num.loading::after {
    content: '';
    display: inline-block;
    width: 8px; height: 8px;
    margin-left: 5px;
    border: 2px solid #e5e7eb;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: sync-spinner 0.6s linear infinite;
    vertical-align: middle;
    position: relative; top: -1px;
}
@keyframes sync-spinner {
    to { transform: rotate(360deg); }
}
/* 数值刷新闪烁 */
.sync-num.flash-update {
    animation: num-flash 0.5s ease-out;
}
@keyframes num-flash {
    0% { background-color: #fef3c7; color: #d97706; }
    100% { background-color: transparent; color: #1e293b; }
}
.sync-date-range { font-size: 0.82rem; color: #6b7280; }
.sync-last-time { font-size: 0.82rem; color: #6b7280; }
.sync-na { color: #d1d5db; font-style: italic; }
.sync-api-num { font-variant-numeric: tabular-nums; font-weight: 600; color: #6366f1; font-size: 0.85rem; }
.sync-behind { font-variant-numeric: tabular-nums; font-weight: 500; color: #d97706; font-size: 0.85rem; }
.sync-behind-days { font-size: 0.75rem; color: #6b7280; font-weight: 400; }
.sync-status-text { font-size: 0.82rem; color: #6b7280; }
.sync-date-btn.btn-continue { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.sync-date-btn.btn-sync { background: #dbeafe; border-color: #3b82f6; color: #1e40af; cursor: not-allowed; opacity: 0.8; }
.sync-date-btn.btn-synced {
    color: #9ca3af !important;
    border-color: #d1d5db !important;
    background: #f3f4f6 !important;
    cursor: not-allowed;
    opacity: 0.7;
}
.sync-status-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.sync-dot-ok { background: #22c55e; }
.sync-dot-busy { background: #f59e0b; animation: sync-pulse 1s infinite; }
.sync-dot-err { background: #ef4444; }
@keyframes sync-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.sync-type-btn { white-space: nowrap; }
.sync-type-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.sync-type-btn .sync-spinner {
    display: inline-block;
    animation: sync-spin 1s linear infinite;
}
@keyframes sync-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* 日期列表表格 */
.sync-date-table th:first-child,
.sync-date-table td:first-child { padding-left: 0; }
.sync-date-table th,
.sync-date-table td { padding: 0.35rem 0.75rem; white-space: nowrap; }
.sync-row-today { background: #fffbeb; }
.price-up { color:#dc2626; font-size:0.78rem; font-weight:600; margin-left:0.3rem; white-space:nowrap; }
.price-down { color:#16a34a; font-size:0.78rem; font-weight:600; margin-left:0.3rem; white-space:nowrap; }
.sync-today-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: #d97706;
    background: #fef3c7;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.3rem;
    vertical-align: middle;
}
/* Row active state during sync */
.sync-row-active { background: #fefce8 !important; }
.sync-row-active td { border-bottom-color: #fde68a; }
.sync-row-done td { border-bottom-color: #bbf7d0; }

.btn-ghost {
    background: none;
    border: 1px solid transparent;
    color: #6b7280;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-ghost:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    color: #374151;
}

/* Data Overview Grid */
.data-overview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.overview-card {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 1.25rem; text-align: center;
}
.overview-number { font-size: 1.5rem; font-weight: 700; color: #1e293b; }
.overview-label { font-size: 0.85rem; color: #64748b; margin-top: 0.25rem; }
.overview-desc { font-size: 0.75rem; color: #6b7280; margin-top: 0.15rem; }
.overview-date { font-size: 0.72rem; color: #64748b; margin-top: 0.4rem; padding-top: 0.4rem; border-top: 1px solid #e2e8f0; }

/* Data Management — List Layout */
.data-mgmt-section {
    padding: 0.75rem 0;
}
.data-mgmt-section-header {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.35rem 0; flex-wrap: wrap;
}
.data-mgmt-section-title {
    font-weight: 600; font-size: 0.95rem; color: #1e293b;
    min-width: 110px;
}
.data-mgmt-stat {
    font-size: 0.82rem; color: #64748b;
}
.data-mgmt-date-range {
    font-size: 0.82rem; color: #374151;
    font-family: Consolas, monospace;
}
.data-mgmt-divider {
    border: none; border-top: 1px solid #e2e8f0; margin: 0;
}
.mgmt-loading {
    display: inline-flex; align-items: center; gap: 0.4rem;
    font-size: 0.82rem; color: #6b7280;
}
.mgmt-loading::before {
    content: '';
    width: 12px; height: 12px;
    border: 2px solid #e5e7eb; border-top-color: #6366f1;
    border-radius: 50%; animation: sync-spinner 0.6s linear infinite;
    display: inline-block; flex-shrink: 0;
}
.data-mgmt-types {
    display: flex; flex-wrap: wrap; gap: 0.4rem;
    padding: 0.35rem 0;
}
.mgmt-type-item {
    display: inline-flex; align-items: center; gap: 0.3rem;
    background: #fff; border: 1px solid #e2e8f0; border-radius: 4px;
    padding: 0.25rem 0.5rem; font-size: 0.78rem;
}
.mgmt-type-label { color: #374151; font-weight: 500; }
.mgmt-type-count { color: #64748b; }
.mgmt-type-del {
    color: #dc2626; cursor: pointer; border: none; background: none;
    font-size: 0.7rem; padding: 0 0.15rem; line-height: 1;
}
.mgmt-type-del:hover { color: #b91c1c; }
.data-mgmt-actions { padding: 0.25rem 0; }
.data-mgmt-date-delete {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.mgmt-date-input {
    padding: 0.3rem; border: 1px solid #d1d5db; border-radius: 4px;
    font-size: 0.8rem; width: 130px;
}
.mgmt-preview { font-size: 0.78rem; color: #6b7280; padding: 0.15rem 0; }

/* Date rows */
.mgmt-date-row {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.35rem 0.5rem; border-bottom: 1px solid #f3f4f6;
    font-size: 0.85rem;
}
.mgmt-date-row:last-child { border-bottom: none; }
.mgmt-date-row-date { color: #374151; font-weight: 500; min-width: 7em; }
.mgmt-date-row-count { color: #6b7280; margin-left: 0.25rem; }
.mgmt-date-row-del {
    margin-left: auto; color: #dc2626; cursor: pointer;
    border: 1px solid #fca5a5; background: #fff;
    border-radius: 4px; font-size: 0.75rem; padding: 0.15rem 0.45rem;
    line-height: 1.4; transition: all 0.15s;
}
.mgmt-date-row-del:hover { background: #fef2f2; border-color: #f87171; }
.mgmt-del-sold { color: #6b7280; border-color: #d1d5db; }
.mgmt-del-sold:hover { background: #f3f4f6; border-color: #9ca3af; }
.btn-outline {
    color: #374151; border-color: #d1d5db; background: #fff;
    padding: 0.3rem 0.6rem; border-radius: 4px; font-size: 0.78rem;
    cursor: pointer; border-width: 1px; border-style: solid;
    transition: all 0.15s;
}
.btn-outline:hover { background: #f3f4f6; border-color: #9ca3af; }
.btn-outline:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-outline-danger {
    color: #dc2626; border-color: #fca5a5; background: #fff;
    padding: 0.3rem 0.6rem; border-radius: 4px; font-size: 0.78rem;
    cursor: pointer; border-width: 1px; border-style: solid;
}
.btn-outline-danger:hover { background: #fef2f2; }
.btn-outline-success {
    color: #16a34a; border-color: #86efac; background: #fff;
    padding: 0.3rem 0.6rem; border-radius: 4px; font-size: 0.78rem;
    cursor: pointer; border-width: 1px; border-style: solid;
}
.btn-outline-success:hover { background: #f0fdf4; }
.btn-outline-danger-light {
    color: #9ca3af; border-color: #e5e7eb; background: none;
    padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.75rem;
    cursor: pointer; border-width: 1px; border-style: solid;
}
.btn-outline-danger-light:hover { color: #dc2626; border-color: #fca5a5; background: #fef2f2; }

/* Recycle Section */
.recycle-summary {
    display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
    padding: 0.25rem 0;
}
.recycle-actions {
    display: flex; align-items: center; gap: 0.5rem;
    margin-left: auto;
}

/* Recycle Popup */
.recycle-filter-bar {
    display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem;
}
.recycle-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.5rem; border-bottom: 1px solid #f1f5f9;
    font-size: 0.82rem;
}
.recycle-item:hover { background: #f8fafc; }
.recycle-item input[type="checkbox"] { margin: 0; }
.recycle-domain { flex: 1; font-family: monospace; color: #1e293b; }
.recycle-table-tag {
    font-size: 0.7rem; padding: 0.1rem 0.35rem; border-radius: 3px;
    background: #e2e8f0; color: #475569;
}
.recycle-time { font-size: 0.75rem; color: #6b7280; }
.recycle-restore-btn {
    color: #16a34a; cursor: pointer; border: none; background: none;
    font-size: 0.75rem; padding: 0.15rem 0.3rem;
}
.recycle-restore-btn:hover { color: #15803d; text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .domain-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-left,
    .toolbar-right {
        justify-content: stretch;
    }

    .search-box input {
        min-width: 0;
        width: 100%;
    }

    .domain-pagination button,
    .domain-pagination .page-num {
        padding: 0.4rem 0.6rem;
        font-size: 0.82rem;
    }

    .form-row { flex-direction: column; }
}

/* ===== Detail Sections ===== */
.detail-section { margin-bottom: 1.25rem; }
.section-title { font-size: 0.95rem; margin: 0 0 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid #f1f5f9; }
.domain-info-section { background: #f8fafc; border-radius: 8px; padding: 1rem; margin-bottom: 1.25rem; }

/* ===== Upgrade Prompt Modal ===== */
.upgrade-prompt { text-align: center; padding: 1rem 0; }
.upgrade-prompt .upgrade-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.upgrade-prompt h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.upgrade-prompt > p { font-size: 0.88rem; color: #64748b; margin-bottom: 1.5rem; }
.pricing-options { display: flex; gap: 1rem; justify-content: center; margin-bottom: 1rem; }
.pricing-options .pricing-card {
    flex: 1; max-width: 200px; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 1.25rem 1rem; position: relative; background: #fff;
}
.pricing-options .pricing-card.recommended { border-color: #4f46e5; box-shadow: 0 0 0 1px #4f46e5; }
.pricing-options .pricing-card .badge {
    position: absolute; top: -0.5rem; right: 0.75rem;
    background: #4f46e5; color: #fff; font-size: 0.65rem;
    padding: 0.15rem 0.5rem; border-radius: 4px;
}
.pricing-options .pricing-card h4 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.pricing-options .pricing-card .price { font-size: 1.5rem; font-weight: 800; color: #4f46e5; }
.pricing-options .pricing-card p { font-size: 0.78rem; color: #6b7280; margin: 0.5rem 0; }
.pricing-options .pricing-card .btn { margin-top: 0.5rem; width: 100%; }
.upgrade-note { font-size: 0.8rem; color: #6b7280; }

/* ===== Trend Chart ===== */
.trend-chart-wrap { max-height: 250px; }
.trend-chart { width: 100%; height: 220px; }

/* ===== Domain Detail Modal Width ===== */
.domain-detail-modal { max-width: 600px; }

/* ===== Homepage Domain Showcase ===== */
.domain-showcase {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem; margin-top: 1.5rem;
}
.domain-card-simple {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 1.25rem; transition: all 0.2s;
}
.domain-card-simple:hover {
    border-color: #4f46e5; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.domain-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.domain-card-header .domain-name { margin: 0; font-size: 1.05rem; word-break: break-all; }
.domain-status {
    padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.72rem; font-weight: 600;
    background: #dbeafe; color: #1e40af; white-space: nowrap;
}
.domain-card-footer { display: flex; justify-content: space-between; align-items: center; }
.domain-card-footer .price { font-size: 1.1rem; font-weight: 700; color: #4f46e5; }

/* ===== Modal Buttons ===== */
.modal-footer .button { padding: 0.5rem 1.25rem; border-radius: 6px; font-size: 0.9rem; cursor: pointer; }
.button-primary { background: #4f46e5; color: #fff; border: none; }
.button-primary:hover { background: #4338ca; }
.button-secondary { background: #f1f5f9; color: #374151; border: 1px solid #e2e8f0; }
.button-secondary:hover { background: #e2e8f0; }

.spinner {
    display: inline-block; width: 28px; height: 28px;
    border: 3px solid #e2e8f0; border-top-color: #4f46e5;
    border-radius: 50%; animation: spin 0.8s linear infinite;
}

/* ===== Gname cha-wrap Filter Layout ===== */

.filter-panel-container {
    max-width: 1200px;
    margin: 1.2rem auto 0;
    padding: 0 1.5rem;
}

.filter-panel {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
}

/* ===== Tabs Nav ===== */
.tabs-nav {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tabs-ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
    align-items: center;
    flex-wrap: wrap;
}

.tabs-ul li {
    margin: 0;
    padding: 0;
}

.tabs-ul li.active {
    padding: 0.3rem 0.75rem;
    background: var(--primary-color);
    color: #fff;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: default;
}

.tabs-ul li.gdsx a {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    color: var(--primary-color);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 3px;
    transition: all 0.15s;
    white-space: nowrap;
}

.tabs-ul li.gdsx a:hover {
    border-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.04);
}

/* "更多" dropdown */
.sx-gd-trigger {
    position: relative;
}

.sx-gd-trigger > a {
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    color: #64748b;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.sx-gd-trigger > a:hover {
    color: var(--primary-color);
}

.sx-gd-trigger .arrow-down::after {
    content: '▼';
    font-size: 0.6rem;
    margin-left: 2px;
}

.sx-gd-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    list-style: none;
    margin: 4px 0 0;
    padding: 0.35rem 0;
    min-width: 130px;
}

.sx-gd-dropdown li {
    margin: 0;
    padding: 0;
}

.sx-gd-dropdown li a {
    display: block;
    padding: 0.35rem 1rem;
    font-size: 0.8rem;
    color: #374151;
    text-decoration: none;
}

.sx-gd-dropdown li a:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

/* Quick query + settings */
.tabs-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.diylist {
    position: relative;
    font-size: 0.82rem;
    color: var(--primary-color);
    cursor: pointer;
    white-space: nowrap;
}

.diylist1 {
    color: #64748b;
}

.diylist1:hover {
    color: var(--primary-color);
}

/* ===== Cha-box ===== */
.cha-box {
    padding: 0;
}

/* Cha list row */
.cha-list {
    display: flex;
    align-items: flex-start;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cha-list:last-of-type {
    border-bottom: none;
}

.cha-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    line-height: 28px;
    margin-right: 0.25rem;
}

.quick-wrap {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.picker-wrapper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.15s;
}

.picker-wrapper:focus-within {
    border-color: var(--primary-color);
}

.picker-wrapper.picker-large {
    min-width: 160px;
}

.picker-wrapper.picker-small {
    min-width: 80px;
}

.picker-wrapper textarea {
    width: 100%;
    min-width: 240px;
    padding: 0.35rem 0.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.82rem;
    outline: none;
    resize: vertical;
    min-height: 28px;
    line-height: 1.5;
    font-family: inherit;
    background: transparent;
}

.picker-wrapper input[type="text"],
.picker-wrapper input:not([type]) {
    width: 100%;
    min-width: 180px;
    padding: 0.35rem 0.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.82rem;
    outline: none;
    background: transparent;
}

.picker-select {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.82rem;
    background: #fff;
    outline: none;
    cursor: pointer;
    min-height: 28px;
}

.picker-trigger {
    width: 100%;
    padding: 0.35rem 0.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.82rem;
    background: transparent;
    color: #374151;
    cursor: pointer;
    text-align: left;
    min-height: 28px;
}

.picker-trigger:hover {
    color: var(--primary-color);
}

.filter-tld-tags,
.filter-year-tags {
    display: none;
}

.cd-line {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0 0.25rem;
}

/* "更多"展开按钮 */
.cha-more,
.cha-more1 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 1rem;
    color: #94a3b8;
    cursor: pointer;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    transition: all 0.15s;
    user-select: none;
    line-height: 1;
}

.cha-more:hover,
.cha-more1:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.quick-cha-more {
    padding: 0.5rem 0 0.25rem 4rem;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.quick-cha-more.hide {
    display: none;
}

.visibilityH {
    visibility: hidden;
}

.hide {
    display: none;
}

/* ===== Gname-style Checkbox ===== */
.jp-checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.8rem;
    color: #374151;
    cursor: pointer;
    user-select: none;
    margin-right: 0.4rem;
    white-space: nowrap;
}

.jp-checkbox {
    position: relative;
    display: inline-flex;
    width: 14px;
    height: 14px;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
}

.jp-checkbox:hover {
    border-color: var(--primary-color);
}

.jp-checkbox.active {
    border-color: var(--primary-color);
}

.jp-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 1;
    margin: 0;
}

.jp-checkbox .jp-checkbox-inner {
    width: 8px;
    height: 8px;
    border-radius: 1px;
    transition: all 0.15s;
    opacity: 0;
}

.jp-checkbox input[type="checkbox"]:checked + .jp-checkbox-inner {
    background: var(--primary-color);
    opacity: 1;
}

.jp-checkbox.active .jp-checkbox-inner {
    background: var(--primary-color);
    opacity: 1;
}

/* ===== Buttons in Action Row ===== */
.cha-submit {
    display: inline-flex;
    margin-left: 0.5rem;
}

.cha-submit .btn-query {
    padding: 0.45rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
}

.cha-reset {
    display: inline-flex;
    margin-left: 0.35rem;
}

.cha-reset .btn-reset {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
}

.btn-save-settings.diyset {
    font-size: 0.82rem;
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 0.75rem;
    cursor: pointer;
    white-space: nowrap;
}

.btn-save-settings.diyset:hover {
    text-decoration: underline;
}

/* ===== Attribute Grid ===== */
.attr-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.5rem;
    align-items: center;
}

.attr-grid .jp-checkbox-wrapper {
    margin-right: 0;
}

.attr-grid .jp-checkbox-wrapper b {
    font-weight: 500;
}

.attr-grid .jp-checkbox-wrapper:hover b {
    color: var(--primary-color);
}

/* Inline threshold picker (Gname checked_sc pattern) */
.attr-grid .jm-picker {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--primary-color);
    margin-left: 0.15rem;
}

.attr-grid .jm-picker .jm-picker-select {
    border: 1px solid var(--primary-color);
    border-radius: 3px;
    padding: 0.1rem 0.2rem;
    font-size: 0.72rem;
    background: #fff;
    color: var(--primary-color);
    outline: none;
    cursor: pointer;
    max-width: 60px;
}

.attr-grid .jm-picker .jm-picker-label {
    font-weight: 600;
    color: var(--primary-color);
}

.attr-grid .jp-checkbox-wrapper.checked_sc {
    background: rgba(79, 70, 229, 0.06);
    border-radius: 4px;
    padding: 0.1rem 0.3rem;
}

/* Exclude mode dropdown */
.filter-exclude-mode {
    min-width: 130px;
}

/* ===== Summary Bar ===== */
.filter-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 1rem;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    gap: 0.5rem;
}

.summary-text {
    color: #64748b;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-label {
    color: #374151;
    font-weight: 600;
}

.summary-clear-link {
    color: var(--primary-color);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
}

.summary-clear-link:hover {
    text-decoration: underline;
}

/* ===== Popup Overlays ===== */
.filter-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.filter-popup-panel {
    background: #fff;
    border-radius: 8px;
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.popup-year-panel { max-width: 440px; }
.popup-advanced-panel { max-width: 400px; }

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

.popup-header h4 { margin: 0; font-size: 1rem; }

.popup-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
    line-height: 1;
}

.popup-body {
    padding: 1rem 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.popup-footer {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
}

.popup-footer .btn {
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
}

.popup-footer .btn-primary {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.popup-footer .btn-primary:hover { background: #4338ca; }

/* TLD groups */
.popup-group { margin-bottom: 0.6rem; }

.popup-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.3rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid #f1f5f9;
}

.popup-group-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.5rem;
}

/* Custom input in popup */
.popup-custom-input {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

/* ===== Dropdown Panels (inline, not modal) ===== */
.dropdown-wrapper {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 2000;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    min-width: 420px;
    max-height: 60vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dropdown-year-panel {
    min-width: 340px;
}

.dropdown-body {
    padding: 0.85rem 1rem;
    overflow-y: auto;
    flex: 1;
    max-height: 380px;
}

/* "不限" button at top of TLD dropdown */
.dropdown-footer {
    display: flex;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--border-color);
    justify-content: flex-end;
}

.dropdown-footer .btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
}

.dropdown-footer .btn-primary {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.dropdown-footer .btn-primary:hover { background: #4338ca; }

/* Year buttons inside dropdown */
.dropdown-years {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}


/* Custom input row inside dropdown */
.dropdown-custom-input { margin-top: 0.75rem; }
.dropdown-custom-input label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.3rem;
}
.dropdown-custom-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}
.dropdown-custom-row input[type="text"],
.dropdown-custom-row input[type="number"] {
    flex: 1;
    padding: 0.35rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.82rem;
    outline: none;
    box-sizing: border-box;
}
.dropdown-custom-row input:focus { border-color: var(--primary-color); }
.dropdown-custom-row .btn { white-space: nowrap; }

/* Responsive: on mobile, dropdown stretches to full width */
@media (max-width: 768px) {
    .dropdown-panel {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 90vw;
        max-height: 80vh;
        box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    }
    .dropdown-years { grid-template-columns: repeat(4, 1fr); }
}

.popup-custom-input label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.3rem;
}

.popup-custom-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.popup-custom-row input[type="text"],
.popup-custom-row input[type="number"] {
    flex: 1;
    padding: 0.35rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.82rem;
    outline: none;
    box-sizing: border-box;
}

.popup-custom-row input[type="text"]:focus,
.popup-custom-row input[type="number"]:focus {
    border-color: var(--primary-color);
}

.popup-custom-row .btn {
    padding: 0.35rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.8rem;
    background: #fff;
    cursor: pointer;
    white-space: nowrap;
}

.popup-custom-row .btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Advanced rows */
.popup-adv-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.popup-adv-row label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    min-width: 80px;
}

.popup-adv-row select {
    flex: 1;
    padding: 0.35rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.82rem;
    background: #fff;
    outline: none;
}

.popup-adv-row select:focus { border-color: var(--primary-color); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .filter-panel-container { padding: 0 0.75rem; }

    .tabs-nav { flex-direction: column; align-items: flex-start; }
    .tabs-actions { margin-left: 0; width: 100%; justify-content: space-between; }

    .cha-list { flex-direction: column; padding: 0.5rem 0.75rem; }
    .quick-wrap { flex-direction: column; align-items: flex-start; width: 100%; }
    .picker-wrapper.picker-large,
    .picker-wrapper textarea { min-width: 100%; width: 100%; }
    .picker-wrapper input[type="text"] { min-width: 100%; }

    .quick-cha-more { padding-left: 0; }

    .filter-popup-panel { max-width: 95vw; }

    .filter-summary-bar { flex-direction: column; align-items: flex-start; gap: 0.3rem; }

    .attr-grid { justify-content: flex-start; }
}

/* ---------- Delete Progress (数字文本) ---------- */
.namedd-progress-wrap {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: #1e293b;
    color: #fff;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    font-size: 13px;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
}
.namedd-progress-text {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.namedd-progress-actions {
    display: flex;
    gap: 10px;
}
.namedd-progress-actions a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.15s;
}
.namedd-progress-actions a:hover { color: #fff; }
.namedd-progress-actions .prog-cancel { color: #fca5a5; }
.namedd-progress-actions .prog-cancel:hover { color: #fef2f2; }

/* ===== 日期选择弹窗 ===== */
.sync-date-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    width: 440px;
    max-width: 92vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}
.sync-date-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}
.sync-date-popup-header #sdp-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
}
.popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.popup-close:hover { color: #374151; }
.sync-date-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    max-height: 50vh;
}
.sync-date-popup-footer {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    justify-content: flex-end;
}
/* Date items */
.sdp-summary {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
    line-height: 1.6;
}
.sdp-summary-row {
    color: #374151;
}
.sdp-summary-row strong {
    color: #0369a1;
}
.sdp-date-list {
    max-height: 340px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}
.sdp-date-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 0.85rem;
}
.sdp-date-item:hover { background: #f9fafb; }
.sdp-date-item:last-child { border-bottom: none; }
.sdp-checkbox {
    width: 15px;
    height: 15px;
    accent-color: #4f46e5;
    cursor: pointer;
    flex-shrink: 0;
}
.sdp-date-label {
    font-weight: 600;
    color: #374151;
    min-width: 6em;
}
.sdp-count {
    font-variant-numeric: tabular-nums;
    color: #6b7280;
    font-size: 0.82rem;
    margin-left: auto;
}
.sdp-count-zero { color: #d1d5db; }
.sdp-count-est { color: #f59e0b; font-style: italic; }
.sdp-status-tag {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}
.sdp-tag-synced { background: #dcfce7; color: #166534; }
.sdp-tag-gap { background: #fef3c7; color: #92400e; }
.sdp-tag-pending { background: #dbeafe; color: #1e40af; }
.sdp-select-actions {
    padding: 0.5rem 0.5rem 0.25rem;
    border-top: 1px solid #f3f4f6;
    margin-top: 0.25rem;
}
.sdp-select-all {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #6b7280;
    cursor: pointer;
}
.sdp-select-all input[type="checkbox"] {
    width: 14px;
}

/* Sync date popup indicator dots (replacing emoji icons) */
.sdp-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}
.sdp-indicator-synced { background: #16a34a; }
.sdp-indicator-gap { background: #f59e0b; }
.sdp-indicator-pending { background: #3b82f6; }

/* ===== Watch / Fav Button ===== */
.btn-watch {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 14px;
    line-height: 1.4;
    color: #94a3b8;
    transition: all 0.15s;
}
.btn-watch:hover { border-color: #f59e0b; color: #f59e0b; background: #fffbeb; }
.btn-watch.watched { color: #f59e0b; border-color: #f59e0b; background: #fffbeb; }

/* ===== 统一下拉按钮样式 ===== */
.dropdown-years { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.3rem; margin-bottom: 0.75rem; }
.dropdown-compose-body, .tld-btn-grid { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.dropdown-compose-panel { min-width: 320px; }
.dropdown-expdays-panel { min-width: 200px; }

/* 所有按钮统一基础样式 */
.dropdown-year-btn, .dropdown-tld-btn, .dropdown-compose-btn,
.dropdown-expdays-btn {
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.78rem;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
    color: #374151;
    outline: none;
}
.dropdown-year-btn:hover, .dropdown-tld-btn:hover, .dropdown-compose-btn:hover,
.dropdown-expdays-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.dropdown-year-btn.active, .dropdown-tld-btn.active, .dropdown-compose-btn.active,
.dropdown-expdays-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* 网格按钮（年份/TLD/构成） */
.dropdown-year-btn { padding: 0.35rem 0.3rem; text-align: center; }
.dropdown-tld-btn { padding: 0.3rem 0.55rem; text-align: center; min-width: 48px; }
.dropdown-compose-btn { padding: 0.3rem 0.55rem; text-align: center; }

/* 列表按钮（到期） */
.dropdown-expdays-btn {
    display: block;
    width: 100%;
    padding: 0.4rem 0.75rem;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    text-align: left;
    font-size: 0.82rem;
}
.dropdown-expdays-btn:first-child { border-radius: 4px 4px 0 0; }
.dropdown-expdays-btn:last-child { border-bottom: none; border-radius: 0 0 4px 4px; }
.dropdown-expdays-btn:hover { background: #f5f3ff; }
.dropdown-expdays-btn.active { font-weight: 600; }

/* ===== 紧凑筛选行 ===== */
.filter-row-compact { white-space: nowrap; }
.filter-row-compact .quick-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-row-compact .cha-title {
    flex-shrink: 0;
}
.filter-row-compact .dropdown-wrapper {
    display: inline-block;
    vertical-align: middle;
}
.filter-row-compact .filter-price-inp {
    width: 70px;
    padding: 4px 6px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.82rem;
    height: 30px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s;
}
.filter-row-compact .filter-price-inp:focus {
    border-color: var(--primary-color);
}
.filter-row-compact .cd-line {
    flex-shrink: 0;
    color: #6b7280;
}

/* ===== TLD 按钮网格（替代勾选框） ===== */
.tld-btn-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.dropdown-tld-btn {
    padding: 0.3rem 0.55rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.78rem;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    color: #374151;
    min-width: 48px;
}
.dropdown-tld-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.dropdown-tld-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ===== 域名构成按钮网格 ===== */
.dropdown-compose-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.85rem 1rem;
}

/* ===== popup-group (TLD 分组标题) ===== */
.popup-group-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.4rem;
    margin-top: 0.6rem;
}
.popup-group-title:first-child {
    margin-top: 0;
}

/* ===== Domain Tags ===== */
.domain-tag {
    display: inline-block;
    padding: 0 6px;
    line-height: 1.6;
    border-radius: 3px;
    font-size: 0.7rem;
    background: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
    margin-right: 2px;
    white-space: nowrap;
}
.domain-tag[title] {
    cursor: help;
    border-bottom: 1px dotted #93c5fd;
}
.domain-tag.tag-more {
    background: #f1f5f9;
    color: #64748b;
    border-color: #e2e8f0;
    font-size: 0.65rem;
}

/* ===== Lexicon Admin Styles ===== */
.lex-cat-item:hover {
    background: #f0f9ff;
}
.cat-root {
    font-weight: 600;
    color: #1e293b;
}
.tree-line {
    display: inline-block;
    width: 16px;
    height: 1.2em;
    vertical-align: middle;
}
.tree-branch {
    display: inline-block;
    width: 12px;
    height: 1.2em;
    vertical-align: middle;
    border-left: 1.5px solid #cbd5e1;
    margin-right: 2px;
}
.tree-corner {
    display: inline-block;
    width: 12px;
    height: 1.2em;
    vertical-align: middle;
    border-left: 1.5px solid #cbd5e1;
    border-bottom: 1.5px solid #cbd5e1;
    margin-bottom: -1px;
    margin-right: 2px;
}
.tree-label {
    vertical-align: middle;
}
.page-btn {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.82rem;
    color: #374151;
    background: #fff;
    user-select: none;
    line-height: 1.5;
}
.page-btn:hover:not(.page-disabled):not(.page-active) {
    background: #f3f4f6;
}
.page-active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}
.page-disabled {
    color: #d1d5db;
    cursor: default;
}
#lexicon-word-table th {
    font-size: 0.78rem;
    white-space: nowrap;
}
#lexicon-word-table td {
    vertical-align: middle;
}

/* ===== 分类树 - 现代样式 ===== */
.cat-root {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    transition: background 0.12s;
    font-size: 0.85rem;
    border-radius: 4px 4px 0 0;
}
.cat-root:hover { background: #f9fafb; }
.cat-root.active {
    background: #eff6ff;
    font-weight: 700;
    border-left: 3px solid #2563eb;
    padding-left: calc(0.75rem - 3px);
}
.cat-tree-sortable, .cat-tree-sortable ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.cat-tree-sortable ul { padding-left: 18px; }
.cat-tree-sortable li {
    margin: 0;
}

.cat-item {
    display: flex;
    align-items: center;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    font-size: 0.82rem;
    white-space: nowrap;
    border-radius: 4px;
    transition: background 0.12s;
    gap: 0.25rem;
    user-select: none;
}
.cat-item:hover { background: #f9fafb; }
li.active > .cat-item,
.cat-item.active {
    background: #eff6ff;
    font-weight: 700;
    border-left: 3px solid #2563eb;
    padding-left: calc(0.5rem - 3px);
}
.cat-item.active .cat-name {
    color: #1d4ed8;
}

.drag-handle {
    cursor: grab;
    color: #d1d5db;
    font-size: 0.85rem;
    flex-shrink: 0;
    padding: 0 0.15rem;
    user-select: none;
    line-height: 1;
}
.drag-handle:hover { color: #6b7280; }
.cat-item:active .drag-handle { cursor: grabbing; }

.cat-icon { flex-shrink: 0; margin-right: 0.1rem; }
.cat-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cat-count {
    color: #6b7280;
    font-size: 0.72rem;
    flex-shrink: 0;
    margin-right: 0.25rem;
}

.cat-actions {
    display: none;
    flex-shrink: 0;
    gap: 0.1rem;
    align-items: center;
}
.cat-item:hover .cat-actions { display: inline-flex; }

.cat-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 0.2rem;
    font-size: 0.78rem;
    opacity: 0.45;
    transition: opacity 0.12s;
    line-height: 1;
    border-radius: 3px;
}
.cat-action-btn:hover {
    opacity: 1;
    background: #f3f4f6;
}
.cat-action-btn.btn-del:hover {
    color: #ef4444;
    background: #fef2f2;
}

.cat-inline-edit-input {
    border: 1px solid #2563eb;
    border-radius: 3px;
    padding: 0.1rem 0.3rem;
    font-size: 0.82rem;
    min-width: 50px;
    outline: none;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
    background: #fff;
}

/* SortableJS visual states */
.sortable-ghost {
    opacity: 0.35;
    background: #e5e7eb !important;
    border-radius: 4px;
}
.sortable-chosen {
    background: #f0f9ff !important;
}
.sortable-drag {
    opacity: 0.9;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    border-radius: 4px;
}
.nmr-save-filter-overlay{position:fixed;inset:0;z-index:10000;display:flex;align-items:center;justify-content:center;padding:1rem;background:rgba(15,23,42,.55)}
.nmr-save-filter-dialog{width:min(420px,100%);padding:1.5rem;border-radius:12px;background:#fff;box-shadow:0 20px 60px rgba(15,23,42,.25)}
.nmr-save-filter-dialog h3{margin:0 0 1rem}.nmr-save-filter-dialog label{display:block;color:#334155;font-weight:600}
.nmr-save-filter-name{box-sizing:border-box;width:100%;margin-top:.5rem;padding:.7rem .8rem;border:1px solid #cbd5e1;border-radius:7px;font-size:1rem}
.nmr-save-filter-error{min-height:1.4rem;padding-top:.4rem;color:#dc2626;font-size:.85rem}
.nmr-save-filter-actions{display:flex;justify-content:flex-end;gap:.6rem;margin-top:.8rem}

/* Nameremind UI pass: shared surfaces and mobile admin layout */
html, body { max-width:100%; overflow-x:hidden; }
.admin-panel, .filter-panel-container, .domain-table-wrap, .uc-wrap { min-width:0; }
.admin-main > *, .filter-panel > *, .uc-main > * { min-width:0; }
.admin-main table, .filter-panel table, .uc-main table { max-width:100%; }
.status-bar { box-shadow:0 5px 18px rgba(37,55,87,.05); }
.setting-card, .tool-card, .domain-table-wrap { box-shadow:0 4px 16px rgba(37,55,87,.045); }
.domain-table thead th { background:#f8f9fc; color:#566176; }
.domain-table tbody tr:hover { background:#f7f8ff; }
.btn, .button, .btn-primary, .button-primary { min-height:40px; }
@media (max-width:1024px) {
    .admin-panel { padding:1rem .85rem 1.5rem; gap:.85rem; }
    .admin-sidenav { position:sticky; top:.5rem; z-index:5; padding:.4rem; gap:.25rem; border-radius:10px; box-shadow:0 4px 14px rgba(15,23,42,.08); scrollbar-width:none; }
    .admin-sidenav::-webkit-scrollbar { display:none; }
    .admin-sidenav a { min-height:42px; padding:.55rem .7rem; }
    .admin-main { width:100%; }
    .panel-header-container h1 { font-size:1.35rem; line-height:1.3; }
    .panel-header-container p { font-size:.84rem; line-height:1.5; }
    .status-bar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; padding:.85rem; margin-bottom:1rem; }
    .status-item { min-width:0; }
    .status-value { overflow-wrap:anywhere; }
    .card-body { padding:1rem; }
    .card-title { padding:.85rem 1rem; font-size:1rem; }
    .sync-status-table { min-width:620px; }
}
@media (max-width:600px) {
    .admin-panel { padding:.75rem .65rem 1.25rem; }
    .admin-sidenav a { font-size:.78rem; gap:.35rem; }
    .admin-sidenav a svg { width:16px; height:16px; }
    .status-cards { grid-template-columns:1fr !important; gap:.65rem !important; }
    .status-cards > * { grid-column:auto !important; }
    .sync-actions, .form-actions, .log-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
    .sync-actions .btn, .form-actions .btn, .log-actions .btn { flex:1 1 145px; min-height:42px; }
    .domain-toolbar, .toolbar-left, .toolbar-right { flex-wrap:wrap; gap:.5rem; }
    .domain-pagination { flex-wrap:wrap; justify-content:center; gap:.3rem; }
    .domain-pagination .page-info { width:100%; text-align:center; order:-1; }
    .filter-panel-container { padding:0 .65rem; }
    .filter-panel { padding:.85rem; }
    .tabs-nav { gap:.35rem; }
    .tabs-nav > * { min-height:40px; }
    .modal-content { width:calc(100vw - 1.25rem); max-height:calc(100vh - 1.25rem); overflow-y:auto; }
    .pricing-options { flex-direction:column; align-items:stretch; }
    .pricing-options .pricing-card { max-width:none; }
}
@media (max-width:480px) {
    .status-bar { grid-template-columns:1fr; }
    .status-item { padding-bottom:.55rem; border-bottom:1px solid rgba(186,230,253,.7); }
    .status-item:last-child { padding-bottom:0; border-bottom:0; }
    .sync-date-table th, .sync-date-table td { padding:.4rem .55rem; }
}
