:root {
  --bg-dark: #120e1a; /* Sidebar */
  --bg-main: #181425; /* Main content */
  --bg-card: #201a33; /* Cards */
  --bg-card-hover: #292240;
  --accent: #6c5ce7;
  --text: #f1f0f5;
  --muted: #8b85a1;
  --border: rgba(255,255,255,0.06);
  --green: #00b894;
  --yellow: #fdcb6e;
  --blue: #0984e3;
}
* { box-sizing: border-box; font-family: 'Inter', sans-serif; margin: 0; padding: 0; }
body { background: var(--bg-main); color: var(--text); overflow: hidden; height: 100vh; }

.layout { display: flex; height: 100vh; }

/* Sidebar */
.sidebar { width: 240px; background: var(--bg-dark); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 20px 0; z-index: 10; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; padding: 0 20px 20px; }
.logo-icon { width: 24px; height: 24px; background: var(--accent); border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.menu-group { margin-bottom: 20px; }
.menu-item { padding: 10px 20px; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.menu-item:hover { color: var(--text); background: rgba(255,255,255,0.02); }
.nav-header { padding: 10px 20px; font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 600; letter-spacing: 0.5px; }
.nav-item { padding: 8px 20px; font-size: 13px; color: var(--muted); cursor: pointer; border-left: 2px solid transparent;}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.02); }
.nav-item.active { color: var(--text); background: rgba(255,255,255,0.04); border-left-color: var(--accent); }
.user-profile { margin-top: auto; padding: 20px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--border); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #4a3e6d; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: bold; }
.u-name { font-size: 13px; font-weight: 600; }
.u-role { font-size: 11px; color: var(--muted); }

/* Main */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 24px 30px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.h1 { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.edit-icon { font-size: 14px; opacity: 0.5; cursor: pointer; }
.top-actions { display: flex; gap: 10px; }
.btn { padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; border: none; }
.btn.ghost { background: rgba(255,255,255,0.05); color: var(--text); border: 1px solid var(--border); }
.btn.primary { background: var(--accent); color: white; }

.tabs-row { display: flex; gap: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab { padding: 10px 0; font-size: 13px; color: var(--muted); cursor: pointer; position: relative; }
.tab.active { color: var(--text); }
.tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--accent); }

.filters-row { display: flex; gap: 12px; margin-bottom: 24px; }
.search-input, .filter-select { background: rgba(0,0,0,0.2); border: 1px solid var(--border); padding: 8px 12px; border-radius: 6px; color: var(--text); font-size: 13px; outline: none; }
.search-input { width: 240px; }
.filter-select { padding-right: 30px; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg fill='%238b85a1' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>"); background-repeat: no-repeat; background-position: right 4px center; }

/* Kanban */
.board-wrapper { display: flex; gap: 16px; flex: 1; overflow-x: auto; padding-bottom: 10px; }
.board-column { flex: 0 0 280px; display: flex; flex-direction: column; background: rgba(0,0,0,0.1); border-radius: 10px; border: 1px solid rgba(255,255,255,0.02); }
.col-head { padding: 14px 16px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--text); }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot.gray { background: #636e72; } .dot.blue { background: var(--blue); } .dot.yellow { background: var(--yellow); } .dot.green { background: var(--green); }
.cnt { color: var(--muted); margin-left: auto; font-size: 11px; }
.col-body { padding: 0 12px 12px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.col-body::-webkit-scrollbar { width: 4px; }
.col-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Task Card */
.task-card { background: var(--bg-card); border: 1px solid var(--border); padding: 14px; border-radius: 8px; cursor: grab; transition: 0.15s; }
.task-card:hover { background: var(--bg-card-hover); border-color: rgba(255,255,255,0.1); }
.task-card:active { cursor: grabbing; transform: scale(0.98); }
.tc-id { font-size: 10px; color: var(--muted); margin-bottom: 6px; font-family: monospace; }
.tc-title { font-size: 13px; font-weight: 500; line-height: 1.4; margin-bottom: 12px; }
.tc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tc-tag { font-size: 10px; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); font-weight: 500;}
.tc-tag.orange { color: #e1b12c; border-color: rgba(225,177,44,0.3); }
.tc-footer { display: flex; justify-content: space-between; align-items: center; }
.tc-assignee { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.tc-avatar { width: 20px; height: 20px; border-radius: 50%; background: #4a3e6d; display: flex; align-items: center; justify-content: center; font-size: 9px; color: white;}
.tc-price { font-size: 12px; font-weight: 600; color: var(--green); }

/* Modal Reset & Layout */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; z-index: 1000; opacity: 0; transition: 0.2s;}
.modal-overlay.active { display: flex; opacity: 1; }
.modal-content { transition: 0.3s; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; }
.modal-overlay.active .modal-content { transform: translateY(0); }

/* Detailed View Specifics */
.tm-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: var(--bg-dark); }
.tm-id { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.tm-title { font-size: 18px; font-weight: 600; }
.tm-close { background: none; border: none; color: var(--muted); font-size: 24px; cursor: pointer; }
.tm-body { display: flex; flex: 1; overflow: hidden; }
.tm-main { flex: 1; padding: 24px; overflow-y: auto; border-right: 1px solid var(--border); background: var(--bg-main); }
.tm-side { width: 300px; padding: 24px; overflow-y: auto; background: var(--bg-dark); }
.tm-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 600; margin-bottom: 8px; letter-spacing: 0.5px;}
.tm-desc { background: rgba(0,0,0,0.2); border: 1px solid var(--border); padding: 16px; border-radius: 8px; font-size: 13px; line-height: 1.5; color: var(--text); min-height: 80px; margin-bottom: 24px;}
.tm-tabs { display: flex; gap: 16px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tm-tab { padding: 8px 0; font-size: 13px; color: var(--muted); cursor: pointer; position: relative; font-weight: 500;}
.tm-tab.active { color: var(--text); }
.tm-tab.active::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: var(--accent); }
.tm-input, .tm-select { width: 100%; background: rgba(0,0,0,0.2); border: 1px solid var(--border); color: var(--text); padding: 10px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 20px; outline: none; }
.prop-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 12px; border-bottom: 1px solid rgba(255,255,255,0.02);}
.prop-lbl { color: var(--muted); }
.prop-val { font-weight: 500; text-align: right;}

#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--bg-card); border-left: 3px solid var(--accent); color: white; padding: 12px 16px; border-radius: 6px; font-weight: 500; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); animation: slideIn 0.3s forwards; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Медиаплеер внутри задачи */
.tm-tab-content { animation: fadeIn 0.2s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.media-preview { width: 100%; max-height: 400px; object-fit: contain; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 16px; background: rgba(0,0,0,0.4); display: block; }

/* Медиаплеер внутри задачи */
.tm-tab-content { animation: fadeIn 0.2s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.media-preview { width: 100%; max-height: 400px; object-fit: contain; border-radius: 8px; border: 1px solid var(--border); margin-bottom: 16px; background: rgba(0,0,0,0.4); display: block; }
