:root {
  --bg: #f6f8fb;
  --ink: #16202a;
  --muted: #647282;
  --line: #dbe4ee;
  --card: #ffffff;
  --teal: #0f766e;
  --teal-soft: #dff7f3;
  --green: #22a06b;
  --green-soft: #e6f8ee;
  --blue: #2563eb;
  --blue-soft: #e8f0ff;
  --gold: #f4a62a;
  --gold-soft: #fff3d9;
  --pink: #ec4899;
  --pink-soft: #ffe4f1;
  --cyan: #06b6d4;
  --cyan-soft: #def7ff;
  --orange: #fb7a2a;
  --red: #dc4c4c;
  --red-soft: #ffe7e7;
  --purple: #7c3aed;
  --purple-soft: #efe7ff;
  --shadow: 0 18px 45px rgba(30, 52, 76, 0.12);
  --shadow-3d: 0 22px 0 rgba(30, 52, 76, 0.06), 0 34px 70px rgba(30, 52, 76, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, #bdf8ed, transparent 34%),
    radial-gradient(circle at 12% 18%, #ffe4f1, transparent 28%),
    radial-gradient(circle at bottom left, #efe7ff, transparent 32%),
    linear-gradient(135deg, #f8fbff 0%, #fffaf2 100%),
    var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

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

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
  padding: 28px;
}

.screen {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
}

.screen.active {
  display: block;
}

.hero {
  min-height: 210px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-icon,
.card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-icon {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--blue), var(--pink));
  font-size: 24px;
  font-weight: 900;
  box-shadow: var(--shadow-3d);
  transform: rotate(-4deg);
}

.kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 5vw, 58px);
}

h2,
h3,
h4 {
  margin-bottom: 0;
}

.hero-copy {
  max-width: 430px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.install-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(520px, 100%);
  margin: -8px 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 14px;
  color: var(--ink);
  text-align: right;
  background: linear-gradient(135deg, rgba(223,247,243,0.92), rgba(255,228,241,0.84));
  box-shadow: 0 10px 24px rgba(30, 52, 76, 0.07);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.install-tip:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(30, 52, 76, 0.12);
}

.install-tip::after {
  content: "اختياري";
  flex: 0 0 auto;
  min-width: 64px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.install-tip strong,
.install-tip span {
  display: block;
}

.install-tip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.install-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(620px, 100%);
  margin: 0 0 22px;
}

.install-status div {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f8fbff);
  box-shadow: 0 8px 16px rgba(30, 52, 76, 0.05);
}

.install-status span,
.install-status strong {
  display: block;
}

.install-status span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.install-status strong {
  margin-top: 3px;
  font-size: 12px;
}

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

.role-card {
  min-height: clamp(150px, 18vw, 230px);
  display: grid;
  align-content: space-between;
  gap: 16px;
  padding: clamp(16px, 2vw, 24px);
  border: 0;
  border-radius: 22px;
  text-align: right;
  color: var(--ink);
  background: var(--card);
  box-shadow: var(--shadow-3d);
  transform: perspective(900px) rotateX(0deg) rotateY(0deg);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.role-card::after,
.panel::after,
.login-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.55), transparent 42%);
  opacity: 0.75;
}

.role-card > *,
.panel > *,
.login-card > * {
  position: relative;
  z-index: 1;
}

.role-card:hover {
  transform: perspective(900px) translateY(-7px) rotateX(3deg) rotateY(-3deg);
  box-shadow: 0 28px 0 rgba(30, 52, 76, 0.06), 0 42px 80px rgba(30, 52, 76, 0.22);
}

.role-card strong {
  font-size: clamp(18px, 2vw, 24px);
}

.role-card small {
  color: var(--muted);
  line-height: 1.7;
  font-size: clamp(12px, 1.2vw, 14px);
}

.role-card.owner {
  background: linear-gradient(160deg, #ffffff 0%, var(--teal-soft) 54%, var(--cyan-soft) 100%);
}

.role-card.service {
  background: linear-gradient(160deg, #ffffff 0%, var(--gold-soft) 54%, #ffe8d6 100%);
}

.role-card.finance {
  background: linear-gradient(160deg, #ffffff 0%, var(--blue-soft) 54%, var(--green-soft) 100%);
}

.role-card.admin {
  background: linear-gradient(160deg, #ffffff 0%, var(--purple-soft) 54%, var(--pink-soft) 100%);
}

.card-icon {
  width: clamp(44px, 5vw, 58px);
  height: clamp(44px, 5vw, 58px);
  border-radius: 16px;
  position: relative;
}

.home-icon {
  background: linear-gradient(145deg, var(--teal), var(--cyan));
}

.home-icon::before {
  content: "";
  width: 28px;
  height: 22px;
  background: #fff;
  clip-path: polygon(50% 0, 100% 38%, 100% 100%, 0 100%, 0 38%);
}

.headset-icon {
  background: linear-gradient(145deg, var(--gold), var(--orange));
}

.headset-icon::before {
  content: "";
  width: 30px;
  height: 24px;
  border: 5px solid #fff;
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
}

.chart-icon {
  background: linear-gradient(145deg, var(--blue), var(--green));
}

.chart-icon::before {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: conic-gradient(#fff 0 65%, rgba(255,255,255,0.35) 65% 100%);
}

.admin-icon {
  background: linear-gradient(145deg, var(--purple), var(--pink));
}

.admin-icon::before {
  content: "";
  width: 30px;
  height: 30px;
  border: 5px solid #fff;
  border-radius: 50%;
}

.login-card,
.panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.login-card {
  width: min(440px, 100%);
  margin: 72px auto;
  padding: 28px;
}

.login-card .card-icon {
  margin-bottom: 18px;
  background: var(--teal);
}

.hidden {
  display: none !important;
}

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
}

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

.login-note {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.login-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--teal);
  font-weight: 900;
  line-height: 1.6;
}

.login-status.error {
  color: var(--red);
}

.primary-action,
.secondary-action,
.danger-action,
.back-button,
.link-button,
.choice-card {
  border: 0;
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 16px;
  font-weight: 900;
}

.primary-action {
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #fff;
  box-shadow: 0 10px 18px rgba(6, 182, 212, 0.22);
}

.secondary-action {
  background: linear-gradient(135deg, #fff, #f3f8ff);
  border: 1px solid var(--line);
  color: var(--ink);
}

.login-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.login-card .secondary-action {
  width: 100%;
}

.danger-action {
  background: linear-gradient(135deg, var(--pink), var(--red));
  color: #fff;
  box-shadow: 0 10px 18px rgba(236, 72, 153, 0.24);
}

.back-button {
  background: linear-gradient(135deg, #fff, var(--teal-soft));
  border: 1px solid var(--line);
  color: var(--teal);
}

.link-button {
  background: transparent;
  color: var(--blue);
  padding-inline: 0;
}

.dashboard {
  display: none;
}

.dashboard.active {
  display: block;
}

.dashboard-top,
.panel-head,
.section-row,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.dashboard-top {
  margin-bottom: 18px;
}

.owner-layout,
.work-grid {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

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

.panel {
  padding: 22px;
  margin-bottom: 18px;
}

.panel.soft {
  background: linear-gradient(160deg, #fff, var(--blue-soft), var(--cyan-soft));
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.badge.demand {
  color: #8a154f;
  background: var(--pink-soft);
}

.badge.ok {
  color: #135c37;
  background: var(--green-soft);
}

.bank-card {
  margin: 18px 0;
  padding: 20px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #102a63, var(--blue));
  box-shadow: 0 18px 0 rgba(236, 72, 153, 0.08), 0 28px 48px rgba(30, 52, 76, 0.16);
  transform: perspective(700px) rotateX(2deg);
}

.bank-card.debt-card {
  background: linear-gradient(135deg, #be185d, var(--pink), #fb7185);
}

.bank-card.credit-card {
  color: #135c37;
  background: linear-gradient(135deg, #d9fbe7, var(--green-soft), #f4fff8);
}

.bank-card.clear-card {
  color: #135c37;
  background: linear-gradient(135deg, #bbf7d0, var(--green-soft), #f4fff8);
}

.bank-card span,
.bank-card strong {
  display: block;
}

.bank-card strong {
  margin-top: 8px;
  font-size: 32px;
}

.mini-card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.owner-extra-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.mini-card-row div,
.owner-extra-row div,
.stacked-metrics div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f7fbff);
  box-shadow: 0 12px 24px rgba(30, 52, 76, 0.08);
}

.mini-card-row span,
.mini-card-row strong,
.owner-extra-row span,
.owner-extra-row strong,
.stacked-metrics span,
.stacked-metrics strong {
  display: block;
}

.mini-card-row span,
.owner-extra-row span,
.stacked-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.mini-card-row strong,
.owner-extra-row strong,
.stacked-metrics strong {
  margin-top: 6px;
  font-size: 22px;
}

.owner-extra-row div:first-child {
  background: linear-gradient(145deg, var(--cyan-soft), #fff);
}

.owner-extra-row div:last-child {
  background: linear-gradient(145deg, var(--gold-soft), #fff);
}

.dues-list,
.stacked-metrics,
.integration-list,
.admin-actions {
  display: grid;
  gap: 10px;
}

.dues-list div,
.integration-list div {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #f8fbff);
  box-shadow: 0 10px 20px rgba(30, 52, 76, 0.06);
}

.dues-list div {
  display: flex;
  justify-content: space-between;
}

.owner-contact-card {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #ffc48f;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff7ed, var(--pink-soft));
}

.owner-contact-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
}

.owner-contact-card p,
.inline-request p,
.pie-summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.payment-methods {
  margin: 16px 0;
}

.method-grid,
.report-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.method-grid div,
.report-cards div,
.inline-request {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, #f8fbff);
  box-shadow: 0 12px 24px rgba(30, 52, 76, 0.08);
}

.method-grid span,
.method-grid strong,
.report-cards span,
.report-cards strong,
.report-cards small {
  display: block;
}

.method-grid span,
.report-cards span,
.report-cards small {
  color: var(--muted);
  font-size: 13px;
}

.method-grid strong,
.report-cards strong {
  margin-top: 6px;
  font-size: 18px;
}

.inline-request {
  margin: 14px 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.inline-request:not(.hidden) {
  display: grid;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

th {
  background: #eef4fb;
  color: var(--muted);
  font-size: 13px;
}

.choice-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.choice-card {
  background: linear-gradient(145deg, #fff, #f8fbff);
  border: 1px solid var(--line);
  font-size: 18px;
  box-shadow: 0 12px 22px rgba(30, 52, 76, 0.08);
}

.choice-card.active {
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #fff;
}

.service-tab,
.finance-detail {
  display: none;
}

.service-tab.active,
.finance-detail.active {
  display: block;
}

.debt-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #ffc48f;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff6ea, var(--pink-soft));
  box-shadow: 0 14px 24px rgba(244, 166, 42, 0.13);
}

.debt-alert strong,
.debt-alert span {
  display: block;
}

.debt-alert span {
  color: var(--muted);
  margin-top: 4px;
}

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

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  background: #eef4fb;
}

.segmented-control button {
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-weight: 900;
  color: var(--muted);
}

.segmented-control button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 10px 18px rgba(6, 182, 212, 0.2);
}

.span-2 {
  grid-column: 1 / -1;
}

.compact-field {
  min-width: 180px;
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.finance-card {
  min-height: 110px;
  padding: 18px;
  border: 0;
  border-radius: 18px;
  text-align: right;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.65), 0 16px 30px rgba(30, 52, 76, 0.09);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.finance-card:hover:not(:disabled) {
  transform: translateY(-5px) perspective(700px) rotateX(3deg);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.65), 0 24px 46px rgba(30, 52, 76, 0.16);
}

.finance-card span,
.finance-card strong {
  display: block;
}

.finance-card strong {
  margin-top: 10px;
  font-size: 28px;
}

.finance-card.income {
  background: linear-gradient(145deg, var(--green-soft), #f8fff4);
}

.finance-card.expense {
  background: linear-gradient(145deg, var(--red-soft), var(--pink-soft));
}

.finance-card.net {
  background: linear-gradient(145deg, var(--blue-soft), var(--cyan-soft));
}

.finance-card.debt {
  background: linear-gradient(145deg, var(--gold-soft), #fff8ed);
}

.finance-card.active {
  outline: 3px solid var(--teal);
}

.report-panel {
  background:
    radial-gradient(circle at 10% 10%, var(--cyan-soft), transparent 25%),
    radial-gradient(circle at 90% 0, var(--pink-soft), transparent 26%),
    rgba(255,255,255,0.94);
}

.report-cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0;
}

.report-cards div {
  min-height: 118px;
}

.report-cards strong {
  font-size: 28px;
}

.star-card {
  background: linear-gradient(145deg, #fef9c3, var(--green-soft)) !important;
  box-shadow: 0 16px 30px rgba(34, 160, 107, 0.16) !important;
}

.bar-chart-panel {
  margin-top: 14px;
}

.bar-chart-3d {
  height: 270px;
  display: grid;
  grid-template-columns: repeat(7, minmax(64px, 1fr));
  align-items: end;
  gap: 18px;
  padding: 22px 18px 36px;
  border-radius: 20px;
  background: linear-gradient(145deg, #ffffff, #eef7ff);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7), 0 20px 42px rgba(30,52,76,0.11);
  overflow-x: auto;
}

.bar-chart-3d div {
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 7px;
  position: relative;
}

.bar-chart-3d span,
.bar-chart-3d b {
  display: block;
  width: 22px;
  border-radius: 9px 9px 4px 4px;
  transform: skewX(-8deg);
  box-shadow: 8px 8px 0 rgba(30,52,76,0.08), 0 12px 20px rgba(30,52,76,0.16);
  position: relative;
}

.bar-chart-3d span {
  height: var(--income);
  background: linear-gradient(180deg, #5eead4, var(--green));
}

.bar-chart-3d b {
  height: var(--expense);
  background: linear-gradient(180deg, #fda4af, var(--red));
}

.bar-chart-3d span::before,
.bar-chart-3d b::before {
  content: attr(data-value);
  position: absolute;
  left: 50%;
  top: -30px;
  min-width: 46px;
  padding: 4px 6px;
  border-radius: 999px;
  color: #fff;
  background: rgba(22, 32, 42, 0.82);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  transform: translateX(-50%) skewX(8deg);
  box-shadow: 0 8px 14px rgba(30,52,76,0.18);
}

.bar-chart-3d b::before {
  top: -52px;
  background: rgba(138, 21, 79, 0.86);
}

.bar-chart-3d small {
  position: absolute;
  bottom: -28px;
  color: var(--muted);
  font-weight: 800;
  font-size: 12px;
}

.chart-key {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 800;
}

.visual-layout {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  align-items: center;
  margin: 16px 0 20px;
}

.pie {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 18px #fff, 0 22px 0 rgba(30, 52, 76, 0.06), var(--shadow);
  transform: perspective(650px) rotateX(8deg);
  position: relative;
}

.income-pie {
  background: conic-gradient(var(--green) 0 60%, var(--blue) 60% 85%, var(--gold) 85% 100%);
}

.expense-pie {
  background: conic-gradient(var(--red) 0 48%, var(--blue) 48% 76%, var(--gold) 76% 100%);
}

.legend {
  display: grid;
  gap: 12px;
}

.labeled-pie {
  width: 220px;
  height: 220px;
}

.pie-label {
  position: absolute;
  min-width: 74px;
  padding: 6px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(22, 32, 42, 0.78);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 8px 16px rgba(30, 52, 76, 0.18);
}

.pie-label.l1 { top: 42px; right: 16px; }
.pie-label.l2 { left: -4px; top: 92px; }
.pie-label.l3 { bottom: 30px; right: 46px; }

.pie-summary {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, var(--blue-soft));
}

.legend div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, #fff, #f8fbff);
  box-shadow: 0 10px 20px rgba(30, 52, 76, 0.06);
}

.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: inline-block;
  margin-left: 8px;
}

.dot.green { background: var(--green); }
.dot.blue { background: var(--blue); }
.dot.gold { background: var(--gold); }
.dot.red { background: var(--red); }

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #f3f8ff;
}

.unit-debt-box {
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  background: var(--gold-soft);
  color: #6d4300;
  font-weight: 800;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status-chip.warning {
  color: #8a154f;
  background: var(--pink-soft);
}

.status-chip.neutral {
  color: #144b7f;
  background: var(--blue-soft);
}

.status-chip.star {
  color: #135c37;
  background: #dcfce7;
}

tr.committed {
  background: linear-gradient(90deg, #f0fdf4, #fffbea);
}

.admin-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-actions button {
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #fff, var(--purple-soft));
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(30, 52, 76, 0.08);
  transition: transform 0.18s ease;
}

.admin-actions button:hover {
  transform: translateY(-4px);
}

.setting-field {
  margin-top: 18px;
}

.integration-list strong,
.integration-list span {
  display: block;
}

.integration-list span {
  color: var(--muted);
  margin-top: 4px;
}

@media (max-width: 980px) {
  .role-grid,
  .finance-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-grid,
  .report-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .owner-layout,
  .work-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .app {
    padding: 12px;
  }

  .choice-strip,
  .finance-cards,
  .mini-card-row,
  .owner-extra-row,
  .method-grid,
  .report-cards,
  .entry-form,
  .inline-request,
  .visual-layout,
  .admin-actions {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    margin-bottom: 14px;
    gap: 12px;
  }

  .brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    font-size: 18px;
  }

  h1 {
    font-size: 28px;
  }

  .hero-copy {
    font-size: 14px;
    line-height: 1.6;
  }

  .install-tip {
    align-items: stretch;
    flex-direction: row;
    margin-bottom: 10px;
  }

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

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

  .role-card {
    min-height: 138px;
    gap: 10px;
    padding: 14px;
    border-radius: 18px;
  }

  .role-card small {
    display: none;
  }

  .role-card strong {
    font-size: 17px;
  }

  .card-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .panel-head,
  .dashboard-top,
  .debt-alert,
  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .login-actions {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 380px) {
  .role-card {
    min-height: 122px;
    padding: 12px;
  }

  .role-card strong {
    font-size: 15px;
  }
}
