/* SIMOPKA — Shared Sidebar & Layout (Dark Theme) */

/* ─── STANDARD LAYOUT (sidebar pages) ─── */
.layout { display: flex; flex: 1; overflow: hidden; }

.sidebar {
  width: 220px; background: var(--panel); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto; flex-shrink: 0;
}
.nav-sec { padding: 14px 16px 4px; font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 12px; color: var(--muted); cursor: pointer; transition: all 0.15s; font-weight: 500; text-decoration: none; }
.nav-item:hover { background: rgba(59,130,246,0.06); color: var(--text); }
.nav-item.active { background: rgba(59,130,246,0.1); color: var(--accent2); border-right: 3px solid var(--accent); font-weight: 600; }
.nav-item i { width: 16px; text-align: center; font-size: 13px; }
.nav-badge { margin-left: auto; padding: 1px 6px; border-radius: 100px; font-size: 9px; font-weight: 700; }
.nav-badge         { background: var(--red);   color: #fff; }
.nav-badge.warn    { background: var(--amber); color: #080E1A; }
.nav-badge.ok      { background: var(--green); color: #080E1A; }
.nav-badge.blue    { background: var(--accent); color: #fff; }

.sidebar-footer { margin-top: auto; border-top: 1px solid var(--border); padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.sidebar-avatar { width: 30px; height: 30px; background: linear-gradient(135deg,var(--navy),var(--accent)); border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 0.6875rem; font-weight: 700; color: #fff; flex-shrink: 0; }
.sidebar-user-name { font-size: 0.75rem; font-weight: 600; color: var(--text); }
.sidebar-user-role { font-size: 0.625rem; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.sidebar-logout { margin-left: auto; color: var(--muted); cursor: pointer; font-size: 12px; }
.sidebar-logout:hover { color: var(--red); }

.main { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }

/* ─── PAGE HEADER ─── */
.page-hdr { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.page-title { font-size: 1rem; font-weight: 800; color: var(--text); }
.page-sub { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ─── INCIDENT TIMELINE ─── */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: flex; gap: 12px; padding: 12px 0; position: relative; }
.tl-item:not(:last-child)::before { content: ''; position: absolute; left: 15px; top: 44px; bottom: 0; width: 1px; background: var(--border); }
.tl-icon { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; flex-shrink: 0; border: 1px solid var(--border); }
.tl-icon.created   { background: rgba(59,130,246,0.15); color: var(--accent2); border-color: rgba(59,130,246,0.3); }
.tl-icon.assigned  { background: rgba(167,139,250,0.12); color: var(--purple); border-color: rgba(167,139,250,0.3); }
.tl-icon.updated   { background: rgba(251,191,36,0.12); color: var(--amber); border-color: rgba(251,191,36,0.3); }
.tl-icon.resolved  { background: rgba(16,217,160,0.12); color: var(--green); border-color: rgba(16,217,160,0.3); }
.tl-icon.closed    { background: rgba(94,127,168,0.1); color: var(--muted); border-color: var(--border); }
.tl-body { flex: 1; min-width: 0; }
.tl-action { font-size: 0.8125rem; font-weight: 600; color: var(--text); }
.tl-actor  { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.tl-note   { font-size: 0.75rem; color: var(--text); margin-top: 6px; background: var(--card2); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; line-height: 1.5; }
.tl-time   { font-size: 0.6875rem; color: var(--muted); font-family: 'JetBrains Mono', monospace; white-space: nowrap; flex-shrink: 0; padding-top: 3px; }

/* ─── INTEGRATION STATUS INDICATOR ─── */
.integ-status { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; }
.integ-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.integ-dot.ok   { background: var(--green); box-shadow: 0 0 5px rgba(16,217,160,0.5); }
.integ-dot.warn { background: var(--amber); box-shadow: 0 0 5px rgba(251,191,36,0.5); }
.integ-dot.down { background: var(--red);   box-shadow: 0 0 5px rgba(248,113,113,0.5); }

/* ─── STATUS BAR (bottom OCC) ─── */
.status-bar {
  height: 32px; background: var(--card2); border-top: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 16px; gap: 20px; flex-shrink: 0;
  font-size: 11px; overflow: hidden;
}
.status-bar-item { display: flex; align-items: center; gap: 5px; color: var(--muted); white-space: nowrap; }
.status-bar-item strong { color: var(--text); font-weight: 600; }
.status-bar-sep { width: 1px; height: 14px; background: var(--border); flex-shrink: 0; }
.status-bar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }

/* ─── DRAWER (right panel) ─── */
.drawer { width: 320px; background: var(--panel); border-left: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; overflow: hidden; }
.drawer-hdr { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.drawer-title { font-size: 0.8125rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 6px; }
.drawer-body { flex: 1; overflow-y: auto; }

/* ─── CHIP / TAG ─── */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 100px; font-size: 0.6875rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.chip-open      { background: rgba(59,130,246,0.12); color: var(--accent2); border-color: rgba(59,130,246,0.2); }
.chip-progress  { background: rgba(251,191,36,0.12);  color: #D97706; border-color: rgba(251,191,36,0.2); }
.chip-resolved  { background: rgba(16,217,160,0.12); color: #0FBF8E; border-color: rgba(16,217,160,0.2); }
.chip-closed    { background: rgba(94,127,168,0.1);  color: var(--muted); border-color: var(--border); }
.chip-critical  { background: rgba(248,113,113,0.15); color: #EF4444; border-color: rgba(248,113,113,0.25); animation: blink-chip 1.5s ease infinite; }
.chip-warning   { background: rgba(251,191,36,0.12);  color: #D97706; border-color: rgba(251,191,36,0.2); }
.chip-alert     { background: rgba(251,146,60,0.12);  color: var(--orange); border-color: rgba(251,146,60,0.2); }
@keyframes blink-chip { 0%,100%{opacity:1} 50%{opacity:0.6} }

/* ─── DEVIATION LABEL ─── */
.dev-label { font-family: 'JetBrains Mono', monospace; font-size: 0.8125rem; font-weight: 700; }
.dev-ontime  { color: var(--green); }
.dev-warning { color: var(--amber); }
.dev-alert   { color: var(--orange); }
.dev-critical{ color: var(--red); }

/* ─── ACTIVITY FEED ─── */
.act-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; border-bottom: 1px solid rgba(26,47,78,0.5); transition: background 0.15s; }
.act-item:last-child { border-bottom: none; }
.act-item:hover { background: rgba(59,130,246,0.03); }
.act-icon { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; margin-top: 1px; }
.act-body { flex: 1; min-width: 0; }
.act-text { font-size: 0.8125rem; color: var(--text); line-height: 1.4; }
.act-meta { font-size: 0.6875rem; color: var(--muted); margin-top: 2px; }
.act-time { font-size: 0.6875rem; font-family: 'JetBrains Mono', monospace; color: var(--muted); white-space: nowrap; padding-top: 3px; flex-shrink: 0; }
