/* Trinity Update â€“ Modern SaaS UI (Bootstrap 5.3 theme-aware) */

/* ---------- Theme tokens ---------- */
:root{
  --bg: #f6f8fc;
  --surface: rgba(255,255,255,.92);
  --surface-solid: #ffffff;
  --surface-2: #f2f5fb;

  --text: #0f172a;
  --muted: rgba(15,23,42,.62);

  --border: rgba(15,23,42,.10);
  --shadow: 0 14px 40px rgba(15,23,42,.10);
  --shadow-soft: 0 8px 20px rgba(15,23,42,.08);

  --radius: 18px;
  --radius-sm: 14px;

  --accent: #4f46e5;          /* indigo */
  --accent-2: #06b6d4;        /* cyan for dark hover */
  --focus: rgba(79,70,229,.22);

  --thead: rgba(15,23,42,.04);
  --row-hover: rgba(79,70,229,.06);
}

[data-bs-theme="dark"]{
  --bg: #0b1020;
  --bs-body-bg: #1e1e2f;
  --bs-table-bg: #27293d;
  --surface: #27293d;
  --surface-solid: #1e1e2f;
  --surface-2: rgba(255,255,255,.06);

  --text: #8c909a;
  --muted: rgba(226,232,240,.72);

  --border: #353a53;
  --shadow: 0 18px 52px rgba(0,0,0,.55);
  --shadow-soft: 0 10px 26px rgba(0,0,0,.40);

  --focus: rgba(56,189,248,.22);

  --thead: #27293d;
  --row-hover: rgba(56,189,248,.10);
}
.table {

	--bs-table-border-color: var(--border);
}

/* ---------- Base ---------- */
html, body { height: 100%; }
/* Fixed Gradient Backdrop (fÃ¼r lange Seiten) */
body{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

body::before{
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(79,70,229,.15), transparent 60%),
    radial-gradient(900px 500px at 110% 0%, rgba(6,182,212,.12), transparent 55%);
  background-repeat: no-repeat;
}

main{ flex: 1 0 auto; }
footer{ flex-shrink:0; }

a { text-underline-offset: 3px; }

/* ---------- Page headings ---------- */
h1.h4{
  position: relative;
  display: inline-block;
  color: var(--text);
  font-weight: 700;
  letter-spacing: .015em;
  line-height: 1.2;
  padding-bottom: .28rem;
}
h1.h4::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--accent) 0%,
    color-mix(in srgb, var(--accent-2) 62%, var(--accent)) 100%
  );
  opacity: .88;
}

/* ---------- Navbar (glass) ---------- */
.navbar{
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
  backdrop-filter: blur(14px);
}
.brand-icon{
  display: inline-block;
  width: 22px;
  height: 22px;
}
[data-bs-theme="dark"] .brand-icon{
  filter: invert(1) brightness(10);
}
.navbar .nav-link{
  color: var(--text) !important;
  opacity: .88;
}
.navbar .nav-link:hover{ opacity: 1; }
.navbar .dropdown-menu{
  background: var(--surface-solid) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
}
[data-bs-theme="dark"] .navbar .dropdown-menu{
  background: var(--surface-solid) !important;
}
.navbar .dropdown-item{
  color: var(--text) !important;
}
.navbar .dropdown-item:hover{
  background: var(--surface-2) !important;
}

/* ---------- Buttons ---------- */
.btn{ border-radius: var(--radius-sm); }
.btn-primary{
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 10px 22px rgba(79,70,229,.18);
}
.btn-primary:hover{
  filter: brightness(0.98);
}
.btn-outline-secondary{
  color: var(--text) !important;
  border-color: var(--border) !important;
}
.btn-outline-secondary:hover{
  background: var(--surface-2) !important;
}

/* ---------- Cards ---------- */
.card{
  background: var(--surface-solid) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
[data-bs-theme="dark"] .card{
  background: var(--surface-solid) !important;
}
.card-header{
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
}

/* ---------- Forms ---------- */
.form-control, .form-select{
  background: var(--surface-solid) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm);
}
.form-control::placeholder{
  color: color-mix(in srgb, var(--muted) 92%, transparent);
}
.form-control:focus, .form-select:focus{
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border)) !important;
  box-shadow: 0 0 0 .25rem var(--focus) !important;
}
.input-group-text{
  background: var(--surface-2) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

/* ---------- Table (premium) ---------- */
.table-wrap{
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.table{
  margin: 0;
  color: var(--text) !important;

}
.table thead th{
  background: var(--thead) !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--border) !important;
  font-weight: 700;
  white-space: nowrap;
  padding-top: .85rem;
  padding-bottom: .85rem;
}
.table td{
  border-top: 1px solid var(--border) !important;
  padding-top: .7rem;
  padding-bottom: .7rem;
}
.table-hover tbody tr:hover{
  background: var(--row-hover) !important;
}

/* Dark mode: status rows should remain subtle, including bootstrap hover logic */
[data-bs-theme="dark"] .table tbody tr.table-danger{
  --bs-table-bg: rgba(220, 53, 69, .11);
  --bs-table-accent-bg: transparent;
  --bs-table-hover-bg: rgba(220, 53, 69, .15);
  --bs-table-border-color: rgba(220, 53, 69, .22);
  --bs-table-color: var(--text);
  --bs-table-hover-color: var(--text);
}
[data-bs-theme="dark"] .table tbody tr.table-warning{
  --bs-table-bg: rgba(255, 193, 7, .10);
  --bs-table-accent-bg: transparent;
  --bs-table-hover-bg: rgba(255, 193, 7, .14);
  --bs-table-border-color: rgba(255, 193, 7, .20);
  --bs-table-color: var(--text);
  --bs-table-hover-color: var(--text);
}
[data-bs-theme="dark"] .table tbody tr.table-info{
  --bs-table-bg: rgba(13, 202, 240, .09);
  --bs-table-accent-bg: transparent;
  --bs-table-hover-bg: rgba(13, 202, 240, .12);
  --bs-table-border-color: rgba(13, 202, 240, .18);
  --bs-table-color: var(--text);
  --bs-table-hover-color: var(--text);
}

/* Optional: slightly tighter first columns */
.table td:first-child, .table th:first-child { padding-left: 1rem; }
.table td:last-child, .table th:last-child { padding-right: 1rem; }

/* ---------- Footer ---------- */
footer{
  background: var(--surface) !important;
  border-top: 1px solid var(--border) !important;
  backdrop-filter: blur(14px);
}
.text-muted{ color: var(--muted) !important; }


/* --- Table: sticky header + column polish --- */
.table-sticky thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  /* bleibt im Dark/Light korrekt, weil var(--thead) */
  background: var(--thead) !important;
}

/* Slightly smaller type for dense tables */
.table-saas td, .table-saas th{
  font-size: .88rem;
}

/* Better wrapping for long text cells */
.td-wrap{
  white-space: normal !important;
  word-break: break-word;
}


.table-link{ color: inherit; text-decoration: none; }
.table-link:hover{ text-decoration: underline; }

/* Action button looks like SaaS icon pill */
.btn-icon{
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}
/* Dashboard Breite */
.dashboard-wrap{
  max-width: 1400px;
  margin: 0 auto;
}

/* Dropdown immer Ã¼ber Sticky-Table */
.navbar{ position: sticky; top: 0; z-index: 1050; }
.dropdown-menu{ z-index: 2000; }

/* Sticky Table Header darf nicht Ã¼ber Navbar/Dropdown liegen */
.table-sticky thead th{
  position: sticky;
  top: 0;
  z-index: 1;
}
/* Dashboard: erst bei schmalen Screens horizontal scrollen */
.dashboard-table-min{
  min-width: 1400px;
}
.dashboard-artist { font-size: 1.2rem; }
.dashboard-support { font-size: .95rem; }
.dashboard-col-prices { min-width: 100px; }
.col-artist-min { min-width: 240px; }
.col-presales-min { min-width: 320px; }

