:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #eef3f8;
  --ink: #172033;
  --muted: #6a7486;
  --line: #dbe3ef;
  --blue: #1667d9;
  --blue-2: #e6f0ff;
  --green: #0f9f6e;
  --green-2: #e7f8f1;
  --amber: #b7791f;
  --amber-2: #fff6dd;
  --red: #d54747;
  --red-2: #ffeded;
  --slate: #263245;
  --shadow: 0 12px 32px rgba(24, 35, 58, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #121b2d;
  color: #eef4ff;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  gap: 24px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  color: #101827;
  border-radius: 8px;
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand span {
  color: #9eabc0;
  font-size: 13px;
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  border: 0;
  color: #cfd7e6;
  background: transparent;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 12px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 11px;
  transition: background 160ms ease, color 160ms ease;
}

.nav-item span {
  width: 22px;
  text-align: center;
  color: #8fa0ba;
}

.nav-item:hover,
.nav-item.active {
  background: #22314c;
  color: #ffffff;
}

.nav-item.active span {
  color: #56a2ff;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.sidebar-footer span,
.sidebar-footer strong {
  display: block;
}

.sidebar-footer span {
  color: #9eabc0;
  font-size: 12px;
  text-transform: uppercase;
}

.sidebar-footer strong {
  margin-top: 4px;
}

.workspace {
  min-width: 0;
  padding: 24px;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.12;
}

h2 {
  font-size: 22px;
  margin-bottom: 4px;
}

h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.topbar-actions,
.row-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.danger-button,
.ghost-button,
.icon-button {
  border: 0;
  min-height: 38px;
  border-radius: 8px;
  font-weight: 700;
}

.primary-button {
  background: var(--blue);
  color: #fff;
  padding: 0 16px;
  box-shadow: 0 8px 18px rgba(22, 103, 217, 0.22);
}

a.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

a.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.secondary-button {
  background: var(--panel-2);
  color: var(--slate);
  padding: 0 14px;
}

.danger-button {
  background: var(--red-2);
  color: var(--red);
  padding: 0 14px;
}

.ghost-button {
  background: transparent;
  color: var(--blue);
  padding: 0 10px;
}

.icon-button {
  width: 38px;
  display: grid;
  place-items: center;
  background: var(--panel);
  color: var(--slate);
  border: 1px solid var(--line);
}

.grid {
  display: grid;
  gap: 16px;
}

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

.grid.two {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

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

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card.pad {
  padding: 18px;
}

.stat-card {
  padding: 16px;
  min-height: 116px;
  text-align: left;
}

.stat-link {
  width: 100%;
  color: inherit;
  transition: transform 160ms ease, border-color 160ms ease;
}

.stat-link:hover {
  border-color: #b8c8dd;
  transform: translateY(-1px);
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  font-size: 30px;
  margin: 10px 0 8px;
}

.stat-card small {
  color: var(--muted);
}

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

.city-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 14px;
  scrollbar-width: thin;
}

.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 14px;
  scrollbar-width: thin;
}

.filter-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--slate);
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  font-weight: 800;
}

.filter-chip.active {
  border-color: var(--blue);
  background: var(--blue-2);
  color: var(--blue);
}

.search {
  min-width: 240px;
  max-width: 360px;
  width: 100%;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

td {
  font-size: 14px;
}

tbody tr:hover {
  background: #f8fbff;
}

.muted {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.green {
  color: var(--green);
  background: var(--green-2);
}

.pill.amber {
  color: var(--amber);
  background: var(--amber-2);
}

.pill.red {
  color: var(--red);
  background: var(--red-2);
}

.pill.blue {
  color: var(--blue);
  background: var(--blue-2);
}

.pill.gray {
  color: #596579;
  background: #edf1f6;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.clickable,
.clickable-row {
  cursor: pointer;
}

.clickable:hover,
.clickable-row:hover {
  background: #f8fbff;
}

.list-item-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.list-item strong {
  display: block;
}

.list-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

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

.field-grid.one {
  grid-template-columns: 1fr;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  color: #354158;
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd9e8;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  min-height: 42px;
  padding: 0 12px;
  outline: none;
}

textarea {
  padding-top: 11px;
  min-height: 96px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(22, 103, 217, 0.12);
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 39, 0.42);
  z-index: 40;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(720px, 100vw);
  height: 100vh;
  background: #fff;
  z-index: 50;
  box-shadow: -18px 0 40px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

#drawerBody {
  overflow: auto;
  padding: 22px;
}

.hidden {
  display: none;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  overflow-x: auto;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
}

.calendar-scroll {
  overflow-x: auto;
  padding-bottom: 2px;
}

.calendar-scroll .calendar-grid {
  min-width: 840px;
}

.calendar-weekdays {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.calendar-weekdays div {
  padding: 10px;
  background: #f8fbff;
  border-right: 1px solid var(--line);
}

.calendar-weekdays div:last-child {
  border-right: 0;
}

.calendar-day {
  min-height: 138px;
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.calendar-day:nth-child(7n + 1) {
  border-left: 1px solid var(--line);
}

.calendar-day:nth-last-child(-n + 7):first-child,
.calendar-day:nth-last-child(-n + 7):first-child ~ .calendar-day {
  border-bottom: 1px solid var(--line);
}

.calendar-day.muted-day {
  background: #f4f7fb;
  color: #8a94a6;
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px rgba(22, 103, 217, 0.32);
}

.calendar-date {
  font-weight: 900;
  margin-bottom: 8px;
}

.calendar-events {
  display: grid;
  gap: 6px;
}

.calendar-event {
  width: 100%;
  border: 1px solid #c9dcf8;
  background: var(--blue-2);
  color: #174d9a;
  border-radius: 6px;
  padding: 7px;
  text-align: left;
  display: grid;
  gap: 2px;
  min-height: 0;
}

.calendar-event.company-cym {
  border-color: #bfd7ff;
  background: #edf5ff;
  color: #1554a2;
}

.calendar-event.company-promove {
  border-color: #ffc9c9;
  background: #fff1f1;
  color: #b4232a;
}

.calendar-event.company-memorias {
  border-color: #ffd7a8;
  background: #fff6e8;
  color: #a14d08;
}

.calendar-event strong,
.calendar-event span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event strong {
  font-size: 12px;
}

.calendar-event span {
  font-size: 12px;
}

.kanban-column {
  background: #edf2f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  min-height: 360px;
}

.kanban-column h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.assignment {
  background: #fbfdff;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 10px;
  position: relative;
}

.project-scale-card {
  background: #ffffff;
  border: 1px solid #cfdced;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
}

.scale-project-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  padding: 14px;
}

.scale-project-header strong,
.scale-project-header small {
  display: block;
}

.scale-project-header small {
  color: var(--muted);
  margin-top: 4px;
}

.assignment-group-label {
  background: #f4f8fd;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  padding: 9px 14px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}

.assignment-group {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #f8fbff;
}

.assignment-group .assignment::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 22px;
  width: 10px;
  height: 1px;
  background: #b8c8dc;
}

.assignment-list {
  display: grid;
  gap: 10px;
}

.assignment-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.assignment-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue-2);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.assignment-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
}

.assignment-line strong,
.assignment-line small {
  display: block;
}

.assignment-line small {
  color: var(--muted);
  margin-top: 3px;
}

.payment-project-list {
  display: grid;
  gap: 12px;
}

.payment-project {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  overflow: hidden;
}

.payment-project-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.payment-project-header h3 {
  margin: 3px 0 4px;
}

.payment-project-header p {
  margin: 0;
  color: var(--muted);
}

.payment-summary {
  display: grid;
  justify-items: end;
  gap: 5px;
  min-width: 130px;
}

.payment-summary strong {
  font-size: 20px;
}

.payment-summary small {
  color: var(--muted);
}

.payment-photographer-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.payment-photographer {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(260px, auto);
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  padding: 12px;
}

.payment-status-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.detail-view {
  display: grid;
  gap: 14px;
}

.detail-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

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

.detail-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
}

.detail-grid span,
.detail-grid strong {
  display: block;
}

.detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.message-preview,
.email-preview {
  white-space: pre-wrap;
  background: #0f172a;
  color: #e5eefc;
  border-radius: 8px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.55;
  overflow: auto;
}

.empty {
  border: 1px dashed #c5d0df;
  border-radius: 8px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: 18px;
  min-height: 18px;
}

.public-page {
  min-height: 100vh;
  background: #101827;
}

.login-page {
  min-height: 100vh;
  background: #101827;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(420px, 100%);
}

.login-card {
  background: #fff;
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.brand.compact {
  color: var(--ink);
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}

.brand.compact span {
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 14px;
}

.public-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.15fr);
}

.public-hero {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(18, 27, 45, 0.96), rgba(18, 27, 45, 0.78)),
    linear-gradient(45deg, #111827, #17345c);
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
}

.public-brand {
  padding: 0;
  border-bottom: 0;
}

.public-hero h1 {
  max-width: 560px;
  font-size: 44px;
  line-height: 1.04;
  margin-bottom: 18px;
}

.public-copy {
  max-width: 520px;
  color: #c8d3e4;
  font-size: 17px;
  line-height: 1.55;
}

.public-notes {
  display: grid;
  gap: 12px;
}

.public-notes div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.public-notes strong {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: #101827;
}

.public-notes span {
  color: #d8e2f1;
}

.public-card {
  background: #ffffff;
  padding: 36px;
  overflow: auto;
}

.form-section {
  max-width: 780px;
}

.public-checkbox {
  margin-top: 14px;
  align-items: flex-start;
  line-height: 1.45;
}

.public-actions {
  max-width: 780px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.success-panel {
  max-width: 620px;
  min-height: 520px;
  display: grid;
  align-content: center;
  justify-items: start;
}

.success-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green-2);
  color: var(--green);
  font-size: 30px;
  font-weight: 900;
  margin-bottom: 18px;
}

.success-panel p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.success-panel small {
  color: var(--muted);
}

@media (max-width: 1020px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 12px;
    overflow: hidden;
  }

  .brand,
  .sidebar-footer {
    display: none;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    max-width: 100%;
    min-width: 0;
    scrollbar-width: thin;
  }

  .nav-item {
    flex: 0 0 auto;
  }

  .workspace {
    padding: 16px;
  }

  .grid.stats,
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .public-shell {
    grid-template-columns: 1fr;
  }

  .public-hero {
    padding: 28px;
  }

  .public-hero h1 {
    font-size: 34px;
  }

  .public-card {
    padding: 24px;
  }

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

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions > * {
    flex: 1 1 auto;
  }

  .payment-photographer {
    grid-template-columns: 1fr;
  }

  .payment-status-group {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 24px;
  }

  .field-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .topbar-actions,
  .form-actions,
  .row-actions {
    width: 100%;
  }

  .primary-button,
  .secondary-button,
  .danger-button {
    flex: 1 1 auto;
  }

  .kanban {
    grid-template-columns: minmax(240px, 1fr);
  }

  .calendar-day {
    min-height: 116px;
  }

  .payment-project-header {
    display: grid;
  }

  .payment-summary {
    justify-items: start;
  }
}
