/* assets/css/video_cms.css – Dark UI für Video CMS */

:root {
    --bg-body: #020617;
    --bg-surface: #020617;
    --bg-card: #020617;
    --bg-elevated: #020617;
    --border-subtle: rgba(148, 163, 184, 0.25);
    --accent: #22c55e;
    --accent-soft: rgba(34, 197, 94, 0.12);
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --danger: #ef4444;
    --radius-lg: 18px;
    --radius-md: 10px;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.85);
    --pill-bg: rgba(148, 163, 184, 0.1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.vcms-body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    background: radial-gradient(circle at top, #0b1120 0, #020617 40%, #000 100%);
    color: var(--text-main);
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.vcms-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.vcms-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    backdrop-filter: blur(18px);
    background: linear-gradient(to bottom, rgba(15,23,42,0.98), rgba(15,23,42,0.8), transparent);
    border-bottom: 1px solid rgba(148,163,184,0.3);
}

.vcms-header-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.vcms-logo {
    font-weight: 600;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.vcms-nav {
    display: flex;
    gap: 12px;
}
.vcms-nav a {
    font-size: 0.86rem;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--text-muted);
}
.vcms-nav a:hover {
    border-color: rgba(148,163,184,0.6);
    background: rgba(15,23,42,0.85);
    text-decoration: none;
}

.vcms-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}
.vcms-user {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.vcms-main {
    padding: 16px 20px 24px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Cards */

.card {
    background: radial-gradient(circle at top left, rgba(34,197,94,0.06), transparent 40%) , rgba(15,23,42,0.92);
    border-radius: 26px;
    border: 1px solid rgba(148,163,184,0.35);
    box-shadow: var(--shadow-soft);
    padding: 18px 20px;
}

.card-sub {
    background: radial-gradient(circle at top, rgba(148,163,184,0.1), transparent 45%), rgba(15,23,42,0.9);
    border-radius: 20px;
    border: 1px solid rgba(148,163,184,0.35);
    padding: 14px 16px 16px;
}

.card h1 {
    font-size: 1.25rem;
    margin: 0 0 4px;
}
.card h2 {
    font-size: 0.98rem;
    margin: 0 0 6px;
}
.card p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.card-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(148,163,184,0.3);
    padding-bottom: 8px;
}

/* Buttons / Inputs */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.85rem;
    padding: 6px 12px;
    background: rgba(15,23,42,0.95);
    color: var(--text-main);
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.08s ease, background 0.1s ease, border-color 0.1s ease;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15,23,42,0.9);
    text-decoration: none;
}
.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    color: #022c22;
    border-color: rgba(34,197,94,0.8);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #16a34a, #22c55e);
}

.btn-secondary {
    background: rgba(15,23,42,0.9);
    border-color: rgba(148,163,184,0.6);
}

.btn-ghost {
    background: transparent;
    border-color: rgba(148,163,184,0.5);
    color: var(--text-muted);
}
.btn-ghost:hover {
    background: rgba(15,23,42,0.9);
}

.btn-xs {
    padding: 4px 9px;
    font-size: 0.78rem;
}

.form-control {
    width: 100%;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.5);
    padding: 6px 10px;
    font-size: 0.85rem;
    background: rgba(15,23,42,0.96);
    color: var(--text-main);
    outline: none;
}
.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(34,197,94,0.4);
}

/* Layout helpers */

.vcms-filters {
    display: flex;
    gap: 8px;
    align-items: center;
}

.grid-2 {
    display: grid;
    grid-template-columns: minmax(0,1.2fr) minmax(0,1fr);
    gap: 14px;
    margin-top: 14px;
}

@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: minmax(0,1fr);
    }
}

/* Board */

.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.board-col {
    background: rgba(15,23,42,0.9);
    border-radius: 18px;
    border: 1px solid rgba(148,163,184,0.4);
    padding: 10px;
    display: flex;
    flex-direction: column;
    max-height: 70vh;
}

.board-col-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.board-col-title {
    font-size: 0.88rem;
    font-weight: 500;
}
.board-col-count {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.board-col-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.board-col-body.drop-target {
    outline: 1px dashed rgba(34,197,94,0.8);
    outline-offset: 2px;
}

/* Cards */

.board-card {
    background: radial-gradient(circle at top left, rgba(34,197,94,0.18), transparent 55%);
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,0.45);
    padding: 8px 9px;
    cursor: grab;
    box-shadow: 0 8px 22px rgba(15,23,42,0.9);
}
.board-card.dragging {
    opacity: 0.6;
    box-shadow: 0 0 0 1px rgba(34,197,94,0.7);
}

.board-card-title {
    font-size: 0.9rem;
    margin: 0 0 4px;
}

.board-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Pills / Badges */

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,0.8);
    padding: 1px 7px;
    font-size: 0.76rem;
    background: rgba(15,23,42,0.9);
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 0.76rem;
    border: 1px solid transparent;
}
.badge.primary {
    background: rgba(34,197,94,0.15);
    border-color: rgba(34,197,94,0.7);
    color: #bbf7d0;
}
.badge.muted {
    background: rgba(148,163,184,0.1);
    border-color: rgba(148,163,184,0.6);
    color: #cbd5f5;
}

/* Tables */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.table th,
.table td {
    padding: 6px 6px;
    border-bottom: 1px solid rgba(30,64,175,0.7);
}
.table th {
    text-align: left;
    font-weight: 500;
    color: var(--text-muted);
}

/* KPIs */

.kpi-row {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
}

.kpi-card {
    border-radius: 18px;
    border: 1px solid rgba(34,197,94,0.35);
    background: radial-gradient(circle at top, rgba(34,197,94,0.22), rgba(15,23,42,0.95));
    padding: 8px 10px;
}
.kpi-value {
    font-size: 1.1rem;
    font-weight: 600;
}
.kpi-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.board-card-meta .deadline-label {
    margin-left: 0.5rem;
    font-size: 0.85rem;
    opacity: 0.8;
}

.board-card-meta .deadline-label.deadline-overdue {
    font-weight: 600;
    color: #c0392b; /* z. B. Rot, nach deinem Design anpassen */
}



/* ==========================================================
   VCMS Mobile Patch – ohne neue HTML-Klassen
   -> ANS ENDE von assets/css/video_cms.css
   ========================================================== */

html { -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; }

body.vcms-body { overflow-x: hidden; }

/* Touch / iOS Zoom vermeiden */
.btn, a, input, select, textarea { min-height: 44px; }
input, select, textarea { font-size: 16px; }

/* Main darf auf Mobile nicht „zu eng“ werden */
@media (max-width: 640px) {
  .vcms-main {
    padding: 12px 12px 18px;
  }
}

/* ----------------------------------------------------------
   Header: wrap + Nav horizontal scroll statt Überlauf
   ---------------------------------------------------------- */
@media (max-width: 820px) {
  .vcms-header {
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .vcms-header-left,
  .vcms-header-right {
    flex: 1 1 100%;
    width: 100%;
    justify-content: space-between;
  }

  .vcms-header-left {
    gap: 10px;
    align-items: center;
  }

  /* Nav: falls viele Links -> horizontal scroll (sauber auf Mobile) */
  .vcms-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    gap: 8px;
    padding-bottom: 4px;
  }
  .vcms-nav a { flex: 0 0 auto; }

  /* User/Text nicht unnötig Platz fressen */
  .vcms-user {
    max-width: 60vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* ----------------------------------------------------------
   Filter/Buttons: stacken, volle Breite, kein Quetschen
   ---------------------------------------------------------- */
@media (max-width: 820px) {
  .vcms-filters {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .vcms-filters .form-control {
    flex: 1 1 100%;
    width: 100%;
  }

  .vcms-filters .btn {
    flex: 1 1 calc(50% - 6px);
    width: auto; /* wichtig: nicht 100% erzwingen, sonst hässlich */
  }
}

@media (max-width: 480px) {
  .vcms-filters .btn {
    flex: 1 1 100%;
    width: 100%;
  }
}

/* ----------------------------------------------------------
   Cards: weniger Innenabstand, damit Content atmen kann
   ---------------------------------------------------------- */
@media (max-width: 640px) {
  .card { padding: 14px 14px; border-radius: 22px; }
  .card-sub { padding: 12px 12px 14px; border-radius: 18px; }

  .card-header {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .card-header .vcms-filters,
  .card-header .btn {
    width: 100%;
  }
}

/* ----------------------------------------------------------
   Board: auf Mobile horizontal scroll (Spalten bleiben nutzbar)
   ---------------------------------------------------------- */
@media (max-width: 820px) {
  .board-grid {
    display: flex;              /* statt Grid -> horizontales Board */
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
  }

  .board-col {
    flex: 0 0 86vw;             /* eine Spalte ~ Bildbreite */
    max-width: 86vw;
    max-height: 72vh;           /* ok für Mobile */
    scroll-snap-align: start;
  }

  /* Karten etwas „touchiger“ */
  .board-card { padding: 10px 10px; }
  .board-card-title { font-size: 0.95rem; }
  .board-card-meta { font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .board-col {
    flex-basis: 92vw;
    max-width: 92vw;
  }
}

/* ----------------------------------------------------------
   Tabellen: nicht quetschen -> scrollen
   ---------------------------------------------------------- */
@media (max-width: 820px) {
  .table {
    display: block;             /* wrapper-light ohne HTML-Änderung */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .table th, .table td {
    padding: 8px 10px;
  }
}

/* ----------------------------------------------------------
   KPI: auf Mobile enger & stabil
   ---------------------------------------------------------- */
@media (max-width: 640px) {
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .kpi-row { grid-template-columns: minmax(0, 1fr); }
}

/* Optional: reduziert Motion (professionell für UX) */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover { transform: none; box-shadow: none; }
}


/* ==========================================================
   Layout: 90% Screen-Nutzung (ohne HTML-Änderungen)
   -> ANS ENDE von video_cms.css
   ========================================================== */

/* Desktop/Allgemein: Main nutzt ~90% der Viewport-Breite */
.vcms-main {
  width: min(95vw, 2200px);     /* 90% Bildschirm, aber gedeckelt */
  max-width: none;             /* killt die 1400px Begrenzung */
  margin: 0 auto;
  padding: 16px 20px 24px;
}

/* Karten/Flächen sollen nicht übermäßig „luftig“ wirken */
.card { padding: 18px 20px; }
.card-sub { padding: 14px 16px 16px; }

/* Große Screens dürfen noch mehr nutzen */
@media (min-width: 1600px) {
  .vcms-main { width: min(97vw, 2600px); }
}

/* Mobile: fast volle Breite, mit sauberem Rand */
@media (max-width: 640px) {
  .vcms-main {
    width: 94vw;               /* praktisch Vollbreite */
    padding: 12px 12px 18px;   /* kleiner Gutter */
  }
}

/* Optional: Board + Tabellen profitieren von mehr Fläche */
.board-grid { width: 100%; }
.table { width: 100%; }


/* =========================
   Tags (multi-select) – Apple-Style
   ========================= */

select[multiple].form-control,
.form-control[multiple] {
    height: 180px;              /* statt Mini-Höhe */
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.92);

    outline: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    -webkit-appearance: none;
    appearance: none;

    /* bessere Lesbarkeit */
    font-size: 0.92rem;
    line-height: 1.35;

    /* smooth scroll look */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.22) rgba(255,255,255,.06);
}

/* Optionen */
select[multiple].form-control option,
.form-control[multiple] option {
    padding: 8px 10px;
    margin: 2px 0;
    border-radius: 10px;
    color: rgba(255,255,255,.92);
}

/* Hover */
select[multiple].form-control option:hover,
.form-control[multiple] option:hover {
    background: rgba(255,255,255,.08);
}

/* Selected – klar sichtbar */
select[multiple].form-control option:checked,
.form-control[multiple] option:checked {
    background: rgba(59,130,246,.35); /* primary-ish */
    color: #fff;
}

/* Focus */
select[multiple].form-control:focus,
.form-control[multiple]:focus {
    border-color: rgba(59,130,246,.55);
    box-shadow: 0 0 0 4px rgba(59,130,246,.18);
}

/* Scrollbar (Chromium) */
select[multiple].form-control::-webkit-scrollbar,
.form-control[multiple]::-webkit-scrollbar {
    width: 10px;
}
select[multiple].form-control::-webkit-scrollbar-track,
.form-control[multiple]::-webkit-scrollbar-track {
    background: rgba(255,255,255,.06);
    border-radius: 999px;
}
select[multiple].form-control::-webkit-scrollbar-thumb,
.form-control[multiple]::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.22);
    border-radius: 999px;
}
select[multiple].form-control::-webkit-scrollbar-thumb:hover,
.form-control[multiple]::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,.30);
}

/* Helper-Text unter dem Feld */
.card-sub small,
.form-grid small {
    color: rgba(156,163,175,.95);
}
/* ===== MODAL CORE ===== */
.vcms-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2,6,23,0.75);
    backdrop-filter: blur(6px);
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;
}

.vcms-modal-backdrop.hidden {
    display: none;
}

.vcms-modal {
    width: min(860px, 96vw);
    max-height: 90vh;
    overflow-y: auto;

    background: #020617;
    border-radius: 18px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.6);

    padding: 0;
}

.vcms-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px 18px;
    border-bottom: 1px solid rgba(148,163,184,0.15);
}

.vcms-modal-body {
    padding: 18px;
}

.vcms-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}
.vcms-modal-backdrop{
    position:fixed; inset:0;
    background:rgba(2,6,23,.75);
    backdrop-filter: blur(6px);
    z-index:9999;
    display:flex; align-items:center; justify-content:center;
}
.vcms-modal-backdrop.hidden{ display:none; }

.vcms-modal{
    width:min(900px, 96vw);
    max-height:90vh;
    overflow:auto;
    background: var(--bg-card, #020617);
    border:1px solid rgba(148,163,184,0.15);
    border-radius:18px;
    box-shadow:0 40px 90px rgba(0,0,0,.6);
}
.vcms-modal-header{
    display:flex; align-items:center; justify-content:space-between;
    padding:14px 18px;
    border-bottom:1px solid rgba(148,163,184,0.15);
}
.vcms-modal-body{ padding:18px; }
.vcms-modal-actions{
    display:flex; justify-content:flex-end; gap:8px;
    margin-top:16px;
}

/* Multi-Select angenehm */
#editTags{
    min-height: 150px;
    padding: 10px;
    border-radius: 14px;
}
#editTags option{
    padding: 6px 10px;
    border-radius: 10px;
}
/* ===== TOOLBAR (fehlt bei dir aktuell) ===== */
.vcms-toolbar{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-top:10px;
  padding-bottom:10px;
  border-bottom:1px solid rgba(148,163,184,0.25);
}
.vcms-toolbar-left{ flex: 1 1 260px; min-width: 220px; }
.vcms-toolbar-filters{
  flex: 2 1 520px;
  display:grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap:10px;
  min-width: 320px;
}
.vcms-toolbar-actions{
  flex: 0 0 auto;
  display:flex;
  align-items:center;
  gap:10px;
}
.vcms-search{
  width:100%;
  border-radius:999px;
  border:1px solid rgba(148,163,184,0.5);
  padding: 8px 12px;
  background: rgba(15,23,42,0.96);
  color: var(--text-main);
  outline: none;
}
.vcms-search:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.4);
}

@media (max-width: 820px){
  .vcms-toolbar-filters{
    grid-template-columns: 1fr;
  }
  .vcms-toolbar-actions{
    width:100%;
    justify-content:space-between;
  }
}

/* ===== FORM GRID (fehlt bei dir aktuell) ===== */
.form-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:12px;
}
@media (max-width: 720px){
  .form-grid{ grid-template-columns: 1fr; }
}

/* ===== MODAL UX: Body Lock ===== */
body.vcms-modal-open{
  overflow:hidden;
}

/* Optional: Modal scroll nicer */
.vcms-modal{
  overscroll-behavior: contain;
}
textarea.form-control{
  border-radius: 12px;
  height: auto;
  min-height: 140px;
  padding: 10px 12px;
  line-height: 1.35;
}
