:root {
  --bg-main: #f5f7fb;
  --ink-strong: #172033;
  --ink-soft: #5e6a84;
  --surface: #ffffff;
  --surface-2: #eef2fb;
  --line: #d8e0f0;
  --brand: #0f6efd;
  --brand-deep: #0050c8;
  --accent: #11b6a8;
  --danger: #d64255;
}

html {
  font-size: 16px;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--ink-strong);
  background:
    radial-gradient(1200px 450px at -5% -10%, #d8e8ff 0%, transparent 60%),
    radial-gradient(1000px 400px at 110% 0%, #ddfff7 0%, transparent 60%),
    var(--bg-main);
}

.ambient-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(120deg, rgba(15, 110, 253, 0.08), rgba(17, 182, 168, 0.06));
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(245, 247, 251, 0.82);
  border-bottom: 1px solid rgba(216, 224, 240, 0.8);
}

.page-shell {
  padding-top: 1.25rem;
  padding-bottom: 2rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink-strong);
  text-decoration: none;
  font-family: "Syne", "Plus Jakarta Sans", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.brand-dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--brand), var(--accent));
  box-shadow: 0 0 0 6px rgba(15, 110, 253, 0.1);
}

.soft-link {
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.45rem 0.9rem !important;
  transition: all 0.2s ease;
}

.soft-link:hover,
.soft-link:focus {
  color: var(--ink-strong);
  background: rgba(15, 110, 253, 0.1);
}

.user-pill {
  background: #dfe8fa;
  border: 1px solid #c8d6f2;
  color: #273556;
  border-radius: 999px;
  padding: 0.45rem 0.85rem !important;
}

.card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 10px 35px rgba(23, 32, 51, 0.06);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border: none;
}

.btn-outline-primary {
  border-color: #9fc1ff;
  color: var(--brand-deep);
}

.btn-outline-secondary {
  border-color: #adc0d8;
  color: #2f4b6e;
}

.table {
  --bs-table-bg: transparent;
  --bs-table-border-color: var(--line);
}

.table thead th {
  color: #3b4b69;
  font-weight: 700;
  border-bottom-width: 1px;
}

.form-control,
.form-select {
  border-color: #c9d7ef;
  border-radius: 0.75rem;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(15, 110, 253, 0.18);
}

.soft-alert {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.hero-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.hero-title {
  font-family: "Syne", "Plus Jakarta Sans", sans-serif;
  font-size: 1.9rem;
  margin-bottom: 0.3rem;
}

.hero-sub {
  margin: 0;
  color: var(--ink-soft);
}

.panel-list a {
  color: #1e3f73;
  font-weight: 600;
  text-decoration: none;
}

.panel-list a:hover {
  text-decoration: underline;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: #e7eefc;
  color: #21447f;
}

.auth-wrap {
  min-height: 70vh;
  display: grid;
  place-items: center;
}

.auth-panel {
  width: min(450px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 18px 40px rgba(23, 32, 51, 0.12);
}

.auth-page {
  min-height: 100%;
  background:
    linear-gradient(135deg, rgba(9, 21, 38, 0.56), rgba(14, 34, 64, 0.38)),
    url("/images/masaustu2.jpg") center/cover no-repeat fixed;
}

.auth-page-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(760px 360px at 7% 12%, rgba(79, 163, 255, 0.24), transparent 65%),
    radial-gradient(720px 330px at 96% 90%, rgba(45, 202, 176, 0.16), transparent 62%);
  pointer-events: none;
  z-index: 0;
}

.auth-page-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.6rem;
}

.auth-shell {
  width: min(1200px, 96vw);
  min-height: min(690px, calc(100vh - 3.2rem));
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(300px, 1.1fr);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 1.2rem;
  overflow: hidden;
  background: rgba(11, 22, 38, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0 28px 54px rgba(6, 12, 22, 0.45);
}

.auth-form-panel {
  display: grid;
  align-items: center;
  justify-items: start;
  padding: 2.25rem 2rem 2.25rem clamp(1.2rem, 4vw, 4.4rem);
}

.auth-form-card {
  width: min(470px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #d9e3f6;
  border-radius: 1.05rem;
  padding: 1.8rem;
  box-shadow: 0 16px 38px rgba(15, 32, 56, 0.2);
}

.auth-form-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.auth-form-brand-dot {
  width: 0.88rem;
  height: 0.88rem;
  border-radius: 999px;
  background: linear-gradient(140deg, #1f7dff, #15bfaa);
  box-shadow: 0 0 0 7px rgba(31, 125, 255, 0.13);
}

.auth-form-brand-text {
  font-family: "Syne", "Plus Jakarta Sans", sans-serif;
  font-weight: 700;
  color: #16325d;
}

.auth-form-title {
  margin: 0;
  font-family: "Syne", "Plus Jakarta Sans", sans-serif;
  color: #132a4d;
}

.auth-form-subtitle {
  margin: 0.45rem 0 0;
  color: #5b6d8c;
}

.auth-brand-panel {
  display: grid;
  align-items: end;
  padding: 2rem 2.4rem;
  color: #eff5ff;
  background:
    linear-gradient(165deg, rgba(6, 20, 38, 0.72), rgba(5, 13, 25, 0.82)),
    radial-gradient(500px 260px at 92% 5%, rgba(120, 194, 255, 0.2), transparent 65%),
    url("/images/masaustu2.jpg") center/cover no-repeat;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.auth-brand-content {
  max-width: 420px;
}

.auth-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.auth-brand-logo-dot {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 999px;
  background: linear-gradient(140deg, #62bdff, #39e5cc);
  box-shadow: 0 0 0 8px rgba(98, 189, 255, 0.14);
}

.auth-brand-logo-text {
  font-family: "Syne", "Plus Jakarta Sans", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.auth-brand-title {
  font-family: "Syne", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.55rem, 2.2vw, 2.2rem);
  margin-bottom: 0.55rem;
}

.auth-brand-subtitle {
  margin: 0;
  color: rgba(232, 240, 255, 0.9);
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(240px, 1fr));
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
}

.kanban-column {
  background: #eff3fb;
  border: 1px solid #d6e0f4;
  border-radius: 0.9rem;
  padding: 0.7rem;
  min-height: 240px;
}

.kanban-column-head {
  font-weight: 700;
  font-size: 0.9rem;
  color: #23375f;
  margin-bottom: 0.6rem;
}

.kanban-lane-wrap + .kanban-lane-wrap {
  margin-top: 0.65rem;
}

.kanban-lane-title {
  font-size: 0.76rem;
  text-transform: uppercase;
  color: #53678f;
  margin-bottom: 0.35rem;
}

.kanban-dropzone {
  min-height: 72px;
  border: 1px dashed #b8c8e8;
  border-radius: 0.7rem;
  padding: 0.45rem;
  background: rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
}

.kanban-dropzone.over {
  border-color: #4f8dff;
  background: rgba(79, 141, 255, 0.12);
}

.kanban-empty {
  font-size: 0.78rem;
  color: #7a87a3;
}

.kanban-card {
  background: #fff;
  border: 1px solid #d8e0f0;
  border-radius: 0.65rem;
  padding: 0.5rem 0.55rem;
  box-shadow: 0 6px 14px rgba(23, 32, 51, 0.08);
  margin-bottom: 0.45rem;
  cursor: grab;
}

.kanban-card.dragging {
  opacity: 0.55;
}

.kanban-card-title {
  text-decoration: none;
  color: #1f3f72;
  font-weight: 700;
  display: block;
}

.kanban-card-meta {
  font-size: 0.75rem;
  color: #60708f;
  margin-top: 0.2rem;
}

.attachment-list {
  display: grid;
  gap: 0.55rem;
}

.issue-page {
  display: grid;
  gap: 0.85rem;
}

.issue-proof-banner {
  padding: 0.6rem 0.9rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #ffde7a, #ff8a6b);
  color: #4a1900;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: center;
}

.issue-header-card {
  border-radius: 1.1rem;
}

.issue-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.issue-ui-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.62rem;
  margin-bottom: 0.55rem;
  background: linear-gradient(135deg, #d8f8ee, #dce8ff);
  border: 1px solid #b8d8ff;
  color: #18457e;
  font-size: 0.75rem;
  font-weight: 700;
}

.issue-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  background: #edf4ff;
  border: 1px solid #d7e5fb;
  color: #355a8f;
  padding: 0.26rem 0.72rem;
  font-size: 0.79rem;
  font-weight: 600;
}

.issue-breadcrumb a {
  text-decoration: none;
  font-weight: 700;
  color: #1f4d8e;
}

.issue-title {
  font-family: "Syne", "Plus Jakarta Sans", sans-serif;
  font-size: clamp(1.35rem, 2vw, 2rem);
  margin: 0.65rem 0 0.35rem;
  color: #172b4f;
}

.issue-subline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0;
  color: #607291;
  font-size: 0.86rem;
}

.issue-subline span {
  position: relative;
  padding-right: 0.7rem;
}

.issue-subline span:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0.2rem;
  top: 50%;
  width: 0.2rem;
  height: 0.2rem;
  border-radius: 999px;
  background: #9eb1d3;
  transform: translateY(-50%);
}

.issue-toolbar {
  display: flex;
  gap: 0.5rem;
}

.issue-badges {
  margin-top: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.issue-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.95fr);
  gap: 0.95rem;
  align-items: start;
}

.issue-main-column,
.issue-side-column {
  min-width: 0;
}

.issue-main-card,
.issue-side-card {
  border-radius: 1rem;
}

.issue-section-title {
  font-size: 0.94rem;
  letter-spacing: 0.02em;
}

.issue-description {
  white-space: pre-wrap;
  color: #233b62;
  line-height: 1.56;
}

.issue-kv-list {
  display: grid;
  gap: 0.55rem;
}

.issue-kv-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid #e3ebf9;
  border-radius: 0.72rem;
  background: #f8fbff;
  padding: 0.5rem 0.62rem;
}

.issue-kv-label {
  color: #5a6f92;
  font-size: 0.79rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.issue-kv-value {
  color: #1f3f72;
  font-weight: 600;
  font-size: 0.86rem;
  text-align: right;
}

.attachment-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid #d8e0f0;
  border-radius: 0.7rem;
  padding: 0.55rem 0.65rem;
  background: #f8fbff;
}

.attachment-icon {
  flex: 0 0 2.6rem;
  height: 2.2rem;
  border-radius: 0.55rem;
  background: linear-gradient(135deg, #1d73f7, #3ca9f6);
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
}

.attachment-meta {
  min-width: 0;
  flex: 1;
}

.attachment-name {
  font-weight: 600;
  color: #1f3f72;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-detail {
  font-size: 0.78rem;
  color: #60708f;
}

.attachment-actions {
  display: flex;
  gap: 0.4rem;
}

.attachment-preview-frame {
  width: 100%;
  height: 75vh;
  border: 0;
}

.office-edit-frame {
  width: 100%;
  height: 78vh;
  border: 0;
  background: #f6f9ff;
}

.comment-thread-root {
  display: grid;
  gap: 0.8rem;
}

.comment-thread-item {
  border: 1px solid #d8e0f0;
  border-radius: 0.8rem;
  padding: 0.7rem;
  background: #fff;
}

.comment-thread-item.is-reply {
  border-color: #cedcf7;
  background: #f9fbff;
}

.comment-children {
  margin-left: 1.2rem;
  display: grid;
  gap: 0.7rem;
}

.comment-body-text {
  white-space: pre-wrap;
}

.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: flex-start;
}

.comment-head-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.comment-author {
  font-weight: 700;
  color: #223f6f;
}

.comment-date {
  color: #6a7b98;
  font-size: 0.78rem;
}

.comment-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.undo-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #f0c86e;
  border-radius: 0.75rem;
  background: #fff6df;
}

.undo-banner.expired {
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.2s ease;
}

.undo-banner-text {
  color: #6f4f07;
  font-weight: 600;
}

.undo-countdown-text {
  margin-left: 0.45rem;
  font-weight: 500;
}

.comment-compose {
  position: relative;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  padding: 0.35rem;
  transition: all 0.2s ease;
}

.comment-compose.is-dropping {
  border-color: #4f8dff;
  background: rgba(79, 141, 255, 0.08);
}

.mention-wrap {
  position: relative;
}

.mention-menu {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  margin-top: 0.35rem;
  border: 1px solid #d4e0f7;
  border-radius: 0.7rem;
  background: #fff;
  box-shadow: 0 14px 30px rgba(22, 38, 68, 0.16);
  max-height: 220px;
  overflow-y: auto;
}

.mention-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #edf2fb;
  background: #fff;
  text-align: left;
  padding: 0.55rem 0.7rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.mention-item:last-child {
  border-bottom: 0;
}

.mention-item small {
  color: #6380ad;
}

.mention-item.active,
.mention-item:hover {
  background: #eef5ff;
}

.comment-drop-hint {
  margin-top: 0.45rem;
  color: #6b7f9e;
  font-size: 0.8rem;
}

.comment-files-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  padding: 0.24rem 0.62rem;
  background: #edf4ff;
  color: #21477f;
  font-size: 0.78rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .page-shell {
    padding-top: 0.75rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .kanban-board {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-brand-panel {
    padding: 1rem 1.1rem 1.2rem;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

  .auth-form-panel {
    padding: 1rem;
    justify-items: stretch;
  }

  .attachment-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .attachment-actions {
    width: 100%;
  }

  .comment-children {
    margin-left: 0.45rem;
  }

  .undo-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .issue-header-top {
    flex-direction: column;
    align-items: stretch;
  }

  .issue-toolbar {
    width: 100%;
  }

  .issue-toolbar form,
  .issue-toolbar button {
    width: 100%;
  }

  .issue-layout {
    grid-template-columns: 1fr;
  }
}
