/* ============================================================================
   Path: public/static/css/styles.css
   File: styles.css
   Version: 1.1.1
   Author: Powerbay CRM Team
   Date: 2025-08-16
   Description: Dark Theme + Layout + Komponenten für Powerbay CRM UI
   Changelog:
     - 1.1.1: .technology-card in Selection-Highlight aufgenommen.
     - 1.1.0: Basis (BESS Subtabs), Overlay-Styles, Buttons/Pills.
   ========================================================================== */

:root{
  --bg:#0b0f14;
  --card:#0f141b;
  --card-border:#1f2833;
  --fg:#e5e7eb;
  --muted:#9aa3af;
  --accent:#22d3ee;
  --accent-soft: rgba(34,211,238,.25);
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--fg);
}

/* Layout */
.container{ max-width:1400px; margin:0 auto; padding:1rem; }
.content-area{ margin-top:.25rem; }
.grid-2{ display:grid; grid-template-columns: 1fr 1fr; gap:1rem; align-items:start; }
.mt-1{ margin-top:1rem; }
.mb-05{ margin-bottom:.5rem; }

/* Header */
.header{ display:flex; align-items:baseline; gap:1rem; }
.header h1{ margin:0; font-size:1.35rem; }
.muted{ color:var(--muted); }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-size:.9rem; }

/* Tabs */
.nav-tabs{ display:flex; gap:.5rem; margin:.75rem 0 1rem; flex-wrap:wrap; }
.nav-tab{
  padding:.5rem .8rem; border-radius:.6rem; background:var(--card); border:1px solid var(--card-border);
  cursor:pointer; color:var(--fg)
}
.nav-tab.active{ outline:2px solid var(--accent); }

/* Subtabs (BESS) */
.subtabs{ display:flex; gap:.5rem; margin:.25rem 0 .75rem; flex-wrap:wrap; }
.subtab{
  padding:.35rem .65rem; border-radius:.5rem; background:var(--card); border:1px solid var(--card-border);
  cursor:pointer; font-size:.95rem; color:var(--fg)
}
.subtab.active{ outline:2px solid var(--accent); }

/* Card */
.card{
  background:var(--card);
  border:1px solid var(--card-border);
  border-radius:14px;
  padding: .9rem;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.card-header{
  display:flex; justify-content:space-between; align-items:center; gap:.5rem; margin-bottom:.5rem;
}

/* Entity headers */
.company-header{
  display:flex; justify-content:space-between; align-items:center; gap:.5rem; margin-bottom:.4rem;
}
.company-title{ font-weight:700; }

/* Buttons & Pills */
.btn{
  background:#2a2f37; border:1px solid #3a414c; color:var(--fg);
  border-radius:.45rem; padding:.4rem .6rem; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; gap:.35rem;
}
.btn:hover{ filter:brightness(1.06); }
.btn.small{ font-size:.9rem; padding:.3rem .5rem; }
.btn.outline{ background:transparent; border-color:var(--accent); color:var(--accent); }

.pill{
  display:inline-block; padding:.18rem .5rem; border-radius:999px; background:#11161d; border:1px solid #1f2530; color:var(--fg);
  font-size:.85rem; margin-right:.3rem; margin-bottom:.3rem;
}
.pill.small{ font-size:.8rem; opacity:.9; }

/* Lists & rows */
.list{ display:flex; flex-direction:column; gap:.6rem; }
.row{ display:flex; justify-content:space-between; align-items:center; gap:.5rem; padding:.3rem 0; }

/* Details pane expand */
.details-header{ position:relative; padding-right: 2.5rem; }
.details-expand-toggle{
  position:absolute; right:.5rem; top:50%; transform:translateY(-50%);
  background:#2a2f37; border:1px solid #3a414c; color:var(--fg);
  border-radius:.4rem; padding:.3rem .4rem; cursor:pointer;
}
.details-card.expanded{
  position:fixed; inset:5vh 5vw; z-index:1000; background:var(--card); box-shadow: 0 12px 48px rgba(0,0,0,.55);
  border-radius:14px;
}
body.detail-expanded{ overflow:hidden; }

/* Selection highlighting */
.company-card.selected,
.manufacturer-card.selected,
.product-card.selected,
.technology-card.selected{
  outline:2px solid var(--accent);
  box-shadow:0 0 0 3px var(--accent-soft);
  border-radius:12px;
}

/* Loading states */
#company-details.loading, #bess-details.loading{ opacity:.6; }

/* Loading indicator */
#loading-indicator{
  position:fixed; right:1rem; bottom:1rem; background:#222a33; color:var(--fg);
  padding:.4rem .6rem; border-radius:.5rem; border:1px solid #334055; display:none;
}
.htmx-request #loading-indicator{ display:block; }

/* Links */
a{ color:#9dd9f3; }
a.website-link{ text-decoration:underline; }

/* Utilities */
.hidden{ display:none !important; }

/* auth */
.auth-chip {
    display:flex; align-items:center; gap:.5rem;
    font-size:.9rem; color:var(--muted, #c7c7c7);
  }
  .auth-chip .auth-avatar{
    width:22px;height:22px;border-radius:50%;object-fit:cover;
    box-shadow:0 0 0 1px rgba(255,255,255,.15);
  }
  .auth-chip .auth-name{ color:#fff; font-weight:600; }
  .auth-chip .auth-email{ opacity:.8; }
  .auth-chip .auth-logout{
    margin-left:.5rem; text-decoration:none; padding:.1rem .4rem; border-radius:.4rem;
    background:rgba(255,255,255,.06); color:#ddd;
  }
  .auth-chip .auth-logout:hover{ background:rgba(255,255,255,.12); color:#fff; }