:root {
  --app-bg: #f5f7fb;
  --app-surface: #ffffff;
  --app-surface-muted: #eef4f7;
  --app-border: #d9e1e7;
  --app-text: #17212b;
  --app-muted: #647483;
  --app-primary: #0f766e;
  --app-primary-dark: #115e59;
  --app-primary-soft: #d8f3ef;
  --app-accent: #d85f4f;
  --app-shadow: 0 18px 45px rgba(23, 33, 43, 0.08);
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  min-height: 100vh;
  margin-bottom: 0;
  color: var(--app-text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.08), transparent 28rem),
    linear-gradient(180deg, #fbfcfd 0%, var(--app-bg) 44rem);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--app-primary);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-main {
  flex: 1;
  padding-top: 1.4rem;
  padding-bottom: 3rem;
}

.app-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(217, 225, 231, 0.9);
  box-shadow: 0 8px 28px rgba(23, 33, 43, 0.06);
  backdrop-filter: blur(14px);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  color: var(--app-text);
  letter-spacing: 0;
}

.app-brand:hover {
  color: var(--app-text);
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--app-primary), #154b7a);
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.25);
}

.navbar .nav-link {
  border-radius: 8px;
  padding-inline: 0.8rem;
  color: var(--app-muted) !important;
  font-weight: 650;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .dropdown-toggle.show {
  color: var(--app-primary-dark) !important;
  background: var(--app-primary-soft);
}

.dropdown-menu {
  border: 1px solid var(--app-border);
  border-radius: 8px;
  box-shadow: var(--app-shadow);
}

.dropdown-item {
  font-weight: 600;
  color: var(--app-text);
}

.dropdown-item:active,
.dropdown-item:hover {
  color: var(--app-primary-dark);
  background: var(--app-primary-soft);
}

.app-footer {
  background: #fff;
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 27rem;
  display: grid;
  align-items: center;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: #0f2f35;
  box-shadow: var(--app-shadow);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 35, 39, 0.94) 0%, rgba(11, 35, 39, 0.76) 42%, rgba(11, 35, 39, 0.08) 100%),
    url("/img/taskinator-hero.png") right center / cover no-repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 36rem;
  padding: clamp(2rem, 5vw, 4.5rem);
  color: #fff;
}

.hero-kicker,
.section-kicker {
  color: var(--app-accent);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-content h1,
.page-title h1 {
  font-weight: 800;
  letter-spacing: 0;
}

.hero-content .lead {
  color: rgba(255, 255, 255, 0.82);
}

.hero-copy {
  max-width: 31rem;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.04rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.marketing-panel {
  margin-top: 1.4rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.marketing-copy {
  max-width: 55rem;
}

.marketing-copy h2 {
  max-width: 48rem;
  margin: 0.35rem 0 0;
  color: var(--app-text);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.16;
}

.marketing-copy p {
  margin: 0.8rem 0 0;
  color: var(--app-muted);
  font-size: 1.02rem;
  line-height: 1.7;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 1.25rem;
}

.benefit-tile {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.95rem;
  border-radius: 8px;
  background: var(--app-surface-muted);
}

.benefit-tile span {
  color: var(--app-primary);
  font-weight: 900;
}

.benefit-tile p {
  margin: 0;
  color: var(--app-text);
  font-weight: 700;
  line-height: 1.45;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.plan-card {
  padding: 1.1rem;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(23, 33, 43, 0.05);
}

.plan-card-featured {
  border-color: rgba(15, 118, 110, 0.45);
  background:
    linear-gradient(180deg, rgba(216, 243, 239, 0.58), rgba(255, 255, 255, 0.94) 46%),
    #fff;
}

.plan-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.plan-card h3 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 850;
  letter-spacing: 0;
}

.plan-card-header span {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: var(--app-primary-dark);
  background: var(--app-primary-soft);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.plan-card p {
  margin: 0.75rem 0 0;
  color: var(--app-muted);
  line-height: 1.55;
}

.plan-card ul {
  display: grid;
  gap: 0.55rem;
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
}

.plan-card li {
  position: relative;
  padding-left: 1.05rem;
  color: var(--app-text);
  font-weight: 700;
  line-height: 1.45;
}

.plan-card li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--app-accent);
  font-weight: 900;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-title p,
.text-muted {
  color: var(--app-muted) !important;
}

.surface-card,
.card {
  border: 1px solid var(--app-border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(23, 33, 43, 0.05);
}

.surface-card {
  background: var(--app-surface);
}

.invite-card {
  border-left: 4px solid var(--app-primary);
}

.empty-state {
  display: grid;
  gap: 0.35rem;
  place-items: center;
  min-height: 11rem;
  padding: 2rem;
  text-align: center;
  color: var(--app-muted);
  background: var(--app-surface);
  border: 1px dashed #bfd0d7;
  border-radius: 8px;
}

.empty-state::before {
  content: "";
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 8px;
  background:
    linear-gradient(var(--app-surface), var(--app-surface)) padding-box,
    linear-gradient(135deg, var(--app-primary), var(--app-accent)) border-box;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 8px var(--app-primary-soft);
}

.table-panel {
  overflow: hidden;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.table {
  margin-bottom: 0;
}

.table thead th {
  color: var(--app-muted);
  background: #f7fafb;
  border-bottom: 1px solid var(--app-border);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table tbody tr:hover {
  background: #fbfdfd;
}

.badge {
  border-radius: 999px;
  font-weight: 700;
}

.btn {
  border-radius: 8px;
  font-weight: 750;
}

.btn-primary {
  background: var(--app-primary);
  border-color: var(--app-primary);
  box-shadow: 0 10px 20px rgba(15, 118, 110, 0.18);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--app-primary-dark);
  border-color: var(--app-primary-dark);
}

.btn-apk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: #f7fffd;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, rgba(216, 95, 79, 0.98), rgba(15, 118, 110, 0.98));
  box-shadow: 0 14px 28px rgba(18, 42, 48, 0.2);
}

.btn-apk:hover,
.btn-apk:focus {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.38);
  filter: saturate(1.05) brightness(1.02);
}

.btn-apk-icon {
  width: 1.15em;
  height: 1.15em;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.btn-apk-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.btn-outline-primary {
  color: var(--app-primary);
  border-color: #89bcb6;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: #fff;
  background: var(--app-primary);
  border-color: var(--app-primary);
}

.btn-success {
  background: #16724f;
  border-color: #16724f;
}

.form-control,
.form-select {
  border-color: #cbd7dd;
  border-radius: 8px;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus {
  border-color: var(--app-primary);
  box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.16);
}

.form-check-input:checked {
  background-color: var(--app-primary);
  border-color: var(--app-primary);
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.proof-image {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.assigned-task-actions {
  min-width: min(100%, 18rem);
  display: grid;
  gap: 0.55rem;
  justify-items: end;
}

.photo-proof-form {
  width: min(100%, 18rem);
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) auto;
  gap: 0.45rem;
  align-items: start;
}

.photo-proof-camera,
.photo-proof-form [data-proof-error],
.photo-proof-preview {
  grid-column: 1 / -1;
}

.photo-proof-camera {
  display: grid;
  gap: 0.45rem;
}

.photo-proof-video,
.photo-proof-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--app-border);
  border-radius: 8px;
  background: #0f172a;
}

.photo-proof-camera-actions {
  display: flex;
  gap: 0.45rem;
  justify-content: flex-end;
}

.photo-proof-form [data-proof-error] {
  text-align: start;
}

@media (max-width: 767.98px) {
  .app-main {
    padding-top: 0.75rem;
  }

  .hero-panel {
    min-height: 31rem;
  }

  .hero-panel::before {
    background:
      linear-gradient(180deg, rgba(11, 35, 39, 0.95) 0%, rgba(11, 35, 39, 0.78) 56%, rgba(11, 35, 39, 0.16) 100%),
      url("/img/taskinator-hero.png") center bottom / cover no-repeat;
  }

  .dashboard-header {
    display: block;
  }

  .dashboard-actions {
    margin-top: 1rem;
    flex-wrap: wrap;
  }

  .dashboard-actions .btn,
  .dashboard-actions form {
    width: 100%;
  }

  .benefit-grid,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .table-panel {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .responsive-table {
    display: block;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tbody {
    display: grid;
    gap: 0.8rem;
  }

  .responsive-table tr {
    display: grid;
    gap: 0.65rem;
    padding: 0.95rem;
    border: 1px solid var(--app-border);
    border-radius: 8px;
    background: var(--app-surface);
    box-shadow: 0 10px 30px rgba(23, 33, 43, 0.05);
  }

  .responsive-table tbody tr:hover {
    background: var(--app-surface);
  }

  .responsive-table td {
    display: grid;
    grid-template-columns: minmax(6.25rem, 38%) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0;
    border: 0;
    overflow-wrap: anywhere;
  }

  .responsive-table td::before {
    content: attr(data-cell);
    color: var(--app-muted);
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1.35;
    text-transform: uppercase;
  }

  .responsive-table .table-actions-cell {
    display: block;
    padding-top: 0.2rem;
  }

  .responsive-table .table-actions-cell::before {
    content: none;
  }

  .responsive-table .table-actions-cell .btn {
    width: 100%;
  }

  .assigned-task-actions {
    justify-items: stretch;
  }

  .photo-proof-form {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .photo-proof-camera-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}
