/* prototype.css — Custix (edel, ruhig, hochwertig) */

/* -----------------------------
   00) Reset + Basics
------------------------------*/
* { 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";
  color: #0f172a;
  background: #0b1220;
  line-height: 1.45;
}

/* -----------------------------
   01) Design Tokens (Proto)
------------------------------*/
:root{
  --bg: #0b1220;                 /* Near-black background */
  --surface: rgba(255,255,255,.06);
  --surface-2: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.12);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.68);

  --accent: #0ea5a6;             /* Petrol */
  --accent-2: #0b6b6c;           /* Dark petrol */
  --danger: #ef4444;
  --warn: #f59e0b;
  --success: #22c55e;

  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --shadow-soft: 0 10px 30px rgba(0,0,0,.35);

  --r-xl: 18px;
  --r-lg: 14px;
  --r-md: 12px;

  --p-xl: 28px;
  --p-lg: 20px;
  --p-md: 14px;

  --maxw: 440px;
}

/* Subtile Hintergrund-Glow */
.custix-bg {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  position: relative;
  overflow: hidden;
}
.custix-bg:before{
  content:"";
  position:absolute;
  inset:-120px;
  background:
    radial-gradient(800px 500px at 20% 20%, rgba(14,165,166,.20), transparent 60%),
    radial-gradient(700px 400px at 80% 30%, rgba(255,255,255,.08), transparent 65%),
    radial-gradient(900px 600px at 50% 90%, rgba(14,165,166,.10), transparent 60%);
  filter: blur(0px);
  pointer-events:none;
}

/* -----------------------------
   02) Login Card
------------------------------*/
.card {
  width: 100%;
  max-width: var(--maxw);
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, var(--surface), rgba(255,255,255,.04));
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}

.card__inner {
  padding: var(--p-xl);
}

/* ============================
   Brand / Login Header
============================ */

.brand{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.brand--center{
  flex-direction: column;
  text-align: center;
  gap: 12px;
}

/* großes Logo */
.brand__mark--large{
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}

.brand__mark--large img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Text unter Logo */
.brand__text--center{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand__title{
  font-size: 20px;
  font-weight: 650;
  letter-spacing: .3px;
  color: rgba(255,255,255,.95);
  margin: 0;
}

.brand__subtitle{
  font-size: 13px;
  color: rgba(255,255,255,.70);
  letter-spacing: .4px;
  margin: 0;
}



.headline {
  color: var(--text);
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -.2px;
  margin: 10px 0 8px 0;
  font-weight: 700;
}

.subline {
  color: var(--muted);
  margin: 0 0 18px 0;
  font-size: 14px;
}

/* -----------------------------
   03) Form
------------------------------*/
.form {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.label {
  color: rgba(255,255,255,.78);
  font-size: 12px;
  margin-bottom: 6px;
  display: block;
}

.input {
  width: 100%;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  color: var(--text);
  padding: 12px 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.input::placeholder { color: rgba(255,255,255,.40); }

.input:focus {
  border-color: rgba(14,165,166,.60);
  box-shadow: 0 0 0 4px rgba(14,165,166,.18);
  background: rgba(255,255,255,.07);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hint {
  color: rgba(255,255,255,.62);
  font-size: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: 0;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  font-weight: 650;
  letter-spacing: .2px;
  transition: transform .06s ease, filter .15s ease, box-shadow .15s ease;
}

.btn--primary {
  background: linear-gradient(135deg, rgba(14,165,166,.95), rgba(11,107,108,.95));
  color: #031418;
  box-shadow: 0 10px 28px rgba(14,165,166,.22);
}

.btn--primary:hover { filter: brightness(1.05); }
.btn--primary:active { transform: translateY(1px); }

.footer {
  margin-top: 16px;
  color: rgba(255,255,255,.55);
  font-size: 12px;
  text-align: center;
}

/* -----------------------------
   04) Alerts (Flash Messages)
------------------------------*/
.alert {
  margin: 12px 0 0 0;
  padding: 10px 12px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  color: var(--text);
  font-size: 13px;
}

.alert--error {
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.10);
}

.alert--success {
  border-color: rgba(34,197,94,.30);
  background: rgba(34,197,94,.10);
}

/* -----------------------------
   05) Responsive polish
------------------------------*/
@media (max-width: 420px) {
  .card__inner { padding: 20px; }
  .headline { font-size: 22px; }
}


/* ============================
   Dashboard Layout
============================ */

.app{
  min-height: 100%;
  background: var(--bg);
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(15,23,42,.65), rgba(15,23,42,.35));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.topbar__right{
  display: flex;
  align-items: center;
  gap: 10px;
}

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.pagehead{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 20px;
}

.pagehead__title{
  margin: 0;
  color: rgba(255,255,255,.94);
  font-size: 28px;
  letter-spacing: -.2px;
}

.pagehead__sub{
  margin: 6px 0 0;
  color: rgba(255,255,255,.62);
  font-size: 14px;
}

.pagehead__actions{
  display: flex;
  gap: 10px;
}

/* brand inline (topbar) */
.brand--inline{
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.brand__mark--header{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  flex: 0 0 34px;
}

.brand__mark--header img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand__title--header{
  font-size: 15px;
  font-weight: 650;
  margin: 0;
}

.brand__subtitle--header{
  font-size: 12px;
  margin: 0;
}

/* Buttons extra */
.btn--ghost{
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.14);
}

.btn--ghost:hover{
  filter: brightness(1.06);
}

/* user pill */
.userpill{
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.86);
  min-width: 140px;
}

.userpill__label{
  font-size: 11px;
  color: rgba(255,255,255,.58);
}

.userpill__name{
  font-size: 13px;
  font-weight: 600;
}

/* grids */
.grid{
  display: grid;
  gap: 12px;
}

.grid--kpi{
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 26px;
}

.grid--actions{
  grid-template-columns: repeat(2, 1fr);
}

/* KPI card */
.kpi{
  padding: 16px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
}

.kpi__label{
  color: rgba(255,255,255,.62);
  font-size: 12px;
}

.kpi__value{
  margin-top: 8px;
  color: rgba(255,255,255,.94);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .2px;
}

.kpi__hint{
  margin-top: 6px;
  color: rgba(255,255,255,.50);
  font-size: 12px;
}

/* section */
.section{
  margin-top: 24px;
}

.section__title{
  margin: 0 0 12px;
  color: rgba(255,255,255,.86);
  font-size: 15px;
  font-weight: 650;
}

/* action cards */
.cardlink{
  display: block;
  padding: 16px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.04));
  color: rgba(255,255,255,.90);
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
  transition: transform .08s ease, filter .15s ease;
}

.cardlink:hover{
  filter: brightness(1.05);
}

.cardlink:active{
  transform: translateY(1px);
}

.cardlink__title{
  font-weight: 650;
  font-size: 14px;
}

.cardlink__text{
  margin-top: 6px;
  color: rgba(255,255,255,.62);
  font-size: 13px;
  line-height: 1.35;
}

/* panel */
.panel{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  overflow: hidden;
}

.panel__row{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}

.panel__row:first-child{ border-top: 0; }

.panel__title{
  color: rgba(255,255,255,.90);
  font-weight: 650;
  font-size: 13px;
}

.panel__text{
  margin-top: 3px;
  color: rgba(255,255,255,.60);
  font-size: 13px;
}

.panel__meta{
  color: rgba(255,255,255,.50);
  font-size: 12px;
  white-space: nowrap;
}

.appfooter{
  margin-top: 34px;
  text-align: center;
  color: rgba(255,255,255,.45);
  font-size: 12px;
}

/* responsive */
@media (max-width: 980px){
  .grid--kpi{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px){
  .topbar{
    flex-direction: column;
    align-items: flex-start;
  }
  .userpill{ width: 100%; }
  .grid--actions{ grid-template-columns: 1fr; }
  .pagehead{
    flex-direction: column;
    align-items: flex-start;
  }
}


/* --- Custix UI Extensions (Dashboard & Auswertungen) --- */

.cx-grid {
  display: grid;
  gap: 16px;
}

.cx-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cx-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .cx-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .cx-grid-2, .cx-grid-3 { grid-template-columns: 1fr; }
}

.cx-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 26px rgba(0,0,0,0.25);
}

.cx-card-title {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 10px;
}

.cx-kpi {
  font-size: 28px;
  font-weight: 650;
  line-height: 1.1;
}

.cx-sub {
  opacity: 0.75;
  font-size: 13px;
  margin-top: 6px;
}

.cx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cx-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.20);
}

.cx-tab {
  appearance: none;
  border: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  opacity: 0.75;
  cursor: pointer;
}

.cx-tab.active {
  background: rgba(255,255,255,0.08);
  opacity: 1;
}

.cx-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
}

.cx-table th, .cx-table td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: left;
  vertical-align: top;
}

.cx-table th {
  font-size: 12px;
  opacity: 0.75;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
