/* ============================================================
   TASKBOARD — style.css
   Aesthetic: Industrial-minimal with bold amber accents
   ============================================================ */

:root {
  --font-head:  'Outfit', sans-serif;
  --font-body:  'Inter', sans-serif;
  --col-width:  290px;
  --header-h:   64px;
  --radius:     10px;
  --radius-lg:  16px;
  --green:      #3ecf8e;
  --red:        #e05c5c;
  --blue:       #5b8dee;
  --purple:     #9b72f5;
  --col1:       #f5a623; /* Rencana   */
  --col2:       #5b8dee; /* Dikerjakan*/
  --col3:       #9b72f5; /* Dicek     */
  --col4:       #3ecf8e; /* Selesai   */
  --col5:       #e05c5c; /* Batal     */
}

:root {
  --bg:         #0f0f13;
  --bg2:        #16161d;
  --bg3:        #1e1e28;
  --bg-header:  rgba(22, 22, 29, 0.92);
  --border:     #2a2a38;
  --border2:    #35354a;
  --text:       #e8e8f0;
  --text2:      #9090b0;
  --text3:      #5a5a78;
  --accent:     #f5a623;
  --accent2:    #e0901a;
  --accent-glow:rgba(245,166,35,0.18);
  --shadow:     0 4px 24px rgba(0,0,0,0.5);
  --shadow-card:0 2px 12px rgba(0,0,0,0.4);
}

html.theme-light {
  --bg:         #f5f7fa;
  --bg2:        #ffffff;
  --bg3:        #edf0f4;
  --bg-header:  rgba(255, 255, 255, 0.92);
  --border:     #e2e8f0;
  --border2:    #cbd5e1;
  --text:       #0f172a;
  --text2:      #475569;
  --text3:      #94a3b8;
  --accent:     #d97706;
  --accent2:    #b45309;
  --accent-glow:rgba(217,119,6,0.12);
  --shadow:     0 4px 20px rgba(15,23,42,0.08);
  --shadow-card:0 2px 8px rgba(15,23,42,0.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ══════════════════════════════════════
   HEADER
══════════════════════════════════════ */
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--header-h);
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
}

.header-left  { flex: 1; }
.header-center{ flex: 2; display: flex; justify-content: center; }
.header-right { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 36px; height: 36px;
  background: var(--accent); color: var(--bg);
  border-radius: 8px; display: grid; place-items: center;
  font-size: 16px;
}
.logo-text {
  font-family: var(--font-head);
  font-size: 18px; font-weight: 600; letter-spacing: -0.5px;
  color: var(--text);
}
.logo-text strong { color: var(--accent); }
.sidebar-header { padding: 12px 20px !important; }
.logo-custom { max-height: 44px; width: auto; object-fit: contain; }

/* Board title */
.board-title-wrap { display: flex; align-items: center; gap: 8px; }
.board-title {
  font-family: var(--font-head);
  font-size: 16px; font-weight: 700; letter-spacing: -0.3px;
  color: var(--text);
}

/* Stats pills */
.stats-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 99px; padding: 5px 12px;
  font-size: 12px; font-weight: 500; color: var(--text2);
}
.stats-pill i { font-size: 11px; }
.stats-pill.done { border-color: var(--green); color: var(--green); }

/* Buttons */
.btn-primary {
  display: flex; align-items: center; gap: 7px;
  background: var(--accent); color: var(--bg);
  border: none; border-radius: var(--radius);
  padding: 8px 16px; font-size: 13px; font-weight: 600;
  font-family: var(--font-body); cursor: pointer;
  transition: background 0.18s, transform 0.12s;
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  display: flex; align-items: center; gap: 7px;
  background: transparent; color: var(--text2);
  border: 1px solid var(--border2); border-radius: var(--radius);
  padding: 8px 14px; font-size: 13px; font-family: var(--font-body);
  cursor: pointer; transition: all 0.18s;
}
.btn-ghost:hover { border-color: var(--text3); color: var(--text); }

.btn-danger {
  display: flex; align-items: center; gap: 7px;
  background: transparent; color: var(--red);
  border: 1px solid var(--red); border-radius: var(--radius);
  padding: 8px 14px; font-size: 13px; font-family: var(--font-body);
  cursor: pointer; transition: all 0.18s;
}
.btn-danger:hover { background: rgba(224,92,92,0.1); }

.icon-btn {
  background: transparent; border: none; color: var(--text3);
  width: 30px; height: 30px; border-radius: 6px;
  display: grid; place-items: center; cursor: pointer;
  font-size: 13px; transition: all 0.15s;
}
.icon-btn:hover { background: var(--bg3); color: var(--text); }
.icon-btn.close-btn { color: var(--text2); font-size: 15px; }

/* ══════════════════════════════════════
   BOARD
══════════════════════════════════════ */
.board-wrapper {
  padding: 20px 24px 20px;
  overflow: auto;
  height: calc(100vh - var(--header-h));
  box-sizing: border-box;
}

.board {
  display: flex; gap: 18px;
  height: 100%;
  width: max-content; min-width: 100%;
  align-items: flex-start;
  box-sizing: border-box;
}

/* ── COLUMN ── */
.column {
  width: var(--col-width);
  background: var(--column-custom-bg, var(--bg2));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  transition: box-shadow 0.2s;
}
.column.drag-over {
  box-shadow: 0 0 0 2px var(--accent), var(--shadow);
}

.col-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.col-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.col-name {
  font-family: var(--font-head);
  font-weight: 700; font-size: 13px; letter-spacing: 0.3px;
  color: var(--text); flex: 1;
}
.col-count {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text3); font-size: 11px; font-weight: 600;
  border-radius: 99px; padding: 2px 8px; min-width: 24px; text-align: center;
}
.col-add-btn {
  background: transparent; border: none; color: var(--text3);
  width: 26px; height: 26px; border-radius: 6px;
  display: grid; place-items: center; cursor: pointer; font-size: 14px;
  transition: all 0.15s;
}
.col-add-btn:hover { background: var(--accent-glow); color: var(--accent); }

/* color stripe per column */
.col-stripe {
  height: 3px; border-radius: 99px; margin: 0 16px 14px;
  margin-top: 4px;
}

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

/* Empty state */
.col-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 24px 12px;
  color: var(--text3); font-size: 12px; text-align: center;
}
.col-empty i { font-size: 22px; margin-bottom: 4px; opacity: 0.4; }

/* ── CARD ── */
.card {
  background: var(--card-custom-bg, var(--bg3));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  cursor: grab;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s, opacity 0.15s;
  position: relative;
}
.card:hover {
  border-color: var(--border2);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.card.dragging {
  opacity: 0.35; cursor: grabbing;
  transform: rotate(2deg) scale(0.97);
}
.card.drag-placeholder {
  border: 2px dashed var(--border2);
  background: transparent; opacity: 0.5;
  pointer-events: none;
}

/* Priority bar */
.card-priority-bar {
  position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; border-radius: 0 2px 2px 0;
}
.priority-low    { background: var(--green); }
.priority-medium { background: var(--accent); }
.priority-high   { background: var(--red); }

.card-title {
  font-size: 13px; font-weight: 500; color: var(--text);
  line-height: 1.4; margin-bottom: 6px; padding-left: 10px;
}

.card-desc {
  font-size: 11.5px; color: var(--text2); line-height: 1.4;
  padding: 0 10px 6px; word-break: break-word;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.card-tag {
  font-size: 10px; padding: 2px 7px; border-radius: 99px;
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text3); white-space: nowrap;
}

.card-checklist-summary {
  font-size: 11px; color: var(--text3); padding: 0 10px 6px;
  display: flex; align-items: center; gap: 4px;
}
.detail-checklist {
  margin: 12px 0 4px;
}
.checklist-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 8px;
}
.checklist-header i { margin-right: 6px; }
.checklist-progress { font-size: 12px; color: var(--text3); font-weight: 500; }
.checklist-items { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.checklist-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 6px;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: 13px; color: var(--text); transition: all 0.15s;
}
.checklist-item.checked .checklist-text {
  text-decoration: line-through; color: var(--text3);
}
.checklist-item input[type="checkbox"] {
  accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; flex-shrink: 0;
}
.checklist-text { flex: 1; word-break: break-word; }
.checklist-del {
  background: none; border: none; color: var(--text3); cursor: pointer;
  font-size: 14px; padding: 2px; opacity: 0; transition: all 0.15s;
}
.checklist-item:hover .checklist-del { opacity: 1; }
.checklist-del:hover { color: var(--red); }
.checklist-add {
  display: flex; gap: 6px;
}
.checklist-add input {
  flex: 1; padding: 7px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 12.5px; outline: none;
}
.checklist-add input:focus { border-color: var(--accent); }

.edit-checklist-items { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.edit-checklist-item {
  display: flex; align-items: center; gap: 6px;
}
.edit-checklist-item input {
  flex: 1; padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 12.5px; outline: none;
}
.edit-checklist-item input:focus { border-color: var(--accent); }
.edit-checklist-del {
  background: none; border: none; color: var(--text3); cursor: pointer;
  font-size: 16px; padding: 2px 4px; transition: color 0.15s;
}
.edit-checklist-del:hover { color: var(--red); }
.edit-checklist-add {
  display: flex; gap: 6px;
}
.edit-checklist-add input {
  flex: 1; padding: 7px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 12.5px; outline: none;
}
.edit-checklist-add input:focus { border-color: var(--accent); }

.card-links-summary {
  font-size: 11px; color: var(--text3); padding: 0 10px 6px;
  display: flex; align-items: center; gap: 4px;
}
.links-header {
  font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 8px;
}
.links-header i { margin-right: 6px; }
.links-items { display: flex; flex-direction: column; gap: 4px; }
.link-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 6px;
  background: var(--bg3); border: 1px solid var(--border);
  font-size: 13px; color: var(--accent); text-decoration: none;
  transition: all 0.15s; word-break: break-all;
}
.link-item:hover { border-color: var(--accent); background: var(--accent-glow); }
.link-item i { font-size: 11px; flex-shrink: 0; }
.edit-links-items { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.edit-link-item {
  display: flex; align-items: center; gap: 6px;
}
.edit-link-item input {
  padding: 6px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 12.5px; outline: none;
}
.edit-link-item .edit-link-title { flex: 0.35; }
.edit-link-item .edit-link-url { flex: 1; }
.edit-link-item input:focus { border-color: var(--accent); }
.edit-link-del {
  background: none; border: none; color: var(--text3); cursor: pointer;
  font-size: 16px; padding: 2px 4px; transition: color 0.15s;
}
.edit-link-del:hover { color: var(--red); }
.edit-links-add {
  display: flex; gap: 6px;
}
.edit-links-add input {
  padding: 7px 10px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 12.5px; outline: none;
}
.edit-links-add .edit-link-title-inp { flex: 0 0 120px; }
.edit-links-add .edit-link-url-inp  { flex: 1; }
.edit-links-add input:focus { border-color: var(--accent); }

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-left: 10px; margin-top: 4px;
}
.card-due {
  font-size: 11px; color: var(--text3);
  display: flex; align-items: center; gap: 4px;
}
.card-due.overdue { color: var(--red); }
.card-due.soon    { color: var(--accent); }

.card-actions { display: flex; gap: 4px; opacity: 0; transition: opacity 0.15s; }
.card:hover .card-actions { opacity: 1; }
.card-act-btn {
  background: var(--bg2); border: 1px solid var(--border);
  color: var(--text3); width: 24px; height: 24px;
  border-radius: 5px; display: grid; place-items: center;
  cursor: pointer; font-size: 11px; transition: all 0.15s;
}
.card-act-btn:hover { color: var(--text); border-color: var(--text3); }
.card-act-btn.del:hover { color: var(--red); border-color: var(--red); }

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

.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: 600px; max-width: 96vw; max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.7);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.22s ease;
}
.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 20px 16px; border-bottom: 1px solid var(--border);
}
.modal-header h2 {
  font-family: var(--font-head); font-size: 17px; font-weight: 700;
}

.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }

.modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 16px 20px; border-top: 1px solid var(--border);
}

/* Form */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 12px; font-weight: 500; color: var(--text2); letter-spacing: 0.3px;
}
.form-group .req { color: var(--accent); }
.form-row { display: flex; gap: 12px; }
.form-group.half { flex: 1; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="date"], textarea, select {
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text); border-radius: 8px;
  padding: 9px 12px; font-family: var(--font-body); font-size: 13.5px;
  outline: none; transition: border-color 0.15s;
  width: 100%;
}
input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea { resize: vertical; min-height: 70px; }
select { cursor: pointer; }
select option { background: var(--bg3); }

/* Tags selector */
.tag-selector { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-opt {
  font-size: 11.5px; padding: 4px 10px; border-radius: 99px;
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text3); cursor: pointer; transition: all 0.15s;
  user-select: none;
}
.tag-opt:hover { border-color: var(--accent); color: var(--text); }
.tag-opt.active {
  background: var(--accent-glow); border-color: var(--accent); color: var(--accent);
}

/* ── Detail Modal ── */
.detail-box { width: 520px; }
.detail-col-badge {
  font-size: 12px; font-weight: 700; letter-spacing: 0.5px;
  padding: 4px 12px; border-radius: 99px;
  background: var(--bg3); border: 1px solid var(--border);
}
.detail-title {
  font-family: var(--font-head);
  font-size: 20px; font-weight: 800; line-height: 1.3;
  color: var(--text);
}
.detail-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  font-size: 12px; color: var(--text2);
}
.detail-meta span { display: flex; align-items: center; gap: 5px; }
.detail-desc { font-size: 13.5px; color: var(--text2); line-height: 1.6; white-space: pre-wrap; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-hr { border: none; border-top: 1px solid var(--border); }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.move-section { display: flex; flex-direction: column; gap: 10px; }
.move-section label { font-size: 12px; color: var(--text2); font-weight: 500; }
.move-btns { display: flex; flex-wrap: wrap; gap: 7px; }
.move-btn {
  font-size: 12px; padding: 5px 12px; border-radius: 99px;
  border: 1px solid var(--border2); background: var(--bg3);
  color: var(--text2); cursor: pointer; transition: all 0.15s;
  font-family: var(--font-body);
}
.move-btn:hover { border-color: var(--accent); color: var(--accent); }
.move-btn.active { border-color: var(--text3); color: var(--text3); cursor: default; }

/* ══════════════════════════════════════
   TOAST
══════════════════════════════════════ */
.toast-wrap {
  position: fixed; bottom: 24px; right: 24px; z-index: 999;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.toast {
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text); border-radius: 10px;
  padding: 11px 16px; font-size: 13px; max-width: 280px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 9px;
  animation: toastIn 0.25s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--accent); }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 640px) {
  .header-center { display: none; }
  .stats-pill { display: none; }
  .board-wrapper { padding: 16px 12px 40px; }
  :root { --col-width: 260px; }
}
