/* ===================================================================
 * IP库 (IP Library) - Dashboard Styles
 * =================================================================== */

/* ---------- 统计卡片 ---------- */
.ip-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.ip-stat-card {
    background: var(--card-bg, rgba(255,255,255,0.04));
    border: 1px solid var(--border-light, rgba(255,255,255,0.06));
    border-radius: 14px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.ip-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(102,126,234,0.15);
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.ip-stat-num {
    font-size: 28px;
    font-weight: 700;
    color: #e2e8f0;
    line-height: 1.2;
}
.ip-stat-label {
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

/* ---------- 分布卡片 ---------- */
.ip-dist-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.ip-dist-card {
    background: var(--card-bg, rgba(255,255,255,0.04));
    border: 1px solid var(--border-light, rgba(255,255,255,0.06));
    border-radius: 14px;
    padding: 18px 22px;
}
.ip-dist-title {
    font-size: 14px;
    font-weight: 600;
    color: #ccc;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ip-dist-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ip-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 13px;
    color: #ccc;
    white-space: nowrap;
}
.ip-tag b {
    font-weight: 600;
    color: #a5b4fc;
    margin-left: 2px;
}
.ip-tag-empty {
    color: #666;
    font-size: 13px;
}
.ip-flag {
    font-size: 16px;
}

/* ---------- 筛选栏 ---------- */
.ip-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    align-items: center;
}
.ip-search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.ip-search-input:focus {
    border-color: rgba(102,126,234,0.55);
}
.ip-filter-select {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    min-width: 130px;
}
.ip-filter-select option {
    background: #1a1a2e;
    color: #e2e8f0;
}
.ip-btn {
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.ip-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}
.ip-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.ip-btn-secondary {
    background: rgba(255,255,255,0.08);
    color: #ccc;
    border: 1px solid rgba(255,255,255,0.1);
}
.ip-btn-secondary:hover {
    background: rgba(255,255,255,0.12);
}

/* ---------- 表格 ---------- */
.ip-table-wrap {
    overflow-x: auto;
}
.ip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.ip-table thead th {
    text-align: left;
    padding: 12px 14px;
    color: #888;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: nowrap;
    position: sticky;
    top: 0;
    background: #121214;
}
.ip-table tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: #ccc;
}
.ip-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}
.ip-table tbody code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
    color: #a5b4fc;
    background: rgba(102,126,234,0.1);
    padding: 2px 8px;
    border-radius: 4px;
}
.ip-lang-badge {
    display: inline-block;
    background: rgba(102,126,234,0.15);
    color: #a5b4fc;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}
.ip-col-ref, .ip-col-ua {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ip-col-time {
    white-space: nowrap;
    font-size: 12px;
    color: #888;
}

/* ---------- 分页 ---------- */
.ip-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.ip-pager-btn {
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.ip-pager-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.1);
    border-color: rgba(102,126,234,0.4);
}
.ip-pager-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.ip-pager-info {
    font-size: 13px;
    color: #777;
}

/* ---------- 加载/空态 ---------- */
.ip-loading {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 14px;
}
.ip-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 15px;
}
