:root {
  --purple: #6558d9;
  --purple-dark: #5145b8;
  --purple-tint: #f0efff;
  --bg: #f6f7fb;
  --sidebar-bg: #171923;
  --card-bg: #ffffff;
  --border: #e5e7ef;
  --text: #20212b;
  --text-muted: #707386;
  --red: #e5484d;
  --red-tint: #fdecec;
  --amber: #d68a1a;
  --amber-tint: #fdf3e2;
  --green: #1a9c6b;
  --green-tint: #e6f7ef;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(26, 27, 44, .05);
  --shadow-md: 0 12px 34px rgba(26, 27, 44, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}

button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(101, 88, 217, .2);
  outline-offset: 2px;
}

.btn {
  border: none;
  border-radius: var(--radius);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  min-height: 36px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dark); box-shadow: 0 6px 16px rgba(81, 69, 184, .2); transform: translateY(-1px); }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: #f6f6fa; border-color: #dcdce6; }
.btn-danger { background: var(--red-tint); color: var(--red); }
.btn-danger:hover { background: #fbd8d9; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 10px; font-size: 12px; }

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
}
.icon-btn:hover { background: #f1f1f6; color: var(--text); }
.sidebar .icon-btn { color: #858999; }
.sidebar .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.icon-btn-ghost { opacity: 0; transition: opacity .15s; }
.account-header:hover .icon-btn-ghost,
.board-sublist li:hover .icon-btn-ghost { opacity: 1; }

/* Layout */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 256px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: #f4f5f8;
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 0;
  box-shadow: 8px 0 30px rgba(18, 20, 30, .05);
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; letter-spacing: -.02em; color: #fff; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(145deg, #786bea, #5145b8); color: #fff; font-size: 14px; box-shadow: 0 7px 16px rgba(81,69,184,.35); }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: block;
  color: #a8abba;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 8px;
  border-radius: 8px;
}
.nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-link.active { background: rgba(120,107,234,.18); color: #d9d5ff; }

.sidebar-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #777b8c;
  margin-bottom: 6px;
}

.sidebar-scroll { overflow-y: auto; flex: 1; }
.sidebar-empty { font-size: 13px; color: #8e92a2; line-height: 1.5; }

.account-block { margin-bottom: 4px; }
.account-header { display: flex; align-items: center; justify-content: space-between; }
.account-name {
  display: block;
  color: #d9dbe4;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  flex: 1;
}
.account-name:hover { background: rgba(255,255,255,.06); color: #fff; }
.account-name.active { background: rgba(255,255,255,.08); color: #fff; }

.board-sublist { list-style: none; margin: 2px 0 6px; padding: 0 0 0 16px; display: flex; flex-direction: column; gap: 1px; }
.board-sublist li { display: flex; align-items: center; justify-content: space-between; }
.board-link {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #8f93a3;
  text-decoration: none;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 12.5px;
  flex: 1;
}
.board-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.board-link.active { background: rgba(120,107,234,.17); color: #ddd9ff; font-weight: 700; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.btn-add-board {
  background: transparent;
  border: none;
  color: #858999;
  font-size: 12px;
  cursor: pointer;
  padding: 5px 8px;
  text-align: left;
}
.btn-add-board:hover { color: #d9d5ff; }

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.09);
  color: #898d9d;
}
.sidebar-footer a { color: #aeb1bf; text-decoration: none; }
.sidebar-footer a:hover { color: #fff; }

.main { flex: 1; padding: 30px 36px; min-width: 0; overflow: hidden; }

.topbar { margin-bottom: 18px; }
.topbar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.board-heading { flex: 1; min-width: 0; }
.board-eyebrow { display: block; margin-bottom: 3px; color: var(--text-muted); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.board-title { margin: 0; font-size: clamp(20px, 2vw, 26px); font-weight: 800; letter-spacing: -.025em; flex: 1; }
.board-summary { margin: 3px 0 0; color: var(--text-muted); font-size: 12.5px; }
.board-summary span { color: var(--red); font-weight: 700; }
.board-title-sep { color: var(--text-muted); font-weight: 400; margin: 0 4px; }
.empty-state { color: var(--text-muted); font-size: 14px; padding: 40px 0; text-align: center; }

.view-toggle { display: flex; background: #f1f1f6; border-radius: 8px; padding: 2px; }
.view-btn { padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--text-muted); text-decoration: none; border-radius: 6px; }
.view-btn:hover { color: var(--text); }
.view-btn.active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

.filters { display: flex; gap: 8px; }
.filters input[type="text"], .filters select {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  background: #fff;
}
.filters input:focus, .filters select:focus, .modal input:focus, .modal select:focus, .modal textarea:focus,
.auth-form input:focus, .inline-form input:focus, .inline-form select:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(101, 88, 217, .1);
  outline: none;
}
.filters input[type="text"] { flex: 1; max-width: 300px; }

.board-metrics { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; margin: 0 0 22px; }
.metric-card { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px 12px; min-height: 92px; padding: 15px 16px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); }
.metric-label { color: var(--text-muted); font-size: 11px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.metric-card strong { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 27px; line-height: 1; letter-spacing: -.04em; }
.metric-detail { color: #9a9dac; font-size: 11.5px; }
.metric-alert strong, .metric-alert .metric-detail { color: var(--red); }
.metric-progress { grid-template-columns: 1fr auto; }
.metric-bar { grid-column: 1 / -1; height: 5px; margin-top: 9px; overflow: hidden; background: #ebeaf3; border-radius: 99px; }
.metric-bar i { display: block; height: 100%; background: var(--purple); border-radius: inherit; }

/* Board */
.board { display: flex; gap: 16px; align-items: flex-start; overflow-x: auto; padding: 2px 2px 18px; scrollbar-color: #cfd1dc transparent; }
.board-column {
  background: #eceef3;
  border-radius: var(--radius-lg);
  width: 310px;
  flex-shrink: 0;
  padding: 12px;
  min-height: 160px;
}
.board-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 12.5px;
  padding: 4px 6px 10px;
  color: var(--text);
}
.status-name { display: flex; align-items: center; gap: 7px; }
.board-column-header .count {
  background: #e7e7ee;
  color: var(--text-muted);
  border-radius: 20px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
}
.board-column-body { display: flex; flex-direction: column; gap: 8px; min-height: 30px; }
.board-column-body:empty::after {
  content: "Suelta una tarea aquí";
  display: grid;
  place-items: center;
  min-height: 84px;
  border: 1px dashed #ccd0dc;
  border-radius: 10px;
  color: #989baa;
  font-size: 12px;
}
.board-column-body.drag-over { background: var(--purple-tint); border-radius: 8px; }

.task-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 13px 14px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  border: 1px solid var(--border);
}
.task-card:hover { border-color: #bdb8ef; box-shadow: 0 8px 20px rgba(26,27,44,.09); transform: translateY(-1px); }
.task-card.dragging { opacity: 0.4; }

.chip {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.task-title { font-size: 14px; font-weight: 700; margin-bottom: 5px; line-height: 1.35; }
.task-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.task-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.badge { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.badge-alta { background: var(--red-tint); color: var(--red); }
.badge-media { background: var(--amber-tint); color: var(--amber); }
.badge-baja { background: var(--green-tint); color: var(--green); }

.due { font-size: 11.5px; color: var(--text-muted); }
.due.is-overdue { color: var(--red); font-weight: 700; }

/* List view */
.task-table-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.task-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.task-table th, .task-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.task-table th { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; background: #fafafb; }
.task-table tbody tr { cursor: pointer; }
.task-table tbody tr:hover { background: #fafafb; }
.task-table tbody tr:last-child td { border-bottom: none; }
.status-chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20,20,30,0.48);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  z-index: 50;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 26px;
  width: 440px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.modal-small { width: 340px; }
.modal h2 { margin: 0 0 14px; font-size: 16px; }
.modal form { display: flex; flex-direction: column; gap: 12px; }
.modal label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.modal input, .modal select, .modal textarea {
  font-family: inherit;
  font-size: 13.5px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-weight: 400;
}
.modal input:disabled, .modal select:disabled, .modal textarea:disabled { background: #fafafb; color: var(--text-muted); cursor: not-allowed; }
.modal input[type="color"] { padding: 2px; height: 36px; }
.form-row { display: flex; gap: 10px; }
.form-row label { flex: 1; }
.modal-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.modal-actions-right { display: flex; gap: 8px; margin-left: auto; }

.alert {
  background: var(--red-tint);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13.5px;
  margin-bottom: 14px;
}
.alert-success { background: var(--green-tint); color: var(--green); }

.auth-hint { font-size: 12px; color: var(--text-muted); margin: -10px 0 16px; line-height: 1.4; }

/* Links */
.links { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.links-title { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .03em; }
.links-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.links-empty { font-size: 12.5px; color: var(--text-muted); }
.link-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #f5f5f8; border-radius: 7px; padding: 6px 10px; }
.link-item a { color: var(--purple-dark); text-decoration: none; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-item a:hover { text-decoration: underline; }
#linkForm .form-row { margin-bottom: 8px; }

/* Comments */
.comments { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.comments-title { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .03em; }
.comments-list { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; margin-bottom: 10px; }
.comments-empty { font-size: 12.5px; color: var(--text-muted); }
.comment-item { background: #f5f5f8; border-radius: 7px; padding: 8px 10px; }
.comment-head { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 700; margin-bottom: 3px; }
.comment-date { font-weight: 400; color: var(--text-muted); }
.comment-body { font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }
#commentForm { display: flex; flex-direction: column; gap: 8px; }
#commentForm textarea { resize: vertical; }

/* Status manager */
.status-manage-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.status-manage-item { display: flex; align-items: center; gap: 6px; background: #f5f5f8; border-radius: 7px; padding: 6px 8px; }
.status-manage-item.dragging { opacity: .4; }
.status-final-check { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-tertiary); font-size: 10px; white-space: nowrap; }
.status-final-check input, .status-final-new input { accent-color: var(--accent); }
.status-final-new { display: flex; align-items: center; gap: 6px; margin: 8px 0; color: var(--ink-secondary); font-size: 11px; }
.drag-handle {
  cursor: grab;
  display: grid;
  grid-template-columns: repeat(2, 3px);
  grid-template-rows: repeat(3, 3px);
  gap: 2px;
  flex-shrink: 0;
}
.drag-handle i { width: 3px; height: 3px; border-radius: 50%; background: #c7c7d4; }
.status-color-input { max-width: 40px; padding: 2px !important; height: 30px; }
.status-name-input { flex: 1; }
#newStatusForm .form-row { margin-bottom: 8px; }

/* Users page */
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 18px; max-width: 900px; }
.panel-title { margin: 0 0 12px; font-size: 14px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form label { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.inline-form input, .inline-form select {
  font-size: 13.5px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
}
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--border); }
.table th { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.badge-role { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.badge-role-interno { background: var(--purple-tint); color: var(--purple-dark); }
.badge-role-invitado { background: var(--green-tint); color: var(--green); }

/* Calendar */
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-head { margin-bottom: 6px; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; text-align: center; }
.calendar-day {
  background: #fff;
  border: 1px solid #f1f1f5;
  border-radius: 8px;
  min-height: 92px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.calendar-day-empty { background: transparent; border: none; }
.calendar-day.is-today { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple); }
.calendar-day-number { font-size: 12px; font-weight: 700; color: #c7c7d4; margin-bottom: 2px; }
.calendar-day:has(.calendar-task) .calendar-day-number { color: var(--text-muted); }
.is-today .calendar-day-number { color: var(--purple-dark); }
.calendar-task {
  display: block;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar-task.badge-alta { background: var(--red-tint); }
.calendar-task.badge-media { background: var(--amber-tint); }
.calendar-task.badge-baja { background: var(--green-tint); }
.calendar-more { font-size: 10.5px; color: var(--text-muted); padding: 0 6px; }

/* Auth pages */
.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 15% 20%, rgba(101,88,217,.13), transparent 32%),
    radial-gradient(circle at 85% 80%, rgba(26,156,107,.09), transparent 28%),
    var(--bg);
}
.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 38px;
  width: calc(100% - 40px);
  max-width: 390px;
  min-width: 0;
  box-shadow: var(--shadow-md);
}
.auth-title { margin: 0 0 22px; font-size: 25px; letter-spacing: -.025em; }
.auth-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.auth-form input {
  width: 100%;
  min-width: 0;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.auth-switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-muted); }
.auth-switch a { color: var(--purple); font-weight: 600; text-decoration: none; }

.saved-views{display:flex;align-items:center;gap:6px;margin-top:10px}.saved-views a,.saved-views button{padding:4px 8px;border:1px solid var(--border);border-radius:6px;background:#fff;color:var(--text-muted);font-size:11px;text-decoration:none;cursor:pointer}.label-picker{margin:0;padding:8px 10px;border:1px solid var(--border);border-radius:7px}.label-picker legend{padding:0 5px;color:var(--text-muted);font-size:11px}.label-option{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:5px!important;margin:2px 8px 2px 0}.label-option span{padding:2px 7px;border-radius:5px;background:#f1f1f3;color:var(--label-color);font-size:11px;font-weight:600}.new-label-row{display:flex;gap:6px;margin-top:8px}.new-label-row input[type=color]{max-width:38px}

.preferences-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;max-width:680px}.preferences-grid>div{display:flex;flex-direction:column;gap:12px}.preferences-grid>button{grid-column:1/-1;justify-self:start}
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; padding: 14px 16px; gap: 10px; position: static; }
  .sidebar-nav { flex-direction: row; }
  .sidebar-nav .nav-link { flex: 1; text-align: center; }
  .sidebar-section { max-height: 220px; }
  .sidebar-footer { flex-direction: row; justify-content: space-between; align-items: center; }
  .main { padding: 22px 16px; overflow: visible; }
  .topbar-row { align-items: flex-start; flex-wrap: wrap; }
  .board-heading { flex-basis: 100%; }
  .filters { flex-wrap: wrap; }
  .filters input[type="text"] { max-width: none; flex-basis: 100%; }
  .filters select { flex: 1; }
  .board-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { flex-direction: column; }
  .board-column { width: 100%; }
  .task-table-wrap, .panel { overflow-x: auto; }
  .calendar-grid { grid-template-columns: repeat(7, minmax(88px, 1fr)); }
  .calendar-grid:not(.calendar-head) { min-width: 640px; }
  .main:has(.calendar-grid) { overflow-x: auto; }
  .form-row { flex-direction: column; }
  .auth-card { padding: 28px 24px; }
}

.task-assignee { margin-top: 7px; color: var(--text-muted); font-size: 11px; }
.task-tools { grid-column: 1; margin-top: 18px; border-top: 1px solid var(--border); padding-top: 15px; }
.task-tools section { margin-bottom: 18px; }
.task-tools form { margin-top: 8px; }
.checklist-item { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px !important; min-height: 30px; color: var(--text) !important; font-weight: 400 !important; border-bottom: 1px solid #f0f0f1; }
.checklist-item span { flex: 1; }
.checklist-item input:checked + span { color: var(--text-muted); text-decoration: line-through; }
.tool-row { display: block; padding: 7px 2px; color: #4d4f57; text-decoration: none; border-bottom: 1px solid #f0f0f1; font-size: 12.5px; }
.tool-row:hover { color: var(--purple-dark); }
.attachment-row { display: flex; align-items: center; justify-content: space-between; }
.attachment-row a { color: inherit; text-decoration: none; }
.activity-item { position: relative; padding: 8px 8px 8px 16px; color: var(--text-muted); font-size: 11.5px; border-left: 1px solid #dcdce0; }
.activity-item::before { content: ""; position: absolute; left: -3px; top: 13px; width: 5px; height: 5px; border-radius: 50%; background: #a7a8ae; }
.activity-item span { color: var(--text); font-weight: 600; }
.activity-item time { display: block; margin-top: 2px; font-size: 10.5px; }
.confirm-dialog p { color: var(--text-muted); line-height: 1.5; }
.inline-action-form { display: inline-flex; }
.user-actions { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.permissions-cell { color: var(--text-muted); font-size: 11px; }
.check-label { flex-direction: row !important; align-items: center; align-self: center; color: var(--text) !important; }
.status-user { color: #8b3d3d; font-size: 11px; }
.status-user.is-active { color: #347258; }
.notification-row { display: flex; justify-content: space-between; gap: 15px; padding: 12px 8px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--border); font-size: 12px; }
.notification-row span { color: var(--text-muted); }
.notification-row.is-unread { background: var(--purple-tint); }
.temporary-password { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid #d9d5ff; background: var(--purple-tint); border-radius: var(--radius-lg); }
.temporary-password span { color: var(--text-muted); font-size: 12px; }
.temporary-password strong { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 16px; letter-spacing: .04em; }
.reset-request-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.reset-request-row:last-child { border-bottom: 0; }
.reset-request-row div:first-child { display: flex; flex-direction: column; gap: 3px; }
.reset-request-row span { color: var(--text-muted); font-size: 11.5px; }
.account-picker { display:flex; flex-wrap:wrap; gap:8px 14px; margin:0; padding:8px 10px; border:1px solid var(--border); border-radius:7px; }
.account-picker legend { padding:0 5px; color:var(--text-muted); font-size:11px; font-weight:600; }
.personal-task-group { margin: 24px 0; }
.personal-task-group h2 { margin: 0; padding: 0 8px 8px; border-bottom: 1px solid var(--border); font-size: 12px; text-transform: uppercase; }
.personal-task-group h2 span { margin-left: 6px; color: var(--text-muted); font-weight: 500; }
.personal-task-row { display: grid; grid-template-columns: 12px minmax(220px,1fr) minmax(160px,.5fr) 100px; align-items: center; gap: 10px; padding: 9px 8px; border-bottom: 1px solid #eeeeef; color: var(--text); text-decoration: none; }
.personal-task-row:hover { background:#f8f8f9; }
.personal-task-row strong { font-size:12.5px; }.personal-task-row small{color:var(--text-muted)}.personal-task-row em{color:var(--text-muted);font-size:11.5px;font-style:normal;text-align:right}.personal-empty{padding:12px 8px;color:var(--text-muted);font-size:12px}
.global-search-page{display:flex;gap:8px;max-width:760px;margin:30px auto 10px}.global-search-page input{flex:1;padding:12px 14px;border:1px solid var(--border);border-radius:9px;font-size:15px}.search-results{max-width:760px;margin:20px auto}.search-results a{display:grid;grid-template-columns:1fr auto;gap:3px 15px;padding:13px 8px;border-bottom:1px solid var(--border);color:var(--text);text-decoration:none}.search-results span,.search-results small{color:var(--text-muted);font-size:11.5px}.search-results small{grid-column:1/-1}

@media (max-width: 430px) {
  .board-metrics { grid-template-columns: 1fr; }
  .metric-card { min-height: 82px; }
}

/* Minimal workspace direction */
:root {
  --purple: #5b50d6;
  --purple-dark: #463bb8;
  --purple-tint: #f2f0ff;
  --bg: #fff;
  --sidebar-bg: #fafafa;
  --border: #e7e7e9;
  --text: #202124;
  --text-muted: #777980;
  --radius: 7px;
  --radius-lg: 10px;
}

.sidebar {
  width: 252px;
  padding: 14px 12px;
  color: var(--text);
  border-right: 1px solid var(--border);
  box-shadow: none;
}
.sidebar-brand { color: var(--text); font-size: 15px; }
.brand-mark { width: 25px; height: 25px; border-radius: 6px; box-shadow: none; font-size: 12px; }
.nav-link { color: #56585f; font-weight: 500; }
.nav-link:hover { color: var(--text); background: #f0f0f1; }
.nav-link.active { color: var(--text); background: #ebebed; }
.sidebar-section-title { color: #92949a; }
.sidebar-empty { color: var(--text-muted); }
.account-name { color: #4c4e54; font-weight: 500; }
.account-name:hover, .account-name.active { color: var(--text); background: #efeff1; }
.board-link { color: #707279; }
.board-link:hover { color: var(--text); background: #f0f0f1; }
.board-link.active { color: var(--text); background: #e8e8ea; font-weight: 600; }
.btn-add-board { color: #85878d; }
.btn-add-board:hover { color: var(--text); }
.sidebar-footer { color: #85878d; border-color: var(--border); }
.sidebar-footer a { color: #676970; }
.sidebar-footer a:hover { color: var(--text); }
.logout-form { display: inline; }
.logout-form button { padding: 0; border: 0; background: transparent; color: #676970; cursor: pointer; font-size: 12px; }
.logout-form button:hover { color: var(--text); }
.sidebar .icon-btn { color: #888a90; }
.sidebar .icon-btn:hover { color: var(--text); background: #e9e9eb; }

.main { padding: 18px 26px 32px; }
.topbar { padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.board-eyebrow { display: none; }
.board-title { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.board-summary { font-size: 11.5px; margin-top: 1px; }
.view-toggle { background: transparent; padding: 0; border-radius: 0; gap: 14px; align-self: stretch; }
.view-btn { display: flex; align-items: center; padding: 7px 2px; border-radius: 0; border-bottom: 2px solid transparent; font-size: 12px; font-weight: 500; }
.view-btn.active { background: transparent; box-shadow: none; border-color: var(--text); }
.filters { align-items: center; }
.filters input[type="text"], .filters select { min-height: 32px; background: #fff; padding: 5px 9px; font-size: 12px; }
.filters input[type="text"] { max-width: 240px; }
.btn { min-height: 32px; padding: 6px 11px; border-radius: 7px; }
.btn-primary:hover { transform: none; box-shadow: none; }

.task-table-wrap { border: 0; border-radius: 0; overflow: visible; }
.task-table { table-layout: fixed; }
.task-table th, .task-table td { padding: 8px 10px; border-color: #ededee; }
.task-table th { background: #fff; color: #8a8c91; font-size: 10px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.task-table th:first-child { width: 52%; }
.task-table .select-cell { width: 36px; padding-left: 8px; padding-right: 4px; }
.task-table:has(.select-cell) th:nth-child(2) { width: 48%; }
.bulk-toolbar { display:flex; align-items:center; gap:8px; min-height:42px; padding:6px 8px; border-bottom:1px solid var(--border); background:#fafafa; }
.bulk-toolbar span { margin-right:auto; color:var(--text-muted); font-size:11.5px; }.bulk-toolbar select,.bulk-toolbar input{min-height:30px;border:1px solid var(--border);border-radius:6px;background:#fff;padding:4px 7px;font-size:12px}
.inline-task-field { width:100%; max-width:150px; min-height:27px; border:1px solid transparent; background:transparent; border-radius:5px; padding:3px 5px; color:var(--text); font-size:11.5px; }.inline-task-field:hover,.inline-task-field:focus{border-color:var(--border);background:#fff}.inline-task-field.is-saving{opacity:.55}.inline-task-field.is-error{border-color:var(--red)}
.task-table tbody tr:hover { background: #f8f8f9; }
.task-row td:first-child { padding-left: 36px; font-weight: 500; }
.task-row td:first-child::before { content: "○"; color: #a4a6ac; margin-right: 9px; }
.task-group-row td { padding: 18px 8px 7px !important; background: #fff !important; border-bottom: 1px solid var(--border); color: #4d4f55; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; cursor: default; }
.task-group-row .dot { display: inline-block; margin-right: 7px; vertical-align: 1px; }
.group-count { margin-left: 7px; color: #989aa0; font-weight: 500; }
.status-chip { border-radius: 5px; padding: 3px 7px; font-weight: 600; }
.badge { border-radius: 5px; font-weight: 600; }

.board { gap: 10px; }
.board-column { width: 285px; padding: 9px; background: #f5f5f6; border: 1px solid #ededee; }
.task-card { padding: 11px 12px; box-shadow: none; }
.task-card:hover { transform: none; box-shadow: 0 2px 8px rgba(20,20,25,.06); border-color: #cfcfd4; }

#taskModalOverlay { align-items: stretch; justify-content: flex-end; padding: 0; }
#taskModalOverlay .modal { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, .8fr); grid-template-rows: auto auto 1fr; gap: 0 28px; width: min(1040px, 96vw); max-width: none; max-height: 100vh; height: 100vh; padding: 26px 30px; border-radius: 0; box-shadow: -10px 0 30px rgba(20,20,25,.1); }
#taskModalOverlay .modal > h2 { grid-column: 1; font-size: 21px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
#taskModalOverlay #taskForm { grid-column: 1; padding-top: 18px; }
#taskModalOverlay .links { grid-column: 1; }
#taskModalOverlay .comments { grid-column: 2; grid-row: 1 / span 3; margin: -26px -30px -26px 0; padding: 26px 20px; border-top: 0; border-left: 1px solid var(--border); background: #fafafa; display: flex; flex-direction: column; }
#taskModalOverlay .comments-title { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
#taskModalOverlay .comments-list { flex: 1; max-height: none; }
.comment-item { background: #fff; border: 1px solid var(--border); }

@media (max-width: 760px) {
  .sidebar { background: #fafafa; }
  #taskModalOverlay .modal { display: block; width: 100%; padding: 22px 18px; }
  #taskModalOverlay .comments { margin: 18px 0 0; padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--border); background: #fff; }
  .task-table { min-width: 680px; }
}

/* Visual system 2026 — coherent minimal workspace */
:root {
  --accent: #635bdb;
  --accent-hover: #5047c8;
  --accent-soft: #f1efff;
  --surface: #ffffff;
  --surface-subtle: #fafafa;
  --surface-hover: #f6f6f7;
  --line: #e8e8eb;
  --line-strong: #d9dade;
  --ink: #202124;
  --ink-secondary: #5f6269;
  --ink-tertiary: #92949a;
  --danger: #d63c49;
  --shadow-float: 0 18px 50px rgba(24, 24, 28, .13);
}

html { background: var(--surface); }
body { color: var(--ink); background: var(--surface); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { color: inherit; }
input::placeholder, textarea::placeholder { color: #a0a2a8; }

.app { min-height: 100dvh; }
.sidebar {
  width: 240px;
  height: 100dvh;
  position: sticky;
  top: 0;
  padding: 16px 12px 12px;
  gap: 14px;
  background: #fbfbfc;
  border-right: 1px solid var(--line);
}
.sidebar-brand { height: 32px; padding: 0 7px; font-size: 15px; font-weight: 720; }
.brand-mark { width: 24px; height: 24px; border-radius: 6px; background: var(--accent); font-size: 11px; }
.sidebar-nav { gap: 2px; }
.nav-link { min-height: 34px; padding: 8px 9px; border-radius: 7px; color: var(--ink-secondary); font-size: 13px; }
.nav-link:hover { background: #f0f0f2; }
.nav-link.active { background: #ececef; color: var(--ink); font-weight: 620; }
.nav-link[href="search.php"] { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nav-link[href="search.php"]::after { content: "Ctrl K"; color: #a0a2a8; font-size: 9px; font-weight: 500; }
.sidebar > .btn { width: 100%; justify-content: center; }
.sidebar-section-title { height: 25px; margin: 0; padding: 0 8px; color: var(--ink-tertiary); font-size: 10px; font-weight: 700; }
.sidebar-scroll { margin: -2px -3px 0; padding: 0 3px; scrollbar-width: thin; }
.account-block { margin-bottom: 7px; }
.account-name { min-height: 31px; padding: 6px 8px; border-radius: 7px; color: #484a50; }
.account-name.active { background: #eeeef0; color: var(--ink); font-weight: 620; }
.board-sublist { padding-left: 15px; margin: 2px 0 4px; }
.board-link { min-height: 29px; padding: 5px 8px; font-size: 12.5px; }
.board-link.active { background: #e9e9ec; }
.sidebar-footer { padding: 11px 7px 0; gap: 5px; line-height: 1.45; }

.main { padding: 22px 32px 44px; overflow-x: hidden; }
.topbar { margin: 0 0 16px; padding: 0 0 14px; }
.topbar-row { min-height: 40px; margin-bottom: 12px; gap: 18px; }
.board-heading { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 12px; }
.board-title { flex: 0 1 auto; font-size: 19px; font-weight: 680; }
.board-title-sep { margin: 0 6px; color: #b1b2b7; }
.board-summary { margin: 0; color: var(--ink-tertiary); }
.view-toggle { margin-left: auto; gap: 18px; }
.view-btn { padding: 9px 1px 8px; color: #686a71; }
.view-btn:hover { color: var(--ink); }
.view-btn.active { color: var(--ink); border-color: var(--accent); font-weight: 620; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; border-radius: 7px; }
.btn-primary { background: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { border-color: var(--line-strong); background: var(--surface); color: #3f4147; }
.btn-outline:hover { border-color: #c8c9ce; background: var(--surface-hover); }
.btn-danger { background: #fff1f2; color: var(--danger); }
.icon-btn { min-width: 26px; min-height: 26px; }

.filters { width: 100%; gap: 7px; }
.filters input[type="text"], .filters select,
.bulk-toolbar select, .bulk-toolbar input,
.inline-form input, .inline-form select,
.global-search-page input {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 1px 1px rgba(20,20,24,.02);
}
.filters input[type="text"] { min-width: 220px; max-width: 360px; }
.saved-views { min-height: 26px; margin-top: 8px; }
.saved-views a, .saved-views button { border-color: var(--line); color: var(--ink-secondary); }

.bulk-toolbar {
  min-height: 46px;
  margin-top: 4px;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
  background: #fbfbfc;
}
.bulk-toolbar span { padding-left: 3px; }
.bulk-toolbar strong { color: var(--ink); }
.task-table-wrap { border: 1px solid var(--line); border-radius: 0 0 9px 9px; overflow: hidden; }
.task-table { width: 100%; min-width: 820px; table-layout: fixed; }
.task-table th, .task-table td { height: 43px; padding: 8px 12px; vertical-align: middle; }
.task-table th { height: 38px; color: var(--ink-tertiary); font-size: 10.5px; font-weight: 600; background: #fff; }
.task-table th:first-child { width: auto; }
.task-table .select-cell { width: 38px !important; padding: 0 6px 0 12px; text-align: center; }
.task-table:has(.select-cell) th:nth-child(2) { width: 36%; }
.task-table:has(.select-cell) th:nth-child(3) { width: 18%; }
.task-table:has(.select-cell) th:nth-child(4) { width: 17%; }
.task-table:has(.select-cell) th:nth-child(5) { width: 13%; }
.task-table:has(.select-cell) th:nth-child(6) { width: 16%; }
.task-table:not(:has(.select-cell)) th:first-child { width: 40%; }
.task-row td:first-child { padding-left: 12px; font-weight: 400; }
.task-row td:first-child::before { content: none; }
.task-row td:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.task-row:hover { background: #fafafd !important; }
.task-group-row td { height: 41px; padding: 15px 10px 7px !important; color: #575960; font-size: 10.5px; }
.task-group-row:first-child td { padding-top: 10px !important; }
.group-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 5px; border-radius: 9px; background: #f1f1f3; }
.inline-task-field { max-width: 100%; min-height: 29px; padding: 4px 7px; border-radius: 6px; color: #4c4e54; }
.inline-task-field:hover { border-color: var(--line-strong); }
.task-table input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); }

.board { gap: 12px; padding: 2px 1px 22px; }
.board-column { width: 300px; min-height: 180px; padding: 10px; border: 0; border-radius: 10px; background: #f6f6f7; }
.board-column-header { padding: 3px 4px 11px; color: #4c4e54; font-size: 11px; text-transform: uppercase; letter-spacing: .025em; }
.board-column-header .count { background: #ebebed; }
.task-card { padding: 12px; border-color: #e5e5e8; border-radius: 8px; }
.task-title { margin-bottom: 4px; font-size: 13px; font-weight: 620; }
.task-desc { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.45; }
.task-assignee { display: inline-flex; align-items: center; min-height: 22px; margin-top: 8px; padding: 2px 7px; border-radius: 10px; background: #f1f1f3; }

.panel { max-width: 1100px; padding: 20px; border-color: var(--line); border-radius: 10px; box-shadow: none; }
.panel-title { margin-bottom: 16px; font-size: 15px; font-weight: 650; }
.table th, .table td { height: 43px; border-color: var(--line); }
.table th { color: var(--ink-tertiary); font-weight: 600; }
.inline-form { gap: 12px; }
.inline-form label { color: var(--ink-secondary); }
.empty-state { padding: 50px 20px; }

.modal-overlay { background: rgba(25,25,28,.28); backdrop-filter: blur(2px); }
.modal { border: 1px solid var(--line); box-shadow: var(--shadow-float); }
#taskModalOverlay .modal { width: min(1080px, 96vw); grid-template-columns: minmax(0, 1.35fr) minmax(330px, .8fr); padding: 30px 34px; }
#taskModalOverlay .modal > h2 { margin-bottom: 0; font-size: 22px; font-weight: 670; }
#taskModalOverlay #taskForm { gap: 14px; }
.modal label { gap: 6px; color: var(--ink-secondary); font-weight: 550; }
.modal input, .modal select, .modal textarea { min-height: 37px; border-color: var(--line-strong); }
.modal textarea { line-height: 1.5; resize: vertical; }
#taskModalOverlay .comments { background: #fbfbfc; }
.comments-title, .links-title { color: var(--ink-secondary); font-size: 10.5px; }
.comment-item { border: 0; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.task-tools { margin-top: 22px; }
.task-tools h3 { margin: 0 0 8px; font-size: 12px; }

.auth-body { min-height: 100dvh; padding: 24px; background: #f7f7f8; }
.auth-card { width: 100%; max-width: 400px; padding: 34px; border-color: var(--line); border-radius: 12px; box-shadow: 0 12px 35px rgba(20,20,24,.08); }
.auth-title { font-size: 23px; font-weight: 680; }
.auth-form input { min-height: 42px; border-color: var(--line-strong); }
.auth-switch { font-size: 13px; }
.auth-switch a { color: var(--accent); }

.global-search-page { margin-top: 22px; }
.search-results a { border-radius: 8px; }
.search-results a:hover { background: var(--surface-hover); }
.notification-row { border-radius: 8px; }
.notification-row:hover { background: var(--surface-hover); }
.notification-row.is-unread { background: var(--accent-soft); }

@media (max-width: 900px) {
  .main { padding: 20px 20px 36px; }
  .filters { flex-wrap: wrap; }
  .filters input[type="text"] { flex-basis: 100%; max-width: none; }
  #taskModalOverlay .modal { grid-template-columns: minmax(0,1fr) 310px; padding: 24px; }
}

@media (max-width: 760px) {
  .app { display: block; }
  .sidebar { position: relative; width: 100%; height: auto; min-height: 0; padding: 9px 12px; gap: 7px; }
  .sidebar-brand { height: 28px; padding: 0 4px; }
  .sidebar-nav { display: flex; flex-flow: row nowrap; gap: 4px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .sidebar-nav .nav-link { flex: 0 0 auto; overflow: hidden; min-height: 31px; padding: 7px 10px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
  .nav-link[href="search.php"]::after { display: none; }
  .sidebar > .btn { min-height: 32px; }
  .sidebar-section { display: none; }
  .sidebar-footer { display: none; }
  .main { padding: 18px 14px 32px; }
  .topbar-row { gap: 10px; }
  .board-heading { flex-basis: 100%; }
  .board-title { font-size: 18px; }
  .view-toggle { order: 3; width: 100%; margin-left: 0; border-bottom: 1px solid var(--line); }
  .filters select { min-width: calc(50% - 4px); }
  .filters .btn { flex: 1; }
  .bulk-toolbar { overflow-x: auto; }
  .task-table-wrap { overflow-x: auto; }
  .task-table { min-width: 760px; }
  .board { flex-direction: column; overflow: visible; }
  .board-column { width: 100%; }
  #taskModalOverlay { overflow-y: auto; }
  #taskModalOverlay .modal { width: 100%; height: auto; min-height: 100dvh; padding: 20px 16px; }
  #taskModalOverlay .comments { margin: 22px 0 0; }
  .panel { padding: 15px; overflow-x: auto; }
  .preferences-grid { grid-template-columns: 1fr; gap: 18px; }
  .preferences-grid > button { grid-column: 1; }
  .auth-body { padding: 16px; }
  .auth-card { padding: 28px 22px; }
}

/* Secondary workspace pages */
.sidebar-brand { text-decoration: none; }
.sidebar-secondary .sidebar-footer { margin-top: auto; }
.secondary-main { width: min(1180px, calc(100% - 240px)); }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; min-height: 72px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.page-header h1 { margin: 0; font-size: 22px; font-weight: 680; letter-spacing: -.02em; }
.page-header p { margin: 5px 0 0; color: var(--ink-secondary); font-size: 13px; }
.page-header .page-kicker { margin: 0 0 4px; color: var(--ink-tertiary); font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.page-filters { width: auto; margin-bottom: 18px; align-items: flex-end; }
.page-filters label { display: flex; flex-direction: column; gap: 5px; color: var(--ink-tertiary); font-size: 10.5px; font-weight: 600; }
.page-filters input { min-width: 150px; padding: 6px 9px; }
.summary-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.summary-cards article { display: flex; flex-direction: column; gap: 7px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.summary-cards span { color: var(--ink-tertiary); font-size: 11px; }
.summary-cards strong { font-size: 21px; font-weight: 650; letter-spacing: -.02em; }
.data-panel { padding: 0; overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; min-height: 55px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.panel-heading .panel-title { margin: 0; }
.panel-heading span { color: var(--ink-tertiary); font-size: 11px; }
.data-panel .table th:first-child, .data-panel .table td:first-child { padding-left: 18px; }

.settings-panel { max-width: 900px; padding: 0; overflow: hidden; }
.settings-heading { display: grid; grid-template-columns: 1fr 210px; align-items: center; min-height: 74px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.settings-heading h2 { margin: 0; font-size: 15px; }
.settings-heading p { margin: 4px 0 0; color: var(--ink-tertiary); font-size: 12px; }
.settings-columns { display: grid; grid-template-columns: 1fr 1fr; text-align: center; color: var(--ink-tertiary); font-size: 10px; font-weight: 650; text-transform: uppercase; }
.settings-row { display: grid; grid-template-columns: 1fr 105px 105px; align-items: center; min-height: 62px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.settings-row > div { display: flex; flex-direction: column; gap: 2px; }
.settings-row strong { font-size: 13px; font-weight: 600; }
.settings-row small { color: var(--ink-tertiary); font-size: 11px; }
.switch { display: flex; justify-content: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: relative; width: 32px; height: 18px; border-radius: 10px; background: #d7d8dc; transition: .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.18); transition: .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 3px solid rgba(99,91,219,.18); }
.panel-actions { padding: 14px 20px; background: #fbfbfc; }
.calendar-connect { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 900px; }
.calendar-connect p { margin: -8px 0 12px; color: var(--ink-secondary); font-size: 12px; }
.feed-url { width: min(620px, 70vw); min-height: 36px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink-secondary); background: #fafafa; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 20px; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; color: var(--ink-secondary); font-size: 11px; font-weight: 600; }
.form-grid input, .form-grid select { min-height: 38px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; }
.span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; padding-top: 3px; }
.template-create { max-width: 900px; padding: 0; }
.inline-action-form { gap: 6px; }
.inline-action-form select { min-height: 32px; padding: 5px 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; }
.table-actions { text-align: right !important; }
.type-badge, .activity-badge { display: inline-flex; padding: 3px 7px; border-radius: 5px; background: #f0f0f2; color: #55575e; font-size: 10.5px; font-weight: 600; text-transform: capitalize; }
.activity-badge { color: #5149b8; background: var(--accent-soft); }
.sidebar:has(.nav-link.active[href="users.php"]) > .btn-outline { display: none; }

/* User administration */
.secondary-main > .panel > .inline-form { display: grid; grid-template-columns: repeat(4, minmax(150px,1fr)); align-items: end; }
.secondary-main > .panel > .inline-form .account-picker { grid-column: 1 / -1; }
.secondary-main > .panel > .inline-form > .btn { justify-self: start; }
.account-picker { background: #fafafa; border-color: var(--line); }
.check-label input, .account-picker input { accent-color: var(--accent); }
.user-actions .btn { white-space: nowrap; }

/* Operational dashboard */
.dashboard-main { max-width: 1260px; }
.dashboard-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.dashboard-metrics a { display: flex; flex-direction: column; gap: 5px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 9px; color: inherit; text-decoration: none; }
.dashboard-metrics a:hover { border-color: var(--line-strong); background: #fcfcfd; }
.dashboard-metrics small { color: var(--ink-tertiary); font-size: 10.5px; }
.metric-danger { color: var(--danger); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(330px,.75fr); gap: 14px; }
.dashboard-grid .panel { max-width: none; padding: 0; overflow: hidden; }
.panel-heading a { color: var(--ink-secondary); font-size: 11px; text-decoration: none; }
.panel-heading a:hover { color: var(--accent); }
.dashboard-list > a { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 10px; min-height: 58px; padding: 8px 18px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.dashboard-list > a:hover { background: var(--surface-hover); }
.dashboard-list > a:last-child { border-bottom: 0; }
.dashboard-list a div { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.dashboard-list strong { overflow: hidden; font-size: 12.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-list small, .dashboard-list time { color: var(--ink-tertiary); font-size: 10.5px; }
.dashboard-list time.is-overdue { color: var(--danger); font-weight: 600; }
.priority-dot { width: 7px; height: 7px; border-radius: 50%; background: #aeb0b5; }
.priority-alta { background: #e5484d; }.priority-media { background: #e3a226; }.priority-baja { background: #2bb673; }
.activity-feed > div { display: flex; gap: 10px; min-height: 58px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.activity-feed > div:last-child { border-bottom: 0; }
.activity-avatar { display: grid; place-items: center; flex: 0 0 25px; height: 25px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 700; }
.activity-feed p { margin: 1px 0 0; color: var(--ink-secondary); font-size: 11.5px; line-height: 1.45; }
.activity-feed p strong, .activity-feed p b { color: var(--ink); font-weight: 600; }
.activity-feed time { display: block; margin-top: 3px; color: var(--ink-tertiary); font-size: 10px; }
.workload-panel { max-width: none; margin-top: 14px; padding: 0; }
.workload-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; padding: 10px 18px 16px; }
.workload-list > div { display: grid; grid-template-columns: 130px 1fr 28px auto; align-items: center; gap: 10px; min-height: 38px; font-size: 11.5px; }
.workload-list > div > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workload-list strong { text-align: right; }
.workload-list small { color: var(--danger); }
.workload-bar { height: 5px; overflow: hidden; border-radius: 4px; background: #eeeeef; }
.workload-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

/* Personal task inbox */
.inbox-filters { margin-bottom: 18px; flex-wrap: wrap; }
.inbox-filters input[type="text"] { flex: 1 1 280px; max-width: none; }
.inbox-table { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; }
.inbox-head, .inbox-row { display: grid; grid-template-columns: minmax(280px,1fr) 190px 120px 150px; align-items: center; }
.inbox-head { min-height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--ink-tertiary); font-size: 10px; font-weight: 600; }
.inbox-group h2 { display: flex; align-items: center; gap: 7px; min-height: 41px; margin: 0; padding: 10px 14px 6px; border-bottom: 1px solid var(--line); color: #55575e; font-size: 10.5px; text-transform: uppercase; }
.inbox-group h2 span { display: inline-grid; place-items: center; min-width: 18px; height: 18px; border-radius: 9px; background: #f0f0f2; color: var(--ink-tertiary); }
.inbox-row { min-height: 48px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.inbox-row:hover { background: #fafafd; }
.inbox-row > a { display: flex; min-width: 0; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.inbox-row > a div { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.inbox-row strong { overflow: hidden; font-size: 12.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row small { color: var(--ink-tertiary); font-size: 10.5px; }
.inbox-quick { width: calc(100% - 10px); min-height: 29px; padding: 4px 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink-secondary); font-size: 11.5px; }
.inbox-quick:hover:not(:disabled), .inbox-quick:focus { border-color: var(--line-strong); background: #fff; }
.inbox-quick:disabled { color: var(--ink-tertiary); opacity: .8; }
.inbox-quick.is-saving { opacity: .45; }
.inbox-quick.is-error { border-color: var(--danger); }
.inbox-group:last-child .inbox-row:last-child { border-bottom: 0; }
.inbox-group .personal-empty { display: none; }

/* Notifications */
.deadline-panel, .notification-panel { max-width: 900px; padding: 0; overflow: hidden; }
.deadline-list a { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 10px; min-height: 45px; padding: 7px 18px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.deadline-list a:hover { background: var(--surface-hover); }
.deadline-list a:last-child { border-bottom: 0; }
.deadline-list strong { font-size: 12.5px; font-weight: 600; }
.deadline-list time { color: var(--ink-tertiary); font-size: 10.5px; }
.deadline-list time.is-overdue { color: var(--danger); font-weight: 600; }
.notification-item { display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; gap: 10px; min-height: 59px; padding: 8px 15px; border-bottom: 1px solid var(--line); }
.notification-item:last-child { border-bottom: 0; }
.notification-item.is-unread { background: #faf9ff; }
.notification-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; background: #f0efff; color: var(--accent); font-size: 10px; font-weight: 700; }
.notification-item > a { display: flex; min-width: 0; flex-direction: column; gap: 3px; color: inherit; text-decoration: none; }
.notification-item > a strong { overflow: hidden; font-size: 12.5px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.notification-item > a small { color: var(--ink-tertiary); font-size: 10.5px; }
.notification-item form button { display: grid; place-items: center; width: 25px; height: 25px; border: 0; border-radius: 6px; background: transparent; color: var(--ink-tertiary); cursor: pointer; }
.notification-item form button:hover { background: #ececef; color: var(--accent); }

/* Global command search */
.command-overlay { display: none; position: fixed; inset: 0; z-index: 120; align-items: flex-start; justify-content: center; padding-top: min(18vh,150px); background: rgba(25,25,28,.25); backdrop-filter: blur(2px); }
.command-overlay.open { display: flex; }
.command-box { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; width: min(620px,calc(100vw - 30px)); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 11px; background: #fff; box-shadow: var(--shadow-float); }
.command-box > span { padding-left: 15px; color: var(--ink-tertiary); font-size: 20px; }
.command-box input { height: 55px; padding: 0 14px; border: 0; outline: 0; font-size: 15px; }
.command-box kbd { margin-right: 13px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink-tertiary); background: #fafafa; font: 10px inherit; }
.command-box small { grid-column: 1/-1; padding: 9px 15px; border-top: 1px solid var(--line); color: var(--ink-tertiary); font-size: 10.5px; }

@media (max-width: 760px) {
  .secondary-main { width: 100%; }
  .summary-cards { grid-template-columns: 1fr; }
  .settings-heading { grid-template-columns: 1fr; padding: 16px; }
  .settings-columns { display: none; }
  .settings-row { grid-template-columns: 1fr 58px 58px; padding: 0 14px; }
  .settings-row::before { content: none; }
  .calendar-connect { align-items: flex-start; flex-direction: column; }
  .feed-url { width: 100%; }
  .form-grid { grid-template-columns: 1fr; padding: 15px; }
  .span-2 { grid-column: 1; }
  .secondary-main > .panel > .inline-form { display: flex; }
  .dashboard-metrics { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .workload-list { grid-template-columns: 1fr; }
  .inbox-table { overflow-x: auto; }
  .inbox-head, .inbox-row { min-width: 760px; }
}

@media (max-width: 430px) {
  .dashboard-metrics { grid-template-columns: 1fr; }
}
