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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f1117;
    color: #e1e4e8;
    min-height: 100vh;
}

header {
    background: linear-gradient(135deg, #161b22 0%, #1c2333 100%);
    border-bottom: 1px solid #30363d;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 { font-size: 1.5rem; color: #f0f6fc; }
.subtitle { color: #8b949e; margin-top: 4px; font-size: 0.9rem; }
.subtitle strong { color: #58a6ff; }

.stats {
    display: flex;
    gap: 16px;
}

.stat-card {
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 10px 16px;
    text-align: center;
    min-width: 90px;
}

.stat-card .number {
    font-size: 1.4rem;
    font-weight: 700;
    color: #f0f6fc;
}

.stat-card .label {
    font-size: 0.7rem;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toolbar {
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #21262d;
    flex-wrap: wrap;
    gap: 12px;
}

.filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

input[type="text"], select {
    background: #21262d;
    border: 1px solid #30363d;
    color: #e1e4e8;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
}

input[type="text"]:focus, select:focus {
    outline: none;
    border-color: #58a6ff;
}

#search { width: 240px; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #8b949e;
    cursor: pointer;
}

.checkbox-label:hover { color: #e1e4e8; }

.actions { display: flex; gap: 8px; }

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #30363d;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-primary {
    background: #238636;
    color: #fff;
    border-color: #2ea043;
}

.btn-primary:hover { background: #2ea043; }

.btn-secondary {
    background: #21262d;
    color: #e1e4e8;
}

.btn-secondary:hover { background: #30363d; }

.btn-danger {
    background: #da3633;
    color: #fff;
    border-color: #f85149;
}

.btn-danger:hover { background: #f85149; }

.btn-sm { padding: 4px 10px; font-size: 0.8rem; }

.table-container {
    overflow-x: auto;
    padding: 0 24px 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

th {
    background: #161b22;
    color: #8b949e;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #30363d;
    position: sticky;
    top: 0;
}

th.sortable { cursor: pointer; }
th.sortable:hover { color: #e1e4e8; }

td {
    padding: 10px 12px;
    border-bottom: 1px solid #21262d;
    font-size: 0.9rem;
    vertical-align: top;
}

tr:hover td { background: #161b22; }

tr.has-target td { border-left: 3px solid #238636; }

a { color: #58a6ff; text-decoration: none; }
a:hover { text-decoration: underline; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 1px 2px;
}

.badge-gpu {
    background: #1f2937;
    color: #93c5fd;
    border: 1px solid #374151;
}

.badge-target {
    background: #064e3b;
    color: #6ee7b7;
    border: 1px solid #065f46;
}

.badge-vm {
    background: #1e1b4b;
    color: #a5b4fc;
    border: 1px solid #312e81;
}

.badge-container {
    background: #172554;
    color: #93c5fd;
    border: 1px solid #1e3a5f;
}

.badge-bare-metal {
    background: #422006;
    color: #fdba74;
    border: 1px solid #78350f;
}

.checkbox-row {
    display: flex;
    gap: 16px;
    padding: 6px 0;
}

/* Provider type badges */
/* Notes column */
.notes-cell { min-width: 180px; max-width: 280px; }

.notes-display {
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    line-height: 1.3;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 60px;
    overflow: hidden;
}

.notes-display:hover { background: #21262d; }

.notes-placeholder {
    color: #484f58;
    font-style: italic;
}

.notes-input {
    width: 100%;
    min-height: 60px;
    background: #0d1117;
    border: 1px solid #58a6ff;
    color: #e1e4e8;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    line-height: 1.3;
    resize: vertical;
}

.notes-input:focus { outline: none; border-color: #58a6ff; box-shadow: 0 0 0 2px rgba(88,166,255,0.2); }

.ptype-infra { background: #064e3b; color: #6ee7b7; border: 1px solid #065f46; }
.ptype-hyper { background: #312e81; color: #c4b5fd; border: 1px solid #4338ca; }
.ptype-agg { background: #78350f; color: #fcd34d; border: 1px solid #92400e; }
.ptype-serverless { background: #1e3a5f; color: #93c5fd; border: 1px solid #1e40af; }
.ptype-decentral { background: #3b0764; color: #d8b4fe; border: 1px solid #581c87; }
.ptype-unknown { background: #1f2937; color: #6b7280; border: 1px solid #374151; }

.tri-state {
    font-size: 1.1rem;
    text-align: center;
}

.tri-yes { color: #3fb950; }
.tri-no { color: #f85149; }
.tri-unknown { color: #484f58; }

/* Status badges */
.status-select {
    background: transparent;
    border: 1px solid #30363d;
    color: #e1e4e8;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    cursor: pointer;
}

.status-not_contacted { border-color: #484f58; color: #8b949e; }
.status-contacted { border-color: #d29922; color: #e3b341; }
.status-responded { border-color: #3fb950; color: #56d364; }
.status-meeting_scheduled { border-color: #58a6ff; color: #79c0ff; }
.status-declined { border-color: #f85149; color: #ff7b72; }
.status-customer { border-color: #a371f7; color: #bc8cff; }

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 100;
    justify-content: center;
    align-items: flex-start;
    padding-top: 60px;
}

.modal-overlay.active { display: flex; }

.modal {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    width: 640px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #30363d;
}

.modal-header h2 { font-size: 1.1rem; }

.btn-close {
    background: none;
    border: none;
    color: #8b949e;
    font-size: 1.5rem;
    cursor: pointer;
}

.btn-close:hover { color: #e1e4e8; }

.modal-body { padding: 20px; }

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #30363d;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    color: #8b949e;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: #0d1117;
    border: 1px solid #30363d;
    color: #e1e4e8;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
}

.form-group textarea { min-height: 80px; resize: vertical; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

/* Scrape Panel */
.scrape-panel {
    margin: 0 24px;
    padding: 16px;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
}

.scrape-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.scrape-controls h3 {
    font-size: 0.95rem;
    color: #e1e4e8;
}

.scrape-buttons {
    display: flex;
    gap: 8px;
}

.scrape-table {
    width: 100%;
    font-size: 0.85rem;
}

.scrape-table th {
    background: #0d1117;
    font-size: 0.7rem;
}

.scrape-table td {
    padding: 6px 10px;
}

.scrape-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.scrape-running { background: #1a3a5c; color: #58a6ff; }
.scrape-success { background: #0d3320; color: #3fb950; }
.scrape-failed { background: #3d1a1a; color: #f85149; }
.scrape-pending { background: #2d2006; color: #d29922; }
.scrape-error { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #f85149; font-size: 0.8rem; }
.scrape-status-msg { color: #d29922; font-size: 0.85rem; padding: 8px 0; }
.scrape-empty { color: #484f58; font-size: 0.85rem; }
