.form-grid {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.inline-form {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}

.inline-form select { flex: 1; }

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

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tag button {
  border: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  padding: 0 2px;
}

.upload {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-top: 14px;
  padding: 9px 12px;
  border: 1px dashed var(--green);
  border-radius: 9px;
  color: var(--green);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.upload input { display: none; }

.thumb {
  width: 72px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
}

.pager {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 32px 0;
}

.flash {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  max-width: 380px;
  padding: 13px 18px;
  border-radius: 10px;
  background: #15221c;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28);
  font-size: 0.92rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.flash.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.flash.error { background: #9f3f2d; }
.flash.success { background: #167253; }
.flash.warning { background: #b07d1e; }

body:has(.pro-dashboard) > main {
  max-width: none;
  margin: 0;
}

body:has(.pro-dashboard) > footer { margin-top: 0; }

.pro-dashboard {
  --dashboard-shell-max-width: 1200px;
  --dashboard-max-width: 1200px;
  --dashboard-gutter: max(5vw, 28px);
  --dashboard-radius: 15px;
  --dashboard-space-1: 8px;
  --dashboard-space-2: 12px;
  --dashboard-space-3: 18px;
  --dashboard-space-4: 24px;
  --dashboard-space-5: 32px;
  --dashboard-space-6: 44px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  width: min(100%, var(--dashboard-shell-max-width));
  margin-inline: auto;
  min-width: 0;
  min-height: calc(100vh - 76px);
  background: #fff;
}

.dashboard-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.dashboard-sidebar {
  position: sticky;
  top: 76px;
  align-self: start;
  height: calc(100vh - 76px);
  min-width: 0;
  padding: 28px 16px;
  border-right: 1px solid var(--line);
  background: #fbfaf6;
}

.dashboard-brand {
  display: block;
  margin: 0 12px 25px;
  font: 700 22px Fraunces, serif;
  text-decoration: none;
}

.dashboard-sidebar nav {
  display: grid;
  gap: 4px;
}

.dashboard-sidebar button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  text-align: left;
  white-space: nowrap;
}

.dashboard-sidebar button.active,
.dashboard-sidebar button:hover {
  background: #edf4dd;
  color: var(--green);
}

.sidebar-icon,
.button-icon,
.section-icon,
.data-icon {
  display: inline-block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  stroke-width: 2;
}

.sidebar-icon {
  flex-basis: 19px;
  width: 19px;
  height: 19px;
}

.button-icon {
  flex-basis: 17px;
  width: 17px;
  height: 17px;
}

.section-icon {
  flex-basis: 23px;
  width: 23px;
  height: 23px;
  color: var(--green);
}

.dashboard-main {
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
}

.dashboard-content {
  width: min(100%, var(--dashboard-max-width));
  max-width: var(--dashboard-max-width);
  margin-inline: auto;
  padding: 48px var(--dashboard-gutter) 72px;
}

.dashboard-panel { display: none; }
.dashboard-panel.active { display: block; }
.dashboard-panel.active.dashboard-home { display: grid; }

.dashboard-panel h1 {
  margin: 4px 0 12px;
  font: 700 clamp(34px, 3.35vw, 48px)/1.02 Fraunces, serif;
  letter-spacing: -2px;
}

.dashboard-page-header {
  max-width: 720px;
  margin-bottom: var(--dashboard-space-5);
}

.dashboard-page-header > p:last-child,
.dashboard-page-header-row > div > p:last-child {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-page-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--dashboard-space-4);
  max-width: none;
}

.dashboard-page-header-row button,
.profile-save button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  white-space: nowrap;
}

.surface-card,
.profile-group,
.dashboard-card,
.dashboard-feed-card,
.dashboard-empty,
.dashboard-review-card,
.review-card,
.reviews-summary,
.review-item,
.empty-state {
  border: 1px solid var(--line);
  border-radius: var(--dashboard-radius);
  background: #fff;
}

.profile-editor,
.profile-form {
  display: grid;
  gap: var(--dashboard-space-4);
}

.profile-group {
  min-width: 0;
  margin: 0;
  padding: 26px;
}

.profile-group legend {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: calc(100% - 24px);
  padding: 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.profile-group legend small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--dashboard-space-3);
}

.profile-fields label,
.wizard label,
.dashboard-modal label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.profile-fields input,
.profile-fields textarea,
.profile-fields select,
.wizard input,
.wizard textarea,
.wizard select,
.dashboard-modal input,
.dashboard-modal textarea,
.dashboard-modal select {
  color: var(--ink);
  font-weight: 400;
}

.profile-fields textarea { line-height: 1.55; }

.profile-fields .field-wide { grid-column: 1 / -1; }
.profile-fields textarea { min-height: 132px; resize: vertical; }

.field-help {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.profile-save {
  display: flex;
  justify-content: flex-end;
}

.specialty-group { display: grid; gap: var(--dashboard-space-3); }

.profile-group-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.profile-group-heading h2 {
  margin: 0;
  font: 700 24px Fraunces, serif;
}

.profile-group-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.specialty-group .inline-form { max-width: 700px; margin: 0; }

.wizard {
  max-width: 760px;
  padding: 26px;
}

.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}

.wizard-steps span {
  padding: 7px 10px;
  border-radius: 99px;
  background: #f1f2ee;
  color: var(--muted);
  font-size: 12px;
}

.wizard-steps .active {
  background: var(--lime);
  color: var(--ink);
}

.wizard form > div[data-wizard-step] { display: grid; gap: 16px; }
.wizard-actions { display: flex; justify-content: space-between; margin-top: 24px; }

.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--dashboard-space-3);
}

.dashboard-card {
  display: flex;
  min-width: 0;
  min-height: 250px;
  flex-direction: column;
  padding: 22px;
}

.dashboard-card h3 {
  margin: 12px 0 7px;
  font-size: 18px;
  line-height: 1.3;
}

.dashboard-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.dashboard-card .card-description { margin-top: 10px; }

.card-icon-row,
.dashboard-card-actions,
.dashboard-card-meta {
  display: flex;
  align-items: center;
  gap: 9px;
}

.card-icon-row { justify-content: space-between; }

.card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #edf4dd;
  color: var(--green);
}

.dashboard-card-meta {
  flex-wrap: wrap;
  margin-top: 8px;
}

.dashboard-card-actions {
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 20px;
}

.dashboard-card-actions button,
.dashboard-feed-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 12px;
}

.dashboard-card-actions .danger {
  border: 1px solid #ecd9d3;
  background: #fff;
  color: #9f3f2d;
  box-shadow: none;
}

.service-images,
.portfolio-media {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.service-images .image-action,
.portfolio-media .image-action {
  position: relative;
  display: block;
  min-width: 0;
}

.service-images .thumb,
.portfolio-media .thumb {
  width: 100%;
  height: 76px;
  margin: 0;
}

.portfolio-media .image-action:first-child { grid-column: 1 / -1; }
.portfolio-media .image-action:first-child .thumb { height: 180px; }

.image-action button {
  position: absolute;
  top: 5px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  color: #9f3f2d;
  box-shadow: 0 2px 8px #15221c24;
}

.dashboard-status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf4dd;
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.dashboard-status.status-pending { background: #fff3cf; color: #876319; }
.dashboard-status.status-completed { background: #edf4dd; color: var(--green); }
.dashboard-status.status-cancelled { background: #f8e9e5; color: #9f3f2d; }

.dashboard-list,
.dashboard-feed {
  display: grid;
  gap: var(--dashboard-space-3);
}

.dashboard-feed-card { padding: 24px; }

.dashboard-feed-main {
  display: flex;
  gap: 14px;
}

.dashboard-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e3f1e7;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-feed-content { min-width: 0; flex: 1; }

.dashboard-feed-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-feed-description {
  margin: 9px 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.dashboard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.dashboard-meta span { display: inline-flex; align-items: center; gap: 5px; }

.dashboard-feed-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.dashboard-quote { margin: 0; color: var(--muted); font-size: 14px; }
.dashboard-quote b { color: var(--ink); }
.dashboard-feed-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.dashboard-feed-actions .secondary { border: 1px solid #cfe2d1; background: #edf4dd; color: var(--green); }

.empty-state,
.dashboard-empty {
  display: grid;
  grid-column: 1 / -1;
  align-content: center;
  justify-items: center;
  min-height: 230px;
  gap: 10px;
  margin: 0;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.empty-state .empty-icon,
.dashboard-empty .empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #edf4dd;
  color: var(--green);
}

.empty-state h3,
.dashboard-empty h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font: 700 21px Fraunces, serif;
}

.empty-state p,
.dashboard-empty p { max-width: 380px; margin: 0; }

.reviews-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: var(--dashboard-space-4);
  padding: 24px;
  background: #f3f7ef;
}

.reviews-score {
  min-width: 130px;
  color: var(--green);
  font: 700 28px Fraunces, serif;
}

.reviews-summary h2 { margin: 0; font: 700 22px Fraunces, serif; }
.reviews-summary p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--dashboard-space-3);
}

.review-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 22px;
}

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

.review-item-rating { margin: 4px 0 0; color: var(--green); font-weight: 700; }
.review-item-comment { grid-column: 2; margin: 0; color: var(--muted); line-height: 1.55; }
.review-date { color: var(--muted); font-size: 12px; white-space: nowrap; }

.dashboard-home { gap: var(--dashboard-space-6); }

.dashboard-home-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--dashboard-space-5);
}

.dashboard-home-header > div:first-child { min-width: 0; max-width: 700px; }

.dashboard-home-header p:not(.eyebrow) {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-home-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-home-actions button,
.dashboard-home-actions .button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  margin: 0;
  padding: 10px 14px;
  white-space: nowrap;
}

.dashboard-home-actions .secondary { border: 1px solid #cfe2d1; background: #edf4dd; color: var(--green); }
.dashboard-home-actions #dashboard-public-profile { border: 1px solid var(--line); background: transparent; color: var(--ink); }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--dashboard-space-3);
}

.metric-grid > * { min-width: 0; }

.metric-grid .metric-card {
  display: flex;
  width: 100%;
  min-height: 188px;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--dashboard-radius);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
  text-align: left;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}

.metric-grid .metric-card:hover,
.metric-grid .metric-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--green);
  box-shadow: 0 12px 24px #26352512;
}

.metric-card-head { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 750; }

.metric-card-icon,
.summary-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #edf4dd;
  color: var(--green);
}

.metric-grid .metric-card b { display: block; margin: 0; font: 700 30px Fraunces, serif; }
.metric-grid .metric-card small { margin-top: auto; color: var(--green); font-size: 12px; font-weight: 700; line-height: 1.4; }

.dashboard-summary {
  display: flex;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: var(--dashboard-radius);
  background: #f3f7ef;
}

.summary-item { display: flex; flex: 1; align-items: center; gap: 13px; padding: 16px 20px; }
.summary-item + .summary-item { border-left: 1px solid var(--line); }
.summary-item b, .summary-item span { display: block; }
.summary-item b { font-size: 14px; }
.summary-item span { color: var(--muted); font-size: 12px; line-height: 1.4; }

.dashboard-home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: var(--dashboard-space-5);
}

.dashboard-home-section { min-width: 0; }

.dashboard-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--dashboard-space-3);
}

.dashboard-section-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 700 26px Fraunces, serif;
  letter-spacing: -.7px;
}

.text-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  background: transparent;
  color: var(--green);
  box-shadow: none;
  text-decoration: underline;
}

.dashboard-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--dashboard-space-3);
}

.dashboard-review-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 22px;
}

.dashboard-review-card p { grid-column: 2; margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.dashboard-review-card .review-name { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dashboard-review-card .dashboard-rating { margin: 5px 0 0; color: var(--green); font-weight: 700; }

.dashboard-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  border: 0;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 24px 70px #0004;
  scrollbar-width: none;
}

.dashboard-modal::-webkit-scrollbar { display: none; }
.dashboard-modal[open] { animation: modal-enter .2s ease-out; }
.dashboard-modal[open]::backdrop { animation: backdrop-enter .2s ease-out; }
.modal-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.modal-heading h2 { margin: 0; }
.icon-button { padding: 2px 8px; background: transparent; color: var(--ink); box-shadow: none; font-size: 26px; }
.message-history { max-height: 280px; overflow: auto; padding: 10px; border-radius: 9px; background: #f7f7f3; }
.message-history p { padding: 8px; border-radius: 7px; background: #fff; }
.ui-form-modal form { display: grid; gap: 18px; }
.ui-form-fields { display: grid; gap: 14px; }
.ui-form-field { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.ui-form-modal [data-ui-form-description] { color: var(--muted); white-space: pre-wrap; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Enhanced Portfolio Modal */
.portfolio-modal-custom {
  width: min(600px, calc(100vw - 32px));
  padding: 28px;
}
.portfolio-modal-custom .modal-heading {
  align-items: flex-start;
  margin-bottom: 6px;
}
.portfolio-modal-custom .modal-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.modal-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.modal-field input,
.modal-field select,
.modal-field textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: 400 14px 'DM Sans', sans-serif;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.modal-field input:focus,
.modal-field select:focus,
.modal-field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(43, 97, 39, 0.12);
}
.portfolio-photo-section {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.portfolio-photo-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.portfolio-photo-head b {
  display: block;
  font-size: 14px;
  color: var(--ink);
}
.portfolio-photo-head .field-help {
  display: block;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}
.portfolio-photo-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.portfolio-photo-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 18px 16px;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  background: #fafaf8;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: all .2s;
}
.portfolio-photo-drop:hover:not(:disabled) {
  border-color: var(--green);
  background: #f4f7ee;
}
.portfolio-photo-drop .lucide {
  width: 24px;
  height: 24px;
  color: var(--green);
}
.portfolio-photo-drop span {
  font-weight: 700;
  font-size: 13px;
  color: var(--green);
}
.portfolio-photo-drop small {
  color: var(--muted);
  font-size: 11px;
}
.portfolio-photo-drop.is-dragging {
  background: #eef6e6;
  border-color: var(--green);
}
.portfolio-photo-drop.is-full {
  opacity: .5;
  cursor: not-allowed;
  border-style: solid;
}
.portfolio-photo-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}
.portfolio-photo-preview {
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f0f0ee;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.portfolio-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.portfolio-cover-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: var(--green);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  pointer-events: none;
}
.portfolio-photo-preview button {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.7);
  color: white;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: background .15s;
}
.portfolio-photo-preview button:hover {
  background: #d32f2f;
}
.portfolio-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.portfolio-save-btn {
  background: var(--green) !important;
  color: white !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  padding: 10px 22px !important;
  border: 0 !important;
  cursor: pointer !important;
  transition: opacity .15s !important;
}
.portfolio-save-btn:hover {
  opacity: .92;
}
.portfolio-save-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ==========================================================================
   PORTFOLIO REDESIGN (Cards & Header matching reference design)
   ========================================================================== */
.portfolio-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.portfolio-main-title {
  font-family: var(--font-serif, "Lora", Georgia, serif);
  font-size: 32px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
}

.portfolio-main-sub {
  font-size: 14px;
  color: #64748b;
  max-width: 640px;
  line-height: 1.5;
  margin: 0;
}

.portfolio-header-add-btn {
  background: #0f5132 !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 10px 18px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  border: none !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: opacity 0.15s ease !important;
}

.portfolio-header-add-btn:hover {
  opacity: 0.92;
}

.portfolio-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.portfolio-card-custom {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.portfolio-card-custom:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 30px -4px rgba(0, 0, 0, 0.09), 0 6px 12px -2px rgba(0, 0, 0, 0.04);
  border-color: #cbd5e1;
}

.portfolio-cover-wrapper {
  width: 100%;
  height: 210px;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.portfolio-cover-clickable {
  cursor: pointer;
}

.portfolio-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card-custom:hover .portfolio-cover-img {
  transform: scale(1.04);
}

.portfolio-card-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.portfolio-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.portfolio-badge-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #ecfdf5;
  color: #059669;
}

.portfolio-badge-icon svg,
.portfolio-badge-icon i {
  width: 16px;
  height: 16px;
}

.portfolio-card-date {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.portfolio-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
  line-height: 1.3;
}

.portfolio-card-title-clickable {
  cursor: pointer;
  transition: color 0.15s ease;
}

.portfolio-card-title-clickable:hover {
  color: #059669;
  text-decoration: underline;
}

.portfolio-card-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.45;
  margin: 0 0 16px 0;
  flex: 1;
}

.portfolio-gallery-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
}

.portfolio-thumb-item {
  width: 64px;
  height: 46px;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f5f9;
  flex-shrink: 0;
  display: inline-block;
}

.portfolio-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portfolio-thumb-more {
  width: 64px;
  height: 46px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #047857;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.portfolio-actions-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: auto;
}

.portfolio-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  user-select: none;
  box-sizing: border-box;
  width: 100%;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.portfolio-action-btn svg,
.portfolio-action-btn i {
  width: 15px;
  height: 15px;
}

/* Edit button */
.portfolio-action-btn.btn-edit {
  background: #dcfce7;
  color: #14532d;
  border-color: #bbf7d0;
}
.portfolio-action-btn.btn-edit:hover {
  background: #bbf7d0;
}

/* Delete button */
.portfolio-action-btn.btn-delete {
  background: #ffffff;
  border: 1px solid #fecaca;
  color: #dc2626;
}
.portfolio-action-btn.btn-delete:hover {
  background: #fef2f2;
  border-color: #ef4444;
}

/* ==========================================================================
   PORTFOLIO PREVIEW MODAL
   ========================================================================== */
.portfolio-preview-modal-custom {
  max-width: 960px;
  width: 95vw;
  border-radius: 16px;
  padding: 0;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  background: #ffffff;
}

.portfolio-preview-modal-custom::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

.portfolio-preview-container {
  position: relative;
  padding: 32px 36px;
  max-height: 88vh;
  overflow-y: auto;
}

.portfolio-preview-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  transition: background-color 0.15s, color 0.15s;
  z-index: 10;
}

.portfolio-preview-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.portfolio-preview-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  align-items: start;
}

.portfolio-preview-media {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portfolio-preview-main-img-wrap {
  width: 100%;
  height: 330px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
}

.portfolio-preview-main-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

.portfolio-preview-thumbs-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.portfolio-preview-thumb {
  width: 74px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  background: #f1f5f9;
  transition: border-color 0.15s, transform 0.15s;
  padding: 0;
}

.portfolio-preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.portfolio-preview-thumb.active {
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.25);
}

.portfolio-preview-thumb:hover:not(.active) {
  border-color: #cbd5e1;
  transform: translateY(-2px);
}

.portfolio-preview-info {
  display: flex;
  flex-direction: column;
}

.portfolio-preview-badge {
  display: inline-flex;
  align-items: center;
  background: #ecfdf5;
  color: #047857;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
  width: fit-content;
}

.portfolio-preview-title {
  font-family: var(--font-serif, "Lora", Georgia, serif);
  font-size: 28px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 16px 0;
  line-height: 1.25;
}

.portfolio-preview-body-desc {
  font-size: 15px;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 28px 0;
}

.portfolio-preview-details-box {
  border-top: 1px solid #f1f5f9;
  padding-top: 20px;
}

.portfolio-preview-details-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.portfolio-preview-details-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-preview-details-icon svg,
.portfolio-preview-details-icon i {
  width: 18px;
  height: 18px;
}

.portfolio-preview-details-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.portfolio-preview-dl {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.portfolio-preview-dl-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.portfolio-preview-dl-row dt {
  color: #64748b;
  font-weight: 500;
}

.portfolio-preview-dl-row dd {
  color: #1e293b;
  font-weight: 500;
  margin: 0;
}

@media (max-width: 768px) {
  .portfolio-preview-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .portfolio-preview-container {
    padding: 24px 20px;
  }
  .portfolio-preview-main-img-wrap {
    height: 240px;
  }
}

@keyframes modal-enter {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 1120px) {
  .pro-dashboard { grid-template-columns: 204px minmax(0, 1fr); }
  .dashboard-content { padding-top: 40px; padding-bottom: 56px; }
  .dashboard-home-header { grid-template-columns: 1fr; align-items: start; gap: 22px; }
  .dashboard-home-actions { justify-content: flex-start; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-home-grid { grid-template-columns: 1fr; }
  .dashboard-summary { flex-wrap: wrap; }
  .summary-item { min-width: 50%; }
  .summary-item:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 820px) {
  .pro-dashboard { grid-template-columns: minmax(0, 1fr); }
  .dashboard-sidebar {
    position: sticky;
    top: 76px;
    z-index: 8;
    height: auto;
    overflow-x: auto;
    padding: 10px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }
  .dashboard-sidebar::-webkit-scrollbar { display: none; }
  .dashboard-brand { display: none; }
  .dashboard-sidebar nav { display: flex; width: max-content; }
  .dashboard-sidebar button { width: auto; }
  .dashboard-content { padding: 32px 20px 48px; }
  .dashboard-page-header-row { align-items: flex-start; flex-direction: column; }
  .profile-fields, .reviews-grid, .dashboard-review-grid { grid-template-columns: 1fr; }
  .profile-fields .field-wide { grid-column: auto; }
  .dashboard-home-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .dashboard-home-actions button, .dashboard-home-actions .button { width: 100%; justify-content: center; }
  .dashboard-summary { display: grid; }
  .summary-item, .summary-item + .summary-item, .summary-item:nth-child(3) { min-width: 0; border-top: 1px solid var(--line); border-left: 0; }
  .summary-item:first-child { border-top: 0; }
  .dashboard-feed-footer, .dashboard-section-heading { align-items: flex-start; flex-direction: column; }
  .dashboard-feed-actions { width: 100%; justify-content: stretch; }
  .dashboard-feed-actions button { flex: 1; }
  .reviews-summary { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 520px) {
  .dashboard-content { padding-inline: 18px; }
  .dashboard-panel h1 { font-size: clamp(30px, 8.5vw, 36px); letter-spacing: -1.25px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-grid .metric-card { min-height: 154px; }
  .dashboard-feed-card, .dashboard-card, .review-item, .profile-group { padding: 18px; }
  .dashboard-feed-main { align-items: flex-start; }
  .dashboard-feed-title { flex-direction: column; gap: 8px; }
  .dashboard-section-heading h2 { font-size: 23px; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .inline-form button { width: 100%; }
}
