/* CINE DECIDE? - stiluri mobile-first, brand Lappsus.
   Baza (fara media query) tinteste telefoane inguste (~360-430px).
   Media queries adauga layout de tip grid pentru ecrane late (tableta / ecran de proiectie). */

/* Font Urbanist auto-gazduit (nu mai e incarcat de pe fonts.googleapis.com) -
   evita trimiterea IP-ului vizitatorului catre Google fara consimtamant si taie
   2 round-trip-uri catre alte origini din calea critica de randare a textului.
   Doar greutatile chiar folosite in acest fisier: 400/600/700/800 + 400 italic. */
@font-face {
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/urbanist-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Urbanist';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/urbanist-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Urbanist';
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/urbanist-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Urbanist';
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/urbanist-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Token-uri de brand Lappsus */
  --blue: #3b9dd7;
  --coral: #e82e61;
  --white: #ffffff;
  --ice: #edeff4;
  --silver: #c9cad3;
  --slate: #313544;
  --dark: #1a1d28;
  --black: #000000;
  --gradient: linear-gradient(135deg, var(--blue), var(--coral));
  --gradient-h: linear-gradient(90deg, var(--blue), var(--coral));

  /* Token-uri semantice ale aplicatiei, derivate din brand */
  --bg: var(--dark);
  --bg-elevated: #232838;
  --card: #232838;
  --border: rgba(201, 202, 211, 0.18);
  --text: var(--ice);
  --text-dim: var(--silver);
  --accent: var(--blue);
  --accent-strong: #2f8dc4;
  --good: #3ecf8e;
  --warn: #ffb84d;
  --danger: var(--coral);
  --radius: 14px;
  --gap: 14px;
  --maxw: 640px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Urbanist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: 32px;
}

.cd-shell {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px;
}

/* --- Brand bar (logo Lappsus + selector de limba) --- */
.cd-brand-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0 4px;
  margin-bottom: 4px;
}

.cd-brand-logo {
  height: 22px;
  width: auto;
  opacity: 0.95;
}

.lang-switcher {
  display: flex;
  gap: 6px;
}

.lang-btn {
  padding: 5px 9px;
  background: transparent;
  border: 1px solid rgba(201, 202, 211, 0.3);
  color: var(--silver);
  font-family: "Urbanist", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
}

.lang-btn.active {
  background: var(--gradient);
  color: var(--white);
  border-color: transparent;
}

.lang-btn:hover:not(.active) {
  border-color: var(--silver);
  color: var(--white);
}

.cd-footer-credit {
  text-align: center;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.cd-footer-credit img {
  height: 16px;
  width: auto;
  vertical-align: middle;
  opacity: 0.8;
  margin-right: 6px;
}

.cd-footer-credit span {
  color: var(--text-dim);
  font-size: 0.78rem;
  vertical-align: middle;
}

.cd-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(180deg, var(--bg) 85%, transparent);
  padding: 14px 16px 8px;
  margin: -16px -16px 12px;
}

.cd-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.02em;
}

.cd-subtitle {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 2px 0 0;
}

.cd-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

.cd-badge--plenar {
  background: rgba(255, 184, 77, 0.12);
  border-color: var(--warn);
  color: var(--warn);
}

.cd-badge--live {
  background: rgba(62, 207, 142, 0.12);
  border-color: var(--good);
  color: var(--good);
}

.cd-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: var(--gap);
}

.cd-card h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.cd-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--accent);
}

.cd-muted {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.cd-field {
  margin-bottom: 14px;
}

.cd-field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 6px;
  font-weight: 600;
}

input[type="text"],
input[type="password"],
textarea,
select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 16px; /* previne zoom automat pe iOS la focus */
  font-family: inherit;
}

textarea {
  min-height: 84px;
  resize: vertical;
}

button, .cd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #04121f;
  border: none;
  border-radius: 10px;
  padding: 13px 18px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 46px;
  width: 100%;
  text-decoration: none;
}

button:active, .cd-btn:active {
  background: var(--accent-strong);
}

button.cd-secondary, .cd-btn.cd-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

button.cd-ghost, .cd-btn.cd-ghost {
  background: transparent;
  color: var(--accent);
  border: none;
  width: auto;
  padding: 8px 4px;
  min-height: unset;
}

button.cd-danger {
  background: var(--danger);
  color: #260707;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cd-row {
  display: flex;
  gap: 10px;
}

.cd-row > * {
  flex: 1;
}

.cd-stack > * + * {
  margin-top: 10px;
}

.cd-team-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
  background: var(--accent);
  color: #04121f;
}

.cd-decision-item {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 10px;
}

.cd-decision-item:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.cd-decision-item .meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.cd-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cd-list li {
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.cd-list li:first-child {
  border-top: none;
}

.cd-steps {
  margin: 0;
  padding-left: 22px;
}

.cd-steps li {
  padding: 4px 0;
}

.cd-token-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cd-token {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.85rem;
  background: var(--bg-elevated);
  cursor: pointer;
  user-select: none;
}

.cd-token.used {
  opacity: 0.4;
  text-decoration: line-through;
}

.cd-toast {
  position: fixed;
  left: 50%;
  bottom: -80px;
  transform: translateX(-50%);
  background: var(--good);
  color: #05230f;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: bottom 0.25s ease;
  z-index: 100;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.cd-toast--error {
  background: var(--danger);
  color: #2b0808;
}

.cd-toast--visible {
  bottom: 24px;
}

.cd-link-btn {
  display: block;
  text-align: center;
  background: var(--good);
  color: #04240f;
}

details.cd-collapse {
  margin-bottom: var(--gap);
}

details.cd-collapse summary {
  cursor: pointer;
  font-weight: 700;
  padding: 10px 0;
}

.cd-grid-teams {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.cd-board-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.cd-board-card h3 {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cd-empty {
  color: var(--text-dim);
  font-style: italic;
  font-size: 0.9rem;
}

footer.cd-footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-top: 24px;
}

a {
  color: var(--accent);
}

/* --- v2: cronometru --- */
.cd-timer {
  flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
  font-weight: 800;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
  min-width: 72px;
}

.cd-timer.cd-timer--warn {
  border-color: var(--warn);
  color: var(--warn);
}

.cd-timer.cd-timer--danger {
  border-color: var(--danger);
  color: var(--danger);
  animation: cd-pulse 1s infinite;
}

@keyframes cd-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.cd-timer-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.cd-timer-controls button {
  width: auto;
  flex: 1 1 auto;
  min-width: 90px;
}

/* --- v2: optiuni cu pro/contra/cost --- */
.cd-option {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
}

.cd-option:last-child {
  margin-bottom: 0;
}

.cd-option:active {
  background: var(--bg-elevated);
}

.cd-option.selected {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(59, 157, 215, 0.12), rgba(59, 157, 215, 0.04));
}

.cd-option .opt-label {
  font-weight: 700;
  font-size: 1rem;
  display: block;
  margin-bottom: 8px;
}

.cd-option .opt-procon {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 0.85rem;
}

.cd-option .opt-pros,
.cd-option .opt-cons {
  margin: 0;
  padding-left: 18px;
  color: var(--text-dim);
}

.cd-option .opt-pros li::marker {
  color: var(--good);
}

.cd-option .opt-cons li::marker {
  color: var(--danger);
}

.cd-option .opt-procon-heading {
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  display: block;
}

.cd-cost-reveal {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(255, 184, 77, 0.1);
  border: 1px solid var(--warn);
  font-size: 0.9rem;
}

.cd-cost-reveal .cost-heading {
  font-weight: 700;
  color: var(--warn);
  display: block;
  margin-bottom: 4px;
}

/* --- v2: rezumat scoruri la debrief --- */
.cd-score-pill {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.cd-score-pill .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  display: block;
  margin-bottom: 4px;
}

.cd-score-pill .value {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--accent);
}

/* --- v2: panou fire narative (facilitator) --- */
.cd-flag-item {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  margin-bottom: 6px;
}

/* --- v3: instrumente sandbox --- */
.cd-tool {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 12px 10px;
  margin-bottom: 8px;
}

.cd-tool summary {
  cursor: pointer;
  font-weight: 700;
  padding: 10px 0;
}

/* --- v4: sectiuni tutorial (pregatire inainte de start) --- */
.cd-tutorial-section {
  margin-bottom: 20px;
}

.cd-tutorial-section:last-child {
  margin-bottom: 0;
}

.cd-tutorial-section h4 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--accent);
}

/* --- v3: casete de argument pe palarii --- */
.cd-hat-arg {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

/* --- v4: ecranul salii - layout dens, gandit sa incapa intr-un singur "fold" --- */
body.cd-board {
  padding-bottom: 6px;
}

body.cd-board .cd-brand-bar {
  padding: 4px 0 2px;
  margin-bottom: 2px;
}

body.cd-board .cd-card {
  padding: 10px 12px;
  margin-bottom: 8px;
}

body.cd-board #decizie-box {
  padding: 8px 12px;
  margin-top: 8px;
}

body.cd-board .cd-header {
  padding: 8px 16px 4px;
  margin: -16px -16px 6px;
}

body.cd-board .cd-footer {
  margin-top: 8px;
  font-size: 0.72rem;
}

body.cd-board .cd-footer-credit {
  margin-top: 6px;
  padding-top: 6px;
}

body.cd-board .cd-footer-credit img {
  height: 13px;
}

.cd-board-shell {
  max-width: 1600px;
}

.cd-board-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.cd-board-col-side {
  display: grid;
  gap: 10px;
}

.cd-board-card {
  padding: 10px 12px;
}

.cd-board-card h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.cd-board-card p {
  margin: 4px 0;
}

@media (min-width: 1100px) {
  .cd-board-grid {
    grid-template-columns: 2.3fr 1fr;
    align-items: start;
  }
}

/* --- v4: dashboard facilitator - grafice cu bare + indicator de prezenta --- */
.cd-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.cd-bar-label {
  width: 34px;
  flex-shrink: 0;
  font-weight: 700;
}

.cd-bar-track {
  flex: 1;
  height: 10px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
}

.cd-bar-fill {
  height: 100%;
  background: var(--gradient-h);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.cd-bar-value {
  width: 48px;
  flex-shrink: 0;
  text-align: right;
  color: var(--text-dim);
}

.cd-presence-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-dim);
  margin-left: 6px;
  vertical-align: middle;
}

.cd-presence-dot.online {
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.18);
}


/* --- Ecrane late: tableta / laptop conectat la proiector --- */
@media (min-width: 760px) {
  :root {
    --maxw: 900px;
  }

  .cd-grid-teams {
    grid-template-columns: repeat(2, 1fr);
  }

  body.cd-board {
    font-size: 18px;
  }
}

@media (min-width: 1100px) {
  :root {
    --maxw: 1200px;
  }

  .cd-grid-teams {
    grid-template-columns: repeat(3, 1fr);
  }

  .cd-grid-teams.cd-grid-teams--six {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1400px) {
  .cd-grid-teams.cd-grid-teams--six {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (min-width: 1300px) {
  .cd-grid-teams.cd-grid-teams--five {
    grid-template-columns: repeat(5, 1fr);
  }
}
