:root {
  --bg: #eff4fb;
  --bg-secondary: #f7faff;
  --bg-particle: rgba(110, 138, 255, 0.42);
  --bg-particle-line: rgba(161, 187, 255, 0.34);
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --surface-soft: #f6f9fe;
  --surface-muted: #eef3fb;
  --border: rgba(158, 175, 204, 0.24);
  --border-strong: rgba(108, 132, 170, 0.34);
  --text: #172033;
  --text-strong: #0f1728;
  --text-soft: #60708a;
  --text-faint: #8a97ad;
  --primary: #3e63f4;
  --primary-strong: #2d4fe0;
  --primary-soft: rgba(62, 99, 244, 0.12);
  --secondary-bg: #f3f6fc;
  --secondary-text: #263754;
  --danger: #d34e5f;
  --danger-soft: rgba(211, 78, 95, 0.12);
  --success: #179b72;
  --success-soft: rgba(23, 155, 114, 0.14);
  --shadow-xs: 0 1px 2px rgba(14, 24, 43, 0.05);
  --shadow-sm: 0 10px 30px rgba(30, 52, 92, 0.08);
  --shadow-md: 0 24px 70px rgba(20, 38, 74, 0.12);
  --shadow-lg: 0 32px 80px rgba(20, 38, 74, 0.18);
  --radius-xs: 12px;
  --radius-sm: 16px;
  --radius-md: 22px;
  --radius-lg: 28px;
  --radius-xl: 34px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-9: 36px;
  --space-10: 40px;
  --font-body: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(95, 126, 255, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(76, 152, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #f7faff 0%, #edf3fb 54%, #eff4fb 100%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  cursor: pointer;
}

textarea {
  resize: vertical;
}

#particles-js {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.92;
}

#particles-js::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(247, 250, 255, 0.18), rgba(239, 244, 251, 0.1));
}

#particles-js > canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.page-chrome {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.3), transparent 45%),
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.22), transparent 18%);
}

.app-shell {
  position: relative;
  z-index: 2;
  width: min(1500px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-screen.is-visible {
  display: flex;
}

.auth-screen-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top center, rgba(255, 255, 255, 0.18), transparent 34%),
    rgba(14, 24, 43, 0.36);
  backdrop-filter: blur(10px);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.auth-form {
  margin-top: var(--space-6);
}

.auth-error {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(211, 78, 95, 0.18);
  border-radius: 16px;
  background: rgba(255, 244, 246, 0.94);
  color: #a33042;
  font-size: 0.94rem;
  line-height: 1.5;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-9);
  margin-bottom: var(--space-9);
  padding: 10px 4px 4px;
}

.topbar-copy {
  max-width: 720px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.credit-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(98, 119, 160, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  box-shadow: var(--shadow-xs);
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--primary-strong);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar h1,
.section-copy h2,
.modal-header h2,
.project-manager h3 {
  margin: 0;
  color: var(--text-strong);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.topbar h1 {
  font-size: clamp(2rem, 3.4vw, 3.15rem);
  line-height: 1.04;
}

.subtitle,
.section-copy p,
.modal-header p,
.project-manager p {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.65;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 420px;
  padding-top: 6px;
}

.app-main,
.dashboard-grid,
.dashboard-column,
.stacked-form,
.project-list,
.table-shell {
  display: grid;
  gap: var(--space-6);
}

.dashboard-grid {
  grid-template-columns: minmax(340px, 430px) minmax(0, 1fr);
  align-items: start;
  gap: 28px;
}

.dashboard-column {
  align-content: start;
}

.dashboard-column-left {
  gap: var(--space-6);
}

.dashboard-column-right {
  gap: var(--space-6);
}

.dashboard-column-wide {
  min-width: 0;
}

.right-lower-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.1));
  pointer-events: none;
}

.panel-card,
.hero-card,
.modal-dialog {
  padding: 30px;
}

.hero-card {
  margin-bottom: var(--space-8);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 251, 255, 0.9) 100%);
  box-shadow: var(--shadow-md);
}

.project-card::after {
  content: "";
  position: absolute;
  top: -70px;
  right: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 99, 244, 0.13), transparent 68%);
  pointer-events: none;
}

.hero-card-header,
.section-header,
.modal-header,
.date-row,
.form-actions,
.project-add-row,
.summary-grid,
.toggle-grid,
.modal-actions {
  display: flex;
  gap: var(--space-4);
}

.hero-card-header,
.section-header,
.modal-header {
  align-items: flex-start;
  justify-content: space-between;
}

.hero-card-header {
  margin-bottom: 26px;
}

.section-header {
  margin-bottom: 22px;
}

.section-header-tight {
  margin-bottom: 18px;
}

.section-header.compact {
  margin-bottom: var(--space-4);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.hero-meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(84, 110, 170, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--secondary-text);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: var(--shadow-xs);
}

.section-copy h2,
.modal-header h2 {
  font-size: 1.36rem;
  line-height: 1.15;
}

.toolbar-actions,
.form-actions,
.modal-actions {
  flex-wrap: wrap;
}

.date-row,
.project-add-row {
  align-items: end;
}

.field {
  display: grid;
  gap: 10px;
  width: 100%;
}

.field span {
  color: var(--secondary-text);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 18px;
}

.field-wide {
  min-width: 0;
}

.field-compact {
  min-width: 0;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea {
  width: 100%;
  border: 1px solid rgba(141, 162, 196, 0.26);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  color: var(--text-strong);
  padding: 15px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

input::placeholder,
textarea::placeholder {
  color: #96a3b8;
}

input:hover,
textarea:hover {
  border-color: rgba(95, 120, 180, 0.36);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(62, 99, 244, 0.6);
  box-shadow:
    0 0 0 4px rgba(62, 99, 244, 0.11),
    0 10px 22px rgba(62, 99, 244, 0.08);
  transform: translateY(-1px);
}

input:disabled,
textarea:disabled {
  background: var(--surface-muted);
  color: var(--text-faint);
  box-shadow: none;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-strong);
  font-weight: 700;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

.checkbox-panel {
  min-height: 58px;
  width: 100%;
  padding: 0 16px;
  border: 1px solid rgba(141, 162, 196, 0.24);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow-xs);
}

.project-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.project-tabs::-webkit-scrollbar {
  height: 10px;
}

.project-tabs::-webkit-scrollbar-thumb {
  background: rgba(104, 126, 170, 0.28);
  border-radius: 999px;
}

.tab-btn {
  flex: 0 0 auto;
  min-height: 48px;
  border: 1px solid rgba(122, 146, 188, 0.22);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 247, 253, 0.96));
  color: var(--secondary-text);
  padding: 0 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: var(--shadow-xs);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.tab-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(97, 124, 181, 0.34);
  box-shadow: 0 12px 24px rgba(41, 66, 112, 0.08);
}

.tab-btn.active {
  background: linear-gradient(135deg, #4267ff 0%, #5a6dff 54%, #6a63ff 100%);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 18px 34px rgba(62, 99, 244, 0.28);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-compact {
  min-height: 42px;
  padding: 0 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #5c73ff 100%);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(62, 99, 244, 0.24);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-strong) 0%, #5069ff 100%);
  box-shadow: 0 18px 34px rgba(62, 99, 244, 0.28);
}

.btn-secondary {
  background: linear-gradient(180deg, #ffffff 0%, var(--secondary-bg) 100%);
  color: var(--secondary-text);
  border-color: rgba(119, 141, 183, 0.2);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  border-color: rgba(92, 118, 174, 0.34);
  box-shadow: 0 12px 22px rgba(30, 52, 92, 0.08);
}

.btn-danger,
.danger {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 245, 246, 0.98));
  color: var(--danger);
  border-color: rgba(211, 78, 95, 0.2);
  box-shadow: var(--shadow-xs);
}

.btn-danger:hover,
.danger:hover {
  box-shadow: 0 12px 22px rgba(145, 34, 54, 0.08);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.summary-grid-extended {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-box {
  position: relative;
  min-height: 166px;
  padding: 22px 22px 20px;
  border: 1px solid rgba(121, 144, 185, 0.2);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.96));
  box-shadow: var(--shadow-xs);
  display: grid;
  align-content: space-between;
  gap: 14px;
}

.summary-box::before {
  content: "";
  width: 42px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), #6a63ff);
}

.summary-box-minutes::before {
  background: linear-gradient(90deg, #355cff, #4da4ff);
}

.summary-box-neutral::before {
  background: linear-gradient(90deg, #49566e, #7c8ba5);
}

.summary-label {
  color: var(--text-soft);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary-box strong {
  color: var(--text-strong);
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1;
  letter-spacing: -0.05em;
  margin-top: 2px;
}

.summary-footnote {
  color: var(--text-faint);
  font-size: 0.92rem;
  line-height: 1.5;
}

.output-card .toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.toggle-grid-disabled {
  opacity: 0.72;
}

.checkbox-panel-disabled {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(245, 248, 253, 0.86) 100%);
}

.checkbox-panel-disabled span {
  color: var(--text-soft);
}

.output-hint {
  margin: -2px 0 2px;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

.output-area {
  min-height: 188px;
  padding: 20px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(250, 252, 255, 0.95) 0%, rgba(245, 248, 254, 0.98) 100%);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.94rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

.reverse-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(247, 250, 255, 0.96) 100%);
}

.reverse-import-area {
  min-height: 220px;
  padding: 20px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(252, 253, 255, 0.96) 0%, rgba(245, 248, 254, 0.98) 100%);
  line-height: 1.65;
}

.reverse-toggle-grid {
  grid-template-columns: 1fr;
}

.action-card,
.status-card {
  min-height: 100%;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.status-item {
  display: grid;
  gap: 9px;
  padding: 18px 18px;
  border: 1px solid rgba(121, 144, 185, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 255, 0.96));
  box-shadow: var(--shadow-xs);
}

.status-item strong {
  color: var(--text-strong);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.status-item-wide {
  grid-column: 1 / -1;
}

.status-label {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-note {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.table-card {
  min-height: 100%;
}

.table-shell {
  gap: 0;
  border: 1px solid rgba(121, 144, 185, 0.18);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(249, 251, 255, 0.96));
  overflow: hidden;
}

.table-wrap {
  overflow: auto;
  max-height: min(72vh, 920px);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  text-align: left;
  padding: 17px 18px;
  border-bottom: 1px solid rgba(127, 149, 187, 0.16);
  vertical-align: top;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(245, 248, 253, 0.96);
  backdrop-filter: blur(8px);
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tbody tr:nth-child(even) {
  background: rgba(246, 249, 255, 0.52);
}

tbody tr:hover {
  background: rgba(62, 99, 244, 0.045);
}

.ticket-title {
  color: var(--text-strong);
  font-weight: 700;
}

.ticket-note {
  color: var(--text-soft);
  white-space: pre-wrap;
  line-height: 1.55;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.table-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.empty-row td {
  padding: 56px 24px;
  color: var(--text-soft);
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(62, 99, 244, 0.05), transparent 58%),
    linear-gradient(180deg, rgba(249, 251, 255, 0.84), rgba(246, 249, 255, 0.88));
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 24, 43, 0.46);
  backdrop-filter: blur(8px);
}

.modal-dialog {
  position: relative;
  width: min(780px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border: 1px solid rgba(145, 165, 205, 0.24);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.96));
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.22s ease;
}

.modal-dialog-small {
  width: min(560px, 100%);
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.project-manager {
  border: 1px solid rgba(122, 145, 188, 0.18);
  border-radius: 24px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.92), rgba(244, 248, 254, 0.95));
}

.settings-section {
  border: 1px solid rgba(122, 145, 188, 0.18);
  border-radius: 24px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.92), rgba(244, 248, 254, 0.95));
}

.credentials-section {
  display: grid;
  gap: var(--space-4);
}

.project-list {
  gap: var(--space-3);
}

.project-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 15px 16px;
  border: 1px solid rgba(123, 146, 187, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-xs);
}

.project-name {
  color: var(--text-strong);
  font-weight: 700;
}

.project-meta {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(123, 146, 187, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: var(--secondary-text);
  font-size: 1.35rem;
  line-height: 1;
  box-shadow: var(--shadow-xs);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(92, 118, 174, 0.34);
  box-shadow: 0 12px 22px rgba(30, 52, 92, 0.08);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1300;
  min-width: 280px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(16, 24, 40, 0.92);
  color: #ffffff;
  box-shadow: 0 18px 44px rgba(14, 24, 43, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(10px);
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .right-lower-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    max-height: none;
  }
}

@media (max-width: 840px) {
  .app-shell {
    width: min(100% - 24px, 1500px);
    padding-top: 24px;
  }

  .topbar,
  .hero-card-header,
  .section-header,
  .modal-header,
  .date-row,
  .project-add-row,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions,
  .hero-meta {
    justify-content: flex-start;
    max-width: none;
  }

  .summary-grid,
  .summary-grid-extended,
  .output-card .toggle-grid,
  .modal-grid,
  .form-grid,
  .quick-actions-grid,
  .status-list {
    grid-template-columns: 1fr;
  }

  .dashboard-column-left {
    display: contents;
  }

  .dashboard-column-right {
    display: contents;
  }

  .panel-order-tickets {
    order: 2;
  }

  .panel-order-summary {
    order: 3;
  }

  .panel-order-output {
    order: 4;
  }

  .panel-order-reverse {
    order: 5;
  }

  .panel-order-actions {
    order: 6;
  }

  .panel-order-lower {
    order: 6;
  }

  .panel-order-status {
    order: 7;
  }
}

@media (max-width: 640px) {
  .panel-card,
  .hero-card,
  .modal-dialog,
  .auth-card {
    padding: 22px;
  }

  .app-shell {
    width: calc(100% - 16px);
    padding-bottom: 32px;
  }

  .topbar {
    margin-bottom: 20px;
  }

  .btn,
  .btn-compact {
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
  }

  .project-list-item {
    flex-direction: column;
    align-items: stretch;
  }

  .toast {
    right: 12px;
    bottom: 12px;
  }
}
