/* ============================================================
   RESET & TOKENS
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0c0e16;
  --bg-2:        #131620;
  --bg-3:        #191d2e;
  --bg-4:        #1f2438;
  --border:      #252b3d;
  --border-2:    #303753;

  --text:        #e9eaf6;
  --text-muted:  #7880a0;
  --text-dim:    #434b6a;

  --accent:      #6C63FF;
  --accent-h:    #8b85ff;
  --accent-soft: rgba(108,99,255,.15);
  --accent-glow: rgba(108,99,255,.4);

  --green:       #34d399;
  --green-bg:    rgba(52,211,153,.13);
  --yellow:      #fbbf24;
  --yellow-bg:   rgba(251,191,36,.13);
  --orange:      #fb923c;
  --orange-bg:   rgba(251,146,60,.13);
  --red:         #f87171;
  --red-bg:      rgba(248,113,113,.13);
  --blue:        #60a5fa;
  --blue-bg:     rgba(96,165,250,.13);
  --cyan:        #22d3ee;
  --cyan-bg:     rgba(34,211,238,.13);
  --purple:      #a78bfa;
  --purple-bg:   rgba(167,139,250,.13);
  --pink:        #f472b6;
  --pink-bg:     rgba(244,114,182,.13);

  --col-width:   292px;
  --radius:      14px;
  --radius-sm:   9px;
  --radius-xs:   6px;
  --shadow:      0 8px 32px rgba(0,0,0,.55);
  --shadow-sm:   0 2px 12px rgba(0,0,0,.35);
  --transition:  .17s ease;
}

html { font-size: 14px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }

/* ============================================================
   SCROLLBARS
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  height: 60px;
  background: linear-gradient(180deg, rgba(19,22,32,.94), rgba(15,23,42,.86));
  border-bottom: 1px solid rgba(148,163,184,.16);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
  backdrop-filter: blur(14px);
  box-shadow: 0 8px 22px rgba(2,6,23,.24);
}

.header__left, .header__right { display: flex; align-items: center; gap: 16px; }

.header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 10px;
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
}

.header__logo:hover {
  opacity: .92;
  transform: translateY(-1px);
  background: rgba(148,163,184,.08);
}

.header__logo-icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.header__logo-text {
  display: inline;
  font-size: .94rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0;
}

.header__nav {
  display: flex;
  gap: 8px;
  padding: 3px;
  border: 1px solid rgba(148,163,184,.16);
  border-radius: 12px;
  background: rgba(15,23,42,.42);
}
.header__nav a {
  padding: 6px 11px;
  border-radius: 9px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: .84rem;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
  line-height: 1.2;
}
.header__nav a:hover {
  background: rgba(148,163,184,.1);
  color: var(--text);
}
.header__nav a.active {
  background: linear-gradient(135deg, #7c5cff, #6c63ff);
  color: #fff;
  box-shadow: 0 6px 16px rgba(124,92,255,.32), inset 0 0 0 1px rgba(255,255,255,.1);
}

.header__search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15,23,42,.68);
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 10px;
  padding: 0 11px;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}
.header__search:focus-within {
  border-color: #7c5cff;
  box-shadow: 0 0 0 3px rgba(124,92,255,.14);
}
.header__search svg {
  color: var(--text-dim);
  flex-shrink: 0;
}
.header__search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  width: 180px;
  padding: 8px 0;
  font-size: .83rem;
}
.header__search input::placeholder { color: rgba(148,163,184,.72); }

.header__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .8rem;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 8px 20px rgba(124,92,255,.24);
  transition: transform var(--transition), box-shadow var(--transition);
}

.header__avatar:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(124,92,255,.34);
}

.header .btn {
  border-radius: 10px;
  min-height: 34px;
  padding: 7px 12px;
}

.header .btn--primary {
  background: linear-gradient(135deg, #7c5cff, #6c63ff);
  box-shadow: 0 8px 20px rgba(124,92,255,.28);
}

.header .btn--primary:hover {
  background: linear-gradient(135deg, #8a6cff, #786eff);
  box-shadow: 0 12px 28px rgba(124,92,255,.34);
}

.header .btn--ghost {
  background: rgba(15,23,42,.7);
  border-color: rgba(148,163,184,.22);
  color: #cbd5e1;
}

.header .btn--ghost:hover {
  background: rgba(30,41,59,.74);
  color: #fff;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
}
.btn:active { transform: scale(.97); }

.btn--primary {
  background: var(--accent);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-h);
  box-shadow: 0 0 16px var(--accent-glow);
}

.btn--ghost {
  background: var(--bg-3);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn--ghost:hover { background: var(--border); color: var(--text); }

.btn--danger {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(248,113,113,.2);
}
.btn--danger:hover { background: rgba(248,113,113,.22); }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.icon-btn:hover { background: var(--bg-3); color: var(--text); }
.icon-btn--danger:hover { background: var(--red-bg); color: var(--red); }

/* ============================================================
   TOOLBAR
   ============================================================ */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  background: rgba(15,23,42,.78);
  border-bottom: 1px solid rgba(148,163,184,.13);
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 10px;
  backdrop-filter: blur(10px);
}

.toolbar__stats { display: flex; gap: 16px; }
.stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--text-muted);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px 12px;
}
.stat-pill strong { color: var(--text); font-weight: 700; }
.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.toolbar__filters { display: flex; align-items: center; gap: 6px; }
.toolbar__label { font-size: .82rem; color: var(--text-muted); margin-right: 4px; }

.filter-btn {
  padding: 5px 13px;
  border-radius: 99px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(15,23,42,.64);
  border: 1px solid rgba(148,163,184,.2);
  transition: all var(--transition);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ============================================================
   BOARD
   ============================================================ */
.board {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 18px 24px 30px;
  overflow-x: auto;
  overflow-y: hidden;
  /* custom wide scrollbar for board */
  scrollbar-width: thin;
  scrollbar-color: var(--border-2) transparent;
}

.board--kanban {
  max-width: 1760px;
  margin: 0 auto;
}

.board--clients {
  display: block;
  overflow: auto;
}

.clients-view {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.clients-head {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.clients-head-actions {
  display: flex;
  gap: 8px;
}

.clients-bulkbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  flex-wrap: wrap;
}

.clients-bulk-count {
  color: var(--text-muted);
  font-size: .8rem;
}

.clients-bulk-count strong {
  color: var(--text);
}

.clients-bulk-select {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  padding: 6px 8px;
  min-width: 170px;
}

.clients-count {
  color: var(--text-muted);
  font-size: .8rem;
}

.clients-count strong {
  color: var(--text);
}

.clients-table-wrap {
  overflow: auto;
}

.clients-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.clients-table th,
.clients-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: .83rem;
  white-space: nowrap;
}

.clients-table th {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-dim);
  background: var(--bg-3);
  position: sticky;
  top: 0;
  z-index: 2;
}

.clients-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.clients-table th.sortable:hover {
  color: var(--text-muted);
}

.clients-table tbody tr {
  cursor: pointer;
  transition: background var(--transition);
}

.clients-table tbody tr:hover {
  background: var(--bg-3);
}

.clients-col-name {
  display: flex;
  align-items: center;
  gap: 9px;
}

.clients-actions {
  display: inline-flex;
  gap: 6px;
}

.clients-action-btn {
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-3);
  color: var(--text-muted);
  font-size: .74rem;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
}

.clients-action-btn:hover {
  color: var(--text);
  border-color: var(--border-2);
}

.clients-action-btn--danger:hover {
  color: var(--red);
  border-color: rgba(248,113,113,.35);
  background: var(--red-bg);
}

.clients-status-select {
  width: 100%;
  min-width: 130px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text);
  padding: 5px 8px;
}

.clients-export-btn {
  padding: 6px 10px;
  font-size: .78rem;
}

.clients-export-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.clients-empty {
  padding: 40px 22px;
  text-align: center;
  color: var(--text-dim);
  font-size: .86rem;
}

.clients-empty__title {
  color: var(--text);
  font-weight: 700;
  margin-bottom: 6px;
}

.clients-empty__text {
  color: var(--text-muted);
  font-size: .82rem;
}

.tasks-view {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 10px 6px 16px;
}

.tasks-center {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.tasks-center__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.tasks-center__title {
  margin: 0;
  font-size: 1.08rem;
}

.tasks-center__subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: .82rem;
}

.tasks-center__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.tasks-center__stat {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.tasks-center__stat span {
  color: var(--text-muted);
  font-size: .74rem;
}

.tasks-center__stat strong {
  font-size: 1.1rem;
}

.tasks-center__sections {
  display: grid;
  gap: 12px;
}

.tasks-center__section {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(15, 23, 42, .28);
  padding: 10px;
}

.tasks-center__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tasks-center__section-title {
  margin: 0;
  font-size: .84rem;
  color: var(--text-muted);
  font-weight: 700;
}

.tasks-center__section-count {
  font-size: .72rem;
  color: var(--text-dim);
}

.tasks-center__section .tasks-empty {
  margin: 6px 0 0;
}

.tasks-center__section--cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.tasks-center__section--cards .tasks-center__section-head {
  grid-column: 1 / -1;
}

.task-center-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
  cursor: pointer;
}

.task-center-card__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
}

.task-center-card__check {
  display: inline-flex;
  align-items: center;
}

.task-center-card__status {
  justify-self: start;
  font-size: .68rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.task-center-card__status--today { color: #60a5fa; background: rgba(96,165,250,.14); border-color: rgba(96,165,250,.32); }
.task-center-card__status--overdue { color: #f87171; background: rgba(248,113,113,.14); border-color: rgba(248,113,113,.32); }
.task-center-card__status--done { color: #34d399; background: rgba(52,211,153,.14); border-color: rgba(52,211,153,.32); }
.task-center-card__status--open { color: #cbd5e1; background: rgba(148,163,184,.14); border-color: rgba(148,163,184,.32); }

.task-center-card__delete {
  justify-self: end;
}

.task-center-card__title {
  font-size: .86rem;
  font-weight: 700;
  color: var(--text);
}

.task-center-card__title.done {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-center-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
  font-size: .74rem;
  flex-wrap: wrap;
}

.task-center-card__desc {
  color: var(--text-dim);
  font-size: .76rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tasks-center__empty {
  border: 1px dashed var(--border-2);
  border-radius: 10px;
  padding: 24px 14px;
  text-align: center;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.tasks-center__empty-title {
  font-weight: 700;
}

.tasks-center__empty-text {
  color: var(--text-muted);
  font-size: .82rem;
}

.tasks-empty {
  color: var(--text-dim);
  font-size: .82rem;
}

.task-create-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(2, 6, 23, .72);
  backdrop-filter: blur(6px);
  animation: taskCreateFade .2s ease;
}

.task-create-modal__card {
  width: min(620px, 95vw);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, #111827, #0f172a);
  box-shadow: 0 28px 70px rgba(2, 6, 23, .55);
  animation: taskCreateScale .22s ease;
}

.task-create-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.task-create-modal__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
}

.task-create-modal__subtitle {
  margin: 5px 0 0;
  font-size: .8rem;
  color: rgba(226,232,240,.74);
}

.task-create-form {
  display: grid;
  gap: 12px;
}

.task-create-form .form-group {
  display: grid;
  gap: 6px;
}

.task-create-form label {
  color: rgba(203,213,225,.86);
  font-size: .76rem;
  font-weight: 600;
}

.task-create-form input,
.task-create-form select,
.task-create-form textarea {
  background: #0f172a;
  border: 1px solid #232946;
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 42px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.task-create-form textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.45;
}

.task-create-form input::placeholder,
.task-create-form textarea::placeholder {
  color: rgba(148,163,184,.75);
}

.task-create-form input:focus,
.task-create-form select:focus,
.task-create-form textarea:focus {
  border-color: #7c5cff;
  box-shadow: 0 0 0 3px rgba(124,92,255,.15);
}

.task-create-form__row {
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 10px;
  align-items: end;
}

.task-create-form__status {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,.3);
  background: rgba(15,23,42,.7);
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  font-size: .78rem;
  font-weight: 600;
}

.task-create-form__footer {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(148,163,184,.18);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.task-create-form .btn--primary {
  background: linear-gradient(135deg, #7c5cff, #6c63ff);
  box-shadow: 0 8px 22px rgba(124,92,255,.28);
}

.task-create-form .btn--primary:hover {
  background: linear-gradient(135deg, #8a6cff, #786eff);
  box-shadow: 0 12px 28px rgba(124,92,255,.34);
}

.task-create-form .btn--ghost {
  background: rgba(15,23,42,.72);
  border-color: rgba(148,163,184,.24);
  color: #cbd5e1;
}

.task-create-empty {
  border: 1px dashed rgba(148,163,184,.3);
  border-radius: 12px;
  padding: 20px 12px;
  text-align: center;
  color: #cbd5e1;
}

.task-create-empty__title {
  font-size: .86rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.task-create-empty__text {
  font-size: .78rem;
  color: rgba(203,213,225,.75);
}

.task-modal .btn--danger {
  background: rgba(248,113,113,.14);
  border-color: rgba(248,113,113,.3);
  color: #fca5a5;
}

.task-modal .btn--danger:hover {
  background: rgba(248,113,113,.2);
}

@keyframes taskCreateFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes taskCreateScale {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.accesses-view {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.accesses-filters {
  display: grid;
  grid-template-columns: 1fr 220px 180px;
  gap: 8px;
  margin-bottom: 10px;
}

.accesses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.access-search {
  width: min(360px, 100%);
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: .84rem;
}

.access-card--client {
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
}

.access-card--client:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--border));
  transform: translateY(-1px);
}

.access-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.access-card--compact {
  padding: 8px;
  gap: 6px;
}

.access-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.access-card__title {
  font-size: .86rem;
  font-weight: 700;
  color: var(--text);
}

.access-card__meta,
.access-card__row,
.access-card__note {
  font-size: .76rem;
  color: var(--text-muted);
}

.access-card__row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 8px;
  align-items: center;
}

.access-card__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.access-action {
  padding: 5px 8px;
  font-size: .72rem;
}

.access-modal {
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, #111827, #0f172a);
  box-shadow: 0 28px 70px rgba(2, 6, 23, .56);
}

.access-modal__head {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148,163,184,.18);
}

.access-modal__head h3 {
  font-size: 1.02rem;
  font-weight: 700;
}

.access-modal__body {
  padding: 14px 16px 16px;
}

.access-modal__form {
  display: grid;
  gap: 10px;
}

.access-modal__form .form-row {
  gap: 10px;
}

.access-modal__form .form-group {
  margin-bottom: 0;
}

.access-modal__form .form-group label {
  color: rgba(203,213,225,.82);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.access-modal__form input,
.access-modal__form select,
.access-modal__form textarea {
  background: #0f172a;
  border: 1px solid #232946;
  border-radius: 10px;
  color: #fff;
  min-height: 42px;
  padding: 10px 12px;
}

.access-modal__form textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.45;
}

.access-modal__form input::placeholder,
.access-modal__form textarea::placeholder {
  color: rgba(148,163,184,.75);
}

.access-modal__form input:focus,
.access-modal__form select:focus,
.access-modal__form textarea:focus {
  border-color: #7c5cff;
  box-shadow: 0 0 0 3px rgba(124,92,255,.15);
  outline: none;
}

.access-modal__form select option {
  background: #0f172a;
  color: #fff;
}

.access-form-password {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.access-form-copy {
  min-height: 42px;
  padding: 0 10px;
}

.access-modal .task-modal__actions {
  margin-top: 4px;
  border-top: 1px solid rgba(148,163,184,.18);
  padding-top: 12px;
}

.access-modal .btn--primary {
  background: linear-gradient(135deg, #7c5cff, #6c63ff);
  box-shadow: 0 8px 22px rgba(124,92,255,.28);
}

.access-modal .btn--primary:hover {
  background: linear-gradient(135deg, #8a6cff, #786eff);
  box-shadow: 0 12px 28px rgba(124,92,255,.34);
}

.access-modal .btn--ghost {
  background: rgba(15,23,42,.72);
  border-color: rgba(148,163,184,.24);
  color: #cbd5e1;
}

.access-modal .btn--ghost:hover {
  background: rgba(30,41,59,.72);
  color: #fff;
}

.access-modal-sticky {
  position: sticky;
  top: -14px;
  z-index: 3;
  background: linear-gradient(180deg, rgba(24,33,51,.98) 0%, rgba(16,24,39,.95) 100%);
  margin: -14px -16px 10px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(148,163,184,.18);
  display: grid;
  gap: 8px;
}

.access-search--modal {
  width: 100%;
  background: #0f172a;
  border: 1px solid #232946;
  color: #fff;
}

.access-modal-list {
  display: grid;
  gap: 10px;
}

.access-type-section {
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 10px;
  background: rgba(15,23,42,.36);
  overflow: hidden;
}

.access-type-section__head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  background: rgba(30,41,59,.45);
  border-bottom: 1px solid rgba(148,163,184,.16);
  color: var(--text);
  font-weight: 700;
  font-size: .8rem;
  transition: background var(--transition), color var(--transition);
}

.access-type-section__head:hover {
  background: rgba(51,65,85,.55);
  color: #fff;
}

.access-type-section__count {
  color: var(--text-muted);
  font-size: .74rem;
}

.access-type-section__body {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.access-type-section.collapsed .access-type-section__body {
  display: none;
}

.access-type-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: .68rem;
  font-weight: 700;
}

.access-type-badge--hosting { color: #93c5fd; background: rgba(59,130,246,.16); border-color: rgba(59,130,246,.3); }
.access-type-badge--domain { color: #67e8f9; background: rgba(6,182,212,.16); border-color: rgba(6,182,212,.3); }
.access-type-badge--wordpress { color: #c4b5fd; background: rgba(139,92,246,.16); border-color: rgba(139,92,246,.3); }
.access-type-badge--google_ads { color: #fca5a5; background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.3); }
.access-type-badge--meta_ads { color: #f9a8d4; background: rgba(236,72,153,.16); border-color: rgba(236,72,153,.3); }
.access-type-badge--email { color: #86efac; background: rgba(34,197,94,.16); border-color: rgba(34,197,94,.3); }
.access-type-badge--ftp { color: #fdba74; background: rgba(249,115,22,.16); border-color: rgba(249,115,22,.3); }
.access-type-badge--other { color: #cbd5e1; background: rgba(148,163,184,.16); border-color: rgba(148,163,184,.3); }

/* ============================================================
   COLUMN
   ============================================================ */
.column {
  width: var(--col-width);
  min-width: var(--col-width);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(24,33,51,.84), rgba(15,23,42,.92));
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
  max-height: calc(100vh - 148px);
  box-shadow: 0 14px 34px rgba(2,6,23,.26);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.column__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(148,163,184,.16);
  background: rgba(15,23,42,.48);
  gap: 6px;
}

.column__title-wrap {
  display: grid;
  gap: 4px;
}

.column__title-row { display: flex; align-items: center; gap: 10px; }

.column__header-total {
  font-size: .73rem;
  color: var(--text-muted);
  letter-spacing: 0;
  padding-left: 20px;
}

.column__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.column__title {
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: -.2px;
}

.column__count {
  background: rgba(15,23,42,.75);
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid rgba(148,163,184,.24);
  min-width: 26px;
  text-align: center;
}

.column__add {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: rgba(15,23,42,.7);
  transition: all var(--transition);
  flex-shrink: 0;
}
.column__add:hover { background: var(--accent); color: #fff; }

.column__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 60px;
}

/* empty column placeholder */
.column__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 16px;
  color: var(--text-dim);
  font-size: .82rem;
  text-align: center;
  border: 1px dashed rgba(148,163,184,.26);
  border-radius: 12px;
  margin: 4px 0;
}
.column__empty svg { opacity: .35; }

.column__empty-cta {
  margin-top: 4px;
  padding: 6px 10px;
  font-size: .76rem;
}

/* column sum */
.column__footer {
  padding: 9px 12px;
  border-top: 1px solid rgba(148,163,184,.16);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .74rem;
  color: var(--text-muted);
}
.column__footer strong { color: var(--text); }

/* ============================================================
   CARD
   ============================================================ */
.card {
  background: linear-gradient(180deg, rgba(30,41,59,.78), rgba(15,23,42,.88));
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 18px;
  padding: 12px;
  cursor: grab;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), opacity var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: var(--col-color, var(--accent));
}
.card:hover {
  border-color: rgba(124,92,255,.45);
  box-shadow: 0 16px 34px rgba(2,6,23,.4), 0 0 0 1px rgba(124,92,255,.14);
  transform: translateY(-3px);
}
.card:active { cursor: grabbing; }

.card.dragging {
  opacity: .45;
  transform: scale(.97) rotate(1.5deg);
}

.card.filtered-out {
  display: none;
}

/* card top row */
.card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .78rem;
  flex-shrink: 0;
  letter-spacing: -.5px;
}

.card__meta { flex: 1; min-width: 0; }
.card__name {
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card__company {
  font-size: .78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* priority badge */
.priority {
  padding: 3px 9px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 700;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.priority--high   { background: var(--red-bg);    color: var(--red);    }
.priority--medium { background: var(--yellow-bg);  color: var(--yellow); }
.priority--low    { background: var(--green-bg);   color: var(--green);  }

/* card info rows */
.card__info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 8px;
}
.card__info-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .78rem;
  color: var(--text-muted);
}
.card__info-row svg { flex-shrink: 0; opacity: .6; }

/* amount */
.card__amount {
  font-weight: 800;
  font-size: .92rem;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -.3px;
}
.card__amount span { font-size: .75rem; color: var(--text-muted); font-weight: 400; }

/* tag */
.card__tags { display: flex; flex-wrap: wrap; gap: 5px; }

.followup-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.followup-badge--today {
  color: var(--cyan);
  background: var(--cyan-bg);
  border-color: rgba(34,211,238,.25);
}

.followup-badge--tomorrow {
  color: var(--yellow);
  background: var(--yellow-bg);
  border-color: rgba(251,191,36,.25);
}

.followup-badge--overdue {
  color: var(--red);
  background: var(--red-bg);
  border-color: rgba(248,113,113,.28);
}
.tag {
  padding: 3px 9px;
  border-radius: 99px;
  font-size: .72rem;
  font-weight: 600;
  background: var(--purple-bg);
  color: var(--purple);
  border: 1px solid rgba(167,139,250,.18);
}

/* card note */
.card__note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148,163,184,.16);
  font-size: .76rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__tasks {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.task-chip {
  font-size: .71rem;
  color: #cbd5e1;
  background: rgba(15,23,42,.72);
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 999px;
  padding: 2px 8px;
}

.task-chip--overdue {
  color: var(--red);
  border-color: rgba(248,113,113,.28);
  background: var(--red-bg);
}

.task-chip--access {
  color: #a78bfa;
  border-color: rgba(167,139,250,.32);
  background: rgba(167,139,250,.12);
}

.card__footer {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(148,163,184,.16);
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .72rem;
  color: var(--text-dim);
}

.card__footer-status {
  color: var(--text-muted);
}

.card__footer-dot {
  opacity: .55;
}

/* ============================================================
   DRAG OVER COLUMN HIGHLIGHT
   ============================================================ */
.column.drag-over {
  border-color: rgba(124,92,255,.65);
  box-shadow: 0 0 0 2px rgba(124,92,255,.2), inset 0 0 32px rgba(108,99,255,.06);
}
.column.drag-over .column__body {
  background: rgba(108,99,255,.06);
  border-radius: 12px;
}

/* drop ghost */
.drop-ghost {
  height: 76px;
  border-radius: 14px;
  border: 1px dashed rgba(124,92,255,.72);
  background: rgba(124,92,255,.12);
  box-shadow: inset 0 0 0 1px rgba(124,92,255,.2);
  transition: height .15s ease, background .15s ease;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(2,6,23,.72);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: linear-gradient(180deg, #111827, #0f172a);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 24px;
  width: 100%;
  max-width: 760px;
  box-shadow: 0 28px 70px rgba(2,6,23,.56);
  transform: translateY(24px) scale(.96);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
  overflow: hidden;
}
.modal-overlay.open .modal { transform: none; }

/* modal header */
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 0;
}
.modal__title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal__icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.modal__title { font-size: 1.1rem; font-weight: 700; }
.modal__close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.modal__close:hover { background: var(--bg-3); color: var(--text); }

/* steps indicator */
.form-steps {
  display: flex;
  align-items: center;
  padding: 18px 24px 0;
  gap: 0;
}
.form-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-dim);
  transition: color var(--transition);
  white-space: nowrap;
}
.form-step.active { color: var(--accent); }
.form-step.done   { color: var(--green);  }
.form-step__dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-4);
  border: 2px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  color: var(--text-dim);
  transition: all var(--transition);
  flex-shrink: 0;
}
.form-step.active .form-step__dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 10px var(--accent-glow);
}
.form-step.done .form-step__dot {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.form-step__line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin: 0 8px;
  border-radius: 2px;
  transition: background var(--transition);
}
.form-step__line.done { background: var(--green); }

/* form pages */
.modal__body { padding: 16px 22px 18px; }

.form-page { animation: fadeSlide .22s ease; }
.form-page.hidden { display: none; }

@keyframes fadeSlide {
  from { opacity:0; transform:translateX(12px); }
  to   { opacity:1; transform:none; }
}

/* form layout */
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; min-width: 0; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 11px;
  position: relative;
}
.form-group label {
  font-size: .76rem;
  font-weight: 600;
  color: rgba(203,213,225,.82);
  letter-spacing: 0;
  text-transform: none;
}
.form-group--required label::after {
  content: ' *';
  color: var(--red);
}

/* input with icon */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 11px;
  color: var(--text-dim);
  pointer-events: none;
  flex-shrink: 0;
}
.input-wrap input { padding-left: 34px; }

.form-group input,
.form-group select,
.form-group textarea {
  background: #0f172a;
  border: 1px solid #232946;
  border-radius: 10px;
  color: #fff;
  padding: 10px 12px;
  min-height: 42px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #7c5cff;
  box-shadow: 0 0 0 3px rgba(124,92,255,.15);
}
.form-group input.error,
.form-group textarea.error { border-color: var(--red); }
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(148,163,184,.75); }
.form-group textarea {
  min-height: 108px;
  line-height: 1.45;
}
.form-group select option { background: #0f172a; color: #fff; }

.client-modal-currency:focus {
  border-color: #7c5cff !important;
  box-shadow: 0 0 0 3px rgba(124,92,255,.15) !important;
  outline: none;
}

/* field error message */
.field-error {
  font-size: .75rem;
  color: var(--red);
  display: none;
  margin-top: 2px;
}
.field-error.visible { display: block; }

/* priority selector */
.priority-selector {
  display: flex;
  gap: 6px;
}
.prio-btn {
  flex: 1;
  padding: 9px 6px;
  border-radius: 10px;
  font-size: .8rem;
  font-weight: 700;
  border: 1px solid #232946;
  color: #cbd5e1;
  background: #0f172a;
  transition: all var(--transition);
  text-align: center;
}
.prio-btn:hover { border-color: rgba(148,163,184,.55); color: #fff; }
.prio-btn[data-prio="low"].active    { background: var(--green-bg);  border-color: var(--green);  color: var(--green);  }
.prio-btn[data-prio="medium"].active { background: var(--yellow-bg); border-color: var(--yellow); color: var(--yellow); }
.prio-btn[data-prio="high"].active   { background: var(--red-bg);   border-color: var(--red);   color: var(--red);   }

.modal__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px solid rgba(148,163,184,.18);
}
.modal__footer-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.modal .btn--primary {
  background: linear-gradient(135deg, #7c5cff, #6c63ff);
  box-shadow: 0 8px 22px rgba(124,92,255,.28);
}

.modal .btn--primary:hover {
  background: linear-gradient(135deg, #8a6cff, #786eff);
  box-shadow: 0 12px 28px rgba(124,92,255,.34);
}

.modal .btn--ghost {
  background: rgba(15,23,42,.72);
  border-color: rgba(148,163,184,.24);
  color: #cbd5e1;
}

.modal .btn--ghost:hover {
  background: rgba(30,41,59,.72);
  color: #fff;
}

/* ============================================================
   DRAWER
   ============================================================ */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 420px;
  background: var(--bg-2);
  border-left: 1px solid var(--border);
  z-index: 151;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  box-shadow: -12px 0 48px rgba(0,0,0,.5);
}
.drawer.open { transform: translateX(0); }

/* drawer header */
.drawer__header {
  padding: 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer__hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 16px;
  position: relative;
}
.drawer__hero-bg {
  position: absolute;
  inset: 0;
  opacity: .05;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  pointer-events: none;
}
.drawer__avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  letter-spacing: -.5px;
}
.drawer__hero-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.drawer__hero-info h2 {
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.drawer__subtitle {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.drawer__hero-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.drawer__actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  gap: 8px;
}
.drawer__actions { display: flex; gap: 4px; }

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* drawer tabs */
.drawer__tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  gap: 0;
  flex-shrink: 0;
}
.drawer__tab {
  padding: 12px 14px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
  white-space: nowrap;
}
.drawer__tab:hover { color: var(--text); }
.drawer__tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.drawer__tab-panel { display: none; padding: 18px 20px; }
.drawer__tab-panel.active { display: block; }

/* sections */
.drawer-section { margin-bottom: 22px; }
.drawer-section__title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.drawer-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .83rem;
}
.drawer-field:last-child { border-bottom: none; }
.drawer-field__icon {
  width: 28px; height: 28px;
  border-radius: var(--radius-xs);
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.drawer-field__label { color: var(--text-muted); min-width: 100px; font-size: .8rem; }
.drawer-field__val { color: var(--text); font-weight: 600; }
.drawer-field__val a { color: var(--accent); text-decoration: none; }
.drawer-field__val a:hover { text-decoration: underline; }

/* budget highlight */
.drawer-budget {
  background: linear-gradient(135deg, rgba(108,99,255,.12), rgba(167,139,250,.08));
  border: 1px solid rgba(108,99,255,.2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-budget__label { font-size: .8rem; color: var(--text-muted); }
.drawer-budget__val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
}

.drawer-note {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: .83rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.drawer-note-empty {
  color: var(--text-dim);
  font-size: .82rem;
  font-style: italic;
  text-align: center;
  padding: 16px 0;
}

/* move pipeline */
.pipeline {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pipeline-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-3);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.pipeline-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--pi-color, var(--accent));
  border-radius: 3px 0 0 3px;
}
.pipeline-item:hover {
  border-color: var(--border-2);
  background: var(--bg-4);
  transform: translateX(3px);
}
.pipeline-item.active {
  border-color: var(--pi-color, var(--accent));
  background: var(--bg-4);
}
.pipeline-item__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pipeline-item__label { flex: 1; font-size: .83rem; font-weight: 600; color: var(--text-muted); }
.pipeline-item.active .pipeline-item__label { color: var(--text); }
.pipeline-item__check {
  color: var(--green);
  flex-shrink: 0;
  display: none;
}
.pipeline-item.active .pipeline-item__check { display: block; }

/* activity log */
.activity-log { display: flex; flex-direction: column; gap: 0; }
.activity-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: .75rem;
}
.activity-content { flex: 1; min-width: 0; }
.activity-text { font-size: .82rem; color: var(--text); line-height: 1.5; }
.activity-time { font-size: .75rem; color: var(--text-dim); margin-top: 2px; }

.drawer-tasks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-task-form {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 8px;
}

.drawer-task-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-task-preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-task-compact {
  width: 100%;
  text-align: left;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color var(--transition), transform var(--transition);
}

.drawer-task-compact:hover {
  border-color: var(--border-2);
  transform: translateY(-1px);
}

.drawer-task-compact__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.drawer-task-compact__title {
  font-size: .82rem;
  color: var(--text);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-task-compact__title.done {
  text-decoration: line-through;
  color: var(--text-dim);
}

.drawer-task-compact__status {
  font-size: .68rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 7px;
}

.drawer-task-compact__status.open {
  color: var(--accent);
  background: var(--purple-bg);
}

.drawer-task-compact__status.done {
  color: var(--green);
  background: var(--green-bg);
}

.drawer-task-compact__meta {
  font-size: .74rem;
  color: var(--text-muted);
}

.drawer-task-compact__desc {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.drawer-task-show-all {
  margin-top: 4px;
  justify-content: center;
}

.drawer-task-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: start;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
}

.drawer-task-main {
  min-width: 0;
}

.drawer-task-title {
  font-size: .82rem;
}

.drawer-task-title.done {
  text-decoration: line-through;
  color: var(--text-dim);
}

.drawer-task-desc {
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

.drawer-task-due {
  font-size: .75rem;
  color: var(--text-muted);
  padding-top: 1px;
}

.drawer-task-del {
  color: var(--red);
  font-size: .75rem;
}

/* ============================================================
   CONFIRM DIALOG
   ============================================================ */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(6px);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.confirm-overlay.open { opacity: 1; pointer-events: all; }

.confirm-box {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
  transform: scale(.93);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1);
}
.confirm-overlay.open .confirm-box { transform: scale(1); }
.confirm-box__icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--red-bg);
  border: 1px solid rgba(248,113,113,.2);
  display: flex; align-items: center; justify-content: center;
  color: var(--red);
  margin: 0 auto 16px;
}
.confirm-box__text {
  font-size: .95rem;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.5;
}
.confirm-box__btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.task-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 12, 24, .62);
  backdrop-filter: blur(10px);
  z-index: 450;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  padding: 18px;
}

.task-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.task-modal {
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,.3);
  background: linear-gradient(180deg, rgba(24,33,51,.92) 0%, rgba(16,24,39,.95) 100%);
  box-shadow: 0 28px 60px rgba(2, 6, 23, .55);
}

.task-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148,163,184,.2);
}

.task-modal__head h3 {
  margin: 0;
  color: #f8fafc;
  font-size: .98rem;
}

.task-modal__body {
  padding: 14px 16px 16px;
  overflow: auto;
}

.task-modal__body .form-group label {
  color: #cbd5e1;
}

.task-modal__body input,
.task-modal__body textarea {
  background: rgba(15, 23, 42, .7);
  border: 1px solid rgba(148,163,184,.28);
  color: #f8fafc;
}

.task-modal__checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  color: #e2e8f0;
  font-size: .82rem;
}

.task-modal__meta {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  font-size: .8rem;
  color: #cbd5e1;
}

.task-modal__files {
  margin-top: 14px;
  border-top: 1px solid rgba(148,163,184,.2);
  padding-top: 12px;
}

.task-modal__subtasks {
  margin-top: 14px;
  border-top: 1px solid rgba(148,163,184,.2);
  padding-top: 12px;
}

.task-modal__subtasks-form,
.task-modal__files-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 10px;
}

.task-modal__subtasks-list,
.task-modal__files-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.task-modal__upload-state {
  font-size: .76rem;
  color: #93c5fd;
  min-height: 18px;
  margin-bottom: 6px;
}

.task-subtask-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  background: rgba(15,23,42,.45);
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 8px;
  padding: 7px 9px;
}

.task-subtask-title {
  font-size: .8rem;
  color: #e2e8f0;
}

.task-subtask-title.done {
  text-decoration: line-through;
  color: #94a3b8;
}

.task-file-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  background: rgba(15,23,42,.45);
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 8px;
  padding: 7px 9px;
}

.task-file-preview {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(148,163,184,.3);
}

.task-file-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  background: rgba(51,65,85,.65);
  border: 1px solid rgba(148,163,184,.22);
}

.task-file-main {
  min-width: 0;
}

.task-file-link {
  color: #93c5fd;
  text-decoration: none;
  font-size: .8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-file-link:hover { text-decoration: underline; }

.task-file-meta {
  font-size: .72rem;
  color: #94a3b8;
}

.task-file-actions {
  display: inline-flex;
  gap: 6px;
}

.task-file-action {
  font-size: .72rem;
  color: #93c5fd;
  text-decoration: none;
}

.task-modal__actions {
  margin-top: 14px;
  border-top: 1px solid rgba(148,163,184,.2);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------
   TASK DETAILS — Ventra Premium overrides
   ------------------------------------------------------------ */
#taskModalOverlay {
  background: rgba(2,6,23,.72);
  backdrop-filter: blur(6px);
}

#taskModalCard {
  width: min(760px, 100%);
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, #111827, #0f172a);
  box-shadow: 0 28px 70px rgba(2, 6, 23, .56);
}

#taskModalCard .task-modal__head {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148,163,184,.18);
}

#taskModalTitle {
  display: grid;
  gap: 4px;
  font-size: 1.04rem;
  color: #fff;
}

#taskModalTitle::after {
  content: attr(data-subtitle);
  font-size: .78rem;
  font-weight: 500;
  color: rgba(203,213,225,.74);
}

#taskModalCard .task-modal__body {
  padding: 14px 16px 16px;
  display: grid;
  gap: 10px;
}

#taskModalCard .form-row {
  gap: 10px;
}

#taskModalCard .form-group {
  margin-bottom: 0;
}

#taskModalCard .form-group label,
#taskModalCard .task-modal__body .form-group label {
  color: rgba(203,213,225,.82);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

#taskModalCard input,
#taskModalCard textarea,
#taskModalCard select {
  background: #0f172a;
  border: 1px solid #232946;
  border-radius: 10px;
  color: #fff;
  min-height: 42px;
  padding: 10px 12px;
}

#taskModalCard textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.45;
}

#taskModalCard input::placeholder,
#taskModalCard textarea::placeholder {
  color: rgba(148,163,184,.75);
}

#taskModalCard input:focus,
#taskModalCard textarea:focus,
#taskModalCard select:focus {
  border-color: #7c5cff;
  box-shadow: 0 0 0 3px rgba(124,92,255,.15);
  outline: none;
}

#taskModalCard .task-modal__checkbox {
  min-height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,.24);
  background: rgba(15,23,42,.62);
  padding: 0 12px;
  color: #e2e8f0;
}

#taskModalCard .task-modal__meta {
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 12px;
  background: rgba(15,23,42,.45);
  padding: 10px 12px;
}

#taskModalCard .task-modal__subtasks,
#taskModalCard .task-modal__files {
  margin-top: 0;
  border-top: 0;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 12px;
  background: rgba(15,23,42,.45);
  padding: 10px;
}

#taskModalCard .task-modal__subtasks-form,
#taskModalCard .task-modal__files-form {
  grid-template-columns: 1fr auto;
  align-items: center;
}

#taskModalCard .task-subtask-item,
#taskModalCard .task-file-item {
  background: rgba(15,23,42,.68);
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 10px;
  padding: 8px 9px;
}

#taskModalCard .task-file-item {
  grid-template-columns: auto 1fr auto auto auto;
}

#taskModalCard .task-file-preview {
  width: 36px;
  height: 36px;
}

#taskModalCard .task-modal__actions {
  margin-top: 2px;
  border-top: 1px solid rgba(148,163,184,.18);
  padding-top: 12px;
}

#taskModalCard .btn--primary {
  background: linear-gradient(135deg, #7c5cff, #6c63ff);
  box-shadow: 0 8px 22px rgba(124,92,255,.28);
}

#taskModalCard .btn--primary:hover {
  background: linear-gradient(135deg, #8a6cff, #786eff);
  box-shadow: 0 12px 28px rgba(124,92,255,.34);
}

#taskModalCard .btn--ghost {
  background: rgba(15,23,42,.72);
  border-color: rgba(148,163,184,.24);
  color: #cbd5e1;
}

#taskModalCard .btn--danger {
  background: rgba(248,113,113,.14);
  border-color: rgba(248,113,113,.3);
  color: #fca5a5;
}

#taskModalCard .btn--danger:hover {
  background: rgba(248,113,113,.2);
}

.auth-box {
  max-width: 420px;
  text-align: left;
  padding-top: 20px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.hidden { display: none !important; }

.auth-password-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-password-row input {
  flex: 1;
}

.auth-toggle-pass {
  padding: 7px 10px;
  font-size: .75rem;
  min-width: 82px;
  justify-content: center;
}

.auth-forgot-btn {
  align-self: flex-start;
  color: var(--accent);
  font-size: .8rem;
  padding: 0;
  background: none;
  border: none;
}

.auth-forgot-btn:hover {
  text-decoration: underline;
}

.auth-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 4px;
}

.auth-state {
  min-height: 18px;
  font-size: .78rem;
  color: var(--text-muted);
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(1200px 700px at 10% 0%, rgba(108,99,255,.18), transparent 60%),
    radial-gradient(900px 600px at 100% 100%, rgba(167,139,250,.14), transparent 58%),
    var(--bg);
}

.auth-screen.open {
  display: flex;
}

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}

.app-splash__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  min-width: 220px;
}

.app-splash__spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border-2);
  border-top-color: var(--accent);
  animation: appSpin .8s linear infinite;
}

.app-splash__text {
  color: var(--text-muted);
  font-size: .85rem;
}

@keyframes appSpin {
  to { transform: rotate(360deg); }
}

body.app-booting .app-splash {
  display: flex;
}

body.app-booting .auth-screen,
body.app-booting .header,
body.app-booting .toolbar,
body.app-booting .board,
body.app-booting #modalOverlay,
body.app-booting #drawer,
body.app-booting #drawerOverlay,
body.app-booting #confirmOverlay,
body.app-booting #taskModalOverlay {
  display: none !important;
}

.auth-screen__card {
  width: 100%;
  max-width: 420px;
  background: rgba(19,22,32,.94);
  border: 1px solid var(--border-2);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.auth-screen__head {
  margin-bottom: 14px;
}

.auth-screen__logo {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  background: rgba(15,23,42,.5);
  border: 1px solid rgba(148,163,184,.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.auth-screen__logo img {
  width: 28px;
  height: 28px;
}

.auth-screen__title {
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.auth-screen__subtitle {
  color: var(--text-muted);
  font-size: .85rem;
}

body.auth-locked .header,
body.auth-locked .toolbar,
body.auth-locked .board,
body.auth-locked #modalOverlay,
body.auth-locked #drawer,
body.auth-locked #drawerOverlay,
body.auth-locked #confirmOverlay,
body.auth-locked #taskModalOverlay {
  display: none !important;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 300;
}
.toast {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: .85rem;
  color: var(--text);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastIn .22s ease, toastOut .22s ease 2.8s forwards;
  min-width: 240px;
}
.toast--success { border-left: 3px solid var(--green); }
.toast--danger  { border-left: 3px solid var(--red);   }
.toast--info    { border-left: 3px solid var(--accent); }

@keyframes toastIn  { from { opacity:0; transform:translateY(12px); } }
@keyframes toastOut { to   { opacity:0; transform:translateY(-8px);  } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .header__nav { display: none; }
  .header__search input { width: 126px; }
  .header {
    padding: 0 10px;
    height: 56px;
  }
  .header__left, .header__right {
    gap: 10px;
  }
  .header .btn {
    padding: 7px 10px;
    min-height: 32px;
  }
  .header__logo-icon {
    width: 24px;
    height: 24px;
  }
  .header__logo-text {
    display: inline;
    font-size: .9rem;
  }
  .drawer { width: 100%; }
  .task-modal {
    width: 100%;
    max-height: calc(100vh - 16px);
  }
  .task-modal__subtasks-form,
  .task-modal__files-form {
    grid-template-columns: 1fr;
  }
  #taskModalCard {
    width: 95vw;
    border-radius: 18px;
  }
  #taskModalCard .task-modal__head,
  #taskModalCard .task-modal__body {
    padding-left: 12px;
    padding-right: 12px;
  }
  #taskModalCard .task-modal__actions {
    flex-direction: column;
    align-items: stretch;
  }
  #taskModalCard .task-modal__actions > div {
    display: grid !important;
    grid-template-columns: 1fr;
  }
  #taskModalCard .task-file-item {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .form-row { flex-direction: column; gap: 0; }
  .toolbar__filters { gap: 4px; }
  .filter-btn { padding: 4px 10px; }
  .auth-screen {
    padding: 14px;
  }
  .auth-screen__card {
    padding: 18px;
    border-radius: 10px;
  }
  .auth-row {
    flex-direction: column;
    align-items: stretch;
  }
  .auth-row .btn {
    justify-content: center;
  }
  .drawer-task-form {
    grid-template-columns: 1fr;
  }
  .accesses-filters {
    grid-template-columns: 1fr;
  }
  .tasks-view {
    width: 100%;
    padding: 6px 0 12px;
  }
  .tasks-center {
    padding: 10px;
  }
  .tasks-center__head {
    flex-direction: column;
    align-items: stretch;
  }
  .tasks-center__stats {
    grid-template-columns: 1fr 1fr;
  }
  .tasks-center__section--cards {
    grid-template-columns: 1fr;
  }
  .board {
    gap: 12px;
    padding: 14px 12px 22px;
  }
  .column {
    min-width: 84vw;
    width: 84vw;
    max-height: calc(100vh - 168px);
  }
  .card {
    border-radius: 16px;
    padding: 10px;
  }
  .access-modal {
    width: 95vw;
    border-radius: 18px;
  }
  .access-form-password {
    grid-template-columns: 1fr;
  }
  .access-form-copy {
    width: 100%;
    justify-content: center;
  }
  .modal {
    max-width: 95vw;
    border-radius: 18px;
  }
  .modal__header,
  .modal__body {
    padding-left: 14px;
    padding-right: 14px;
  }
  .modal__footer {
    flex-direction: column;
    align-items: stretch;
  }
  .modal__footer-nav {
    width: 100%;
    justify-content: flex-end;
  }
  .task-create-modal {
    padding: 10px;
  }
  .task-create-modal__card {
    width: 95vw;
    border-radius: 18px;
    padding: 14px;
  }
  .task-create-form__row {
    grid-template-columns: 1fr;
  }
  .task-create-form__footer {
    flex-direction: column;
    align-items: stretch;
  }
  .task-create-form__footer .btn {
    justify-content: center;
  }
}

@media (max-width: 980px) {
  .header__nav {
    gap: 5px;
    padding: 2px;
  }
  .header__nav a {
    padding: 6px 9px;
    font-size: .8rem;
  }
  .header__search input {
    width: 150px;
  }
}
