/* ============================================
   CONCEPT 04 — "Terminal"
   Palette: Dark UI, Electric Amber, Slate
   Dense, utilitarian, dashboard-like
   ============================================ */

:root {
    --bg: #0d1117;
    --bg-elevated: #161b22;
    --bg-surface: #21262d;
    --border: #30363d;
    --border-light: #21262d;
    --text: #c9d1d9;
    --text-muted: #8b949e;
    --text-dim: #484f58;
    --amber: #e3b341;
    --amber-dim: #7d5c1e;
    --green: #3fb950;
    --red: #f85149;
    --blue: #58a6ff;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius: 6px;
    --transition: 0.12s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* App Layout */
.app {
    display: grid;
    grid-template-columns: 200px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    background: var(--bg-elevated);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.brand-mark {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--bg);
    background: var(--amber);
    padding: 3px 6px;
    border-radius: 4px;
}

.brand-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.logo-img {
    max-height: 40px;
    width: auto;
    height: 33px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 8px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--text-muted);
    transition: all var(--transition);
    position: relative;
}

.nav-item:hover {
    background: var(--bg-surface);
    color: var(--text);
}

.nav-item.active {
    background: var(--bg-surface);
    color: var(--text);
    font-weight: 500;
}

.nav-icon {
    font-family: var(--font-mono);
    font-size: 12px;
    width: 18px;
    text-align: center;
    color: var(--text-dim);
}

.nav-item.active .nav-icon { color: var(--amber); }

.nav-count {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--bg);
    background: var(--amber);
    padding: 1px 6px;
    border-radius: 10px;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px 0;
    border-top: 1px solid var(--border);
    margin-top: auto;
    font-size: 11px;
    color: var(--text-muted);
}

.status-dot {
    width: 6px; height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-time {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
}

/* Main */
.main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
}

.breadcrumb span:first-child { color: var(--amber); font-weight: 600; }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.meta {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
}

.btn-sm {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--amber);
    padding: 4px 10px;
    border: 1px solid var(--amber-dim);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.btn-sm:hover {
    background: var(--amber-dim);
    color: var(--text);
}

/* Hero */
.hero-terminal {
    padding: 28px 20px 20px;
    border-bottom: 1px solid var(--border);
}

.hero-terminal h1 {
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.hero-terminal p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 10px;
}

.btn-main {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    background: var(--amber);
    color: var(--bg);
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: opacity var(--transition);
}

.btn-main:hover { opacity: 0.9; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-ghost:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

/* Section */
.data-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.section-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-header-compact h2 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.filters {
    display: flex;
    gap: 4px;
}

.filter-btn {
    padding: 4px 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-btn:hover { border-color: var(--text-muted); }

.filter-btn.active {
    background: var(--bg-surface);
    color: var(--text);
    border-color: var(--border);
}

/* Data Grid */
.data-grid {
    display: grid;
    grid-template-columns: 1fr 1.8fr;
    gap: 16px;
    align-items: start;
}

.map-panel {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-image {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Table */
.table-panel {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table thead {
    background: var(--bg-elevated);
}

.data-table th {
    padding: 8px 10px;
    text-align: left;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-muted);
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-elevated);
}

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

.data-table strong {
    color: var(--text);
    font-weight: 600;
}

.mono {
    font-family: var(--font-mono);
}

.ask {
    color: var(--amber);
    font-weight: 600;
}

.pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--bg-surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.pill-hot {
    background: rgba(248,81,73,0.15);
    color: var(--red);
    border-color: rgba(248,81,73,0.3);
}

.pill-new {
    background: rgba(63,185,80,0.15);
    color: var(--green);
    border-color: rgba(63,185,80,0.3);
}

/* Services */
.services-dense {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.svc-row {
    display: grid;
    grid-template-columns: 40px 180px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-elevated);
    transition: background var(--transition);
}

.svc-row:hover { background: var(--bg-surface); }

.svc-num {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
}

.svc-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.svc-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Split */
.split-dense {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.split-col {
    padding: 20px;
    background: var(--bg-elevated);
}

.split-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}

.split-label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--amber);
    background: var(--amber-dim);
    padding: 2px 6px;
    border-radius: 3px;
}

.split-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.dense-list {
    list-style: none;
    margin-bottom: 16px;
}

.dense-list li {
    font-size: 12px;
    color: var(--text-muted);
    padding: 4px 0;
    padding-left: 14px;
    position: relative;
}

.dense-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--amber);
    font-family: var(--font-mono);
    font-size: 10px;
}

/* Stats */
.stats-dense {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border-bottom: 1px solid var(--border);
}

.stat-item {
    padding: 14px 20px;
    background: var(--bg-elevated);
    text-align: center;
}

.stat-val {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--amber);
    display: block;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-lbl {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Feedback */
.feedback-dense {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.feedback-dense blockquote {
    padding: 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-left: 2px solid var(--amber);
}

.feedback-dense blockquote p {
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.feedback-dense blockquote footer {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}

/* Contact */
.contact-dense {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 20px;
    align-items: start;
}

.contact-info-dense p {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-links a,
.contact-links span {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-muted);
    transition: color var(--transition);
}

.contact-links a:hover { color: var(--amber); }

.contact-form-dense {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-line {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.contact-form-dense input,
.contact-form-dense select,
.contact-form-dense textarea {
    padding: 7px 10px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color var(--transition);
}

.contact-form-dense input:focus,
.contact-form-dense select:focus,
.contact-form-dense textarea:focus {
    border-color: var(--amber);
}

.contact-form-dense textarea {
    resize: vertical;
    min-height: 48px;
}

.contact-form-dense .btn-main {
    align-self: flex-start;
}

/* Footer */
.footer-dense {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    margin-top: auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .app { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        left: -200px;
        width: 200px;
        z-index: 1000;
        transition: left 0.25s ease;
    }
    .sidebar.active { left: 0; }
    .data-grid { grid-template-columns: 1fr; }
    .split-dense { grid-template-columns: 1fr; }
    .feedback-dense { grid-template-columns: 1fr; }
    .contact-dense { grid-template-columns: 1fr; }
    .form-line { grid-template-columns: 1fr 1fr; }
    .stats-dense { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .svc-row { grid-template-columns: 30px 1fr; }
    .svc-desc { display: none; }
    .form-line { grid-template-columns: 1fr; }
    .stats-dense { grid-template-columns: 1fr 1fr; }
    .footer-dense { flex-direction: column; gap: 4px; }
    .data-table th,
    .data-table td { padding: 6px 8px; font-size: 11px; }
}
