/* ============================================================
   pane.ls — style.css
   Fonts: Open Sans (body), Roboto Mono (fixed-width)
   ============================================================ */

/* ── Variables ──────────────────────────────────────────── */
:root {
    --bg:           #0d1117;
    --surface:      #161b22;
    --surface-2:    #1c2330;
    --border:       #21262d;
    --border-light: #30363d;
    --text:         #e6edf3;
    --muted:        #7d8590;
    --accent:       #f97316;
    --accent-dark:  #c2510a;
    --accent-dim:   rgba(249, 115, 22, 0.12);

    --font:         'Open Sans', sans-serif;
    --mono:         'Roboto Mono', monospace;
    --max-w:        1100px;
    --radius:       6px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }

/* ── Layout ─────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border-light);
}
.btn-ghost:hover {
    background: var(--surface);
    text-decoration: none;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.825rem;
}

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Site Header ─────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(13, 17, 23, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-family: var(--mono);
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.02em;
    text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--accent); }

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-nav a {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
    padding: 96px 0 80px;
    border-bottom: 1px solid var(--border);
    background:
        radial-gradient(ellipse 60% 40% at 50% -10%, rgba(249,115,22,0.08) 0%, transparent 70%);
}

.hero-content {
    max-width: 640px;
}

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.lead {
    font-size: 1.1rem;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 520px;
}

/* ── Features ────────────────────────────────────────────── */
.features {
    padding: 80px 0;
    border-bottom: 1px solid var(--border);
}

.section-title {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    margin-bottom: 48px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.feature-card {
    background: var(--bg);
    padding: 28px;
}

.feature-icon {
    font-size: 1.4rem;
    color: var(--accent);
    margin-bottom: 14px;
    line-height: 1;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ── CTA ─────────────────────────────────────────────────── */
.cta {
    padding: 80px 0;
    text-align: center;
}

.cta h2 {
    font-size: 1.75rem;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.cta p {
    color: var(--muted);
    margin-bottom: 32px;
    font-size: 1.05rem;
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-inner .logo { font-size: 1rem; }

.muted { color: var(--muted); font-size: 0.875rem; }

/* ── Utilities ───────────────────────────────────────────── */
.small { font-size: 0.8rem; }
code, .mono { font-family: var(--mono); font-size: 0.875em; }


/* ============================================================
   PATCH PANEL COMPONENT
   ============================================================ */

.panel-page {
    padding: 40px 0 80px;
}

/* Breadcrumb */
.breadcrumb {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); text-decoration: none; }
.breadcrumb .sep { color: var(--border-light); }
.breadcrumb .current { color: var(--text); }

/* Panel card */
.panel-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}

.panel-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.panel-card-header h2 {
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--mono);
}

.panel-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.panel-meta-item {
    font-size: 0.8rem;
    color: var(--muted);
}
.panel-meta-item strong {
    color: var(--text);
    font-weight: 500;
}

.panel-card-body {
    padding: 24px 20px;
}

/* ── Rack Unit ───────────────────────────────────────────── */
.rack-unit {
    display: flex;
    align-items: center;
    width: 100%;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,0.6));
    user-select: none;
}

/* Rack ears */
.rack-ear {
    flex-shrink: 0;
    width: 44px;
    height: 92px;
    background: linear-gradient(to right, #252525 0%, #2a2a2a 40%, #222 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 13px;
    border: 1px solid #3a3a3a;
}

.rack-ear--left {
    border-radius: 5px 0 0 5px;
    border-right: none;
    background: linear-gradient(to right, #222 0%, #2a2a2a 100%);
}

.rack-ear--right {
    border-radius: 0 5px 5px 0;
    border-left: none;
    background: linear-gradient(to left, #222 0%, #2a2a2a 100%);
}

.mount-slot {
    width: 12px;
    height: 20px;
    border-radius: 3px;
    background: #080808;
    border: 1px solid #484848;
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.9),
        0 1px 0 rgba(255,255,255,0.04);
}

/* Panel faceplate */
.panel-faceplate {
    flex: 1;
    min-width: 0;
    height: 80px;
    background:
        linear-gradient(to bottom,
            #323232 0%,
            #2c2c2c 2%,
            #222 45%,
            #1e1e1e 55%,
            #252525 98%,
            #1a1a1a 100%
        );
    border-top: 1px solid #3e3e3e;
    border-bottom: 1px solid #0d0d0d;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 12px;
    gap: 3px;
    position: relative;
    overflow: hidden;
}

/* Subtle brushed-metal texture */
.panel-faceplate::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 3px,
        rgba(255,255,255,0.009) 3px,
        rgba(255,255,255,0.009) 6px
    );
    pointer-events: none;
}

/* Port numbers strip */
.port-numbers {
    display: flex;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.port-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    font-family: var(--mono);
    font-size: 7.5px;
    color: #707070;
    line-height: 1;
}

/* Ports row */
.ports-row {
    display: flex;
    gap: 4px;
    position: relative;
    z-index: 1;
}

/* Individual port */
.port {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.port:hover .lc-adapter { filter: brightness(1.15); }

/* LC Duplex adapter body */
.lc-adapter {
    width: 32px;
    background: linear-gradient(to bottom, #d0c290 0%, #b8a870 55%, #c0b07a 100%);
    border-radius: 2px;
    border: 1px solid #8a7650;
    box-shadow:
        0 1px 0 rgba(255,255,255,0.25),
        0 2px 5px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2px 3px 3px;
    gap: 2px;
    transition: filter 0.1s;
}

/* Duplex latch clip (the top bump on an LC adapter) */
.lc-clip {
    width: 20px;
    height: 4px;
    background: linear-gradient(to bottom, #b8a870, #9a8a58);
    border-radius: 1px;
    border: 1px solid #7a6840;
    box-shadow: 0 1px 0 rgba(255,255,255,0.1);
}

/* The dark housing behind the two holes */
.lc-holes {
    display: flex;
    gap: 3px;
    padding: 3px 2px;
    background: #18120a;
    border-radius: 2px;
    border: 1px solid #0e0a06;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.9);
}

/* Individual LC hole */
.lc-hole {
    width: 9px;
    height: 15px;
    border-radius: 50% 50% 50% 50% / 35% 35% 65% 65%;
    border: 1px solid #2a2a2a;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.95);
}

/* Empty port — very dark hole */
.port--empty .lc-hole {
    background: radial-gradient(ellipse at 50% 30%, #0d0d0d 0%, #050505 100%);
}

/* Reserved port — amber tint */
.port--reserved .lc-adapter {
    background: linear-gradient(to bottom, #c8a860 0%, #a88840 100%);
    border-color: #786028;
}
.port--reserved .lc-hole {
    background: radial-gradient(ellipse at 50% 30%, #1a1005 0%, #0d0800 100%);
}

/* Inactive / decommissioned */
.port--inactive .lc-adapter { opacity: 0.5; }
.port--inactive .lc-hole {
    background: #080808;
}

/* ── Cable colours (occupied ports) ─────────────────────── */

/* Single-mode — blue */
.port--sm .lc-holes { background: #0a0c1a; border-color: #1a1c3a; }
.port--sm .lc-hole {
    background: radial-gradient(ellipse at 50% 30%, #4466cc 0%, #2244aa 60%, #112288 100%);
    border-color: #334499;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.7), 0 0 3px rgba(68,102,204,0.3);
}

/* Multimode OM2 — orange */
.port--mm2 .lc-holes { background: #1a0c04; border-color: #2a1408; }
.port--mm2 .lc-hole {
    background: radial-gradient(ellipse at 50% 30%, #e05010 0%, #b03808 60%, #802008 100%);
    border-color: #993010;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.7), 0 0 3px rgba(200,80,20,0.3);
}

/* Multimode OM3 — aqua */
.port--mm3 .lc-holes { background: #041414; border-color: #082424; }
.port--mm3 .lc-hole {
    background: radial-gradient(ellipse at 50% 30%, #00bcd4 0%, #0088aa 60%, #005577 100%);
    border-color: #009aaa;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.7), 0 0 3px rgba(0,188,212,0.3);
}

/* ── Label strip below ports ─────────────────────────────── */
.label-strip {
    display: flex;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.port-tag {
    width: 32px;
    height: 11px;
    background: #f0ece0;
    border: 1px solid #d0c8a0;
    border-radius: 1px;
    font-size: 5.5px;
    font-family: var(--mono);
    color: #444;
    text-align: center;
    line-height: 11px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* ── Tooltip ─────────────────────────────────────────────── */
.port-tooltip {
    position: fixed;
    z-index: 1000;
    background: var(--surface-2);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.78rem;
    min-width: 200px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}
.port-tooltip.visible { opacity: 1; }

.tooltip-port {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.tooltip-label {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text);
}

.tooltip-row {
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.6;
}

.tooltip-row strong { color: var(--text); font-weight: 500; }

.tooltip-status {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-active   { background: rgba(34,197,94,0.15);  color: #4ade80; }
.status-empty    { background: rgba(100,100,100,0.15); color: var(--muted); }
.status-reserved { background: rgba(249,115,22,0.15); color: var(--accent); }
.status-inactive { background: rgba(239,68,68,0.12);  color: #f87171; }

/* ── Port legend ─────────────────────────────────────────── */
.port-legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--muted);
}

.legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.swatch-sm   { background: #4466cc; box-shadow: 0 0 4px rgba(68,102,204,0.6); }
.swatch-mm2  { background: #e05010; box-shadow: 0 0 4px rgba(200,80,20,0.6); }
.swatch-mm3  { background: #00bcd4; box-shadow: 0 0 4px rgba(0,188,212,0.6); }
.swatch-empty    { background: #333; border: 1px solid #555; }
.swatch-reserved { background: var(--accent); box-shadow: 0 0 4px rgba(249,115,22,0.5); }

/* ── Stats strip ─────────────────────────────────────────── */
.panel-stats {
    display: flex;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}

.stat {
    flex: 1;
    background: var(--surface);
    padding: 16px 20px;
    text-align: center;
}

.stat-value {
    font-family: var(--mono);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}