@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-main: #070a13;
  --bg-surface: #0e1424;
  --bg-card: #141c2e;
  --bg-card-hover: #1a253c;
  --bg-col: #0b101c;
  --bg-input: #080d17;
  --text-main: #f8fafc;
  --text-muted: #8492a6;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.28);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --danger: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #05070d;
  color: var(--text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background-image: url('/cat-bg.svg');
  background-size: var(--cat-size, 340px) var(--cat-size, 340px);
  background-repeat: repeat;
  opacity: 0.9;
  animation: catAmbientDrift 110s linear infinite;
  will-change: background-position;
  transition: background-size var(--cat-zoom-transition, 2.4s cubic-bezier(0.16, 1, 0.3, 1));
}

@keyframes catAmbientDrift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 340px 680px;
  }
}

.kanban-app-layout {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 14px 18px;
  overflow: hidden;
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* HEADER */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-back-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 9999px;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-back-link svg {
  width: 14px;
  height: 14px;
}

.nav-back-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  color: #fff;
  transform: translateX(-2px);
}

.app-header h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-header h1 svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

.app-header-cat {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  vertical-align: middle;
  flex-shrink: 0;
}

.notify-trigger-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--primary-glow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.notify-trigger-btn svg {
  width: 16px;
  height: 16px;
}

.notify-trigger-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.notify-trigger-btn:active {
  transform: scale(0.97);
}

@media (max-width: 480px) {
  .btn-text-desktop {
    display: none;
  }
}

/* SELETOR DE QUADROS */
.boards-selector-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  overflow-x: auto;
  scrollbar-width: none;
  flex-shrink: 0;
}

.boards-selector-bar::-webkit-scrollbar {
  display: none;
}

.boards-tabs-list {
  display: flex;
  gap: 8px;
}

.board-tab-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: #cbd5e1;
  padding: 7px 15px;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 7px;
}

.board-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  color: #fff;
}

.board-tab-btn.active {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.6);
  color: #a5b4fc;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
}

.btn-add-board {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  color: var(--text-muted);
  padding: 7px 13px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-add-board svg {
  width: 14px;
  height: 14px;
}

.btn-add-board:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

/* BARRA DE AÇÃO DO QUADRO */
.board-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0 14px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.current-board-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.current-board-info h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.2px;
}

.board-actions-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-new-col {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: #e2e8f0;
  padding: 7px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.84rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-new-col svg {
  width: 15px;
  height: 15px;
}

.btn-new-col:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-hover);
  color: #fff;
}

.btn-new-col:active {
  transform: scale(0.97);
}

.btn-new-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-new-card svg {
  width: 15px;
  height: 15px;
}

.btn-new-card:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-new-card:active {
  transform: scale(0.97);
}

/* COLUNAS KANBAN */
.kanban-columns-container {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  flex: 1;
  padding: 12px 0 16px;
  align-items: flex-start;
}

.kanban-col {
  background: var(--bg-col);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 305px;
  min-width: 295px;
  max-width: 330px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 195px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 10px;
}

.col-header-left {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
}

.col-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  letter-spacing: -0.2px;
  transition: color 0.15s;
}

.col-title:hover {
  color: #93c5fd;
}

.col-badge {
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  color: var(--text-muted);
}

.col-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-col-action {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}

.btn-col-action svg {
  width: 14px;
  height: 14px;
}

.btn-col-action:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn-col-action.del:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
}

.kanban-cards-list {
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

/* CARD KANBAN */
.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.kanban-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.card-title-text {
  font-size: 0.94rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.35;
  letter-spacing: -0.2px;
}

.card-desc-text {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  white-space: pre-line;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.74rem;
  color: #cbd5e1;
}

.due-badge {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.due-badge svg {
  width: 12px;
  height: 12px;
}

/* NAVEGAÇÃO TÁTIL ENTRE COLUNAS */
.card-touch-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.touch-move-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: #cbd5e1;
  border-radius: 8px;
  padding: 5px 9px;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.touch-move-btn svg {
  width: 12px;
  height: 12px;
}

.touch-move-btn:hover, .touch-move-btn:active {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.5);
}

.touch-move-btn:disabled {
  opacity: 0.15;
  pointer-events: none;
}

.btn-card-del {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}

.btn-card-del svg {
  width: 14px;
  height: 14px;
}

.btn-card-del:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* MODAIS REFINADOS */
.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 16px;
}

.custom-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.custom-modal-card {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-modal-backdrop.active .custom-modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
}

.close-modal-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: #94a3b8;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s;
}

.close-modal-btn svg {
  width: 16px;
  height: 16px;
}

.close-modal-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.form-group {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input, .form-group select, .form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #fff;
  padding: 11px 13px;
  font-size: 0.92rem;
  font-family: inherit;
  transition: all 0.18s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: #0d1424;
}

.modal-actions {
  margin-top: 18px;
}

.btn-confirm {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #fff;
  border: none;
  padding: 13px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-confirm:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-confirm:active {
  transform: scale(0.98);
}
