/* ==========================================================================
   BE Serviceportal – Protocol/Next.js Light Theme (Drop-in app.css)
   - Full width, clean SaaS look, subtle grid background, modern cards/tabs
   - Works with existing "be-*" classes + sensible defaults
   ========================================================================== */

:root{
  /* Base */
  --bg: #f7f8fb;
  --panel: #ffffff;
  --panel2:#fbfcff;
  --stroke: rgba(15, 23, 42, .10);
  --stroke2: rgba(15, 23, 42, .06);

  --text:#0f172a;            /* slate-900 */
  --muted: rgba(15, 23, 42, .62);
  --muted2: rgba(15, 23, 42, .45);

  /* Brand (tune if needed) */
  --brand:#0b2a3f;           /* BE Navy */
  --brand2:#0f3a55;          /* Hover */
  --accent:#16a34a;          /* Green */
  --accent2:#22c55e;

  /* UI */
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(2, 6, 23, .08);
  --shadow-sm: 0 6px 18px rgba(2, 6, 23, .08);
  --ring: 0 0 0 4px rgba(34, 197, 94, .18);

  /* Spacing */
  --pad: 18px;
  --pad-lg: 26px;

  /* Typography */
  --font: "univers-next-pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }
body{
  margin:0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle Protocol-like gradient + grid background */
.be-bg{
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 18% 10%, rgba(34,197,94,.18), transparent 60%),
    radial-gradient(900px 520px at 85% 12%, rgba(59,130,246,.10), transparent 60%),
    radial-gradient(900px 520px at 70% 85%, rgba(34,197,94,.10), transparent 60%),
    linear-gradient(180deg, #f7f8fb 0%, #f6f7fb 100%);
}

.be-bg:before{
  content:"";
  position:absolute;
  inset:0;
  background-image:
    linear-gradient(to right, rgba(15,23,42,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,23,42,.05) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: .25;
  pointer-events:none;
  mask-image: radial-gradient(90% 70% at 50% 5%, rgba(0,0,0,.9), transparent 70%);
}

/* ==========================================================================
   Layout shells (full width but with modern padding)
   ========================================================================== */

.be-shell{
  width:100%;
  padding: 0 var(--pad);
}

@media (min-width: 1200px){
  .be-shell{ padding: 0 var(--pad-lg); }
}

/* Main page spacing */
.be-page{
  position:relative;
  z-index:1;
  padding: 22px 0 28px;
}

.be-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  align-items:start;
}

@media (max-width: 1100px){
  .be-grid{ grid-template-columns: 1fr; }
}

/* Optional: make right panel sticky on desktop */
.be-sticky{
  position: sticky;
  top: 92px;
}
@media (max-width: 1100px){
  .be-sticky{ position: static; top:auto; }
}

/* ==========================================================================
   Topbar (modern, not too dark)
   ========================================================================== */

.be-topbar{
  position: sticky;
  top:0;
  z-index: 50;
  background:
    linear-gradient(180deg, rgba(11,42,63,.98) 0%, rgba(11,42,63,.92) 100%);
  border-bottom: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(12px);
}

.be-topbar .navbar-brand,
.be-topbar .nav-link,
.be-topbar .navbar-text{
  color: rgba(255,255,255,.92) !important;
}

.be-topbar .nav-link{
  opacity:.9;
}
.be-topbar .nav-link:hover{
  opacity:1;
}

.be-topbar .be-pill{
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.92);
  border-radius: 999px;
  padding: 8px 12px;
  display:inline-flex;
  gap:8px;
  align-items:center;
  transition: transform .15s ease, background .15s ease;
}
.be-topbar .be-pill:hover{
  background: rgba(255,255,255,.14);
  transform: translateY(-1px);
}

/* ==========================================================================
   Cards / Panels
   ========================================================================== */

.be-card{
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.be-card-header{
  padding: 14px 16px;
  background: linear-gradient(180deg, var(--panel2) 0%, var(--panel) 100%);
  border-bottom: 1px solid var(--stroke2);
}

.be-card-body{
  padding: 16px;
}

.be-card-muted{
  background: rgba(255,255,255,.72);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-sm);
}

/* Section titles */
.be-h1{ font-size: 28px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 6px; }
.be-h2{ font-size: 16px; font-weight: 500; letter-spacing: -.01em; margin: 0 0 10px; }
.be-sub{ color: var(--muted); margin: 0 0 12px;font-size: 12px }

/* ==========================================================================
   Form / Inputs
   ========================================================================== */

.be-form{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
}

.be-input{
  width: min(360px, 100%);
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: #fff;
  padding: 10px 12px;
  color: var(--text);
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease, transform .15s ease;
}

.be-input::placeholder{ color: rgba(15,23,42,.35); }

.be-input:focus{
  border-color: rgba(34,197,94,.35);
  box-shadow: var(--ring);
}

/* ==========================================================================
   Buttons (Protocol-like)
   ========================================================================== */

.be-btn{
  height: 44px;
  border-radius: 12px;
  padding: 0 14px;
  border: 1px solid transparent;
  font-weight: 500;
  letter-spacing: -.01em;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  cursor:pointer;
  text-decoration:none;
  user-select:none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

.be-btn:active{ transform: translateY(1px); }

.be-btn-primary{
  background: var(--accent);
  color: #fff;
  border-color: rgba(0,0,0,.08);
  box-shadow: 0 8px 18px rgba(34,197,94,.22);
	font-size: 15px;
    font-weight: 500;
}
.be-btn-primary:hover{
  background: var(--accent2);
  box-shadow: 0 12px 26px rgba(34,197,94,.26);
  transform: translateY(-1px);
}

.be-btn-ghost{
  background: #fff;
  border-color: var(--stroke);
  color: var(--brand);
}
.be-btn-ghost:hover{
  background: #f8fafc;
  border-color: rgba(15,23,42,.14);
  transform: translateY(-1px);
}

.be-btn-dark{
  background: #0b1220;
  color:#fff;
}
.be-btn-dark:hover{ background: #111b2e; transform: translateY(-1px); }

/* ==========================================================================
   Tabs (clean pill tabs)
   ========================================================================== */

.be-tabs{
  display:flex;
  gap: 10px;
  align-items:center;
  padding: 8px;
  background: #f4f6fa;
  border: 1px solid var(--stroke2);
  border-radius: 999px;
  width: fit-content;
	font-size: 15px
}

.be-tab{
  border: 1px solid transparent;
  background: transparent;
  color: rgba(15,23,42,.65);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 500;
  cursor:pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .15s ease;
}

.be-tab:hover{
  background: rgba(255,255,255,.9);
  color: var(--text);
  transform: translateY(-1px);
}

.be-tab.is-active{
  background: #fff;
  border-color: rgba(15,23,42,.10);
  color: var(--text);
  box-shadow: 0 8px 18px rgba(2,6,23,.08);
}

/* ==========================================================================
   Tables / Rows
   ========================================================================== */

.be-table{
  width:100%;
  border-collapse: collapse;
}

.be-table tr{
  border-bottom: 1px solid var(--stroke2);
}

.be-table th,
.be-table td{
  text-align:left;
  padding: 12px 14px;
  vertical-align: top;
}

.be-table th{
  color: rgba(15,23,42,.65);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 800;
}

.be-table td{
  color: var(--text);
  font-weight: 500;
	font-size: 14px;
}

.be-table .label{
  color: var(--muted);
  font-weight: 400;
	font-size: 14px;
}

/* ==========================================================================
   Field cards (left: Elementdaten je Feld)
   ========================================================================== */

.be-field-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 900px){
  .be-field-grid{ grid-template-columns: 1fr; }
}

.be-mini{
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 14px;
}

.be-mini h3{
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
}

.be-kv{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f9fc;
  border: 1px solid var(--stroke2);
  margin-top: 10px;
  font-weight: 500;
}

.be-kv span{
  color: var(--muted);
  font-weight: 400;
	font-size: 14px
}
.be-kv strong{
  color: var(--text);
  font-weight: 500;
  font-size: 14px
}

/* ==========================================================================
   Product cards (right side)
   ========================================================================== */

.be-product{
  display:flex;
  gap: 14px;
  align-items:flex-start;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.be-product + .be-product{ margin-top: 14px; }

.be-product img{
  width: 110px;
  height: 82px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--stroke2);
  background: #f2f4f8;
}

.be-product h4{
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.be-product p{
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.35;
	font-size: 12px;
    font-weight: 300 !important;
}

.be-product .be-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.be-row{
  display:flex;
  gap: 14px;
  align-items:center;
  flex-wrap: wrap;
}

.be-space-10{ height:10px; }
.be-space-16{ height:16px; }
.be-space-20{ height:20px; }

.be-divider{
  height: 1px;
  background: var(--stroke2);
  width:100%;
}

.be-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f4f6fa;
  border: 1px solid var(--stroke2);
  color: var(--muted);
  font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.be-footer{
  padding: 20px 0 28px;
  color: rgba(15,23,42,.45);
  font-weight: 700;
  font-size: 12px;
}

/* ==========================================================================
   Bootstrap harmony: normalize some defaults (optional but nice)
   ========================================================================== */

a{ color: inherit; }
a:hover{ color: inherit; }

.navbar .btn, .navbar .be-btn{
  height: 38px;
  border-radius: 999px;
  padding: 0 12px;
  font-weight: 600;
}

/* ==========================================================================
   Optional: Protocol-like left sidebar (if you add later)
   ========================================================================== */

.be-docs{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap: 18px;
}
@media (max-width: 1100px){
  .be-docs{ grid-template-columns: 1fr; }
}

.be-sidebar{
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  position: sticky;
  top: 92px;
  height: fit-content;
}
@media (max-width: 1100px){
  .be-sidebar{ position: static; top:auto; }
}

.be-side-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration:none;
  color: rgba(15,23,42,.80);
  border: 1px solid transparent;
  font-weight: 500;
}
.be-side-link:hover{
  background: #f7f9fc;
  border-color: var(--stroke2);
}
.be-side-link.is-active{
  background: rgba(34,197,94,.10);
  border-color: rgba(34,197,94,.22);
  color: var(--text);
}

/* ==========================================================================
   Reduce darkness if any old dark styles still exist
   ========================================================================== */

.be-glass,
.glass,
.dark-panel{
  background: var(--panel) !important;
  color: var(--text) !important;
  border-color: var(--stroke) !important;
}
