:root {
  --blue: #0d3f91;
  --blue-dark: #082c66;
  --blue-deep: #031735;
  --white: #ffffff;
  --bg: #eef3f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15,23,42,0.09);
  --shadow: 0 24px 70px rgba(3, 15, 35, 0.16);
  --shadow-soft: 0 14px 34px rgba(3, 15, 35, 0.08);
  --green: #16a34a;
  --red: #dc2626;
  --yellow: #eab308;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  font-family: Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(13, 63, 145, 0.16), transparent 30%),
    radial-gradient(circle at 90% 10%, rgba(47, 128, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #eef3f9 52%, #ffffff 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

/* AUTH */

.live-auth-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 72% 0%, rgba(47,128,255,0.32), transparent 34%),
    linear-gradient(135deg, #031735 0%, #062b66 54%, #0d3f91 100%);
}

.live-auth {
  width: min(100% - 28px, 460px);
}

.live-auth-card {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border-radius: 32px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 34px 90px rgba(0,0,0,0.28);
}

.live-auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue), #4f8cff);
}

.live-auth-card span,
.live-card-head span,
.live-section-kicker {
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}

.live-auth-card h1 {
  margin: 8px 0 10px;
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.live-auth-card p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.65;
}

.live-auth-card form {
  display: grid;
  gap: 14px;
}

.live-auth-card label,
.live-form label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 900;
}

.live-auth-card input,
.live-form input,
.live-form select,
.live-form textarea,
.live-quick-actions input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 13px;
  background: #f8fafc;
  color: var(--text);
  outline: none;
}

.live-auth-card textarea,
.live-form textarea {
  min-height: 112px;
  resize: vertical;
}

.live-auth-card input:focus,
.live-form input:focus,
.live-form select:focus,
.live-form textarea:focus,
.live-quick-actions input:focus {
  border-color: rgba(13,63,145,0.4);
  box-shadow: 0 0 0 4px rgba(13,63,145,0.09);
  background: #fff;
}

.live-auth-card button,
.live-form button,
.live-topbar button,
.live-quick-actions button,
.live-score-board button,
.live-danger-form button,
.live-comment button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--blue);
  color: #fff;
  font-weight: 950;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.live-auth-card button:hover,
.live-form button:hover,
.live-topbar button:hover,
.live-quick-actions button:hover,
.live-score-board button:hover,
.live-danger-form button:hover,
.live-comment button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(13,63,145,0.22);
}

.live-auth-card > a {
  display: inline-block;
  margin-top: 18px;
  color: var(--muted);
  font-weight: 800;
}

.live-alert {
  margin: 16px 0;
  padding: 13px 14px;
  border-radius: 16px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 900;
}

/* TOPBAR */

.live-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background:
    linear-gradient(90deg, rgba(3,23,53,0.98), rgba(6,43,102,0.98), rgba(13,63,145,0.98));
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 16px 42px rgba(0,0,0,0.2);
  backdrop-filter: blur(16px);
}

.live-topbar div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.live-topbar strong {
  font-size: 1.04rem;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-topbar span {
  color: rgba(255,255,255,0.72);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-topbar button {
  min-height: 42px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.16);
}

/* SHELL */

.live-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 70px;
  display: grid;
  gap: 22px;
}

.live-card,
.live-score-card {
  border-radius: 30px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15,23,42,0.06);
}

.live-card {
  padding: 24px;
}

.live-card-head {
  margin-bottom: 20px;
}

.live-card-head h1,
.live-card-head h2 {
  margin: 7px 0 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.055em;
}

/* DASHBOARD */

.live-match-list {
  display: grid;
  gap: 13px;
}

.live-match-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(15,23,42,0.07);
  border-left: 6px solid var(--blue);
  box-shadow: 0 10px 28px rgba(15,23,42,0.05);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.live-match-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 44px rgba(15,23,42,0.1);
}

.live-match-row strong,
.live-match-row small {
  display: block;
}

.live-match-row strong {
  font-size: 1.08rem;
  font-weight: 950;
}

.live-match-row small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.live-match-row b {
  display: block;
  color: var(--blue);
  font-size: 1.7rem;
  line-height: 1;
  text-align: right;
  font-weight: 950;
}

/* SCORE CARD */

.live-score-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 0%, rgba(47,128,255,0.25), transparent 34%),
    linear-gradient(135deg, #031735 0%, #062b66 54%, #0d3f91 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.live-score-card::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.live-status-line {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: rgba(255,255,255,0.78);
  font-weight: 900;
}

.live-status-line b {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.live-score-board {
  position: relative;
  z-index: 1;
  margin: 28px 0 22px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 22px;
  align-items: center;
  text-align: center;
}

.live-score-board > div {
  min-width: 0;
}

.live-score-board span {
  display: block;
  max-width: 100%;
  color: rgba(255,255,255,0.82);
  font-size: 1rem;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-score-board strong {
  display: block;
  margin: 10px 0 12px;
  font-size: clamp(4rem, 9vw, 7.5rem);
  line-height: 0.9;
  font-weight: 950;
  letter-spacing: -0.08em;
  text-shadow: 0 12px 34px rgba(0,0,0,0.26);
}

.live-score-board em {
  color: rgba(255,255,255,0.48);
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  font-style: normal;
  font-weight: 950;
}

.live-score-board form {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.live-score-board button {
  min-width: 70px;
  background: #fff;
  color: var(--blue);
  box-shadow: 0 12px 30px rgba(0,0,0,0.16);
}

.live-quick-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.live-quick-actions form {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.live-quick-actions button {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.16);
}

.live-quick-actions input {
  width: min(240px, 100%);
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.18);
  color: #fff;
}

.live-quick-actions input::placeholder {
  color: rgba(255,255,255,0.62);
}

.live-danger-form {
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.live-danger-form button {
  background: var(--red);
  box-shadow: 0 12px 28px rgba(220,38,38,0.25);
}

/* GRID / FORMS */

.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 22px;
  align-items: start;
}

.live-form {
  display: grid;
  gap: 14px;
}

.live-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.live-template-hints {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.live-template-hints button {
  min-height: 40px;
  background: #edf3ff;
  color: var(--blue);
  box-shadow: none;
}

.live-template-hints button:hover {
  box-shadow: 0 10px 24px rgba(13,63,145,0.12);
}

/* COMMENTS / EVENTS */

.live-comment-list,
.live-event-list {
  display: grid;
  gap: 11px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 3px;
}

.live-comment,
.live-event-list div {
  padding: 15px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,0.06);
  border-left: 5px solid var(--blue);
}

.live-comment--pending {
  border-left-color: var(--yellow);
}

.live-comment--approved {
  border-left-color: var(--green);
}

.live-comment--rejected,
.live-comment--hidden {
  border-left-color: #94a3b8;
  opacity: 0.72;
}

.live-comment strong,
.live-event-list strong {
  display: block;
  font-weight: 950;
}

.live-comment small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.live-comment p,
.live-event-list p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.live-comment form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.live-comment button {
  min-height: 38px;
  padding: 0 13px;
  font-size: 0.82rem;
}

.live-event-list b {
  display: inline-flex;
  min-width: 42px;
  margin-right: 8px;
  color: var(--blue);
  font-weight: 950;
}

/* MOBILE */

@media (max-width: 980px) {
  .live-grid {
    grid-template-columns: 1fr;
  }

  .live-score-board {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .live-score-board em {
    font-size: 2.3rem;
  }

  .live-form-row {
    grid-template-columns: 1fr;
  }

  .live-quick-actions input {
    width: 100%;
  }

  .live-quick-actions form {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .live-quick-actions form button,
  .live-quick-actions form input {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .live-topbar {
    min-height: 68px;
    padding: 0 14px;
  }

  .live-topbar strong {
    font-size: 0.96rem;
  }

  .live-topbar span {
    max-width: 210px;
    font-size: 0.78rem;
  }

  .live-topbar button {
    min-height: 39px;
    padding: 0 13px;
    font-size: 0.82rem;
  }

  .live-shell {
    width: min(100% - 18px, 1280px);
    margin-top: 16px;
    gap: 16px;
  }

  .live-card,
  .live-score-card,
  .live-auth-card {
    border-radius: 24px;
    padding: 20px;
  }

  .live-status-line {
    flex-direction: column;
    gap: 10px;
  }

  .live-score-board strong {
    font-size: clamp(3.6rem, 22vw, 5.8rem);
  }

  .live-score-board button {
    min-width: 62px;
  }

  .live-quick-actions form {
    grid-template-columns: 1fr;
  }

  .live-match-row {
    grid-template-columns: 1fr;
  }

  .live-match-row b {
    text-align: left;
  }
}

.live-auth-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.live-auth-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #edf3ff;
  color: var(--blue);
  font-weight: 900;
}

.live-auth-links a:hover {
  background: var(--blue);
  color: #fff;
}


/* =========================================================
   REGISTER PAGE
   ========================================================= */

.live-auth--register {
  width: min(100% - 28px, 720px);
}

.live-register-form {
  margin-top: 22px;
}

.live-register-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.live-register-full {
  grid-column: 1 / -1;
}

.live-alert--success {
  background: #dcfce7;
  color: #166534;
}

.live-auth-note {
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,0.08);
  color: #64748b;
  line-height: 1.55;
  font-size: 0.92rem;
}

.live-auth-note strong {
  color: #0f172a;
}

@media (max-width: 640px) {
  .live-register-grid {
    grid-template-columns: 1fr;
  }

  .live-auth--register {
    width: min(100% - 18px, 720px);
  }
}


/* Extra auth links for admin/trainer/live login pages */

.auth-extra-links,
.live-auth-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-extra-links a,
.live-auth-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #edf3ff;
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.auth-extra-links a:hover,
.live-auth-links a:hover {
  background: var(--blue);
  color: #fff;
}


/* =========================================================
   LIVE PANEL STRUCTURE POLISH
   ========================================================= */

.live-shell {
  align-items: start;
}

.live-card,
.live-score-card {
  margin-bottom: 0;
}

.live-grid {
  align-items: start;
}

.live-card-head {
  border-bottom: 1px solid rgba(15,23,42,0.08);
  padding-bottom: 16px;
}

.live-form {
  padding-top: 2px;
}

.live-template-hints {
  padding: 12px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(15,23,42,0.06);
}

.live-template-hints::before {
  content: "Schnellvorlagen";
  width: 100%;
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.live-score-card {
  margin-bottom: 0;
}

.live-status-line {
  margin-bottom: 4px;
}

.live-quick-actions {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.live-danger-form {
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

@media (max-width: 980px) {
  .live-grid {
    gap: 16px;
  }

  .live-score-card {
    padding: 20px;
  }
}

/* =========================================================
   LIVE PANEL REPAIR OVERRIDES
   ========================================================= */

.live-score-card {
  position: relative !important;
  overflow: hidden !important;
  padding: 28px !important;
  border-radius: 30px !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(47,128,255,0.28), transparent 34%),
    linear-gradient(135deg, #031735 0%, #062b66 54%, #0d3f91 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 28px 80px rgba(3,15,35,0.22) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
}

.live-score-card * {
  color: inherit;
}

.live-score-board {
  margin: 28px 0 24px !important;
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  gap: 28px !important;
  align-items: center !important;
  text-align: center !important;
}

.live-score-board span {
  display: block !important;
  color: rgba(255,255,255,0.82) !important;
  font-size: 1.05rem !important;
  font-weight: 950 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.live-score-board strong {
  display: block !important;
  margin: 10px 0 14px !important;
  color: #ffffff !important;
  font-size: clamp(4.5rem, 10vw, 8rem) !important;
  line-height: 0.9 !important;
  font-weight: 950 !important;
  letter-spacing: -0.08em !important;
  text-shadow: 0 18px 42px rgba(0,0,0,0.28) !important;
}

.live-score-board em {
  color: rgba(255,255,255,0.52) !important;
  font-size: clamp(3rem, 6vw, 5rem) !important;
  font-style: normal !important;
  font-weight: 950 !important;
}

.live-score-board button {
  min-width: 72px !important;
  background: #ffffff !important;
  color: #0d3f91 !important;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18) !important;
}

.live-status-line {
  display: flex !important;
  justify-content: space-between !important;
  gap: 16px !important;
  color: rgba(255,255,255,0.78) !important;
  font-weight: 900 !important;
}

.live-status-line b {
  display: inline-flex !important;
  padding: 8px 12px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.13) !important;
  border: 1px solid rgba(255,255,255,0.16) !important;
  color: #ffffff !important;
  font-size: 0.78rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
}

.live-quick-actions {
  padding: 16px !important;
  border-radius: 22px !important;
  background: rgba(255,255,255,0.09) !important;
  border: 1px solid rgba(255,255,255,0.13) !important;
}

.live-quick-actions button {
  background: rgba(255,255,255,0.16) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  color: #ffffff !important;
}

.live-quick-actions input {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(255,255,255,0.18) !important;
  color: #ffffff !important;
}

.live-quick-actions input::placeholder {
  color: rgba(255,255,255,0.6) !important;
}

.live-card {
  border-radius: 28px !important;
  background: #ffffff !important;
  border: 1px solid rgba(15,23,42,0.06) !important;
  box-shadow: 0 18px 48px rgba(3,15,35,0.1) !important;
}

.live-card-head {
  margin-bottom: 20px !important;
  padding-bottom: 16px !important;
  border-bottom: 1px solid rgba(15,23,42,0.08) !important;
}

.live-card-head span {
  color: #0d3f91 !important;
}

.live-card-head h1,
.live-card-head h2 {
  color: #0f172a !important;
}

.live-form input,
.live-form select,
.live-form textarea {
  background: #f8fafc !important;
  color: #0f172a !important;
  border: 1px solid rgba(15,23,42,0.1) !important;
}

.live-form label {
  color: #0f172a !important;
}

.live-comment-list,
.live-event-list {
  max-height: 520px;
  overflow-y: auto;
}

@media (max-width: 980px) {
  .live-score-board {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .live-score-board strong {
    font-size: clamp(4rem, 22vw, 6rem) !important;
  }

  .live-score-board em {
    font-size: 2.6rem !important;
  }

  .live-status-line {
    flex-direction: column !important;
  }
}


/* =========================================================
   LIVE RESET CARD
   ========================================================= */

.live-reset-card {
  border: 1px solid rgba(220, 38, 38, 0.16) !important;
}

.live-reset-card .live-card-head span {
  color: #dc2626 !important;
}

.live-reset-box {
  padding: 22px;
}

.live-reset-box p {
  margin: 0 0 16px;
  color: #64748b;
  line-height: 1.6;
}

.live-reset-form {
  display: grid;
  gap: 14px;
}

.live-reset-check {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: #fff7ed;
  border: 1px solid rgba(234, 88, 12, 0.18);
  color: #9a3412 !important;
  font-weight: 900;
}

.live-reset-check input {
  width: auto !important;
  min-height: auto !important;
}

.live-reset-button {
  background: #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 14px 34px rgba(220, 38, 38, 0.22) !important;
}

.live-reset-button:hover {
  box-shadow: 0 18px 42px rgba(220, 38, 38, 0.3) !important;
}


/* =========================================================
   CREATOR / LIVE PANEL SCROLL FIX
   Live-Seiten müssen wieder normal scrollbar sein.
   Überschreibt zu harte panel.css Desktop-Regeln.
   ========================================================= */

html,
body {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body {
  overflow-y: auto !important;
}

.live-shell,
.live-layout,
.live-app,
.live-main,
.live-content,
.live-page,
.live-dashboard,
.live-match-page,
.live-panel,
.live-wrap,
.live-container {
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

.live-main,
.live-content,
.live-page,
.live-dashboard,
.live-match-page {
  overflow-y: visible !important;
  overflow-x: hidden !important;
}

/* Falls Live-Seiten panel-Klassen mitnutzen */
body:has(.live-shell) .panel-main,
body:has(.live-shell) .panel-content,
body:has(.live-shell) .admin-main,
body:has(.live-shell) .trainer-main {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

body:has(.live-shell) {
  overflow-y: auto !important;
}

/* Fallback für Browser/Strukturen ohne :has-Wirkung:
   Live-Seiten verwenden oft eigene Wrapper, daher nochmal breit lösen. */
.live-card,
.live-grid,
.live-section,
.live-control-grid {
  overflow: visible !important;
}

@media (min-width: 981px) {
  .live-shell,
  .live-layout,
  .live-main,
  .live-content,
  .live-page,
  .live-dashboard,
  .live-match-page {
    width: 100% !important;
    max-width: none !important;
  }
}


/* =========================================================
   LIVE PANEL - HOMEPAGE TICKER SWITCH
   ========================================================= */

.live-home-ticker-card {
  border: 1px solid rgba(14, 165, 233, 0.18) !important;
}

.live-home-ticker-box {
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.live-home-ticker-box strong {
  display: block;
  color: #061735;
  font-weight: 950;
  font-size: 1rem;
}

.live-home-ticker-box p {
  margin: 6px 0 0;
  color: #64748b;
  line-height: 1.55;
}

.live-switch-form {
  margin: 0;
}

.live-toggle-switch {
  min-width: 132px;
  min-height: 48px;
  padding: 5px 14px 5px 5px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 950;
  transition: 0.18s ease;
}

.live-toggle-switch strong {
  color: inherit;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.live-toggle-knob {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
  transition: 0.18s ease;
}

.live-toggle-switch.is-on {
  background: #22c55e !important;
  color: #ffffff !important;
  box-shadow: 0 14px 34px rgba(34, 197, 94, 0.22);
}

.live-toggle-switch.is-off {
  background: #cbd5e1 !important;
  color: #475569 !important;
}

.live-toggle-switch.is-on .live-toggle-knob {
  transform: translateX(4px);
}

.live-toggle-switch.is-off .live-toggle-knob {
  transform: translateX(0);
}

@media (max-width: 720px) {
  .live-home-ticker-box {
    grid-template-columns: 1fr;
  }

  .live-toggle-switch {
    width: 100%;
    justify-content: space-between;
  }
}


/* =========================================================
   LIVE PANEL - TIMER + TICKER EVENT DELETE
   ========================================================= */

.live-timer-panel {
  padding: 22px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.live-timer-display {
  min-height: 150px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  gap: 4px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(34, 197, 94, 0.16), transparent 46%),
    linear-gradient(145deg, #061d46, #0b3d87);
  color: #ffffff;
  box-shadow: 0 20px 46px rgba(3, 18, 43, 0.18);
}

.live-timer-display span {
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}

.live-timer-display strong {
  font-size: 4rem;
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: -0.08em;
  color: #ffffff;
}

.live-timer-display small {
  color: rgba(255,255,255,0.72);
  font-weight: 850;
}

.live-timer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.live-timer-actions form {
  margin: 0;
}

.live-btn {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #eaf1fb;
  color: #0b3d87;
  font-weight: 950;
  cursor: pointer;
}

.live-btn-green {
  background: #22c55e !important;
  color: #ffffff !important;
}

.live-btn-danger {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.live-event-admin-list {
  padding: 18px 22px 22px;
  display: grid;
  gap: 12px;
}

.live-event-admin-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.live-event-admin-minute {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #0b3d87;
  color: #ffffff;
  font-weight: 950;
}

.live-event-admin-body strong {
  display: block;
  color: #061735;
  font-weight: 950;
}

.live-event-admin-body p {
  margin: 4px 0 0;
  color: #475569;
}

.live-event-admin-body small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-weight: 850;
}

.live-event-delete-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-weight: 950;
  cursor: pointer;
}

.live-muted {
  margin: 0;
  color: #64748b;
  font-weight: 750;
}

@media (max-width: 760px) {
  .live-timer-panel {
    grid-template-columns: 1fr;
  }

  .live-timer-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .live-timer-actions button {
    width: 100%;
  }

  .live-event-admin-item {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .live-event-admin-item form {
    grid-column: 1 / -1;
  }

  .live-event-delete-btn {
    width: 100%;
  }
}


/* =========================================================
   LIVE PANEL - AUTO MINUTE FIELD
   Minute wird automatisch vom Live-Timer gesetzt.
   Eingabefeld wird im Tickerformular ausgeblendet.
   ========================================================= */

.live-auto-minute-input {
  display: none !important;
}

.live-auto-minute-input,
.live-auto-minute-input + *,
.live-auto-minute-input ~ * {
  visibility: hidden;
}

/* Falls das Minutenfeld in einem Form-Grid-Block liegt */
.live-auto-minute-input {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Label "Minute" im bekannten Formularlayout ausblenden */
.live-card label:has(.live-auto-minute-input) {
  display: none !important;
}

/* Fallback für Browser/Strukturen: erstes Feld im Tickerformular ausblenden,
   sofern es eine automatisch markierte Minute enthält. */
.live-card form:has(.live-auto-minute-input) label:first-child {
  display: none !important;
}

.live-card form:has(.live-auto-minute-input) .form-row:first-child label:first-child,
.live-card form:has(.live-auto-minute-input) .live-form-grid > label:first-child {
  display: none !important;
}


/* =========================================================
   LIVE PANEL - HIDE STREAMING UI
   Creator/Live Match-Seite wird erstmal reines Ticker-Menü.
   ========================================================= */

.live-card:has([href*="stream"]),
.live-card:has([action*="stream"]),
.live-card:has(input[name*="stream"]),
.live-card:has(select[name*="stream"]),
.live-card:has(textarea[name*="stream"]) {
  display: none !important;
}

/* Häufige Stream-Klassen/Benennungen */
.live-stream-card,
.stream-card,
.livestream-card,
.live-stream-panel,
.stream-panel,
.livestream-panel,
.live-stream-box,
.stream-box,
.livestream-box,
.live-stream-section,
.stream-section,
.livestream-section {
  display: none !important;
}

/* Falls Streamtexte in Card-Heads auftauchen, per Wrapper nicht zuverlässig greifbar:
   diese Klasse kann später gezielt in EJS ergänzt werden. */
.live-hidden-stream-ui {
  display: none !important;
}


/* =========================================================
   LIVE PANEL - TICKER FORM CLEANUP
   Nach Entfernen des Minutenfeldes besseres Grid.
   ========================================================= */

.live-card form:has(.live-auto-minute-input) {
  position: relative;
}

.live-card form:has(.live-auto-minute-input) .live-form-grid,
.live-card form:has(.live-auto-minute-input) .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (max-width: 760px) {
  .live-card form:has(.live-auto-minute-input) .live-form-grid,
  .live-card form:has(.live-auto-minute-input) .form-grid {
    grid-template-columns: 1fr !important;
  }
}


/* =========================================================
   LIVE PANEL SAFE CLEANUP
   Ticker-Menü ohne sichtbares Minutenfeld und ohne Streambereiche
   ========================================================= */

.live-auto-minute-input,
input[name="event_minute"].live-auto-minute-input {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Alte manuelle Zeitfelder oben ausblenden, weil Live-Uhr das übernimmt */
form[action$="/minute"] {
  display: none !important;
}

/* Stream/Livestream UI im Creator Matchpanel ausblenden */
.live-card:has([href*="stream"]),
.live-card:has([action*="stream"]),
.live-card:has(input[name*="stream"]),
.live-card:has(select[name*="stream"]),
.live-card:has(textarea[name*="stream"]),
.live-stream-card,
.stream-card,
.livestream-card,
.live-stream-panel,
.stream-panel,
.livestream-panel,
.live-hidden-stream-ui {
  display: none !important;
}


/* =========================================================
   LIVE PANEL - TICKER EVENT ADMIN LIST
   ========================================================= */

.live-event-admin-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  margin: 10px 0;
  border-radius: 22px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.live-event-admin-minute {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #0b3d87;
  color: #ffffff;
  font-weight: 950;
}

.live-event-admin-body strong {
  display: block;
  color: #061735;
  font-weight: 950;
}

.live-event-admin-body p {
  margin: 4px 0 0;
  color: #475569;
}

.live-event-admin-body small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-weight: 850;
}

.live-event-delete-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-weight: 950;
  cursor: pointer;
}

@media (max-width: 760px) {
  .live-event-admin-item {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .live-event-admin-item form {
    grid-column: 1 / -1;
  }

  .live-event-delete-btn {
    width: 100%;
  }
}


/* =========================================================
   LIVE PANEL - HIDE COMMENTS FROM TICKER MENU
   Creator Match-Control bleibt reines Ticker-/Spielzeit-Menü.
   Kommentare kommen später in eigenes Moderations-/Kommentar-Modul.
   ========================================================= */

.live-card:has(.live-comment),
.live-card:has(form[action*="/comments/"]),
.live-card:has([class*="comment"]),
.live-comment,
.live-comments-card,
.comment-card,
.comments-card {
  display: none !important;
}


.live-hidden-comments-ui {
  display: none !important;
}


/* =========================================================
   LIVE PANEL - RESET CLOCK BUTTON
   ========================================================= */

.live-btn-muted {
  background: #64748b !important;
  color: #ffffff !important;
}

.live-btn-muted:hover {
  background: #475569 !important;
}


/* =========================================================
   LIVE PANEL - CONTROL ORDER CLEANUP
   ========================================================= */

.live-shell {
  display: grid !important;
  gap: 24px !important;
}

.live-timer-card {
  order: 1;
}

.live-score-card {
  order: 2;
}

.live-home-ticker-card {
  order: 3;
}

.live-card:has(form[action*="/ticker/add"]) {
  order: 4;
}

.live-card:has(form[action*="/ticker/"][action*="/delete"]),
.live-card:has(.live-event-admin-item) {
  order: 5;
}

.live-card:has(form[action*="/reset"]),
.live-reset-card {
  order: 6;
}

.live-card,
.live-score-card {
  scroll-margin-top: 90px;
}

.live-card-head {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.live-card-head span {
  color: #0b3d87 !important;
}

.live-score-card,
.live-timer-card,
.live-home-ticker-card {
  position: relative;
}

.live-timer-card::before,
.live-score-card::before,
.live-home-ticker-card::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 22px;
  width: 6px;
  height: 34px;
  border-radius: 999px;
  background: #0b3d87;
  opacity: 0.18;
}

@media (max-width: 760px) {
  .live-shell {
    gap: 16px !important;
  }

  .live-card,
  .live-score-card {
    border-radius: 24px !important;
  }
}


/* =========================================================
   LIVE PANEL - FINAL ORDER + APPLE STYLE PUBLISH SWITCH
   ========================================================= */

.live-shell {
  display: grid !important;
  gap: 22px !important;
}

/* Reihenfolge final */
.live-home-ticker-card {
  order: 1 !important;
}

.live-score-card {
  order: 2 !important;
}

.live-timer-card {
  order: 3 !important;
}

.live-card:has(form[action*="/ticker/add"]) {
  order: 4 !important;
}

.live-card:has(form[action*="/reset"]),
.live-reset-card {
  order: 5 !important;
}

/* Veröffentlichungskarte kompakt oben */
.live-home-ticker-card {
  border-radius: 28px !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(34, 197, 94, 0.10), transparent 34%),
    #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.live-home-ticker-card .live-card-head {
  padding-bottom: 12px !important;
}

.live-home-ticker-card .live-card-head h2 {
  font-size: clamp(1.55rem, 2.4vw, 2.25rem) !important;
}

.live-home-ticker-box {
  padding: 20px 22px 24px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 18px !important;
  align-items: center !important;
}

.live-home-ticker-box p {
  max-width: 620px !important;
}

/* Apple-Style Switch */
.live-toggle-switch {
  width: 112px !important;
  height: 58px !important;
  min-width: 112px !important;
  min-height: 58px !important;
  padding: 5px !important;
  border: 0 !important;
  border-radius: 999px !important;
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  cursor: pointer !important;
  transition: background 0.2s ease, box-shadow 0.2s ease !important;
}

.live-toggle-switch strong {
  position: absolute !important;
  right: 13px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 0.68rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  pointer-events: none !important;
}

.live-toggle-knob {
  width: 48px !important;
  height: 48px !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  box-shadow:
    0 7px 18px rgba(15, 23, 42, 0.20),
    inset 0 1px 0 rgba(255,255,255,0.8) !important;
  transition: transform 0.22s ease !important;
}

.live-toggle-switch.is-on {
  background: #22c55e !important;
  color: #ffffff !important;
  box-shadow: 0 16px 34px rgba(34, 197, 94, 0.24) !important;
}

.live-toggle-switch.is-on .live-toggle-knob {
  transform: translateX(54px) !important;
}

.live-toggle-switch.is-on strong {
  left: 14px !important;
  right: auto !important;
}

.live-toggle-switch.is-off {
  background: #cbd5e1 !important;
  color: #475569 !important;
}

.live-toggle-switch.is-off .live-toggle-knob {
  transform: translateX(0) !important;
}

/* Überschrift/Copy etwas klarer */
.live-home-ticker-card .live-home-ticker-box strong {
  font-size: 1.05rem !important;
}

@media (max-width: 760px) {
  .live-home-ticker-box {
    grid-template-columns: 1fr !important;
  }

  .live-switch-form {
    display: flex !important;
    justify-content: flex-start !important;
  }

  .live-toggle-switch {
    width: 112px !important;
  }
}


/* =========================================================
   LIVE PANEL - INLINE TICKER HISTORY
   Verlauf direkt im Tickerformular, kein extra Verwaltungs-Panel
   ========================================================= */

.live-inline-ticker-history {
  margin-top: 22px !important;
  padding-top: 20px !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.live-inline-ticker-history-head {
  margin-bottom: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.live-inline-ticker-history-head strong {
  color: #061735 !important;
  font-size: 1rem !important;
  font-weight: 950 !important;
}

.live-inline-ticker-history-head span {
  min-height: 30px !important;
  padding: 0 11px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  background: #eaf1fb !important;
  color: #0b3d87 !important;
  font-size: 0.74rem !important;
  font-weight: 950 !important;
}

.live-event-admin-item {
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr) auto !important;
  gap: 14px !important;
  align-items: center !important;
  padding: 14px !important;
  margin: 10px 0 !important;
  border-radius: 22px !important;
  background: #f8fafc !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.live-event-admin-minute {
  width: 46px !important;
  height: 46px !important;
  border-radius: 16px !important;
  display: grid !important;
  place-items: center !important;
  background: #0b3d87 !important;
  color: #ffffff !important;
  font-weight: 950 !important;
}

.live-event-admin-body strong {
  display: block !important;
  color: #061735 !important;
  font-weight: 950 !important;
}

.live-event-admin-body p {
  margin: 4px 0 0 !important;
  color: #475569 !important;
}

.live-event-admin-body small {
  display: block !important;
  margin-top: 5px !important;
  color: #64748b !important;
  font-weight: 850 !important;
}

.live-event-delete-btn {
  min-height: 38px !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #ef4444 !important;
  color: #ffffff !important;
  font-weight: 950 !important;
  cursor: pointer !important;
}

.live-muted {
  margin: 0 !important;
  padding: 16px !important;
  border-radius: 18px !important;
  background: #f8fafc !important;
  color: #64748b !important;
  font-weight: 800 !important;
}

@media (max-width: 760px) {
  .live-event-admin-item {
    grid-template-columns: 46px minmax(0, 1fr) !important;
  }

  .live-event-admin-item form {
    grid-column: 1 / -1 !important;
  }

  .live-event-delete-btn {
    width: 100% !important;
  }
}


/* =========================================================
   LIVE PANEL - FINAL CONTROL ORDER
   1 Publish Switch
   2 Tore / Spielstand
   3 Live-Uhr
   4 Ereignis erstellen + Verlauf
   5 Spiel zurücksetzen
   ========================================================= */

.live-shell {
  display: grid !important;
  gap: 22px !important;
}

/* 1. Live-Ticker veröffentlichen */
.live-home-ticker-card,
.live-card:has(form[action*="/home-ticker-toggle"]) {
  order: 1 !important;
}

/* 2. Tore / Spielstand */
.live-score-card,
section:has(.live-score-board),
section:has(form[action*="/score"]) {
  order: 2 !important;
}

/* 3. Live-Uhr */
.live-timer-card,
section:has(.live-timer-panel),
section:has(form[action*="/timer/"]) {
  order: 3 !important;
}

/* 4. Ereignis erstellen + Verlauf */
.live-card:has(form[action*="/ticker/add"]),
section:has(.live-inline-ticker-history) {
  order: 4 !important;
}

/* 5. Spiel zurücksetzen */
.live-card:has(form[action*="/reset"]),
.live-reset-card,
section:has(.live-reset-form) {
  order: 5 !important;
}

/* Ausgeblendete Altbereiche bleiben unten/unsichtbar */
.live-hidden-comments-ui,
.live-hidden-stream-ui,
.live-card:has(form[action*="/comments/"]),
.live-card:has([action*="stream"]) {
  order: 99 !important;
}


/* =========================================================
   FIX: FIRST PLAYER SELECT WAS HIDDEN
   Das Minutenfeld ist hidden, aber Spieler 1 muss sichtbar bleiben.
   ========================================================= */

/* Alte aggressive Minuten-Hide-Regeln neutralisieren */
.live-card form:has(.live-auto-minute-input) label:first-child,
.live-card form:has(.live-auto-minute-input) .form-row:first-child label:first-child,
.live-card form:has(.live-auto-minute-input) .live-form-row:first-child label:first-child,
.live-card form:has(.live-auto-minute-input) .live-form-grid > label:first-child,
.live-card form:has(.live-auto-minute-input) .form-grid > label:first-child {
  display: grid !important;
  visibility: visible !important;
}

/* Nur das echte Minuteninput bleibt unsichtbar */
.live-auto-minute-input,
input[name="event_minute"].live-auto-minute-input,
input[name="event_minute"][type="hidden"] {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Spieler-Felder ausdrücklich sichtbar halten */
select[name="player_id"],
select[name="related_player_id"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

label:has(select[name="player_id"]),
label:has(select[name="related_player_id"]) {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}


/* =========================================================
   FIXED LIVE TICKER FORM
   ========================================================= */

.live-ticker-create-card {
  order: 4 !important;
}

.live-ticker-form {
  padding: 22px !important;
  display: grid !important;
  gap: 18px !important;
}

.live-form-row-two {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

.live-ticker-form label {
  display: grid !important;
  gap: 8px !important;
  color: #061735 !important;
  font-weight: 950 !important;
}

.live-ticker-form input,
.live-ticker-form select,
.live-ticker-form textarea {
  width: 100% !important;
  min-height: 52px !important;
  padding: 0 16px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  background: #f8fafc !important;
  color: #061735 !important;
  font-weight: 800 !important;
  outline: none !important;
}

.live-ticker-form textarea {
  min-height: 120px !important;
  padding-top: 14px !important;
  resize: vertical !important;
}

.live-ticker-form input:focus,
.live-ticker-form select:focus,
.live-ticker-form textarea:focus {
  border-color: rgba(11, 61, 135, 0.45) !important;
  box-shadow: 0 0 0 4px rgba(11, 61, 135, 0.08) !important;
}

.live-auto-minute-input {
  display: none !important;
}

.live-template-box {
  padding: 16px !important;
  border-radius: 20px !important;
  background: #f8fafc !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.live-template-box > span {
  display: block !important;
  margin-bottom: 12px !important;
  color: #64748b !important;
  font-size: 0.8rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.live-template-buttons {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

.live-template-btn {
  min-height: 38px !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #eaf1fb !important;
  color: #0b3d87 !important;
  font-weight: 950 !important;
  cursor: pointer !important;
}

.live-submit-btn {
  min-height: 52px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #174ea6 !important;
  color: #ffffff !important;
  font-size: 1rem !important;
  font-weight: 950 !important;
  cursor: pointer !important;
}

.live-inline-ticker-history {
  margin: 0 22px 22px !important;
  padding-top: 20px !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.live-inline-ticker-history-head {
  margin-bottom: 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
}

.live-inline-ticker-history-head strong {
  color: #061735 !important;
  font-weight: 950 !important;
}

.live-inline-ticker-history-head span {
  min-height: 30px !important;
  padding: 0 11px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  background: #eaf1fb !important;
  color: #0b3d87 !important;
  font-size: 0.74rem !important;
  font-weight: 950 !important;
}

@media (max-width: 760px) {
  .live-ticker-form {
    padding: 18px !important;
  }

  .live-form-row-two {
    grid-template-columns: 1fr !important;
  }

  .live-inline-ticker-history {
    margin: 0 18px 18px !important;
  }
}


/* =========================================================
   HARD FIX - LIVE TICKER CREATE FORM RESTORE
   ========================================================= */

.live-ticker-create-card {
  order: 4 !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.live-ticker-create-card,
.live-ticker-create-card * {
  box-sizing: border-box !important;
}

.live-ticker-create-card .live-form,
.live-ticker-form {
  padding: 22px !important;
  display: grid !important;
  gap: 18px !important;
  min-height: 0 !important;
}

.live-ticker-create-card label {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  gap: 8px !important;
  color: #061735 !important;
  font-weight: 950 !important;
}

.live-ticker-create-card .live-form-row,
.live-ticker-create-card .live-form-row-two {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  min-height: 0 !important;
}

.live-ticker-create-card input:not([type="hidden"]),
.live-ticker-create-card select,
.live-ticker-create-card textarea {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  min-height: 52px !important;
  padding: 0 16px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  background: #f8fafc !important;
  color: #061735 !important;
  font-weight: 800 !important;
}

.live-ticker-create-card textarea {
  min-height: 120px !important;
  padding-top: 14px !important;
  resize: vertical !important;
}

.live-auto-minute-input,
.live-ticker-create-card input[type="hidden"][name="event_minute"] {
  display: none !important;
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Alte aggressive Hide-Regeln endgültig neutralisieren */
.live-card form:has(.live-auto-minute-input) label:first-child,
.live-card form:has(.live-auto-minute-input) .live-form-row:first-child label:first-child,
.live-card form:has(.live-auto-minute-input) .live-form-grid > label:first-child,
.live-card form:has(.live-auto-minute-input) .form-grid > label:first-child {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.live-template-box {
  display: block !important;
  padding: 16px !important;
  border-radius: 20px !important;
  background: #f8fafc !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.live-template-box > span {
  display: block !important;
  margin-bottom: 12px !important;
  color: #64748b !important;
  font-size: 0.8rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.live-template-buttons {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

.live-template-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #eaf1fb !important;
  color: #0b3d87 !important;
  font-weight: 950 !important;
  cursor: pointer !important;
}

.live-submit-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 52px !important;
  width: 100% !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #174ea6 !important;
  color: #ffffff !important;
  font-size: 1rem !important;
  font-weight: 950 !important;
  cursor: pointer !important;
}

.live-inline-ticker-history {
  margin: 0 22px 22px !important;
  padding-top: 20px !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.live-inline-ticker-history-head {
  margin-bottom: 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
}

.live-inline-ticker-history-head strong {
  color: #061735 !important;
  font-weight: 950 !important;
}

.live-inline-ticker-history-head span {
  min-height: 30px !important;
  padding: 0 11px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  background: #eaf1fb !important;
  color: #0b3d87 !important;
  font-size: 0.74rem !important;
  font-weight: 950 !important;
}

@media (max-width: 760px) {
  .live-ticker-create-card .live-form-row,
  .live-ticker-create-card .live-form-row-two {
    grid-template-columns: 1fr !important;
  }

  .live-ticker-form {
    padding: 18px !important;
  }

  .live-inline-ticker-history {
    margin: 0 18px 18px !important;
  }
}


/* =========================================================
   FIX: SHOW QUICK TEMPLATES + SAVE BUTTON
   ========================================================= */

.live-ticker-create-card .live-template-box {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  padding: 16px !important;
  border-radius: 20px !important;
  background: #f8fafc !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.live-ticker-create-card .live-template-box > span {
  display: block !important;
  margin-bottom: 12px !important;
  color: #64748b !important;
  font-size: 0.8rem !important;
  font-weight: 950 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.live-ticker-create-card .live-template-buttons {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

.live-ticker-create-card .live-template-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  padding: 0 16px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #eaf1fb !important;
  color: #0b3d87 !important;
  font-weight: 950 !important;
  cursor: pointer !important;
}

.live-ticker-create-card .live-submit-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 52px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #174ea6 !important;
  color: #ffffff !important;
  font-size: 1rem !important;
  font-weight: 950 !important;
  cursor: pointer !important;
}

.live-ticker-create-card .live-submit-btn:hover {
  background: #0b3d87 !important;
}


/* =========================================================
   FIX: TICKER SAVE BUTTON FORCE SHOW
   ========================================================= */

.live-ticker-save-btn,
.live-ticker-create-card .live-submit-btn,
form[action*="/ticker/add"] .live-submit-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-height: 54px !important;
  margin-top: 4px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #174ea6 !important;
  color: #ffffff !important;
  font-size: 1rem !important;
  font-weight: 950 !important;
  cursor: pointer !important;
  opacity: 1 !important;
  visibility: visible !important;
  position: relative !important;
  left: auto !important;
  pointer-events: auto !important;
}

.live-ticker-save-btn:hover,
form[action*="/ticker/add"] .live-submit-btn:hover {
  background: #0b3d87 !important;
}

