/* FryBoard — minimal styles */
.glightbox-container { z-index: 9999 !important; }
#members-dropdown { width: 40% !important; min-width: 450px !important; z-index:10}
.main-content { padding: 5px 10px; }
.board-header-actions { padding: 5px 10px; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, sans-serif; font-size: 15px; line-height: 1.5; color: #1a1a1a; background: #f5f5f5; }
.header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1.5rem; background: #2c3e50; color: #fff; }
.header a { color: #ecf0f1; text-decoration: none; margin-left: 1rem; }
.header a:hover { text-decoration: underline; }
.logo { font-weight: 700; margin-left: 0; }
.user-name { margin-right: auto; margin-left: 1rem; opacity: .9; }
.main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.footer { text-align: center; padding: 1rem; color: #7f8c8d; font-size: 0.9rem; }
.alert { padding: 0.75rem 1rem; margin-bottom: 1rem; border-radius: 4px; }
.alert-error { background: #fee; color: #c00; }
.alert-success { background: #efe; color: #080; }

/* Auth */
.auth-form { max-width: 360px; margin: 2rem auto; padding: 1.5rem; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.auth-form h1 { margin-top: 0; font-size: 1.5rem; }
.auth-form label { display: block; margin-top: 1rem; font-weight: 500; }
.auth-form input { width: 100%; padding: 0.5rem 0.75rem; margin-top: 0.25rem; border: 1px solid #ddd; border-radius: 4px; }
.auth-form button { margin-top: 1.25rem; padding: 0.5rem 1.25rem; background: #3498db; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.auth-form button:hover { background: #2980b9; }
.auth-form .links { margin-top: 1rem; }
.auth-form .links a { color: #3498db; }
.auth-oauth { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #eee; }
.auth-oauth p { margin: 0.5rem 0; }
.auth-oauth a { display: inline-block; margin-right: 0.5rem; }

/* Boards list */
.boards-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.board-card { background: #fff; border-radius: 8px; padding: 1.25rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); text-decoration: none; color: inherit; display: block; transition: box-shadow .15s; }
.board-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.board-card h3 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.board-card .meta { font-size: 0.85rem; color: #7f8c8d; }
.page-actions { margin-bottom: 1rem; }
.btn { display: inline-block; padding: 0.5rem 1rem; background: #3498db; color: #fff; text-decoration: none; border-radius: 4px; border: none; cursor: pointer; font-size: 14px; }
.btn:hover { background: #2980b9; color: #fff; }
.btn-secondary { background: #95a5a6; }
.btn-secondary:hover { background: #7f8c8d; }
.btn-danger { background: #e74c3c; }
.btn-danger:hover { background: #c0392b; }
.btn-small { padding: 0.35rem 0.65rem; font-size: 13px; }

/* Board show — kanban */
.board-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.board-header h1 { margin: 0; font-size: 1.5rem; }
.kanban { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 1rem; min-height: 400px; }

/* Тонкий скроллбар (канбан и колонки), цвет на полтона светлее */
#kanban-columns.scrollbar-thin,
.scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.16) transparent;
}
#kanban-columns.scrollbar-thin::-webkit-scrollbar,
.scrollbar-thin::-webkit-scrollbar {
  height: 6px;
}
#kanban-columns.scrollbar-thin::-webkit-scrollbar-track,
.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}
#kanban-columns.scrollbar-thin::-webkit-scrollbar-thumb,
.scrollbar-thin::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.16);
  border-radius: 3px;
}
#kanban-columns.scrollbar-thin::-webkit-scrollbar-thumb:hover,
.scrollbar-thin::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.28);
}

/* Меню колонки (спойлер с действиями) */
.column-menu-dropdown button.column-menu-item {
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
  color: inherit;
}

/* Канбан: верхний скроллбар, высота колонок на десктопе */
#kanban-scroll-top { height: 10px; min-height: 10px; margin-bottom: 20px; }
#kanban-scroll-top::-webkit-scrollbar { height: 6px; }

/* Канбан: высота до низа окна, скролл внутри столбца */
#kanban-columns { align-items: stretch; display: flex; }
.kanban-column .column-header,
.kanban-column .column-search-row { flex-shrink: 0; }
.column-cards { flex: 1 1 0; min-height: 500px; overflow-y: auto; overflow-x: hidden; }
.column-cards.scrollbar-thin { scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, 0.16) transparent; }
.column-cards.scrollbar-thin::-webkit-scrollbar { width: 6px; }
.column-cards.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.column-cards.scrollbar-thin::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.16); border-radius: 3px; }
.column-cards.scrollbar-thin::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.28); }

.kanban-column { flex: 0 0 280px; min-width: 0; min-height: 0; background: #f8f8f8; border-radius: 8px; padding: 0.75rem; display: flex; flex-direction: column; overflow: hidden; align-self: stretch; }

.kanban-column h3 { margin: 0 0 0.5rem; font-size: 0.95rem; font-weight: 600; }
.task-cards { flex: 1; min-height: 80px; }
.task-card { background: #fff; border-radius: 6px; padding: 0.75rem; margin-bottom: 0.5rem; box-shadow: 0 1px 2px rgba(0,0,0,.06); min-width: 0; overflow-x: hidden; }
.task-card a { text-decoration: none; color: inherit; display: block; word-wrap: break-word; overflow-wrap: break-word; word-break: break-word; }
.task-card a:hover { text-decoration: underline; }
.task-card .task-title { font-weight: 500; }
.task-card .task-meta { font-size: 0.8rem; color: #7f8c8d; margin-top: 0.25rem; }
.add-task-form { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid #ccc; }
.add-task-form input, .add-task-form textarea { width: 100%; padding: 0.4rem; margin-bottom: 0.4rem; border: 1px solid #ccc; border-radius: 4px; font-size: 13px; }
.form-inline { display: flex; gap: 0.5rem; align-items: flex-start; flex-wrap: wrap; }
.form-inline input { flex: 1; min-width: 120px; }

/* Task detail */
.task-detail h2 { margin-top: 0; }
.task-detail .description { white-space: pre-wrap; margin: 1rem 0; padding: 1rem; background: #f9f9f9; border-radius: 4px; }
.task-detail .meta { color: #7f8c8d; font-size: 0.9rem; }
.task-detail section { margin: 1.5rem 0; }
.task-detail section h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.comment { padding: 0.75rem; background: #f5f5f5; border-radius: 4px; margin-bottom: 0.5rem; }
.comment .author { font-size: 0.85rem; color: #7f8c8d; }
.attachments-list, .links-list { list-style: none; padding: 0; margin: 0; }
.attachments-list li, .links-list li { padding: 0.35rem 0; border-bottom: 1px solid #eee; }
.attachments-list li:last-child, .links-list li:last-child { border-bottom: none; }

/* Members / statuses */
.members-list { margin: 0.5rem 0; }
.members-list li { display: flex; align-items: center; justify-content: space-between; padding: 0.35rem 0; }
.status-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }

/* Modal / overlay for task (optional) */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: flex-start; justify-content: center; padding: 2rem; overflow: auto; z-index: 100; }
.overlay-inner { background: #fff; border-radius: 8px; padding: 1.5rem; max-width: 640px; width: 100%; margin: auto; }

/* Переключатель темы: солнце — ползунок — луна */
.theme-toggle-switch { min-width: 2.5rem; }
.theme-toggle-thumb { box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
html.dark .theme-toggle-thumb { background: #cbd5e1; }

/* Тёмная тема: переопределения для страниц (карточки, канбан, формы) */
html.dark .rounded-xl.ring-1.ring-slate-200 { background-color: #1e293b; border-color: #334155; }
html.dark .rounded-xl.bg-white { background-color: #1e293b; }
html.dark .kanban-column { background: #334155; }
html.dark .task-card { background: #0f172a; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
html.dark .task-card.ring-1 { border-color: #475569; }
html.dark .bg-slate-100.ring-slate-300 { background-color: #334155; border-color: #475569; }
html.dark .ring-orange-300 { --tw-ring-color: rgb(234 88 12 / 0.5); }
html.dark section.rounded-xl.bg-white { background-color: #1e293b; border-color: #334155; }
html.dark .auth-form { background: #1e293b; border-color: #334155; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
html.dark .auth-form label { color: #e2e8f0; }
html.dark .auth-form input { background: #0f172a; border-color: #475569; color: #f1f5f9; }
html.dark .auth-form .links a { color: #93c5fd; }
html.dark .board-card { background: #1e293b; border-color: #334155; }
html.dark .board-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.4); }
html.dark .board-card h3 { color: #f1f5f9; }
html.dark .board-card .meta { color: #94a3b8; }
html.dark input[type="text"],
html.dark input[type="email"],
html.dark input[type="password"],
html.dark input[type="number"],
html.dark input[type="date"],
html.dark input[type="url"],
html.dark select,
html.dark textarea { background-color: #0f172a; border-color: #475569; color: #f1f5f9; }
html.dark select option { background: #1e293b; color: #f1f5f9; }
html.dark .text-slate-900 { color: #f1f5f9; }
html.dark .text-slate-800 { color: #e2e8f0; }
html.dark .text-slate-700 { color: #cbd5e1; }
html.dark .text-slate-600 { color: #94a3b8; }
html.dark .text-slate-500 { color: #94a3b8; }
html.dark .border-slate-200 { border-color: #334155; }
html.dark .border-slate-100 { border-color: #334155; }
html.dark .bg-slate-50 { background-color: #0f172a; }
html.dark .bg-white { background-color: #1e293b; }
html.dark .scrollbar-thin { scrollbar-color: rgba(255,255,255,0.28) transparent; }
html.dark .scrollbar-thin::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.28); }
html.dark .scrollbar-thin::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.42); }
