:root {
  color: #e7edf7;
  background: #07101d;
  --theme-accent: #f0b429;
  --theme-accent-soft: rgba(240, 180, 41, 0.16);
  --theme-accent-glow: rgba(240, 180, 41, 0.26);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(240, 180, 41, 0.14), transparent 26%),
    radial-gradient(circle at 82% 0%, rgba(64, 112, 168, 0.24), transparent 32%),
    linear-gradient(135deg, #07101d 0%, #101927 48%, #050a12 100%);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 17px;
}

.app-shell {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(9, 17, 31, 0.88), rgba(5, 10, 18, 0.96)),
    #07101d;
  background-size: 34px 34px, 34px 34px, auto;
  min-height: 100vh;
  padding: 24px;
}

.login-shell {
  align-items: center;
  background:
    radial-gradient(circle at 18% 16%, rgba(240, 180, 41, 0.2), transparent 28%),
    linear-gradient(135deg, #07101d 0%, #162034 48%, #0a111e 100%);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-stage {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.8fr);
  max-width: 980px;
  min-height: 620px;
  overflow: hidden;
  width: 100%;
}

.login-visual {
  background:
    linear-gradient(180deg, rgba(7, 16, 29, 0.14), rgba(7, 16, 29, 0.86)),
    #101927;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px;
}

.login-visual img {
  filter: drop-shadow(0 18px 42px rgba(0, 0, 0, 0.22));
  max-width: 340px;
  opacity: 0.95;
  width: 72%;
}

.login-visual-copy {
  color: #ffffff;
  max-width: 440px;
}

.login-visual-copy span {
  color: #f0b429;
  display: block;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.login-visual-copy h1 {
  font-size: 46px;
  line-height: 1;
  margin: 0 0 14px;
}

.login-visual-copy p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  margin: 0;
}

.login-card {
  align-self: center;
  background: #ffffff;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 18px;
  height: 100%;
  max-width: none;
  padding: 56px 46px;
  width: 100%;
}

.login-brand {
  align-items: center;
  color: #172033;
  display: flex;
  font-size: 18px;
  font-weight: 900;
  gap: 10px;
}

.login-card h1 {
  font-size: 30px;
  margin: 0 0 4px;
}

.login-card h2 {
  font-size: 34px;
  line-height: 1.1;
  margin: 0 0 8px;
}

.login-card p {
  color: #657086;
  margin: 0;
}

.login-card label,
.modal label {
  color: #47546b;
}

.login-error {
  background: #fff0ed;
  border: 1px solid #f3b6ab;
  border-radius: 8px;
  color: #9f2d20;
  padding: 10px 12px;
}

.topbar {
  align-items: center;
  background: rgba(14, 24, 40, 0.86);
  border: 1px solid rgba(130, 151, 184, 0.22);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.26);
  display: flex;
  justify-content: space-between;
  margin: 0 auto 22px;
  max-width: 1440px;
  padding: 12px;
}

.brand,
.topbar nav,
.topbar nav button,
.primary-button,
.quiet-button,
.add-inline,
.icon-row,
.card-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.brand {
  background: transparent;
  border: 0;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

.brand-logo {
  min-height: 48px;
  padding: 0;
}

.brand-logo img {
  display: block;
  max-height: 44px;
  object-fit: contain;
  width: 180px;
}

.topbar nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar nav button,
.theme-tabs button,
.quiet-button,
.add-inline,
.card-actions button,
.icon-row button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(130, 151, 184, 0.24);
  border-radius: 8px;
  color: #c8d2e2;
  min-height: 38px;
  padding: 8px 12px;
}

.topbar nav button.active,
.theme-tabs button.active {
  background: linear-gradient(135deg, #f0b429, #d4931c);
  border-color: rgba(240, 180, 41, 0.8);
  color: #07101d;
}

.board-view,
.page-panel {
  margin: 0 auto;
  max-width: 1440px;
}

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

.theme-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-tabs button {
  font-weight: 800;
}

.theme-design {
  --theme-accent: #f0b429;
  --theme-accent-soft: rgba(240, 180, 41, 0.18);
  --theme-accent-glow: rgba(240, 180, 41, 0.3);
}

.theme-video {
  --theme-accent: #ff6b7a;
  --theme-accent-soft: rgba(255, 107, 122, 0.18);
  --theme-accent-glow: rgba(255, 107, 122, 0.3);
}

.theme-comunicacao {
  --theme-accent: #54d6ff;
  --theme-accent-soft: rgba(84, 214, 255, 0.18);
  --theme-accent-glow: rgba(84, 214, 255, 0.3);
}

.theme-programacao {
  --theme-accent: #8cffb3;
  --theme-accent-soft: rgba(140, 255, 179, 0.18);
  --theme-accent-glow: rgba(140, 255, 179, 0.3);
}

.theme-3d {
  --theme-accent: #b999ff;
  --theme-accent-soft: rgba(185, 153, 255, 0.2);
  --theme-accent-glow: rgba(185, 153, 255, 0.3);
}

.theme-outros {
  --theme-accent: #c8d2e2;
  --theme-accent-soft: rgba(200, 210, 226, 0.16);
  --theme-accent-glow: rgba(200, 210, 226, 0.22);
}

.theme-tabs button {
  box-shadow: inset 0 0 0 1px transparent;
}

.theme-tabs button svg {
  color: var(--theme-accent);
}

.theme-tabs button.active {
  background: var(--theme-accent);
  border-color: var(--theme-accent);
  box-shadow: 0 10px 28px var(--theme-accent-glow);
  color: #07101d;
}

.theme-tabs button.active svg {
  color: #07101d;
}

.primary-button {
  background: #f0b429;
  border: 1px solid #e0a31d;
  border-radius: 8px;
  color: #172033;
  font-weight: 800;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
}

.primary-button.full {
  width: 100%;
}

.columns {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.column {
  background:
    radial-gradient(circle at 18% 0%, var(--theme-accent-soft), transparent 32%),
    rgba(13, 23, 39, 0.86);
  border: 1px solid rgba(130, 151, 184, 0.28);
  border-radius: 8px;
  min-height: 420px;
  padding: 12px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.column.drag-over,
.card-list.drag-over {
  background: rgba(26, 42, 66, 0.92);
  border-color: var(--theme-accent);
}

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

.column-header h2,
.page-title h1,
.modal h2 {
  margin: 0;
}

.column-header h2 {
  font-size: 17px;
}

.column-header span {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #e7edf7;
  font-size: 13px;
  font-weight: 800;
  min-width: 28px;
  padding: 3px 8px;
  text-align: center;
}

.card-list {
  display: grid;
  gap: 10px;
  min-height: 300px;
}

.task-card,
.member-row,
.archive-row {
  background: rgba(14, 24, 40, 0.92);
  border: 1px solid rgba(130, 151, 184, 0.24);
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.16);
}

.task-card {
  background:
    radial-gradient(circle at 12% 0%, var(--theme-accent-soft), transparent 35%),
    linear-gradient(180deg, rgba(20, 33, 54, 0.98), rgba(10, 18, 31, 0.98));
  color: #e7edf7;
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding: 16px;
  position: relative;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.task-card::before {
  border-radius: 8px 0 0 8px;
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
  width: 4px;
}

.task-card:hover {
  border-color: var(--theme-accent);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
}

.task-card.priority-baixa::before {
  background: #57d68d;
}

.task-card.priority-normal::before {
  background: var(--theme-accent);
}

.task-card.priority-urgente::before {
  background: #ff544a;
}

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

.task-card-top,
.task-card-footer,
.assignee-line {
  align-items: center;
  display: flex;
}

.task-card-top,
.task-card-footer {
  justify-content: space-between;
}

.drag-handle {
  color: var(--theme-accent) !important;
  font-size: 16px !important;
  letter-spacing: 2px;
  line-height: 1;
}

.task-card-body {
  display: grid;
  gap: 12px;
}

.task-card strong,
.archive-row strong {
  display: block;
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.task-card span,
.archive-row span,
.page-title p {
  color: #9eacc1;
  font-size: 14px;
}

.card-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assignee-line {
  gap: 10px;
}

.assignee-stack {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  min-width: 34px;
}

.assignee-stack .assignee-avatar + .assignee-avatar {
  margin-left: -10px;
}

.assignee-avatar {
  align-items: center;
  background: rgba(7, 16, 29, 0.86);
  border: 1px solid var(--theme-accent);
  border-radius: 999px;
  color: #ffffff !important;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px !important;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.assignee-line b {
  color: #e7edf7;
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.assignee-line small {
  color: #9eacc1;
  display: block;
  font-size: 12px;
  line-height: 1.25;
}

.checklist-preview {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(130, 151, 184, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.checklist-progress {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.checklist-progress span,
.checklist-progress b {
  color: #c8d2e2;
  font-size: 12px;
  font-weight: 900;
}

.checklist-bar {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  height: 5px;
  overflow: hidden;
}

.checklist-bar span {
  background: var(--theme-accent);
  display: block;
  height: 100%;
}

.checklist-mini {
  display: grid;
  gap: 6px;
}

.checklist-mini label {
  align-items: center;
  color: #c8d2e2;
  display: flex;
  flex-direction: row;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
}

.checklist-mini input {
  accent-color: var(--theme-accent);
  min-height: auto;
  width: auto;
}

.checklist-mini label.done span {
  color: #7f8da3;
  text-decoration: line-through;
}

.checklist-mini small {
  color: #9eacc1;
  font-size: 12px;
}

.priority-pill {
  background: var(--theme-accent-soft);
  border: 1px solid var(--theme-accent);
  border-radius: 999px;
  color: #e7edf7 !important;
  font-size: 12px !important;
  font-weight: 800;
  padding: 2px 8px;
  text-transform: uppercase;
}

.priority-urgente .priority-pill {
  background: rgba(255, 84, 74, 0.16);
  border-color: rgba(255, 84, 74, 0.46);
  color: #ffb2ad !important;
}

.priority-baixa .priority-pill {
  background: rgba(87, 214, 141, 0.14);
  border-color: rgba(87, 214, 141, 0.42);
  color: #a7f2c2 !important;
}

.card-actions {
  flex-wrap: wrap;
  gap: 6px;
}

.card-actions button {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(130, 151, 184, 0.22);
  color: #c8d2e2;
  font-size: 12px;
  min-height: 32px;
  padding: 6px 9px;
}

.icon-row {
  gap: 6px;
  justify-content: flex-end;
}

.icon-row button {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(130, 151, 184, 0.22);
  color: #c8d2e2;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.icon-row button:hover,
.card-actions button:hover {
  border-color: var(--theme-accent);
  color: #ffffff;
}

.add-inline {
  justify-content: center;
  margin-top: 12px;
  width: 100%;
}

.page-panel {
  background:
    radial-gradient(circle at 12% 0%, rgba(240, 180, 41, 0.08), transparent 28%),
    rgba(14, 24, 40, 0.9);
  border: 1px solid rgba(130, 151, 184, 0.22);
  border-radius: 8px;
  padding: 22px;
}

.page-title {
  margin-bottom: 18px;
}

.page-title h1 {
  font-size: 28px;
}

.calendar-panel {
  padding: 0;
  overflow: hidden;
}

.calendar-title {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin: 0;
  padding: 22px;
}

.calendar-link {
  text-decoration: none;
}

.calendar-frame {
  background: #ffffff;
  border: 0;
  display: block;
  height: min(76vh, 760px);
  min-height: 560px;
  width: 100%;
}

.member-form {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr) auto auto;
  margin-bottom: 16px;
}

input,
select {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #cdd6e5;
  border-radius: 8px;
  color: #172033;
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}

label {
  color: #c8d2e2;
  display: grid;
  font-size: 13px;
  font-weight: 800;
  gap: 6px;
}

.member-list,
.archive-list {
  display: grid;
  gap: 10px;
}

.member-list {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.member-row,
.archive-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 16px;
}

.member-profile {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.member-profile > span:last-child {
  display: grid;
  min-width: 0;
}

.member-avatar {
  align-items: center;
  background: linear-gradient(135deg, #f0b429, #54d6ff);
  border-radius: 14px;
  color: #07101d;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 950;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.member-row small {
  color: #9eacc1;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-context {
  color: #657086;
  font-size: 14px;
  margin: -8px 0 0;
}

.checkbox-field {
  align-items: center;
  align-self: end;
  display: flex;
  flex-direction: row;
  min-height: 42px;
}

.checkbox-field input {
  min-height: auto;
  width: auto;
}

.assignee-picker {
  border: 1px solid #d6deeb;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin: 0;
  max-height: 230px;
  overflow: auto;
  padding: 12px;
}

.assignee-picker legend {
  color: #172033;
  font-size: 13px;
  font-weight: 900;
  padding: 0 6px;
}

.assignee-picker label {
  align-items: center;
  background: #f5f7fb;
  border: 1px solid #dce3ef;
  border-radius: 8px;
  color: #172033;
  display: flex;
  flex-direction: row;
  gap: 10px;
  padding: 8px 10px;
}

.assignee-picker input {
  accent-color: #f0b429;
  min-height: auto;
  width: auto;
}

.assignee-picker .assignee-avatar {
  background: #172033;
  border-color: #f0b429;
  height: 30px;
  width: 30px;
}

.assignee-picker b {
  display: block;
  font-size: 13px;
  line-height: 1.2;
}

.assignee-picker small,
.assignee-picker p {
  color: #657086;
  font-size: 12px;
}

.checklist-editor {
  display: grid;
  gap: 10px;
}

.checklist-editor-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.checklist-editor-title h3 {
  color: #172033;
  font-size: 15px;
  margin: 0;
}

.checklist-editor-title button {
  align-items: center;
  background: #edf2f8;
  border: 1px solid #d6deeb;
  border-radius: 8px;
  color: #172033;
  display: flex;
  font-weight: 800;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
}

.checklist-editor-list {
  display: grid;
  gap: 8px;
}

.checklist-editor-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.checklist-editor-row input[type="checkbox"] {
  accent-color: #f0b429;
  min-height: auto;
  width: auto;
}

.checklist-editor-row button {
  align-items: center;
  background: #f5f7fb;
  border: 1px solid #d6deeb;
  border-radius: 8px;
  color: #526078;
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.modal-backdrop {
  align-items: center;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 10;
}

.modal {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
  display: grid;
  gap: 14px;
  max-width: 520px;
  padding: 18px;
  width: 100%;
}

.modal h2 {
  color: #172033;
}

.modal-title,
.notice {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.modal-title button,
.notice button {
  background: transparent;
  border: 0;
  color: inherit;
}

.notice-actions {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.notice-actions button:first-child {
  border: 1px solid rgba(240, 180, 41, 0.5);
  border-radius: 8px;
  padding: 7px 10px;
}

.field-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.notice,
.empty-strip,
.loading {
  background: rgba(240, 180, 41, 0.14);
  border: 1px solid rgba(240, 180, 41, 0.4);
  border-radius: 8px;
  color: #ffe3a2;
  margin: 0 auto 16px;
  max-width: 1440px;
  padding: 12px 14px;
}

.loading {
  background: rgba(14, 24, 40, 0.9);
  border-color: rgba(130, 151, 184, 0.22);
  color: #c8d2e2;
}

.empty-column {
  color: #9eacc1;
  font-size: 14px;
  margin: 8px 4px;
}

.billing-panel {
  margin: 0 auto;
  max-width: 1440px;
}

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

.billing-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.billing-nav button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(130, 151, 184, 0.24);
  border-radius: 8px;
  color: #c8d2e2;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 12px;
}

.billing-nav button.active {
  background: #f0b429;
  border-color: #f0b429;
  color: #07101d;
}

.billing-filters,
.billing-form {
  background: rgba(14, 24, 40, 0.9);
  border: 1px solid rgba(130, 151, 184, 0.22);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
}

.billing-filters {
  grid-template-columns: 110px minmax(220px, 1fr) repeat(3, minmax(150px, 0.45fr));
}

.billing-form {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.billing-service-form {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.billing-form button,
.billing-filters button {
  min-height: 42px;
}

.billing-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.billing-cards article {
  background:
    radial-gradient(circle at 12% 0%, rgba(240, 180, 41, 0.12), transparent 42%),
    rgba(14, 24, 40, 0.92);
  border: 1px solid rgba(130, 151, 184, 0.24);
  border-radius: 8px;
  padding: 14px;
}

.billing-cards span {
  color: #9eacc1;
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.billing-cards strong {
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
}

.billing-section-title {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.billing-section-title h2 {
  font-size: 20px;
  margin: 0;
}

.billing-table-wrap {
  background: rgba(14, 24, 40, 0.92);
  border: 1px solid rgba(130, 151, 184, 0.24);
  border-radius: 8px;
  overflow: auto;
}

.billing-table {
  border-collapse: collapse;
  min-width: 980px;
  width: 100%;
}

.billing-table th,
.billing-table td {
  border-bottom: 1px solid rgba(130, 151, 184, 0.16);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

.billing-table th {
  color: #9eacc1;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.billing-table td {
  color: #dbe5f4;
  font-size: 13px;
}

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

.billing-table tbody tr {
  transition: background 0.14s ease, box-shadow 0.14s ease;
}

.billing-table tbody tr:hover {
  background: rgba(240, 180, 41, 0.09);
  box-shadow: inset 3px 0 0 #f0b429;
}

.billing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  min-width: 250px;
}

.billing-actions button,
.billing-table td > button {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(130, 151, 184, 0.22);
  border-radius: 8px;
  color: #c8d2e2;
  font-size: 12px;
  min-height: 30px;
  padding: 5px 8px;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.billing-actions button:hover,
.billing-table td > button:hover {
  background: rgba(240, 180, 41, 0.14);
  border-color: rgba(240, 180, 41, 0.62);
  color: #ffffff;
}

.billing-actions button[data-delete-billing]:hover {
  background: rgba(255, 84, 74, 0.18);
  border-color: rgba(255, 84, 74, 0.64);
  color: #ffb2ad;
}

.billing-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.status-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(130, 151, 184, 0.22);
  border-radius: 999px;
  color: #e7edf7;
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 5px 8px;
  white-space: nowrap;
}

.status-paid {
  background: rgba(87, 214, 141, 0.14);
  border-color: rgba(87, 214, 141, 0.42);
  color: #a7f2c2;
}

.status-overdue,
.status-cancelled {
  background: rgba(255, 84, 74, 0.16);
  border-color: rgba(255, 84, 74, 0.44);
  color: #ffb2ad;
}

.status-invoice_sent,
.status-partial {
  background: rgba(84, 214, 255, 0.14);
  border-color: rgba(84, 214, 255, 0.42);
  color: #9ce9ff;
}

.status-off {
  background: rgba(158, 172, 193, 0.12);
  color: #c8d2e2;
}

.billing-import {
  background: rgba(14, 24, 40, 0.9);
  border: 1px solid rgba(130, 151, 184, 0.22);
  border-radius: 8px;
  margin-bottom: 14px;
  padding: 12px;
}

.billing-import summary {
  color: #ffffff;
  cursor: pointer;
  font-weight: 900;
}

.billing-import p {
  color: #9eacc1;
  font-size: 13px;
}

.billing-import textarea {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #cdd6e5;
  border-radius: 8px;
  color: #172033;
  display: block;
  min-height: 140px;
  padding: 10px;
  resize: vertical;
  width: 100%;
}

.billing-modal-form {
  max-height: min(86vh, 760px);
  overflow: auto;
}

.billing-modal-form.wide {
  max-width: 760px;
}

.billing-modal-form .field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-modal-form .checkbox-field {
  color: #47546b;
}

.tv-shell {
  height: 100vh;
  overflow: hidden;
  padding: 14px;
}

.tv-summary {
  --tv-card-gap: 7px;
  --tv-card-padding: 6px 10px 6px 16px;
  --tv-column-gap: 8px;
  --tv-column-padding: 10px;
  --tv-heading-size: clamp(28px, 3.2vw, 50px);
  --tv-kicker-size: 12px;
  --tv-meta-size: clamp(14px, 1.25vw, 20px);
  --tv-pill-size: clamp(11px, 0.9vw, 14px);
  --tv-status-size: clamp(20px, 2vw, 32px);
  --tv-task-owner-size: clamp(13px, 1.05vw, 17px);
  --tv-task-title-size: clamp(16px, 1.35vw, 22px);
  display: grid;
  gap: 10px;
  grid-template-rows: auto minmax(0, 1fr);
  height: calc(100vh - 28px);
  margin: 0 auto;
  max-width: 1920px;
  overflow: hidden;
}

.tv-summary.tv-compact {
  --tv-card-gap: 5px;
  --tv-card-padding: 5px 9px 5px 14px;
  --tv-heading-size: clamp(24px, 2.6vw, 40px);
  --tv-meta-size: clamp(13px, 1.1vw, 17px);
  --tv-status-size: clamp(18px, 1.75vw, 27px);
  --tv-task-owner-size: clamp(12px, 0.95vw, 15px);
  --tv-task-title-size: clamp(14px, 1.15vw, 19px);
}

.tv-summary.tv-dense,
.tv-summary.tv-ultra {
  --tv-card-gap: 4px;
  --tv-card-padding: 3px 7px 3px 11px;
  --tv-column-gap: 6px;
  --tv-column-padding: 8px;
  --tv-heading-size: clamp(20px, 2vw, 30px);
  --tv-kicker-size: 10px;
  --tv-meta-size: clamp(12px, 0.95vw, 15px);
  --tv-pill-size: clamp(10px, 0.8vw, 12px);
  --tv-status-size: clamp(16px, 1.4vw, 23px);
  --tv-task-owner-size: clamp(11px, 0.85vw, 13px);
  --tv-task-title-size: clamp(13px, 1vw, 16px);
}

.tv-summary-header {
  align-items: end;
  display: flex;
  justify-content: space-between;
}

.tv-summary-header span {
  color: #f0b429;
  display: block;
  font-size: var(--tv-kicker-size);
  font-weight: 950;
  text-transform: uppercase;
}

.tv-summary-header h1 {
  color: #ffffff;
  font-size: var(--tv-heading-size);
  line-height: 1;
  margin: 2px 0 0;
}

.tv-summary-header strong {
  color: #c8d2e2;
  font-size: var(--tv-meta-size);
  line-height: 1.1;
  text-align: right;
}

.tv-summary-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 0;
}

.tv-column {
  background: rgba(14, 24, 40, 0.9);
  border: 1px solid rgba(130, 151, 184, 0.24);
  border-radius: 8px;
  display: grid;
  gap: var(--tv-column-gap);
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  padding: var(--tv-column-padding);
}

.tv-column-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.tv-column-title h2 {
  color: #ffffff;
  font-size: var(--tv-status-size);
  line-height: 1;
  margin: 0;
}

.tv-column-title span {
  background: #f0b429;
  border-radius: 999px;
  color: #07101d;
  font-size: var(--tv-meta-size);
  font-weight: 950;
  min-width: 34px;
  padding: 3px 9px;
  text-align: center;
}

.tv-task-list {
  display: grid;
  gap: var(--tv-card-gap);
  grid-template-rows: repeat(var(--tv-rows), minmax(0, 1fr));
  min-height: 0;
  overflow: hidden;
}

.tv-task {
  align-items: center;
  background:
    linear-gradient(90deg, var(--theme-accent) 0 5px, transparent 5px),
    rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(130, 151, 184, 0.18);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr) auto;
  min-height: 0;
  overflow: hidden;
  padding: var(--tv-card-padding);
}

.tv-task strong,
.tv-task span,
.tv-task b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tv-task strong {
  color: #ffffff;
  font-size: var(--tv-task-title-size);
  line-height: 1.1;
}

.tv-task span {
  color: #c8d2e2;
  font-size: var(--tv-task-owner-size);
  font-weight: 800;
}

.tv-task b {
  background: var(--theme-accent-soft);
  border: 1px solid var(--theme-accent);
  border-radius: 999px;
  color: #ffffff;
  font-size: var(--tv-pill-size);
  line-height: 1;
  padding: 5px 8px;
}

.tv-empty {
  align-items: center;
  color: #9eacc1;
  display: flex;
  font-size: clamp(18px, 1.8vw, 28px);
  justify-content: center;
  margin: 0;
}

@media (max-width: 900px) {
  .app-shell {
    padding: 14px;
  }

  .topbar,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar nav {
    justify-content: stretch;
  }

  .topbar nav button,
  .primary-button,
  .theme-tabs button {
    flex: 1 1 auto;
  }

  .columns,
  .member-form,
  .billing-filters,
  .billing-cards,
  .field-grid,
  .login-stage {
    grid-template-columns: 1fr;
  }

  .calendar-title {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-frame {
    min-height: 620px;
  }

  .login-stage {
    min-height: auto;
  }

  .login-visual {
    min-height: 300px;
    padding: 28px;
  }

  .login-visual img {
    max-width: 230px;
  }

  .login-visual-copy h1 {
    font-size: 34px;
  }

  .login-card {
    padding: 28px;
  }

  .tv-shell {
    padding: 12px;
  }

  .tv-summary {
    height: calc(100vh - 24px);
  }

  .tv-summary-grid {
    gap: 12px;
  }

  .tv-task {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}
