:root {
  --bg: #08070d;
  --bg-alt: #14101f;
  --panel: #17131f;
  --panel-border: #2e2740;
  --text: #ece9f5;
  --text-muted: #9d93b8;
  --accent: #6d4cae;
  --accent-hover: #5a3f92;
  --accent-gradient: linear-gradient(135deg, #6d4cae, #a68bdb);
  --green: #35d07f;
  --green-bg: rgba(53, 208, 127, 0.12);
  --red: #ff5c72;
  --red-bg: rgba(255, 92, 114, 0.12);
  --yellow: #ffb84d;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

:root[data-theme="light"] {
  --bg: #f6f4fb;
  --bg-alt: #ece7f7;
  --panel: #ffffff;
  --panel-border: #e0d9f0;
  --text: #221c33;
  --text-muted: #6e6685;
  --accent: #6d4cae;
  --accent-hover: #5a3f92;
  --accent-gradient: linear-gradient(135deg, #6d4cae, #a68bdb);
  --green: #1f9d5c;
  --green-bg: rgba(31, 157, 92, 0.12);
  --red: #dc2626;
  --red-bg: rgba(220, 38, 38, 0.1);
  --yellow: #b45309;
  --shadow: 0 4px 20px rgba(109, 76, 174, 0.15);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Arial, sans-serif;
  background: radial-gradient(circle at top left, var(--bg-alt), var(--bg) 60%);
  color: var(--text);
  min-height: 100vh;
}

.app {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ---------- HEADER ---------- */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

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

.brand-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.brand-name {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-tm {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-coach {
  color: var(--text);
  margin-left: 3px;
}

.subtitle,
.brand-tagline {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 12.5px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  padding: 5px;
  border-radius: 12px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
}

/* ---------- TAB CONTENT ---------- */
.tab-content {
  display: none;
  flex-direction: column;
  gap: 22px;
  animation: fadeIn 0.25s ease;
}

.tab-content.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- STATS ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
}

.stat-label {
  font-size: 12.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
}

.stat-value.positive { color: var(--green); }
.stat-value.negative { color: var(--red); }

/* ---------- PANELS ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
}

.panel-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-header-row h2 { margin: 0; }

/* ---------- FORM ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-wide {
  grid-column: 1 / -1;
}

label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

input, select, textarea {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
}

textarea {
  resize: vertical;
}

.form-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-danger-outline {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-danger-outline:hover {
  background: var(--red-bg);
}

.btn-icon-delete {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  padding: 4px 8px;
  border-radius: 6px;
}

.btn-icon-delete:hover {
  color: var(--red);
  background: var(--red-bg);
}

/* ---------- TABLE ---------- */
.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid var(--panel-border);
  white-space: nowrap;
}

tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--panel-border);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

.pl-positive { color: var(--green); font-weight: 700; }
.pl-negative { color: var(--red); font-weight: 700; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-long { background: var(--green-bg); color: var(--green); }
.badge-short { background: var(--red-bg); color: var(--red); }
.badge-mistake { background: rgba(255, 184, 77, 0.14); color: var(--yellow); }
.badge-none { background: rgba(145, 153, 172, 0.14); color: var(--text-muted); }

.empty-msg {
  color: var(--text-muted);
  font-size: 13.5px;
  text-align: center;
  padding: 20px 0 4px;
  display: none;
}

/* ---------- COACH ---------- */
.coach-intro {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: -6px 0 16px;
}

.coach-output {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.coach-card {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 14px 16px;
}

.coach-card.warn {
  border-left-color: var(--yellow);
}

.coach-card.good {
  border-left-color: var(--green);
}

.coach-card h3 {
  margin: 0 0 6px;
  font-size: 14.5px;
}

.coach-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.coach-card .tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--yellow);
  letter-spacing: 0.04em;
}

/* ---------- COACH CHAT ---------- */
.coach-chat-messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding: 4px 2px 8px;
  margin-bottom: 14px;
}

.coach-msg {
  max-width: 78%;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.coach-msg-user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 3px;
}

.coach-msg-assistant {
  align-self: flex-start;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-bottom-left-radius: 3px;
}

.coach-msg-pending {
  opacity: 0.6;
}

.coach-chat-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.coach-chat-form textarea {
  flex: 1;
  resize: none;
}

.coach-chat-form .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 40px;
}

@media (max-width: 640px) {
  .topbar { flex-direction: column; align-items: flex-start; }
  .tabs { width: 100%; }
  .tab-btn { flex: 1; }
}

/* ---------- CHECKBOXY (chyby) ---------- */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 12px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  padding: 0;
}

/* ---------- SCREENSHOT UPLOAD ---------- */
input[type="file"] {
  padding: 8px;
  cursor: pointer;
}

.screenshot-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.screenshot-thumb {
  position: relative;
  width: 120px;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.screenshot-thumb img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.screenshot-thumb input[type="text"] {
  font-size: 11px;
  padding: 5px 6px;
}

.screenshot-thumb .thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(15, 17, 23, 0.85);
  color: var(--red);
  border: none;
  border-radius: 6px;
  width: 20px;
  height: 20px;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.screenshot-order-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 5px;
  padding: 1px 6px;
}

.btn-screens {
  background: rgba(91, 141, 239, 0.14);
  color: var(--accent);
  border: 1px solid rgba(91, 141, 239, 0.35);
  padding: 5px 10px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-screens:hover {
  background: rgba(91, 141, 239, 0.24);
}

/* ---------- LIGHTBOX ---------- */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 10, 0.88);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-box {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
}

#lightboxImg {
  max-width: 100%;
  max-height: 65vh;
  border-radius: 10px;
  object-fit: contain;
}

.lightbox-caption {
  color: var(--text-muted);
  font-size: 13.5px;
  margin: 0;
  text-align: center;
  max-width: 500px;
}

.lightbox-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lightbox-nav button {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.lightbox-nav button:hover {
  background: var(--accent-hover);
}

.lightbox-counter {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  color: var(--text);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.lightbox-close:hover {
  color: var(--red);
}

/* ---------- ČASOVÝ INPUT ---------- */
input[type="time"] {
  color-scheme: dark;
}

/* ---------- PRAVIDLA ---------- */
.btn-primary-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary-outline:hover {
  background: rgba(91, 141, 239, 0.14);
}

.rules-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rule-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 14px;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.rule-row.done {
  border-color: rgba(53, 208, 127, 0.4);
}

.rule-number {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
  padding-top: 10px;
  min-width: 18px;
}

.rule-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.rule-text {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.5;
  resize: none;
  overflow: hidden;
  min-height: 44px;
}

.rule-row.done .rule-text {
  border-color: rgba(53, 208, 127, 0.3);
}

.rule-text:focus {
  border-color: var(--accent);
}

.rule-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-save-rule {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-save-rule:hover {
  background: var(--accent-hover);
}

.btn-save-rule.saved {
  background: var(--green);
}

.btn-delete-rule {
  background: transparent;
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
}

.btn-delete-rule:hover {
  color: var(--red);
  border-color: var(--red);
}

/* Velký čtvercový checkbox ve stylu appky */
.rule-check {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 6px;
  cursor: pointer;
  flex-shrink: 0;
}

.rule-check input {
  position: absolute;
  opacity: 0;
  width: 46px;
  height: 46px;
  margin: 0;
  cursor: pointer;
}

.rule-check .checkmark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.rule-check .checkmark::after {
  content: "";
  width: 10px;
  height: 16px;
  border: solid transparent;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) translate(-1px, -2px);
  transition: border-color 0.15s ease;
}

.rule-check input:checked ~ .checkmark {
  background: var(--green-bg);
  border-color: var(--green);
}

.rule-check input:checked ~ .checkmark::after {
  border-color: var(--green);
}

.rule-check input:hover ~ .checkmark {
  border-color: var(--accent);
}

@media (max-width: 640px) {
  .rule-row { flex-wrap: wrap; }
  .rule-actions { margin-left: 30px; }
}

/* ---------- READ-ONLY ZOBRAZENÍ PRAVIDEL (záložka Pravidla) ---------- */
.rule-row.view {
  align-items: center;
}

.rule-view-text {
  flex: 1;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  white-space: normal;
  padding: 4px 0;
}

.rule-row.view.done .rule-view-text {
  color: var(--text-muted);
}

/* ---------- SETTINGS SUBNAV ---------- */
.settings-subnav {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.subtab-btn {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.subtab-btn:hover {
  color: var(--text);
}

.subtab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.subtab-content {
  display: none;
  flex-direction: column;
  gap: 22px;
}

.subtab-content.active {
  display: flex;
}

/* ---------- TOGGLE FIELDS (nastavení deníku) ---------- */
.toggle-fields-list {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* ---------- VLASTNÍ POLE ---------- */
.custom-field-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.custom-field-form input[type="text"] {
  flex: 1;
  min-width: 200px;
}

.custom-field-form select {
  min-width: 160px;
}

.custom-fields-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.custom-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 10px 14px;
}

.custom-field-row .field-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}

.custom-field-row .field-type-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(91, 141, 239, 0.14);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ---------- VÝSLEDEK (TP/SL) BADGE ---------- */
.badge-tp { background: var(--green-bg); color: var(--green); }
.badge-sl { background: var(--red-bg); color: var(--red); }

/* ---------- ZPRÁVY: dvousloupcové rozvržení ---------- */
.news-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

@media (max-width: 900px) {
  .news-layout {
    grid-template-columns: 1fr;
  }
}

.news-stories-panel {
  display: flex;
  flex-direction: column;
}

.stories-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 720px;
  overflow-y: auto;
  padding-right: 4px;
}

.story-card {
  background: var(--bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.15s ease;
}

.story-card:hover {
  border-color: var(--accent);
}

.story-card a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  line-height: 1.4;
}

.story-card a:hover {
  color: var(--accent);
}

.story-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 6px 0 0;
  line-height: 1.5;
}

.story-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---------- ZPRÁVY (ekonomický kalendář) ---------- */
.news-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.news-updated {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.news-filter-row {
  margin: -4px 0 14px;
}

.badge-impact-high { background: var(--red-bg); color: var(--red); }
.badge-impact-medium { background: rgba(255, 184, 77, 0.14); color: var(--yellow); }
.badge-impact-low { background: rgba(145, 153, 172, 0.14); color: var(--text-muted); }
.badge-impact-holiday { background: rgba(91, 141, 239, 0.14); color: var(--accent); }
.badge-currency { background: rgba(145, 153, 172, 0.14); color: var(--text); }

#newsError a {
  color: var(--accent);
}

/* ---------- PŘIPOMÍNKY U KALENDÁŘE ---------- */
.reminder-cell {
  white-space: normal;
  min-width: 230px;
}

.reminder-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
}

.reminder-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.reminder-check {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.reminder-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.reminder-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reminder-time-row label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.rem-time {
  width: 110px;
}

.btn-save-reminder {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.btn-save-reminder:hover {
  background: var(--accent-hover);
}

.btn-save-reminder.saved {
  background: var(--green);
}

/* ---------- HLAVIČKOVÁ ROZKLIKÁVACÍ MENU (jazyk / účet) ---------- */
.header-menus {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown-wrap {
  position: relative;
}

.dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.dropdown-trigger:hover {
  border-color: var(--accent);
}

.dropdown-icon {
  font-size: 15px;
}

.dropdown-caret {
  color: var(--text-muted);
  font-size: 11px;
  transition: transform 0.15s ease;
}

.dropdown-wrap.open .dropdown-caret {
  transform: rotate(180deg);
}

.dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 190px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 50;
}

.dropdown-panel-right {
  left: auto;
  right: 0;
}

.dropdown-wrap.open .dropdown-panel {
  display: block;
}

.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.dropdown-item:hover {
  background: var(--bg);
}

.dropdown-item.active {
  color: var(--accent);
  font-weight: 700;
}

.dropdown-item-danger {
  color: var(--red);
}

.dropdown-divider {
  height: 1px;
  background: var(--panel-border);
  margin: 6px 2px;
}

.password-box {
  max-width: 360px;
}

.password-title {
  margin: 0 0 18px;
  font-size: 17px;
}

/* ---------- PŘIHLAŠOVACÍ OBRAZOVKA ---------- */
.auth-gate {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-lang-wrap {
  position: absolute;
  top: 20px;
  right: 20px;
}

/* ---------- PŘEPÍNAČ SVĚTLÝ/TMAVÝ REŽIM ---------- */
.theme-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  color: var(--text);
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, background 0.15s ease;
}

.theme-toggle:hover {
  transform: scale(1.08);
  background: var(--bg-alt);
}

.auth-box {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.auth-brand .brand-icon {
  width: 40px;
  height: 40px;
}

.auth-brand .brand-name {
  font-size: 20px;
}

.auth-subtitle {
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.auth-box .field {
  margin-bottom: 14px;
}

.auth-message {
  font-size: 13px;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 14px;
  line-height: 1.4;
}

.auth-error {
  background: var(--red-bg);
  color: var(--red);
}

.auth-info {
  background: var(--green-bg);
  color: var(--green);
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.auth-actions button {
  width: 100%;
}

.auth-link-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  text-decoration: underline;
  cursor: pointer;
  text-align: center;
}

.auth-link-btn:hover {
  color: var(--accent);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  margin: 18px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--panel-border);
}

.auth-divider span {
  padding: 0 12px;
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: #3c4043;
  border: 1px solid var(--panel-border);
  padding: 11px 16px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.btn-google:hover {
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ---------- MENU PŘIHLÁŠENÉHO UŽIVATELE ---------- */
.user-email {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
