:root {
  --bg: #f3f4f6;
  --panel: #ffffff;
  --text: #171717;
  --muted: #6b7280;
  --line: #e5e7eb;
  --dark: #111111;
  --danger: #b42318;
  --shadow: 0 8px 24px rgba(0, 0, 0, .06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button, input, textarea { font: inherit; }

button { cursor: pointer; }

.hidden { display: none !important; }

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 30px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--muted);
}

h1 {
  margin: 4px 0 0;
  font-size: 24px;
}

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

.search-input {
  width: min(340px, 40vw);
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 11px 14px;
  outline: none;
}

.search-input:focus,
.composer input:focus,
textarea:focus,
.login-box input:focus {
  border-color: #9ca3af;
  box-shadow: 0 0 0 3px rgba(17,17,17,.08);
}

.app-shell {
  max-width: 1800px;
  margin: 0 auto;
  padding: 24px;
}

.composer {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.composer form {
  display: flex;
  gap: 10px;
}

.composer input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 15px;
  outline: none;
}

.primary-button,
.teleprompter-button {
  border: 0;
  border-radius: 12px;
  background: var(--dark);
  color: white;
  padding: 12px 16px;
  font-weight: 700;
}

.ghost-button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 10px 14px;
}

.global-message {
  min-height: 18px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--danger);
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(300px, 1fr));
  gap: 16px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 20px;
}

.column {
  background: #eceef1;
  border: 1px solid #dde0e4;
  border-radius: 16px;
  padding: 14px;
  min-height: 300px;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.column-header > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.column-title {
  margin: 0;
  font-size: 16px;
}

.column-icon { font-size: 19px; }

.column-count {
  background: #d8dbe0;
  color: #3f4650;
  min-width: 27px;
  height: 27px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

.column-description {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 14px;
  min-height: 30px;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pauta-card {
  position: relative;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  box-shadow: 0 5px 16px rgba(0,0,0,.045);
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.status-dot {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 2px solid #9ca3af;
  background: white;
  border-radius: 6px;
  margin-top: 1px;
}

.card-title-wrap {
  flex: 1;
  min-width: 0;
}

.card-title-wrap.clickable {
  cursor: pointer;
}

.card-title {
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
  overflow-wrap: anywhere;
}

.card-date {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.expand-button,
.menu-button {
  border: 0;
  background: transparent;
  color: #737373;
  padding: 0 2px;
  font-weight: 900;
}

.expand-button {
  font-size: 22px;
  line-height: 1;
  transform: rotate(-90deg);
  transition: transform .18s ease;
  margin-top: -1px;
}

.expand-button.expanded {
  transform: rotate(0deg);
}

.menu-button {
  letter-spacing: 1px;
}

.card-menu {
  position: absolute;
  top: 38px;
  right: 10px;
  z-index: 4;
  min-width: 145px;
  padding: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.card-menu button,
.status-picker button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px;
  border-radius: 7px;
}

.card-menu button:hover,
.status-picker button:hover {
  background: #f3f4f6;
}

.danger-text { color: var(--danger); }

.status-picker {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px;
  background: #fafafa;
}

.status-picker button.active {
  background: #111;
  color: white;
}

.script-area {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.script-area label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 7px;
}

.script-area textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px;
  line-height: 1.5;
  outline: none;
}

.script-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.save-state {
  font-size: 11px;
  color: var(--muted);
}

.teleprompter-button {
  padding: 9px 11px;
  font-size: 12px;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(17,17,17,.92);
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-box {
  width: min(390px, 100%);
  background: white;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 70px rgba(0,0,0,.3);
}

.brand-mark {
  width: 48px;
  height: 48px;
  background: #111;
  color: white;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.login-box h1 { margin-top: 18px; }
.login-box p { color: var(--muted); }

.login-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  outline: none;
}

.login-box .primary-button { width: 100%; }

.form-error {
  min-height: 18px;
  margin-top: 9px;
  color: var(--danger);
  font-size: 13px;
}

@media (max-width: 900px) {
  .app-header {
    position: static;
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .header-actions { width: 100%; }
  .search-input { width: 100%; flex: 1; }
  .app-shell { padding: 14px; }

  .board {
    grid-template-columns: repeat(4, minmax(300px, 84vw));
    scroll-snap-type: x proximity;
  }

  .column { scroll-snap-align: start; }
}

@media (max-width: 560px) {
  .composer form { flex-direction: column; }
  .primary-button { width: 100%; }
  h1 { font-size: 21px; }
}


.brand-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dashboard-logo.fr2-logo {
  display: block;
  width: 180px;
  height: 72px;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 900px) {
  .dashboard-logo.fr2-logo {
    width: 150px;
    height: 60px;
  }
}

@media (max-width: 560px) {
  .brand-area {
    gap: 10px;
  }

  .dashboard-logo.fr2-logo {
    width: 115px;
    height: 48px;
  }
}


.camera-tp-button {
  border: 1px solid #111;
  border-radius: 12px;
  background: #fff;
  color: #111;
  padding: 9px 11px;
  font-size: 12px;
  font-weight: 800;
}

.script-footer {
  flex-wrap: wrap;
}

.script-footer .save-state {
  margin-right: auto;
}
