/* Taskora Pro - main stylesheet
   Edit the variables below to re-brand the template. */

/* ===== Theme variables ===== */
:root {
  --bg: #f6f7fb;
  --card: #fff;
  --ink: #14173a;
  --muted: #6b7094;
  --line: #e4e6f1;
  --accent: #5b4bdb;
  --accent-2: #8b5cf6;
  --ok: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 10px;
}
[data-theme="dark"] {
  --bg: #0f1226;
  --card: #171b36;
  --ink: #eceefb;
  --muted: #9aa0c9;
  --line: #262b4d;
}

/* ===== Base / reset ===== */
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
}
body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== Sidebar and top bar ===== */
.side {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  transition: transform 0.2s;
  z-index: 30;
}
.brand {
  font-weight: 800;
  font-size: 19px;
  padding: 0 10px 18px;
  color: var(--accent);
}
.side a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 2px;
}
.side a:hover {
  background: var(--bg);
}
.side a.on {
  background: var(--accent);
  color: #fff;
}
.main {
  margin-left: 236px;
  min-height: 100vh;
}
.top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 20;
}
.top h1 {
  font-size: 18px;
  margin: 0;
  flex: 1;
}
.wrap {
  padding: 24px 28px;
}

/* ===== Buttons ===== */
.btn {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 600;
  cursor: pointer;
  min-height: 38px;
}
.btn:hover {
  background: var(--accent-2);
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn.del {
  background: var(--bad);
}

/* ===== Layout and cards ===== */
.grid {
  display: grid;
  gap: 16px;
}
.g4 {
  grid-template-columns: repeat(4, 1fr);
}
.g2 {
  grid-template-columns: repeat(2, 1fr);
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-width: 0;
}
.card h3 {
  margin: 0 0 12px;
  font-size: 14px;
}
.stat b {
  display: block;
  font-size: 26px;
  margin-top: 4px;
}
.stat span {
  color: var(--muted);
}
.bar {
  height: 6px;
  background: var(--line);
  border-radius: 9px;
  overflow: hidden;
  margin: 10px 0 4px;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--line);
}
.tag.active,
.tag.high {
  color: var(--accent);
}
.tag.done {
  color: var(--ok);
}
.tag.hold,
.tag.medium {
  color: var(--warn);
}

/* ===== Toolbars, forms and tables ===== */
.bar-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
input,
select,
textarea {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  min-height: 38px;
  width: 100%;
}
.bar-tools input {
  max-width: 280px;
}
.bar-tools select {
  width: auto;
}
.tbl {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  color: var(--muted);
  font-weight: 600;
}
.empty {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

/* ===== Modals and toasts ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 30, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 50;
}
.modal.open {
  display: flex;
}
.modal .box {
  background: var(--card);
  border-radius: 12px;
  padding: 22px;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow: auto;
}
.box label {
  display: block;
  font-weight: 600;
  margin: 12px 0 5px;
}
.err {
  color: var(--bad);
  font-size: 12px;
  min-height: 14px;
}
.box .row {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 18px;
}
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: var(--ink);
  color: var(--bg);
  padding: 11px 16px;
  border-radius: 8px;
  z-index: 60;
  animation: in 0.2s;
}
@keyframes in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ===== Kanban board ===== */
.kan {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.col {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  min-height: 300px;
}
.col.over {
  border-color: var(--accent);
}
.col h3 {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}
.task {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  margin-bottom: 9px;
  cursor: grab;
}
.task p {
  margin: 0 0 8px;
  font-weight: 600;
}
.task .m {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.menu {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
}
@media (max-width: 1024px) {
  .g4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .side {
    transform: translateX(-100%);
  }
  .side.open {
    transform: none;
  }
  .main {
    margin-left: 0;
  }
  .menu {
    display: block;
  }
  .g2,
  .g4 {
    grid-template-columns: 1fr;
  }
  .wrap {
    padding: 16px;
  }
  .top {
    padding: 12px 16px;
  }
}

/* ===== 3D layer ===== */
/* 3D layer */
body {
  perspective: 1400px;
}
.card {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition:
    transform 0.18s,
    box-shadow 0.18s;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 14px 28px -16px rgba(50, 40, 140, 0.35),
    0 2px 0 var(--line);
}
.card:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 22px 36px -16px rgba(50, 40, 140, 0.45),
    0 2px 0 var(--line);
}
.btn {
  box-shadow:
    0 4px 0 #3d30a8,
    0 8px 14px -6px rgba(60, 40, 180, 0.5);
  transition:
    transform 0.08s,
    box-shadow 0.08s;
}
.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #3d30a8;
}
.btn.ghost {
  box-shadow: 0 3px 0 var(--line);
}
.btn.del {
  box-shadow: 0 4px 0 #9b1c1c;
}
.hero3d {
  display: grid;
  grid-template-columns: 1fr 200px;
  align-items: center;
  gap: 16px;
  background: linear-gradient(120deg, #3b2fb3, #6d4de0);
  color: #fff;
  border-radius: 14px;
  padding: 24px 30px;
  margin-bottom: 16px;
  overflow: hidden;
}
.hero3d h2 {
  margin: 0 0 6px;
  font-size: 22px;
}
.hero3d p {
  margin: 0;
  opacity: 0.85;
}
.scene {
  perspective: 800px;
  height: 170px;
  display: grid;
  place-items: center;
}
.cube {
  width: 90px;
  height: 90px;
  position: relative;
  transform-style: preserve-3d;
  animation: spin 14s linear infinite;
}
.cube i {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(139, 92, 246, 0.45));
}
.cube i:nth-child(1) {
  transform: translateZ(45px);
}
.cube i:nth-child(2) {
  transform: rotateY(180deg) translateZ(45px);
}
.cube i:nth-child(3) {
  transform: rotateY(90deg) translateZ(45px);
}
.cube i:nth-child(4) {
  transform: rotateY(-90deg) translateZ(45px);
}
.cube i:nth-child(5) {
  transform: rotateX(90deg) translateZ(45px);
}
.cube i:nth-child(6) {
  transform: rotateX(-90deg) translateZ(45px);
}
@keyframes spin {
  to {
    transform: rotateX(360deg) rotateY(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cube {
    animation: none;
  }
  .card {
    transition: none;
  }
}

/* ===== Header actions, notifications and search ===== */
.top .ic {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 11px;
  cursor: pointer;
  min-height: 38px;
}
.dd {
  position: absolute;
  right: 70px;
  top: 56px;
  width: 300px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 20px 40px -10px rgba(20, 20, 80, 0.35);
  padding: 8px;
  display: none;
  z-index: 40;
}
.dd.open {
  display: block;
}
.dd p {
  margin: 0;
  padding: 9px 10px;
  border-radius: 6px;
}
.dd p.new {
  background: var(--bg);
  font-weight: 600;
}
.dd h4 {
  margin: 6px 10px;
  font-size: 13px;
}
.ov {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 30, 0.6);
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding: 90px 16px;
  z-index: 70;
}
.ov.open {
  display: flex;
}
.ov .sb {
  background: var(--card);
  width: 100%;
  max-width: 520px;
  border-radius: 12px;
  padding: 14px;
}
.ov a {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
}
.ov a:hover,
.ov a:focus {
  background: var(--bg);
}
.chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: #ece9ff;
  color: #4b3cc4;
  margin-right: 4px;
}
.av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  flex: none;
  position: relative;
}
.av.on::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  border: 2px solid var(--card);
}

/* ===== Calendar ===== */
.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.cal > div {
  background: var(--card);
  min-height: 92px;
  padding: 6px;
  font-size: 12px;
  cursor: pointer;
  min-width: 0;
}
.cal .h {
  min-height: 0;
  text-align: center;
  font-weight: 700;
  color: var(--muted);
  cursor: default;
}
.cal .td {
  background: #efecff;
}
[data-theme="dark"] .cal .td {
  background: #262455;
}
.cal .ev {
  display: block;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  padding: 1px 5px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal .dl {
  background: var(--warn);
}

/* ===== Messages ===== */
.chat {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  height: calc(100vh - 150px);
  min-height: 420px;
}
.chat .list a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
}
.chat .list a.on,
.chat .list a:hover {
  background: var(--bg);
}
.thread {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.msgs {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 6px;
}
.b {
  max-width: 75%;
  padding: 9px 13px;
  border-radius: 12px;
  background: var(--bg);
}
.b.me {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
}
.send {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* ===== Settings toggles ===== */
.tgl {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.tgl input {
  width: 20px;
  min-height: 20px;
}

/* ===== Login / register pages ===== */
body.auth {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 16px;
  background: linear-gradient(140deg, #e9e6ff, var(--bg));
}
[data-theme="dark"] body.auth {
  background: var(--bg);
}
.aw {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
  max-width: 880px;
  width: 100%;
}
.aw .cube {
  width: 120px;
  height: 120px;
}
.aw .cube i:nth-child(1) {
  transform: translateZ(60px);
}
.aw .cube i:nth-child(2) {
  transform: rotateY(180deg) translateZ(60px);
}
.aw .cube i:nth-child(3) {
  transform: rotateY(90deg) translateZ(60px);
}
.aw .cube i:nth-child(4) {
  transform: rotateY(-90deg) translateZ(60px);
}
.aw .cube i:nth-child(5) {
  transform: rotateX(90deg) translateZ(60px);
}
.aw .cube i:nth-child(6) {
  transform: rotateX(-90deg) translateZ(60px);
}
.aw .cube i {
  background: linear-gradient(135deg, rgba(91, 75, 219, 0.85), rgba(139, 92, 246, 0.6));
}
.aw .scene {
  height: 260px;
}
.aw h2 {
  margin: 0 0 6px;
}
.aw .box {
  max-width: none;
  padding: 26px;
}
.aw .btn {
  width: 100%;
  margin-top: 16px;
}
.sm {
  color: var(--muted);
  font-size: 13px;
  margin-top: 14px;
}
.sm a {
  color: var(--accent);
  font-weight: 600;
}

/* ===== Documentation page ===== */
.doc {
  max-width: 820px;
}
.doc h2 {
  margin-top: 28px;
}
.doc code,
.doc pre {
  background: var(--bg);
  border-radius: 6px;
  padding: 2px 6px;
}
.doc pre {
  padding: 12px;
  overflow-x: auto;
}
@media (max-width: 768px) {
  .chat {
    grid-template-columns: 1fr;
    height: auto;
  }
  .aw {
    grid-template-columns: 1fr;
  }
  .aw .scene {
    display: none;
  }
  .hero3d {
    grid-template-columns: 1fr;
  }
  .hero3d .scene {
    display: none;
  }
  .dd {
    right: 12px;
  }
}
