/* -----------------------------------------------------------
   Buchhaltung SaaS – Light UI (inspired by deutsche-see.de)
   - clean white surfaces
   - large spacing / calm typography
   - blue brand accents + lime accent from your palette
   Colors requested:
     #0F9ED5, #0B6F97, #BACC12
------------------------------------------------------------ */

:root{
  --brand:#0F9ED5;
  --brand-dark:#0B6F97;
  --accent:#BACC12;

  --bg:#f6f7f9;
  --surface:#ffffff;
  --surface-2:#fbfcfe;

  --text:#0b1220;
  --text-2:#334155;
  --muted:#64748b;

  --line:rgba(15,23,42,.14);
  --shadow: 0 10px 26px rgba(2, 8, 23, .10);

  --radius:8px;
  --radius-lg:10px;
  --gap:18px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(900px 500px at 10% 0%, rgba(15,158,213,.14), transparent 60%),
    radial-gradient(900px 520px at 100% 10%, rgba(186,204,18,.10), transparent 62%),
    var(--bg);
}

/* container & grids */
.container{width:min(1200px, calc(100% - 48px)); margin:0 auto;}
.row{display:flex; gap:var(--gap)}
.grid{display:grid; gap:var(--gap)}
.g2{grid-template-columns:repeat(2, minmax(0,1fr))}
.g3{grid-template-columns:repeat(3, minmax(0,1fr))}
.g4{grid-template-columns:repeat(4, minmax(0,1fr))}
@media (max-width: 980px){ .g4{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (max-width: 760px){ .row{flex-direction:column} .g3,.g2{grid-template-columns:1fr} .g4{grid-template-columns:1fr} }

.card{
  background: var(--surface);
  border:1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card.pad{padding:22px}

/* typography */
h1,h2,h3{margin:0 0 10px 0; letter-spacing:-.02em}
h1{font-size:44px; line-height:1.05}
h2{font-size:24px}
h3{font-size:16px}
p{margin:0; color:var(--text-2); line-height:1.65}
.kicker{color:var(--muted); text-transform:uppercase; font-weight:800; letter-spacing:.14em; font-size:12px}
.small{font-size:13px;color:var(--muted)}

/* buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:10px;
  padding:11px 16px;
  border-radius: 8px;
  border:1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}
.btn:hover{ transform: translateY(-1px); border-color: rgba(15,23,42,.20); box-shadow: 0 10px 26px rgba(2,8,23,.10); }
.btn.primary{
  border-color: rgba(15,158,213,.35);
  background: linear-gradient(180deg, rgba(15,158,213,.14), rgba(15,158,213,.06));
  color: var(--brand-dark);
}
.btn.primary:hover{ box-shadow: 0 12px 30px rgba(15,158,213,.18); }
.btn.accent{
  border-color: rgba(186,204,18,.45);
  background: linear-gradient(180deg, rgba(186,204,18,.18), rgba(186,204,18,.08));
}
.btn.ghost{
  border-color: transparent;
  background: transparent;
}
.btn.ghost:hover{
  border-color: rgba(15,23,42,.14);
  background: rgba(255,255,255,.70);
}

/* inputs */
.input, select, textarea{
  width:100%;
  padding:11px 12px;
  border-radius: 8px;
  border:1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  outline:none;
}
textarea{min-height:92px; resize:vertical}
label{display:block; font-size:13px; color:var(--text-2); margin:0 0 6px 2px}
.field{display:flex; flex-direction:column; gap:6px}
.form{display:grid; gap:12px}
.form .cols-2{display:grid; gap:12px; grid-template-columns:repeat(2, minmax(0,1fr))}
@media (max-width:760px){ .form .cols-2{grid-template-columns:1fr} }

/* header (landing) */
.topstrip{
  background: var(--brand-dark);
  color: #fff;
  font-weight:700;
  font-size:13px;
}
.topstrip .container{
  padding:10px 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.topstrip a{color:#fff; text-decoration:underline; text-underline-offset:3px}
.header{
  position:sticky;
  top:0;
  z-index:30;
  background: rgba(246,247,249,.75);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.header .bar{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
  gap:14px;
}
.brand{
  display:flex; align-items:center; gap:12px;
}
.logo{
  width:40px;height:40px;border-radius:8px;
  background: radial-gradient(circle at 30% 20%, rgba(15,158,213,.95), rgba(11,111,151,.70));
  box-shadow: 0 12px 26px rgba(15,158,213,.20);
}
.brand strong{font-size:14px}
.brand span{display:block; font-size:12px; color:var(--muted); margin-top:2px}
.navlinks{display:flex; gap:8px; flex-wrap:wrap; align-items:center}

/* hero */
.hero{
  padding:34px 0 22px 0;
}
.hero-grid{
  display:grid;
  gap:var(--gap);
  grid-template-columns: 1.3fr .7fr;
  align-items:stretch;
}
@media (max-width: 980px){ .hero-grid{grid-template-columns:1fr} }

.hero .lead{
  padding:26px;
  border-radius: var(--radius-lg);
  border:1px solid var(--line);
  background:
    radial-gradient(900px 420px at 25% 10%, rgba(15,158,213,.16), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.80));
  box-shadow: var(--shadow);
}
.hero .cta{margin-top:16px; display:flex; gap:10px; flex-wrap:wrap}

.hr{height:1px;background:var(--line);margin:18px 0}

/* portal shell */
.shell{
  display:grid;
  grid-template-columns: 280px minmax(0,1fr);
  min-height:100vh;
}
@media (max-width: 980px){ .shell{grid-template-columns:1fr} }

.sidebar{
  position:sticky; top:0; height:100vh;
  padding:18px;
  border-right:1px solid var(--line);
  background: rgba(255,255,255,.65);
  backdrop-filter: blur(10px);
}
@media (max-width: 980px){ .sidebar{position:relative; height:auto} }

.nav{
  margin-top:14px;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.nav a{
  padding:10px 12px;
  border-radius: 8px;
  color: var(--text-2);
  text-decoration:none;
  border:1px solid transparent;
  display:flex; align-items:center; justify-content:space-between;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.nav a:hover{ background: rgba(255,255,255,.85); border-color: rgba(15,23,42,.12); transform: translateY(-1px); }
.nav a.active{
  color: var(--brand-dark);
  background: linear-gradient(180deg, rgba(15,158,213,.12), rgba(15,158,213,.06));
  border-color: rgba(15,158,213,.22);
}

.badge{
  font-size:12px;
  padding:3px 9px;
  border-radius: 8px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.85);
  color: var(--muted);
}

.main{padding:22px}
.topbar{
  display:flex; align-items:flex-end; justify-content:space-between; gap:12px;
  margin-bottom:14px;
}
.topbar .right{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.pill{
  border:1px solid var(--line);
  background: rgba(255,255,255,.85);
  padding:8px 10px;
  border-radius:10px;
  display:flex; gap:8px; align-items:center;
  color:var(--text-2);
  font-size:13px;
}

/* kpis */
.kpi{
  padding:16px;
  border-radius: 10px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.90);
}
.kpi .val{font-size:24px; font-weight:900; margin-top:8px}
.spark{
  height:44px;
  border-radius: 8px;
  border:1px dashed rgba(15,23,42,.18);
  background: linear-gradient(90deg, rgba(15,158,213,.20), rgba(186,204,18,.14));
  margin-top:10px;
}

/* tables */
.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 8px;
  border:1px solid var(--line);
  background: var(--surface);
}
.table th, .table td{
  padding:12px 12px;
  border-bottom:1px solid var(--line);
  font-size:13px;
  color:var(--text-2);
}
.table th{ text-align:left; color:var(--text); font-size:12px; text-transform:uppercase; letter-spacing:.12em; background: rgba(248,250,252,.8); }
.table tr:hover td{ background: rgba(15,158,213,.06); color:var(--text); }

/* modal */
.modal{
  position:fixed; inset:0; display:none; align-items:center; justify-content:center;
  background: rgba(2,8,23,.55);
  padding:18px;
}
.modal.open{display:flex}
.modal .box{
  width:min(680px, 100%);
  border-radius: 10px;
  border:1px solid rgba(255,255,255,.20);
  background: #fff;
  box-shadow: 0 22px 60px rgba(2,8,23,.35);
  padding:18px;
}
.modal .head{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px}
.modal .head strong{font-size:14px}

/* footer */
.footer{
  margin-top:26px;
  padding:26px 0 34px 0;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:13px;
}



/* ----------------------------------
   Portal Top Navigation (instead of sidebar)
---------------------------------- */
.portal-header{
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(246,247,249,.85);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.portal-header .bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 0;
}
.portal-left{
  display:flex;
  align-items:center;
  gap:14px;
  min-width: 240px;
}
.portal-left .brand{margin:0}
.portal-center{
  flex:1;
  display:flex;
  justify-content:center;
}
.portal-right{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
  min-width: 240px;
}

.menu{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}

.menu .item > a,
.menu .group > a,
.menu .group > button{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius: 8px;
  border:1px solid transparent;
  background: transparent;
  color: var(--text-2);
  text-decoration:none;
  cursor:pointer;
  transition: background .14s ease, border-color .14s ease, transform .14s ease;
}
.menu .item > a:hover,
.menu .group > a:hover,
.menu .group > button:hover{
  background: rgba(255,255,255,.85);
  border-color: rgba(15,23,42,.12);
  transform: translateY(-1px);
}

.menu .item > a.active{
  color: var(--brand-dark);
  background: linear-gradient(180deg, rgba(15,158,213,.12), rgba(15,158,213,.06));
  border-color: rgba(15,158,213,.22);
}

.group{position:relative; z-index:20}
.group::after{
  /* hover-bridge so you can move the mouse from button to dropdown without losing hover */
  content:"";
  position:absolute;
  left:0;
  right:0;
  top:100%;
  height:10px;
}
.dropdown{
  position:absolute;
  top:100%; /* no gap -> reliable hover */
  left: 0;
  min-width: 240px;
  transform: translateY(10px); /* visual spacing without hover gap */
  background: var(--surface);
  border:1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(2,8,23,.14);
  padding:8px;
  display:none;
  z-index:60; /* above neighboring menu items */
}
.group:hover .dropdown,
.group:focus-within .dropdown{
  display:block;
}
.dropdown a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 10px;
  border-radius: 8px;
  text-decoration:none;
  color: var(--text-2);
  border:1px solid transparent;
}
.dropdown a:hover{
  background: rgba(15,158,213,.06);
  border-color: rgba(15,158,213,.16);
  color: var(--text);
}
.dropdown a.active{
  color: var(--brand-dark);
  background: linear-gradient(180deg, rgba(15,158,213,.12), rgba(15,158,213,.06));
  border-color: rgba(15,158,213,.22);
}

.portal-main{
  padding: 18px 0 34px 0;
}

@media (max-width: 980px){
  .portal-header .bar{flex-wrap:wrap}
  .portal-left, .portal-right{min-width: 0}
  .portal-center{order: 3; width: 100%; justify-content:flex-start}
  .menu{gap:6px}
}



/* --- Dropdown overlay robustness (fix click-through / overlap) --- */
.portal-header{ z-index: 120 !important; }
.portal-center{ position: relative; z-index: 130; }
.menu{ position: relative; z-index: 140; }
.menu .item, .menu .group{ position: relative; z-index: 140; }
.menu .group:hover,
.menu .group:focus-within{ z-index: 200; }
.dropdown{ z-index: 300 !important; pointer-events: auto; }
