/*!***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!./node_modules/next/font/google/target.css?{"path":"app/layout.tsx","import":"Inter","arguments":[{"subsets":["latin"],"variable":"--font-inter","display":"swap"}],"variableName":"inter"} ***!
  \***********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/ba9851c3c22cd980-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/21350d82a1f187e9-s.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/c5fe6dc8356a8c31-s.woff2) format('woff2');
  unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/19cfc7226ec3afaa-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/df0a9ae256c0569c-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/8e9860b6e62d6359-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/_next/static/media/e4af272ccee01ff0-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: 'Inter Fallback';src: local("Arial");ascent-override: 90.44%;descent-override: 22.52%;line-gap-override: 0.00%;size-adjust: 107.12%
}.__className_f367f3 {font-family: 'Inter', 'Inter Fallback';font-style: normal
}.__variable_f367f3 {--font-inter: 'Inter', 'Inter Fallback'
}

/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  color-scheme: dark;

  --bg: #09090b;
  --surface: #111113;
  --surface-elev: #18181b;
  --surface-hover: #1c1c20;
  --surface-muted: #131316;

  --border: #232327;
  --border-strong: #2e2e33;

  --fg: #f4f4f5;
  --fg-muted: #a1a1aa;
  --fg-subtle: #71717a;

  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-soft: rgb(99 102 241 / 12%);

  --danger: #f87171;
  --danger-hover: #fca5a5;
  --danger-soft: rgb(248 113 113 / 10%);

  --status-open: #22c55e;
  --status-progress: #6366f1;
  --status-review: #f59e0b;
  --status-closed: #71717a;

  --status-open-soft: rgb(34 197 94 / 12%);
  --status-progress-soft: rgb(99 102 241 / 14%);
  --status-review-soft: rgb(245 158 11 / 12%);
  --status-closed-soft: rgb(113 113 122 / 14%);

  --status-open-border: rgb(34 197 94 / 35%);
  --status-progress-border: rgb(99 102 241 / 40%);
  --status-review-border: rgb(245 158 11 / 35%);
  --status-closed-border: rgb(113 113 122 / 40%);

  --radius: 6px;
  --radius-lg: 8px;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / 35%);
  --shadow-md: 0 1px 2px rgb(0 0 0 / 35%), 0 8px 24px rgb(0 0 0 / 35%);

  --font-sans:
    var(--font-inter), ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

h2 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

h3 {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(9 9 11 / 80%);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--fg);
}

.topbar-brand::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
}

.topbar-right {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.topbar-user {
  color: var(--fg-muted);
  font-size: 0.85rem;
}

/* Layout */
.shell {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.stack {
  display: grid;
  gap: 20px;
}

.stack-sm {
  display: grid;
  gap: 12px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.muted {
  color: var(--fg-muted);
}

.subtle {
  color: var(--fg-subtle);
  font-size: 0.85rem;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* Page header */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 1.4rem;
}

.page-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Buttons */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: white;
  cursor: pointer;
  padding: 0 12px;
  font-size: 0.85rem;
  font-weight: 550;
  transition: background 0.12s, border-color 0.12s, color 0.12s, opacity 0.12s;
}

button:hover,
.btn:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

button:focus-visible,
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.danger,
.btn-danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #1a0a0a;
}

button.danger:hover,
.btn-danger:hover {
  border-color: var(--danger-hover);
  background: var(--danger-hover);
}

.btn-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--fg);
}

.btn-secondary:hover {
  border-color: var(--fg-subtle);
  background: var(--surface-hover);
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--fg-muted);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  border-color: transparent;
  color: var(--fg);
}

.btn-danger-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--danger);
}

.btn-danger-ghost:hover {
  background: var(--danger-soft);
  border-color: transparent;
  color: var(--danger-hover);
}

.btn-sm {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  font-size: 0.95rem;
  line-height: 1;
}

.btn-icon-only {
  min-height: 26px;
  width: 26px;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  border-radius: var(--radius);
}

.issue-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.issue-actions .btn-icon-only {
  opacity: 0;
  transition: opacity 0.12s, background 0.12s, color 0.12s;
}

.issue-row:hover .issue-actions .btn-icon-only,
.issue-actions .btn-icon-only:focus-visible {
  opacity: 1;
}

/* Forms */
.form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
}

label > span {
  color: var(--fg);
  font-size: 0.8rem;
  font-weight: 550;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--fg);
  padding: 8px 11px;
  transition: border-color 0.12s, box-shadow 0.12s;
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg-muted) 50%),
    linear-gradient(135deg, var(--fg-muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
  cursor: pointer;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input::placeholder,
textarea::placeholder {
  color: var(--fg-subtle);
}

textarea {
  resize: vertical;
  min-height: 90px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Panel */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 20px;
}

/* Toolbar (view tabs + new issue button) */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Segmented tabs (view switcher) */
.tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  gap: 2px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 4px;
  color: var(--fg-muted);
  font-size: 0.82rem;
  font-weight: 550;
  transition: background 0.12s, color 0.12s;
}

.tab:hover {
  color: var(--fg);
}

.tab.active {
  background: var(--surface-elev);
  color: var(--fg);
}

.tab-icon {
  font-size: 0.9rem;
  line-height: 1;
}

/* Status dot + label */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 550;
  color: var(--fg-muted);
  text-transform: capitalize;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--fg-subtle);
  flex-shrink: 0;
}

.status.open::before { background: var(--status-open); }
.status.in_progress::before { background: var(--status-progress); }
.status.in_review::before { background: var(--status-review); }
.status.closed::before { background: var(--status-closed); }

/* Status-cycle pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--fg);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 550;
  text-transform: capitalize;
  cursor: pointer;
}

.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--fg-subtle);
  flex-shrink: 0;
}

.status-pill:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.status-pill.open::before { background: var(--status-open); }
.status-pill.in_progress::before { background: var(--status-progress); }
.status-pill.in_review::before { background: var(--status-review); }
.status-pill.closed::before { background: var(--status-closed); }

/* Status badge (detail page) */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--fg-muted);
  width: fit-content;
}

.status-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--fg-subtle);
}

.status-badge.open {
  background: var(--status-open-soft);
  border-color: var(--status-open-border);
  color: #4ade80;
}
.status-badge.open::before { background: var(--status-open); }

.status-badge.in_progress {
  background: var(--status-progress-soft);
  border-color: var(--status-progress-border);
  color: #a5b4fc;
}
.status-badge.in_progress::before { background: var(--status-progress); }

.status-badge.in_review {
  background: var(--status-review-soft);
  border-color: var(--status-review-border);
  color: #fcd34d;
}
.status-badge.in_review::before { background: var(--status-review); }

.status-badge.closed {
  background: var(--status-closed-soft);
  border-color: var(--status-closed-border);
  color: var(--fg-muted);
}
.status-badge.closed::before { background: var(--status-closed); }

/* Label badge */
.label-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--fg-muted);
  width: fit-content;
  letter-spacing: 0.01em;
}

.label-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--fg-subtle);
}

.label-badge.research::before { background: #818cf8; }
.label-badge.feature::before { background: #34d399; }
.label-badge.bug::before { background: #f87171; }
.label-badge.chore::before { background: #94a3b8; }
.label-badge.admin::before { background: #f59e0b; }
.label-badge.improvement::before { background: #38bdf8; }

/* Filters */
.filters {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.filters a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  color: var(--fg-muted);
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
}

.filters a:hover {
  background: var(--surface-hover);
  color: var(--fg);
}

.filters a + a {
  border-left: 1px solid var(--border);
}

.filters a.active {
  background: var(--surface-elev);
  color: var(--fg);
  font-weight: 600;
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--fg-muted);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0 5px;
  font-variant-numeric: tabular-nums;
}

.filter-short { display: none; }

.filters a.active .filter-count {
  background: var(--surface);
  color: var(--fg);
}

/* Empty */
.empty {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 40px 20px;
  color: var(--fg-muted);
  text-align: center;
  font-size: 0.9rem;
}

/* Issue list */
.issue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}

.issue-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  transition: background 0.12s;
}

.issue-row:first-child {
  border-top: 0;
}

.issue-row:hover {
  background: var(--surface-hover);
}

.issue-id {
  color: var(--fg-subtle);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.issue-link {
  display: block;
  min-width: 0;
  color: var(--fg);
}

.issue-title {
  display: block;
  font-weight: 550;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.issue-time {
  color: var(--fg-subtle);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Kanban */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kanban-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid var(--border);
  border-top-width: 2px;
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  padding: 12px;
}

.kanban-column.open { border-top-color: var(--status-open); }
.kanban-column.in_progress { border-top-color: var(--status-progress); }
.kanban-column.in_review { border-top-color: var(--status-review); }
.kanban-column.closed { border-top-color: var(--status-closed); }

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.kanban-column-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kanban-column-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--fg-subtle);
}

.kanban-column.open .kanban-column-title::before { background: var(--status-open); }
.kanban-column.in_progress .kanban-column-title::before { background: var(--status-progress); }
.kanban-column.in_review .kanban-column-title::before { background: var(--status-review); }
.kanban-column.closed .kanban-column-title::before { background: var(--status-closed); }

.kanban-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--fg-muted);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0 6px;
  font-variant-numeric: tabular-nums;
}

.kanban-cards {
  display: grid;
  gap: 8px;
}

.kanban-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px 12px;
  color: var(--fg);
  transition: border-color 0.12s, background 0.12s, transform 0.12s;
}

.kanban-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-elev);
}

.kanban-card-id {
  color: var(--fg-subtle);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.kanban-card-title {
  font-weight: 550;
  font-size: 0.88rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.kanban-card-time {
  color: var(--fg-subtle);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.kanban-empty {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg-subtle);
  padding: 16px 12px;
  text-align: center;
  font-size: 0.8rem;
}

/* Detail */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--fg-muted);
  font-size: 0.85rem;
  font-weight: 500;
  width: fit-content;
}

.back-link:hover {
  color: var(--fg);
}

.back-link::before {
  content: "←";
  font-size: 0.95rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: start;
}

.detail-main {
  min-width: 0;
  display: grid;
  gap: 20px;
}

.detail-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-title .detail-id {
  color: var(--fg-subtle);
  font-size: 1.25rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.detail-body {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 20px;
}

.description {
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--fg);
}

.detail-side {
  position: sticky;
  top: 68px;
  display: grid;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 16px;
}

.detail-side-section {
  display: grid;
  gap: 6px;
}

.detail-side-label {
  color: var(--fg-subtle);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-side-value {
  font-size: 0.88rem;
  color: var(--fg);
}

.detail-side-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
  border: 0;
}

.detail-side-actions {
  display: grid;
  gap: 8px;
}

/* Dialog (modal) */
.dialog {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg);
  padding: 0;
  width: min(520px, calc(100% - 32px));
  box-shadow: var(--shadow-md);
}

.dialog.dialog-lg {
  width: min(820px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
}

.dialog.dialog-lg .dialog-body {
  padding: 24px 28px 28px;
}

.dialog.dialog-lg .form {
  gap: 18px;
}

.dialog.dialog-lg textarea {
  min-height: 220px;
  font-size: 0.95rem;
}

.dialog.dialog-lg input[type="text"],
.dialog.dialog-lg input:not([type]),
.dialog.dialog-lg select {
  padding: 10px 12px;
  font-size: 0.95rem;
}

.dialog::backdrop {
  background: rgb(0 0 0 / 55%);
  backdrop-filter: blur(2px);
}

.dialog[open] {
  animation: dialog-in 0.14s ease-out;
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.dialog-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  width: 28px;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: transparent;
  color: var(--fg-muted);
  font-size: 1.1rem;
  line-height: 1;
}

.dialog-close:hover {
  background: var(--surface-hover);
  border-color: transparent;
  color: var(--fg);
}

.dialog-body {
  padding: 18px 20px 20px;
}

/* Auth */
.auth-page {
  display: grid;
  min-height: calc(100vh - 52px);
  place-items: center;
  padding: 24px;
}

.auth-wrap {
  display: grid;
  gap: 16px;
  width: min(380px, 100%);
  justify-items: stretch;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 650;
  letter-spacing: -0.01em;
  font-size: 1rem;
  color: var(--fg);
}

.auth-brand::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
}

.auth-panel {
  padding: 24px;
}

.auth-panel h1 {
  font-size: 1.25rem;
}

.auth-switch {
  margin-top: 14px;
  text-align: center;
  font-size: 0.85rem;
}

.error {
  color: var(--danger);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-side {
    position: static;
  }
}

@media (max-width: 720px) {
  .kanban-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .shell {
    width: calc(100% - 24px);
    padding: 16px 0 32px;
  }

  .topbar-inner {
    width: calc(100% - 24px);
    gap: 8px;
  }

  .topbar-user {
    display: none;
  }

  .page-header h1 {
    font-size: 1.2rem;
  }

  .page-header-actions {
    width: 100%;
  }

  .page-header-actions > * {
    flex: 1;
  }

  .kanban-board {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .filters {
    width: 100%;
    overflow: visible;
  }

  .filters a {
    flex: 1;
    justify-content: center;
    padding: 6px 9px;
    font-weight: 600;
  }

  .filter-full { display: none; }
  .filter-short {
    display: inline-flex;
    min-width: 12px;
    justify-content: center;
  }

  .issue-list {
    border-radius: var(--radius);
  }

  .issue-row {
    grid-template-columns: 32px minmax(0, 1fr) auto auto;
    gap: 6px;
    padding: 8px 10px;
  }

  .issue-id {
    font-size: 0.78rem;
  }

  .issue-title {
    font-size: 0.88rem;
  }

  .issue-time {
    display: none;
  }

  /* Compact status pill on mobile — just the colored dot */
  .status-pill {
    font-size: 0;
    padding: 0;
    width: 28px;
    height: 28px;
    min-height: 28px;
    justify-content: center;
    border-radius: 999px;
  }
  .status-pill::before {
    width: 10px;
    height: 10px;
  }

  .issue-actions {
    gap: 4px;
  }

  /* Always show row action icons on touch (no hover) */
  .issue-actions .btn-icon-only {
    opacity: 1;
  }

  .toolbar {
    align-items: stretch;
    gap: 10px;
  }

  .tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
    justify-content: center;
  }

  /* Bigger tap targets on touch */
  button,
  .btn,
  .tab,
  .filters a {
    min-height: 36px;
  }

  .btn-icon-only {
    min-height: 32px;
    width: 32px;
  }

  /* Detail page */
  .detail-title h1 {
    font-size: 1.2rem;
    overflow-wrap: anywhere;
  }

  .detail-body {
    padding: 14px;
  }

  .detail-side {
    padding: 14px;
  }

  /* Dialog tightens on phones */
  .dialog,
  .dialog.dialog-lg {
    width: calc(100% - 16px);
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

  .dialog-header {
    padding: 12px 14px;
  }

  .dialog-body {
    padding: 14px;
  }

  .dialog.dialog-lg .dialog-body {
    padding: 16px;
  }

  .dialog.dialog-lg textarea {
    min-height: 160px;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .form-actions > * {
    width: 100%;
  }

  /* Kanban cards: less cramped */
  .kanban-card {
    padding: 10px;
  }
}

/* Prevent iOS Safari from zooming on focus by ensuring 16px+ input font */
@media (max-width: 640px) {
  input,
  textarea,
  select {
    font-size: 16px;
  }
}

