.btn {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.btn svg,
.create-notes svg,
.create-card-head svg,
.summary-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

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

.btn-primary {
  color: #ffffff;
  background: var(--primary-gradient);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #021a14 0%, #064e3b 54%, #0f9f72 100%);
}

.btn-soft {
  color: var(--primary-mid);
  border: 1px solid var(--primary-border);
  background: var(--primary-soft);
}

.btn-soft:hover {
  border-color: rgba(4, 120, 87, 0.34);
  box-shadow: 0 10px 24px rgba(6, 78, 59, 0.08);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-strong);
  background: #ffffff;
  font-size: 1.45rem;
  line-height: 1;
}

.eyebrow {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--primary-border);
  border-radius: 999px;
  color: var(--primary-mid);
  background: rgba(236, 253, 245, 0.86);
  box-shadow: 0 10px 26px rgba(6, 78, 59, 0.06);
  font-size: 0.82rem;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.pulse-dot {
  position: relative;
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--primary-light);
}

.pulse-dot::after {
  position: absolute;
  inset: -5px;
  content: "";
  border-radius: inherit;
  border: 1px solid rgba(16, 185, 129, 0.72);
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  to {
    opacity: 0;
    transform: scale(1.8);
  }
}

.feature-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 74px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  color: var(--primary-mid);
  background: var(--primary-soft);
  box-shadow: 0 12px 28px rgba(6, 78, 59, 0.08);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.feature-item strong,
.feature-item small {
  display: block;
}

.feature-item strong {
  margin-bottom: 2px;
  color: var(--text-strong);
  font-size: 0.94rem;
  font-weight: 950;
}

.feature-item small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.create-card {
  max-width: 670px;
  padding: clamp(20px, 2vw, 28px);
  border-radius: 28px;
}

.create-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.create-card-head h2 {
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  letter-spacing: -0.02em;
}

.create-card-head svg {
  color: var(--muted);
}

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

.create-form input {
  min-height: 56px;
  border-radius: 16px;
}

.create-form .btn {
  min-height: 56px;
  padding: 0 24px;
  border-radius: 18px;
}

.create-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 18px;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 850;
}

.create-notes span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}

.create-notes svg {
  width: 15px;
  height: 15px;
  color: var(--primary-mid);
}

.created-link-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--primary-border);
  border-radius: 20px;
  background: rgba(236, 253, 245, 0.78);
}

.created-link-box[hidden] {
  display: none !important;
}

.created-link-box > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.created-link-box div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}

.created-link-box input {
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: #ffffff;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input,
select {
  min-height: 46px;
  padding: 0 13px;
}

textarea {
  resize: vertical;
  padding: 13px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(4, 120, 87, 0.42);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.13);
}

input:disabled {
  color: var(--muted-strong);
  background: #f6fbf8;
}

.filters label,
.form-grid label,
.textarea-label {
  display: grid;
  gap: 8px;
}

.filters span,
.form-grid span,
.textarea-label span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.summary-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  min-height: 136px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.summary-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.6);
}

.summary-card small {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.summary-card strong {
  display: block;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  letter-spacing: -0.055em;
}

.summary-card em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-weight: 700;
  opacity: 0.72;
}

.summary-card.blue {
  color: var(--blue-text);
  background: linear-gradient(135deg, var(--blue-bg), #ffffff);
}

.summary-card.green {
  color: var(--green-text);
  background: linear-gradient(135deg, var(--green-bg), #ffffff);
}

.summary-card.red {
  color: var(--red-text);
  background: linear-gradient(135deg, var(--red-bg), #ffffff);
}

.table-wrap[hidden],
.empty-state[hidden] {
  display: none !important;
}

.work-table {
  width: 100%;
  min-width: 940px;
  border-collapse: collapse;
}

.work-table th,
.work-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.work-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #f6fbf8;
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.work-table tbody tr:hover {
  background: #fbfefc;
}

.work-table tbody tr:last-child td {
  border-bottom: 0;
}

.job-title {
  display: grid;
  gap: 4px;
}

.job-title strong {
  color: var(--primary-strong);
  font-size: 0.96rem;
}

.job-title span {
  color: var(--muted);
  font-size: 0.84rem;
}

.money {
  font-weight: 900;
  white-space: nowrap;
}

.money.remain {
  color: var(--red-text);
}

.money.paid {
  color: var(--green-text);
}

.row-actions {
  display: flex;
  gap: 8px;
}

.link-action {
  border: 0;
  color: var(--primary-mid);
  background: transparent;
  font-weight: 950;
}

.status-toggle {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.status-toggle.ok,
.preview-table .paid {
  color: var(--green-text);
  border: 1px solid rgba(4, 120, 87, 0.18);
  background: var(--green-bg);
}

.status-toggle.danger,
.preview-table .unpaid {
  color: var(--red-text);
  border: 1px solid rgba(190, 18, 60, 0.16);
  background: var(--red-bg);
}

.status-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(6, 78, 59, 0.08);
}

.preview-table .paid,
.preview-table .unpaid {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 38px;
  border: 1px dashed var(--line-strong);
  border-radius: 24px;
  text-align: center;
  background: rgba(255, 255, 255, 0.64);
}

.empty-state img {
  width: 72px;
  margin-bottom: 16px;
  opacity: 0.85;
}

.empty-state h3 {
  margin: 0 0 8px;
}

.empty-state p {
  max-width: 440px;
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.6;
}

.panel-footer {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  color: var(--muted-strong);
  font-weight: 750;
}

.month-field {
  position: relative;
}

.month-picker-button {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 22px;
  gap: 2px 10px;
  align-items: center;
  width: 100%;
  min-height: 54px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 253, 250, 0.94));
  box-shadow: 0 14px 30px rgba(6, 78, 59, 0.06);
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.month-picker-button:hover,
.month-picker-button[aria-expanded="true"] {
  border-color: rgba(4, 120, 87, 0.34);
  box-shadow: 0 18px 38px rgba(6, 78, 59, 0.13);
  transform: translateY(-1px);
}

.month-picker-button .month-icon,
.month-picker-button .chevron {
  fill: none;
  stroke: var(--primary-mid);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.35;
}

.month-picker-button .month-icon {
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
}

.month-picker-button .chevron {
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  transition: transform 0.18s ease;
}

.month-picker-button[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

.month-picker-button strong {
  overflow: hidden;
  font-size: 0.96rem;
  font-weight: 950;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.month-picker-button small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.month-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 30;
  width: min(380px, 92vw);
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 80px rgba(6, 78, 59, 0.18);
  backdrop-filter: blur(18px);
}

.month-popover[hidden] {
  display: none !important;
}

.month-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f6fbf8;
}

.month-popover-head strong {
  font-size: 1.08rem;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.month-popover-head .icon-btn {
  width: 36px;
  height: 36px;
  font-size: 1.8rem;
  font-weight: 700;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.month-option {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--muted-strong);
  background: #ffffff;
  font-weight: 950;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.month-option:hover {
  border-color: rgba(4, 120, 87, 0.28);
  background: rgba(16, 185, 129, 0.07);
  transform: translateY(-1px);
}

.month-option.is-active {
  color: #ffffff;
  border-color: transparent;
  background: var(--primary-gradient);
  box-shadow: 0 12px 26px rgba(6, 78, 59, 0.24);
}

.month-now {
  width: 100%;
  margin-top: 12px;
}

.edit-dialog {
  width: min(720px, calc(100% - 24px));
  border: 0;
  border-radius: 28px;
  padding: 0;
  color: var(--text);
  background: transparent;
}

.edit-dialog::backdrop {
  background: rgba(20, 26, 44, 0.42);
  backdrop-filter: blur(8px);
}

.edit-dialog form {
  padding: 24px;
  border-radius: 28px;
}

.edit-dialog header,
.edit-dialog footer {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.edit-dialog h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 16px;
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 8px 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f6fbf8;
  font-weight: 850;
}

.check-row input {
  width: 18px;
  height: 18px;
  min-height: auto;
  accent-color: var(--primary-mid);
}

.textarea-label {
  margin-bottom: 18px;
}

.toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 36px));
}

.toast {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
  animation: toast-in 0.22s ease-out both;
}

.toast strong {
  display: block;
  margin-bottom: 3px;
}

.toast span {
  color: var(--muted-strong);
  font-size: 0.92rem;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .edit-dialog form {
    padding: 18px;
  }

  .edit-dialog footer,
  .panel-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}
