.photo-cakes-main {
  background: #f6f7f4;
}

.photo-cakes-page,
.photo-cakes-page button,
.photo-cakes-page input,
.photo-cakes-page select,
.photo-cakes-page textarea {
  font-family: "Poppins", sans-serif;
}

.photo-cakes-page {
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 64px;
  color: #11130f;
}

.photo-cake-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 30px 34px;
  border: 1px solid #d9ddd4;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f7f1dd 100%);
  box-shadow: 0 14px 40px rgba(31, 38, 24, 0.08);
}

.photo-cake-hero h1 {
  margin: 4px 0 8px;
  color: #090a08;
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 900;
  line-height: 1.05;
}

.photo-cake-hero p {
  max-width: 780px;
  margin: 0;
  color: #22261f;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.65;
}

.photo-cake-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid #1d2419;
  border-radius: 12px;
  color: #11130f;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.photo-cake-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.photo-cake-summary article {
  min-width: 0;
  padding: 20px 22px;
  border: 1px solid #d7dbd2;
  border-radius: 18px;
  background: #fff;
}

.photo-cake-summary article.is-new {
  border-color: #9f7516;
  background: #fff9e9;
}

.photo-cake-summary article.is-danger {
  border-color: #b93831;
  background: #fff0ee;
}

.photo-cake-summary span,
.photo-cake-facts span,
.photo-cake-scope span {
  display: block;
  color: #363b32;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
}

.photo-cake-summary strong {
  display: block;
  margin: 4px 0 0;
  color: #0a0b09;
  font-size: 36px;
  font-weight: 900;
}

.photo-cake-summary small {
  color: #33382f;
  font-size: 13px;
  font-weight: 600;
}

.photo-cake-controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border: 1px solid #d7dbd2;
  border-radius: 16px;
  background: #fff;
}

.photo-cake-branch-filter,
.photo-cake-scope {
  width: min(360px, 100%);
}

.photo-cake-branch-filter label,
.photo-cake-work label,
.photo-cake-manage label {
  display: grid;
  gap: 7px;
  color: #171a15;
  font-size: 14px;
  font-weight: 750;
}

.photo-cakes-page input,
.photo-cakes-page select,
.photo-cakes-page textarea {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #a9b0a3;
  border-radius: 10px;
  color: #080908;
  background: #fff;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.45;
}

.photo-cakes-page textarea {
  min-height: 96px;
  resize: vertical;
}

.photo-cakes-page input:focus,
.photo-cakes-page select:focus,
.photo-cakes-page textarea:focus,
.photo-cakes-page button:focus-visible,
.photo-cakes-page a:focus-visible,
.photo-cakes-page summary:focus-visible {
  outline: 3px solid rgba(158, 113, 11, 0.32);
  outline-offset: 2px;
  border-color: #79570c;
}

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

.photo-cake-tabs a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid #c9cec4;
  border-radius: 12px;
  color: #20241d;
  background: #f7f8f5;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.photo-cake-tabs a.active {
  border-color: #1b2118;
  color: #fff;
  background: #1b2118;
}

.photo-cake-list {
  display: grid;
  gap: 18px;
}

.photo-cake-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d3d8cd;
  border-left: 6px solid #b48a28;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(25, 31, 21, 0.06);
}

.photo-cake-card.status-contacted,
.photo-cake-card.status-design {
  border-left-color: #3976a6;
}

.photo-cake-card.status-approved,
.photo-cake-card.status-printed {
  border-left-color: #3e7a45;
}

.photo-cake-card.status-delivered {
  border-left-color: #2e6c3b;
  opacity: 0.9;
}

.photo-cake-card.status-canceled {
  border-left-color: #71766d;
  background: #f5f6f3;
}

.photo-cake-card.is-overdue {
  border-color: #bd4037;
  border-left-color: #bd4037;
  box-shadow: 0 12px 34px rgba(157, 38, 30, 0.12);
}

.photo-cake-card-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 16px;
}

.photo-cake-status,
.photo-cake-alert,
.photo-cake-warning,
.photo-cake-branch-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  margin: 0 6px 6px 0;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.photo-cake-status {
  color: #342707;
  background: #f8df9f;
}

.photo-cake-alert {
  color: #fff;
  background: #a92d26;
}

.photo-cake-warning {
  color: #622f05;
  background: #ffd9b7;
}

.photo-cake-branch-badge {
  flex: 0 0 auto;
  color: #18321b;
  background: #dcebdc;
}

.photo-cake-card-head h2 {
  margin: 5px 0;
  color: #090a08;
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 850;
  line-height: 1.25;
}

.photo-cake-card-head p {
  margin: 0;
  color: #292e26;
  font-size: 14px;
  line-height: 1.55;
}

.photo-cake-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 24px 20px;
}

.photo-cake-facts > div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #e0e3dc;
  border-radius: 12px;
  background: #f8f9f7;
}

.photo-cake-facts strong {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 4px;
  color: #10120f;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

.danger-text {
  color: #a12822 !important;
}

.photo-cake-work,
.photo-cake-manage,
.photo-cake-history {
  border-top: 1px solid #dfe3da;
}

.photo-cake-work > summary,
.photo-cake-manage > summary,
.photo-cake-history > summary {
  min-height: 48px;
  padding: 14px 24px;
  color: #11130f;
  background: #fbfcfa;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  list-style-position: inside;
}

.photo-cake-work[open] > summary,
.photo-cake-manage[open] > summary,
.photo-cake-history[open] > summary {
  background: #f3f6ef;
}

.photo-cake-work form,
.photo-cake-manage form {
  display: grid;
  gap: 16px;
  padding: 20px 24px 24px;
}

.photo-cake-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.photo-cake-form-grid.manager-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.photo-cake-work label small {
  color: #40463b;
  font-size: 12px;
  font-weight: 600;
}

.photo-cake-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.photo-cake-form-actions a {
  color: #234d28;
  font-size: 14px;
  font-weight: 800;
}

.photo-cakes-page button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #172014;
  border-radius: 11px;
  color: #fff;
  background: #1f2a1c;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}

.photo-cakes-page button:hover {
  background: #31422c;
}

.photo-cake-history ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 14px 24px 22px;
  list-style: none;
}

.photo-cake-history li {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(220px, 1.6fr) auto;
  gap: 14px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  color: #1a1d18;
  background: #f5f7f3;
  font-size: 13px;
}

.photo-cake-history li small {
  color: #40453c;
  font-size: 12px;
  font-weight: 600;
}

.photo-cake-empty {
  padding: 54px 28px;
  border: 1px dashed #aeb5a7;
  border-radius: 20px;
  text-align: center;
  background: #fff;
}

.photo-cake-empty > span {
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #416b42;
  font-size: 26px;
  font-weight: 900;
}

.photo-cake-empty h2 {
  margin: 14px 0 6px;
  color: #0a0b09;
  font-size: 25px;
  font-weight: 850;
}

.photo-cake-empty p,
.photo-cake-safety p {
  margin: 0;
  color: #292e26;
  font-size: 14px;
  line-height: 1.65;
}

.photo-cake-safety {
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid #cdd5c7;
  border-radius: 14px;
  background: #edf4e9;
}

.photo-cake-safety strong {
  display: block;
  margin-bottom: 3px;
  color: #142313;
  font-size: 14px;
  font-weight: 850;
}

[data-portal-theme="night"] .photo-cakes-main,
[data-portal-theme="night"] .photo-cakes-page {
  color: #f4f6f1;
  background: #10130f;
}

[data-portal-theme="night"] .photo-cake-hero,
[data-portal-theme="night"] .photo-cake-summary article,
[data-portal-theme="night"] .photo-cake-controls,
[data-portal-theme="night"] .photo-cake-card,
[data-portal-theme="night"] .photo-cake-empty {
  border-color: #495044;
  color: #f4f6f1;
  background: #1a1f18;
}

[data-portal-theme="night"] .photo-cakes-page h1,
[data-portal-theme="night"] .photo-cakes-page h2,
[data-portal-theme="night"] .photo-cakes-page strong,
[data-portal-theme="night"] .photo-cakes-page p,
[data-portal-theme="night"] .photo-cakes-page label,
[data-portal-theme="night"] .photo-cakes-page span,
[data-portal-theme="night"] .photo-cakes-page small,
[data-portal-theme="night"] .photo-cakes-page summary {
  color: #f4f6f1;
}

[data-portal-theme="night"] .photo-cake-facts > div,
[data-portal-theme="night"] .photo-cake-work > summary,
[data-portal-theme="night"] .photo-cake-manage > summary,
[data-portal-theme="night"] .photo-cake-history > summary,
[data-portal-theme="night"] .photo-cake-history li {
  border-color: #41483d;
  background: #232922;
}

[data-portal-theme="night"] .photo-cakes-page input,
[data-portal-theme="night"] .photo-cakes-page select,
[data-portal-theme="night"] .photo-cakes-page textarea,
[data-portal-theme="night"] .photo-cake-back {
  border-color: #697164;
  color: #f7f8f5;
  background: #151915;
}

@media (max-width: 1050px) {
  .photo-cake-facts,
  .photo-cake-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .photo-cakes-page {
    width: min(100% - 20px, 1480px);
    padding-top: 14px;
  }

  .photo-cake-hero,
  .photo-cake-controls,
  .photo-cake-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .photo-cake-hero,
  .photo-cake-card-head {
    padding: 20px;
  }

  .photo-cake-back,
  .photo-cake-branch-filter,
  .photo-cake-scope {
    width: 100%;
  }

  .photo-cake-summary,
  .photo-cake-facts,
  .photo-cake-form-grid,
  .photo-cake-form-grid.manager-grid {
    grid-template-columns: 1fr;
  }

  .photo-cake-facts {
    padding: 0 20px 18px;
  }

  .photo-cake-work form,
  .photo-cake-manage form {
    padding: 18px 20px 22px;
  }

  .photo-cake-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .photo-cake-form-actions a,
  .photo-cake-form-actions button,
  .photo-cake-manage button {
    width: 100%;
    text-align: center;
  }

  .photo-cake-history li {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
