* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Space Mono', 'Courier New', monospace;
  background: var(--c5, #0A2540);
  background-image:
    repeating-linear-gradient(0deg, var(--grid-line, rgba(127,199,232,0.16)) 0, var(--grid-line, rgba(127,199,232,0.16)) 1px, transparent 1px, transparent 32px),
    repeating-linear-gradient(90deg, var(--grid-line, rgba(127,199,232,0.16)) 0, var(--grid-line, rgba(127,199,232,0.16)) 1px, transparent 1px, transparent 32px);
  color: var(--on-page-bg, #fff);
  line-height: 1.6;
  font-size: 15px;
  min-height: 100vh;
}
body[data-theme-style="hotdog"] {
  background-image:
    linear-gradient(var(--page-tint-overlay, rgba(10,37,64,0.55)), var(--page-tint-overlay, rgba(10,37,64,0.55))),
    url('hotdog-pattern.png');
  background-repeat: repeat;
  background-size: auto, 200px 200px;
}
body[data-theme-style="bathroom"] {
  background-image:
    linear-gradient(var(--page-tint-overlay, rgba(10,37,64,0.55)), var(--page-tint-overlay, rgba(10,37,64,0.55))),
    url('bathroom-pattern.png');
  background-repeat: repeat;
  background-size: auto, 400px 400px;
}
body[data-theme-style="kitchen"] {
  background-image:
    linear-gradient(var(--page-tint-overlay, rgba(10,37,64,0.55)), var(--page-tint-overlay, rgba(10,37,64,0.55))),
    url('kitchen-pattern.png');
  background-repeat: repeat;
  background-size: auto, 400px 400px;
}
h1, h2, h3 { font-family: 'Architects Daughter', 'Space Mono', sans-serif; font-weight: 400; line-height: 1.3; margin: 0 0 0.5rem; letter-spacing: 0.02em; }
h1 { font-size: 1.8rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
a { color: var(--accent-text, #0E3A5C); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.75rem;
  background: var(--c3, #0E3A5C);
  color: #fff;
  flex-wrap: wrap;
  border-bottom: 2px dashed var(--c4, #7FC7E8);
}
.site-header .brand { color: var(--on-c3, #fff); font-family: 'Architects Daughter', sans-serif; font-weight: 400; font-size: 1.3rem; display: flex; align-items: center; gap: 0.5rem; }
.site-header nav { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.site-header nav a {
  color: var(--on-c3, #fff);
  opacity: 0.85;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  border-radius: 4px;
  transition: background 0.15s ease, opacity 0.15s ease;
}
.site-header nav a:hover { opacity: 1; background: rgba(255,255,255,0.14); text-decoration: none; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--on-c3, #fff);
  font-size: 1.3rem;
  cursor: pointer;
}
.nav-toggle:hover { background: rgba(255,255,255,0.14); }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-header nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--c3, #0E3A5C);
    padding: 0.5rem 1rem 1rem;
    gap: 0.15rem;
    z-index: 20;
  }
  .site-header { position: relative; }
  .site-header nav.nav-open { display: flex; }
  .site-header nav a { padding: 0.7rem 1rem; }
}

.container {
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 2.25rem 1.5rem;
  background: var(--main-frame-bg, rgba(231,238,243,0.7));
  border: 1px solid var(--main-frame-border, rgba(127,199,232,0.3));
  border-radius: 16px;
}

.site-footer {
  text-align: center;
  padding: 2rem 1.5rem 1.5rem;
  font-size: 0.82rem;
  color: var(--on-page-bg, #fff);
  opacity: 0.7;
}
.site-footer a { color: inherit; text-decoration: underline; }
.site-footer a:hover { opacity: 0.8; }

.card {
  background: var(--card-bg, rgba(231,238,243,0.98));
  border: 1px solid var(--c4, #7FC7E8);
  border-radius: 4px;
  padding: 1.5rem 1.6rem;
  margin-bottom: 1.25rem;
  color: #16232e;
}

.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.75rem; flex-wrap: wrap; gap: 1rem; }
.page-head-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1.4rem;
}

.item-card {
  position: relative;
  background: var(--card-bg, rgba(231,238,243,0.93));
  border: 1px solid var(--c4, #7FC7E8);
  border-radius: 4px;
  overflow: hidden;
  color: #16232e;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.item-card:hover { border-color: var(--c2, #1F6FB2); transform: translateY(-2px); }
.item-card-link { display: block; color: inherit; text-decoration: none; }
.item-card-link:hover { text-decoration: none; }
.item-card-edit-btn {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(14,58,92,0.75);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  z-index: 2;
  transition: background 0.15s ease;
}
.item-card-edit-btn:hover { background: rgba(14,58,92,0.95); text-decoration: none; }
.item-card-cover {
  aspect-ratio: 3 / 2;
  background: var(--light-tint, #eef3f7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--accent-text, #0E3A5C);
  overflow: hidden;
  text-decoration: none;
}
.item-card-cover img { width: 100%; height: 100%; object-fit: cover; }
a.item-card-cover:hover img { opacity: 0.85; }
.item-card-body { padding: 0.7rem 0.85rem; }
.item-card-title { font-weight: 700; font-size: 0.9rem; margin: 0 0 0.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card-meta { font-size: 0.78rem; color: #4a5c68; }

.progress-bar { background: rgba(14,58,92,0.12); border: 1px solid var(--c4, #7FC7E8); border-radius: 20px; height: 10px; overflow: hidden; }
.progress-bar-fill { background: linear-gradient(90deg, var(--c2, #1F6FB2), var(--c2-gradient, #164e7d)); height: 100%; transition: width 0.2s ease; }
.progress-label { font-size: 0.78rem; color: #4a5c68; margin-top: 0.3rem; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--light-tint, #eef3f7);
  border: 1px solid var(--c4, #7FC7E8);
  color: var(--accent-text, #0E3A5C);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-badge.status-done, .status-badge.status-installed, .status-badge.status-sold, .status-badge.status-fully_paid {
  background: var(--c2, #1F6FB2); color: var(--on-c2, #fff); border-color: transparent;
}

.section-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-bottom: 1.5rem; border-bottom: 2px dashed var(--grid-line, rgba(127,199,232,0.4)); padding-bottom: 0.75rem; }
.section-tabs a {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  color: var(--on-page-bg, #fff);
  font-size: 0.88rem;
  font-weight: 700;
  border: 1px solid transparent;
}
.section-tabs a.active { background: var(--c2, #1F6FB2); color: var(--on-c2, #fff); }
.section-tabs a:hover { text-decoration: none; border-color: var(--c4, #7FC7E8); }

.section-tabs-select { display: none; }
@media (max-width: 720px) {
  .section-tabs { display: none; }
  .section-tabs-select {
    display: block; width: 100%; margin-bottom: 1.5rem; padding: 0.65rem 0.85rem;
    border: 1px solid var(--c4, #7FC7E8); border-radius: 4px; font-weight: 700;
    background: var(--card-bg, rgba(231,238,243,0.93)); color: #16232e;
  }
}

.af-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  background: #fff;
  border: 1px solid var(--c4, #7FC7E8);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(10,37,64,0.25);
  margin-top: 0.3rem;
  max-height: 260px;
  overflow-y: auto;
}
.af-dropdown-item {
  padding: 0.6rem 0.9rem;
  font-size: 0.88rem;
  font-weight: normal;
  cursor: pointer;
  border-bottom: 1px solid rgba(14,58,92,0.08);
}
.af-dropdown-item:last-child { border-bottom: none; }
.af-dropdown-item:hover { background: var(--light-tint, #eef3f7); }

.notice {
  background: var(--card-bg, rgba(231,238,243,0.93));
  color: #16232e;
  border: 1px solid var(--c4, #7FC7E8);
  padding: 1rem 1.25rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}
.error {
  background: #fdecea;
  border: 1px solid #f3c7c2;
  color: #922;
  padding: 0.85rem 1.1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

form label { display: block; margin-bottom: 1rem; font-weight: 700; font-size: 0.88rem; }
form input[type=text], form input[type=email], form input[type=password],
form input[type=number], form input[type=date], form input[type=url], form input[type=tel],
form input[type=file], form select, form textarea {
  display: block;
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--c4, #7FC7E8);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: normal;
  background: #fff;
  color: #16232e;
}
form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--c2, #1F6FB2);
}
form .row { display: flex; gap: 1rem; flex-wrap: wrap; }
form .row label { flex: 1; min-width: 160px; }
form .row .field-group { flex: 1; min-width: 160px; }
form fieldset { border: 1px solid var(--c4, #7FC7E8); border-radius: 4px; padding: 1.1rem; margin-bottom: 1.25rem; }
form legend { font-family: 'Architects Daughter', sans-serif; font-weight: 400; padding: 0 0.4rem; font-size: 1.05rem; }
form .checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-weight: 500; }
form .checkbox-label input { width: auto; margin: 0; }

.theme-swatch-picker { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.theme-swatch { cursor: pointer; position: relative; }
.theme-swatch input {
  position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer;
}
.theme-swatch-circle {
  display: block; width: 34px; height: 34px; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(14,58,92,0.3);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.theme-swatch input:checked + .theme-swatch-circle {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c2, #1F6FB2);
  transform: scale(1.08);
}
.theme-swatch-default { background: conic-gradient(#E7EEF3 0deg 180deg, #1F6FB2 180deg 360deg); }

.theme-style-picker { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.theme-style-option {
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  position: relative;
}
.theme-style-option input {
  position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer;
}
.theme-style-preview {
  display: block; width: 64px; height: 44px; border-radius: 4px;
  background-color: #0A2540;
  box-shadow: 0 0 0 1px rgba(14,58,92,0.3);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.theme-style-preview-blueprint {
  background-image:
    repeating-linear-gradient(0deg, rgba(127,199,232,0.35) 0, rgba(127,199,232,0.35) 1px, transparent 1px, transparent 10px),
    repeating-linear-gradient(90deg, rgba(127,199,232,0.35) 0, rgba(127,199,232,0.35) 1px, transparent 1px, transparent 10px);
}
.theme-style-preview-hotdog {
  background-image: url('hotdog-pattern.png');
  background-size: 40px 40px;
  background-repeat: repeat;
}
.theme-style-preview-bathroom {
  background-image: url('bathroom-pattern.png');
  background-size: 40px 40px;
  background-repeat: repeat;
}
.theme-style-preview-kitchen {
  background-image: url('kitchen-pattern.png');
  background-size: 40px 40px;
  background-repeat: repeat;
}
.theme-style-option input:checked + .theme-style-preview {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c2, #1F6FB2);
  transform: scale(1.06);
}
.theme-style-option-label { font-size: 0.78rem; }

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.25rem;
  border-radius: 4px;
  border: none;
  font-family: 'Architects Daughter', sans-serif;
  font-weight: 400;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-primary { background: linear-gradient(180deg, var(--c2, #1F6FB2), var(--c2-gradient, #164e7d)); color: var(--on-c2, #fff); border: 1px solid rgba(0,0,0,0.06); }
.btn-primary:hover { opacity: 0.9; text-decoration: none; }
.btn-secondary { background: transparent; color: var(--accent-text, #0E3A5C); border: 1px solid var(--accent-text, #0E3A5C); }
.btn-secondary:hover { background: var(--light-tint, #eef3f7); text-decoration: none; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-small { padding: 0.4rem 0.85rem; font-size: 0.82rem; }

.muted { color: #4a5c68; font-size: 0.86rem; }
.card .muted { color: #4a5c68; }

.auth-split { display: flex; gap: 2.5rem; align-items: center; flex-wrap: wrap; }
.auth-intro { flex: 1; min-width: 260px; color: var(--on-page-bg, #fff); }
.auth-intro .tagline { font-family: 'Architects Daughter', sans-serif; font-size: 1.1rem; margin-bottom: 1rem; opacity: 0.9; }
.auth-card { flex: 1; min-width: 300px; max-width: 420px; }
.auth-divider { text-align: center; margin: 1rem 0; color: #4a5c68; font-size: 0.85rem; }

.item-detail { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.item-detail-cover { width: 220px; flex-shrink: 0; }
.item-detail-cover .item-card-cover { border-radius: 4px; }
.item-detail-fields { flex: 1; min-width: 260px; }
.item-detail-fields dt { font-weight: 700; font-size: 0.82rem; color: #4a5c68; margin-top: 0.75rem; }
.item-detail-fields dd { margin: 0.1rem 0 0; }

/* Acceptance criteria checklist */
.checklist { list-style: none; margin: 0 0 0.75rem; padding: 0; }
.checklist-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.checklist-row input[type=text] { flex: 1; margin: 0; }
.checklist-row input[type=checkbox] { width: 20px; height: 20px; flex-shrink: 0; }
.checklist-row .remove-criterion { background: none; border: none; color: #c0392b; cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0.3rem; }

/* Link-existing-item picker */
.link-picker { border: 1px solid var(--c4, #7FC7E8); border-radius: 4px; max-height: 220px; overflow-y: auto; padding: 0.5rem 0.75rem; background: #fff; }
.link-picker input[type=search] { margin: 0 0 0.5rem; }
.link-picker-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; }
.link-picker-row input { width: auto; margin: 0; }
.link-picker-empty { color: #4a5c68; font-size: 0.85rem; padding: 0.5rem 0; }

/* Budget page */
.budget-toggle-form { margin-bottom: 1rem; }
.budget-toggle-form .checkbox-label { color: var(--on-page-bg, #fff); }
.budget-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.budget-stat { text-align: center; padding: 1rem; border: 1px dashed var(--c4, #7FC7E8); border-radius: 4px; }
.budget-stat .value { font-size: 1.4rem; font-weight: 700; font-family: 'Space Mono', monospace; }
.budget-stat .label { font-size: 0.78rem; color: #4a5c68; text-transform: uppercase; letter-spacing: 0.03em; }
.budget-stat.remaining-positive .value { color: #1F6FB2; }
.budget-stat.remaining-negative .value { color: #c0392b; }

.budget-chart { display: flex; flex-direction: column; gap: 0.9rem; }
.budget-chart-row { display: flex; align-items: center; gap: 0.75rem; }
.budget-chart-label { flex: 0 0 160px; font-size: 0.85rem; font-weight: 700; }
.budget-chart-track { display: flex; flex: 1; background: rgba(14,58,92,0.1); border: 1px solid var(--c4, #7FC7E8); border-radius: 20px; height: 16px; overflow: hidden; }
.budget-chart-bar { height: 100%; transition: width 0.2s ease; }
.budget-chart-bar.chart-planned { background: var(--c2, #1F6FB2); }
.budget-chart-bar.chart-products { background: var(--accent-text, #0E3A5C); }
.budget-chart-bar.chart-sold { background: var(--c4, #7FC7E8); }
.budget-chart-bar.chart-products-proposed { background: var(--c2-light, rgba(31,111,178,0.4)); cursor: help; }
.proposed-cost-reveal { font-size: 0.78rem; margin: -0.4rem 0 0.4rem; padding-left: 172px; }
@media (max-width: 560px) { .proposed-cost-reveal { padding-left: 0; } }
.budget-chart-value { flex: 0 0 90px; text-align: right; font-family: 'Space Mono', monospace; font-weight: 700; font-size: 0.9rem; }

@media (max-width: 560px) {
  .budget-chart-label { flex-basis: 110px; font-size: 0.78rem; }
  .budget-chart-value { flex-basis: 70px; font-size: 0.82rem; }
}

/* Work Items kanban board */
.kanban-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1rem; align-items: start; }
.kanban-col {
  background: rgba(255,255,255,0.06);
  border: 1px dashed var(--c4, #7FC7E8);
  border-radius: 4px;
  padding: 0.75rem;
  min-height: 140px;
}
.kanban-col.drag-over { background: rgba(255,255,255,0.14); border-style: solid; }
.kanban-col-head { font-family: 'Architects Daughter', sans-serif; font-size: 1rem; margin-bottom: 0.75rem; color: var(--on-page-bg, #fff); }
.kanban-col-empty { color: var(--on-page-bg, #fff); opacity: 0.45; font-size: 0.8rem; text-align: center; padding: 1rem 0; }
.kanban-card {
  background: var(--card-bg, rgba(231,238,243,0.93));
  border: 1px solid var(--c4, #7FC7E8);
  border-radius: 4px;
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.6rem;
  color: #16232e;
}
.kanban-card[draggable=true] { cursor: grab; }
.kanban-card.dragging { opacity: 0.4; }
.kanban-card-blocked { opacity: 0.75; }
.kanban-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.4rem; }
.kanban-card-title { font-weight: 700; font-size: 0.85rem; line-height: 1.35; }
.kanban-card-actions { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.kanban-card-view, .kanban-card-edit { color: var(--accent-text, #0E3A5C); font-size: 0.85rem; }
.kanban-card-view { background: none; border: none; cursor: pointer; padding: 0; }
.kanban-card-meta { display: flex; flex-wrap: wrap; gap: 0.6rem; font-size: 0.75rem; color: #4a5c68; margin-top: 0.35rem; }
.kanban-card-blocked-note { font-size: 0.75rem; color: #4a5c68; margin-top: 0.35rem; }

@media (max-width: 900px) { .kanban-board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .kanban-board { grid-template-columns: 1fr; } }

.kanban-detail-backdrop { position: fixed; inset: 0; background: rgba(10,37,64,0.75); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 1.5rem; }
.kanban-detail-backdrop[hidden] { display: none; }
.kanban-detail-panel {
  position: relative; background: var(--card-bg, rgba(231,238,243,0.97)); border-radius: 12px;
  padding: 1.75rem; max-width: 560px; width: 100%; max-height: 85vh; overflow-y: auto; color: #16232e;
}
.kanban-detail-panel .status-badge { margin-bottom: 0.75rem; }
.kanban-detail-panel dl { margin: 1rem 0; }
.kanban-detail-panel dt { font-weight: 700; font-size: 0.8rem; color: #4a5c68; margin-top: 0.75rem; }
.kanban-detail-panel dd { margin: 0.1rem 0 0; }
.kanban-detail-panel .checklist { list-style: none; padding: 0; margin: 0; }
.kanban-detail-panel .lightbox-close { top: 1rem; right: 1rem; background: rgba(14,58,92,0.15); color: #16232e; }
.kanban-detail-panel .lightbox-close:hover { background: rgba(14,58,92,0.3); }

/* Work Items: Board/List toggle + list (spreadsheet-style) view */
.work-view-toggle { display: flex; gap: 0.4rem; margin-bottom: 1.25rem; }
.work-view-toggle a {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.9rem;
  border-radius: 4px; border: 1px solid var(--c4, #7FC7E8); color: var(--on-page-bg, #fff); font-size: 0.85rem; font-weight: 700;
}
.work-view-toggle a.active { background: var(--c2, #1F6FB2); color: var(--on-c2, #fff); border-color: transparent; }
.work-view-toggle a:hover { text-decoration: none; }

.table-scroll { overflow-x: auto; }
.work-list-table { width: 100%; border-collapse: collapse; background: var(--card-bg, rgba(231,238,243,0.93)); border-radius: 4px; overflow: hidden; }
.work-list-table th, .work-list-table td { padding: 0.6rem 0.8rem; text-align: left; font-size: 0.85rem; border-bottom: 1px solid rgba(14,58,92,0.1); color: #16232e; white-space: nowrap; }
.work-list-table th { font-family: 'Architects Daughter', sans-serif; font-weight: 400; font-size: 0.9rem; cursor: pointer; user-select: none; }
.work-list-table th:hover { background: rgba(14,58,92,0.06); }
.work-list-table th.sort-asc::after { content: ' \25B2'; }
.work-list-table th.sort-desc::after { content: ' \25BC'; }
.work-list-table tr:last-child td { border-bottom: none; }
.work-list-row-blocked { opacity: 0.7; }
.link-like { background: none; border: none; padding: 0; color: var(--accent-text, #0E3A5C); font-weight: 700; cursor: pointer; text-decoration: none; font-size: inherit; font-family: inherit; }
.link-like:hover { text-decoration: underline; }

/* Project sharing */
.collaborator-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.collaborator-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid rgba(14,58,92,0.08); flex-wrap: wrap; }
.collaborator-row:last-child { border-bottom: none; }
.collaborator-row form { margin: 0; }
.collaborator-admin-toggle { margin: 0; font-weight: 500; }

/* Service attachments */
.attachment-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.attachment-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid rgba(14,58,92,0.08); }
.attachment-row:last-child { border-bottom: none; }
.attachment-delete { background: none; border: none; color: #c0392b; cursor: pointer; padding: 0.2rem; }

/* Photo gallery */
.gallery-section { margin-bottom: 2rem; }
.gallery-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.gallery-section-head form { margin: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; min-height: 60px; }
.gallery-photo { position: relative; border-radius: 4px; overflow: hidden; border: 1px solid var(--c4, #7FC7E8); aspect-ratio: 4/3; cursor: grab; background: var(--light-tint, #eef3f7); }
.gallery-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-photo.dragging { opacity: 0.4; }
.gallery-photo .gallery-photo-delete {
  position: absolute; top: 0.3rem; right: 0.3rem; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(192,57,43,0.85); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; border: none; cursor: pointer;
}
.gallery-photo .gallery-photo-view {
  position: absolute; top: 0.3rem; left: 0.3rem; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(14,58,92,0.75); color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; border: none; cursor: pointer;
}
.gallery-photo .gallery-photo-view:hover { background: rgba(14,58,92,0.95); }

.lightbox-backdrop { position: fixed; inset: 0; background: rgba(10,37,64,0.92); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 2.5rem; }
.lightbox-backdrop[hidden] { display: none; }
.lightbox-backdrop img { max-width: 100%; max-height: 100%; border-radius: 4px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.15); color: #fff; border: none; font-size: 1.2rem; cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.15); color: #fff; border: none; font-size: 1.4rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
@media (max-width: 600px) {
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.2rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}
.gallery-drop-hint { border: 2px dashed var(--c4, #7FC7E8); border-radius: 4px; padding: 1.5rem; text-align: center; color: #4a5c68; font-size: 0.85rem; }
.gallery-upload-label { display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer; }

@media (max-width: 600px) {
  .container { padding: 1.5rem 1rem; }
  .card { padding: 1.1rem 1.2rem; }
}
