.hidden { display: none; }

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
}

/* Prevent the double scrollbar on desktop: when the dashboard (full-height
   shell) is visible it manages its own inner scrolling, so the page itself
   must not scroll. On mobile the dashboard scrolls naturally with the body. */
@media (min-width: 768px) {
  html, body { height: 100%; }
  body.dashboard-open {
    height: 100vh;
    overflow: hidden;
  }
}

/* Smooth, native-feeling scrolling for the dashboard scroll container
   and any inner scroll areas (tables). */
.main-content,
.table-wrap {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sidebar.open { transform: translateX(0); }

.nav-links a.active,
.nav-links a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.inline-message { display: none; }
.inline-message.show { display: block; }

.task-list li.done span {
  text-decoration: line-through;
  color: #6b7280;
}

@keyframes fadeInView {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-section { animation: fadeInView 0.2s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
.input-shake { animation: shake 0.45s ease-in-out; }

/* Invoice table header - shared component class to avoid repeating
   long Tailwind utility strings on every column (cheaper to parse/transfer). */
.th-cell {
  position: sticky;
  top: 0;
  z-index: 10;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  padding: 0.75rem;
  font-weight: 600;
  color: #475569;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.th-cell.num { text-align: right; }
.th-cell:first-child { border-top-left-radius: 0.75rem; }
.th-cell:last-child { border-top-right-radius: 0.75rem; }

/* Action column stays fixed on the right while only the table scrolls.
   Buttons are laid out horizontally (row), not stacked (column). */
.action-col {
  position: sticky;
  right: 0;
  z-index: 10;
  background-color: #ffffff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -8px 0 12px -8px rgba(15, 23, 42, 0.12);
}
.action-col .flex-row { flex-direction: row; }

/* Compact action button used in Master Data lists */
.tiny-btn {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  border-radius: 0.5rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.tiny-btn:hover { background: #fee2e2; }

/* Single-choice Jenis Aplikasi (Part 1): highlight the selected option. */
.app-type-option input:checked + span {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Jira-style task board */
.jira-quick-add .grid > label { margin: 0; }

/* Quick-add form: keep elements from shifting when the priority label changes */
.task-form-row { align-items: end; }
.task-priority-preview {
  width: 100%;
  min-width: 0;
  height: 44px;            /* sama dengan input (py-2.5 + text) */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #f8fafc;
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
/* On >= sm the preview shares a row with the submit button and stretches. */
@media (min-width: 640px) {
  .task-priority-preview { flex: 1 1 auto; width: auto; }
}
.task-toggle input:checked { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.task-toggle:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

/* Interactive task tree */
.task-tree-node .task-node-row { position: relative; }
.task-tree-drop > .task-node-row {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.task-tree .task-add-child,
.task-tree .task-del-node { pointer-events: auto; }

.jira-column {
  min-height: 120px;
}

/* On phones the quick-add priority/preview row stacks; keep the preview and
   the submit button full-width and evenly aligned. */
@media (max-width: 767px) {
  .task-form-row { gap: 1rem; }
  .task-priority-preview { width: 100%; }
}

.jira-column-dragover {
  background: #eff6ff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.jira-card-draggable { cursor: grab; }
.jira-card-draggable:active { cursor: grabbing; }
.jira-card-dragging { opacity: 0.5; }

@media (min-width: 768px) {
  .jira-board-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.jira-card:hover .jira-card-actions { opacity: 1; }

.jira-card-actions {
  opacity: 0;
  transition: opacity 0.15s ease;
}

/* Task view tabs (List / Gantt / Kanban) */
.task-tab { color: #475569; }
.task-tab.active { color: #ffffff; }
.task-tab:not(.active):hover { background: #f1f5f9; }

/* Gantt chart */
.gantt-label { white-space: nowrap; }
.gantt-track { background-image: repeating-linear-gradient(90deg, #f1f5f9 0, #f1f5f9 1px, transparent 1px, transparent 100%); }
.gantt-row:hover .gantt-track { background-color: #f8fafc; }
.gantt-chart { overflow-x: auto; }


