:root {
    --bg-deep: #09090b;
    --bg-navy: #0f172a;
    --bg-card: #111114;
    --border: #334155;
    --text-white: #f8fafc;
    --text-zinc: #94a3b8;
    --blue-600: #2563eb;
    --blue-500: #3b82f6;
    --blue-400: #60a5fa;
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-white);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Unified Layout Framework */
.dashboard-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-viewport {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-image: radial-gradient(circle at top left, var(--bg-navy) 0%, var(--bg-deep) 100%);
}

.top-bar {
    height: 64px;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 40px;
    z-index: 100;
}

.scroll-surface {
    flex: 1;
    padding: 40px;
}

/* Modular Form Layout (Top Filter Bar) */
.filter-bar-horizontal {
    background: #111114;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 32px;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.filter-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.label-mini {
    font-size: 0.625rem;
    font-weight: 800;
    color: var(--text-zinc);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.input-select, .input-text {
    background: #1c1c21;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 0.8125rem;
    outline: none;
    transition: all 0.2s;
}

.input-select:focus, .input-text:focus {
    border-color: var(--blue-500);
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-500) 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #1c1c21;
    color: var(--text-zinc);
    border: 1px solid var(--border);
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secondary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-search {
    background: var(--blue-600);
    color: white;
    font-weight: 600;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8125rem;
    align-self: flex-end;
}

/* Refined Table Data Point */
.intelligence-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.intelligence-table th {
    background: #1c1c21;
    text-align: left;
    padding: 10px 16px;
    font-size: 0.6875rem;
    font-weight: 800;
    color: var(--text-zinc);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.intelligence-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.8125rem;
    vertical-align: top;
}

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

.intelligence-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges & Tags */
.chip-blue {
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue-400);
    font-size: 0.625rem;
    font-weight: 700;
    border: 1px solid rgba(59, 130, 246, 0.2);
    display: inline-block;
    margin-right: 4px;
    margin-bottom: 4px;
}

.chip-zinc {
    padding: 2px 6px;
    border-radius: 4px;
    background: #2d2d33;
    color: var(--text-zinc);
    font-size: 0.625rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.chip-scale {
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    color: #e2e8f0;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.chip-scale:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.badge-source {
    font-size: 0.625rem;
    font-weight: 800;
    color: #4b5563;
    text-transform: uppercase;
}

.domain-pill {
    font-size: 0.875rem;
    color: var(--text-zinc);
    font-weight: 600;
    transition: all 0.2s ease;
}

.domain-pill:hover {
    color: var(--blue-400);
}

/* Flash Messages / Alerts */
.alert-container {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert {
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid transparent;
    animation: alert-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
}

@keyframes alert-slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--blue-400);
    border-color: rgba(59, 130, 246, 0.2);
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    opacity: 0.6;
}

.alert-close:hover {
    background: rgba(255, 255, 255, 0.05);
    opacity: 1;
}

/* Pagination Styles */
.pagination-container {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pagination-info {
    font-size: 0.75rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-nav {
    height: 36px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #1c1c21;
    border: 1px solid var(--border);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-nav:hover {
    background: #27272a;
    border-color: #3f3f46;
}

.btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-active {
    width: 36px;
    height: 36px;
    background: var(--blue-600);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 800;
    color: white;
}

.jump-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

.input-jump {
    width: 60px;
    height: 36px;
    background: #1c1c21;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 8px;
    color: white;
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
    outline: none;
    transition: all 0.2s;
}

.input-jump:focus {
    border-color: var(--blue-500);
    background: #27272a;
}

/* Chrome, Safari, Edge, Opera */
.input-jump::-webkit-outer-spin-button,
.input-jump::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.input-jump[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}
