.owner-access-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.7rem;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(231, 194, 122, 0.42);
  background: rgba(255, 255, 255, 0.08);
  color: #f8f2e8;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.owner-access-button:hover,
.owner-access-button:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(231, 194, 122, 0.72);
  box-shadow: 0 14px 26px rgba(6, 12, 20, 0.28);
}

.owner-access-button.is-owner {
  background: linear-gradient(135deg, #d8b06a 0%, #efcb7b 100%);
  border-color: rgba(255, 244, 214, 0.7);
  color: #1a202b;
}

.owner-access-button--mobile {
  width: 100%;
  justify-content: center;
  margin-top: 0.25rem;
}

.owner-access-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.projects-loading,
.project-empty-state {
  margin: 0 auto;
  max-width: 44rem;
  padding: 1rem 1.2rem;
  border-radius: 1rem;
  border: 1px dashed rgba(133, 148, 173, 0.34);
  text-align: center;
  color: rgba(56, 65, 80, 0.78);
  background: rgba(255, 255, 255, 0.7);
}

.projects-loading[hidden],
.project-empty-state[hidden] {
  display: none;
}

.project-card-copy {
  min-height: 4.3rem;
}

.project-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  margin-top: 0.35rem;
  padding: 0.78rem 1rem;
  border-radius: 0.9rem;
  background: #162131;
  color: #f8f2e8;
  font-size: 0.92rem;
  font-weight: 700;
  transition:
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.project-card-cta:hover,
.project-card-cta:focus-visible {
  transform: translateY(-1px);
  background: #202f45;
  box-shadow: 0 12px 24px rgba(20, 31, 43, 0.16);
}

.project-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.9rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  color: #fcfaf6;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.project-status--green {
  background: #17a34a;
}

.project-status--gold {
  background: #ca8a04;
}

.project-status--blue {
  background: #2563eb;
}

.project-status--dark {
  background: #334155;
}

.owner-status {
  min-height: 1.3rem;
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
}

.owner-status[data-tone="error"] {
  color: #be123c;
}

.owner-status[data-tone="success"] {
  color: #0f766e;
}

.owner-status[data-tone="warning"] {
  color: #9a3412;
}

.owner-status[data-tone="info"] {
  color: #1d4ed8;
}

.owner-modal,
.owner-panel {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 120;
}

.owner-modal.is-open,
.owner-panel.is-open {
  display: flex;
}

.owner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 15, 0.76);
  backdrop-filter: blur(12px);
}

.owner-dialog,
.owner-panel-shell {
  position: relative;
  z-index: 1;
  width: min(1140px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  border-radius: 1.8rem;
  background: #f8f6f1;
  box-shadow: 0 36px 90px rgba(2, 6, 12, 0.42);
}

.owner-dialog {
  width: min(460px, calc(100vw - 2rem));
  padding: 1.4rem;
}

.owner-dialog-head,
.owner-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.owner-dialog-head h3,
.owner-panel-head h3,
.owner-form-head h4,
.owner-list-head h4 {
  margin: 0;
  color: #162131;
}

.owner-dialog-head p,
.owner-panel-head p,
.owner-form-head p,
.owner-list-head p {
  margin: 0.35rem 0 0;
  color: #5b6573;
}

.owner-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: rgba(22, 33, 49, 0.08);
  color: #162131;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.owner-icon-button:hover,
.owner-icon-button:focus-visible {
  transform: translateY(-1px);
  background: rgba(22, 33, 49, 0.14);
}

.owner-note {
  margin: 1rem 0 0;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: #fff7e6;
  border: 1px solid rgba(217, 119, 6, 0.18);
  color: #8a4b04;
  font-size: 0.93rem;
  line-height: 1.5;
}

.owner-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

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

.owner-field {
  display: grid;
  gap: 0.42rem;
}

.owner-field--full {
  grid-column: 1 / -1;
}

.owner-field label {
  font-size: 0.87rem;
  font-weight: 700;
  color: #1f2937;
}

.owner-field input,
.owner-field textarea,
.owner-field select {
  width: 100%;
  min-height: 3rem;
  padding: 0.82rem 0.95rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(134, 146, 166, 0.34);
  background: #ffffff;
  color: #162131;
  font: inherit;
}

.owner-field textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.owner-field input:focus,
.owner-field textarea:focus,
.owner-field select:focus {
  outline: 2px solid rgba(214, 166, 85, 0.22);
  border-color: rgba(214, 166, 85, 0.62);
}

.owner-field-help {
  font-size: 0.82rem;
  color: #6b7280;
}

.owner-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1f2937;
}

.owner-switch input {
  width: 1rem;
  height: 1rem;
  accent-color: #d39a36;
}

.owner-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.owner-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.95rem;
  padding: 0.82rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: #162131;
  color: #f8f6f1;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.owner-button:hover,
.owner-button:focus-visible {
  transform: translateY(-1px);
}

.owner-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.owner-button--ghost {
  background: transparent;
  border-color: rgba(99, 115, 134, 0.28);
  color: #1f2937;
}

.owner-button--gold {
  background: linear-gradient(135deg, #d8b06a 0%, #efcb7b 100%);
  color: #182130;
  box-shadow: 0 16px 32px rgba(215, 176, 108, 0.2);
}

.owner-button--danger {
  background: transparent;
  border-color: rgba(190, 24, 93, 0.22);
  color: #be123c;
}

.owner-panel-shell {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  height: min(880px, calc(100vh - 2rem));
}

.owner-panel-sidebar {
  min-height: 0;
  padding: 1.35rem;
  background:
    radial-gradient(circle at top left, rgba(216, 176, 106, 0.18), transparent 38%),
    linear-gradient(180deg, #132030 0%, #101a28 100%);
  color: #f8f2e8;
}

.owner-panel-sidebar .owner-panel-head h3,
.owner-panel-sidebar .owner-list-head h4 {
  color: #f8f2e8;
}

.owner-panel-sidebar .owner-panel-head p,
.owner-panel-sidebar .owner-list-head p {
  color: rgba(248, 242, 232, 0.72);
}

.owner-owner-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.78rem 0.95rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 233, 197, 0.12);
  font-size: 0.88rem;
}

.owner-owner-chip strong {
  display: block;
  color: #f8f2e8;
}

.owner-owner-chip span {
  color: rgba(248, 242, 232, 0.72);
}

.owner-list-wrap {
  display: grid;
  gap: 0.95rem;
  margin-top: 1.25rem;
}

.owner-list {
  display: grid;
  gap: 0.72rem;
  min-height: 0;
  max-height: calc(100vh - 19rem);
  overflow: auto;
  padding-right: 0.15rem;
}

.owner-list-item {
  border-radius: 1rem;
  border: 1px solid rgba(255, 235, 198, 0.14);
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.owner-list-item.is-active {
  border-color: rgba(239, 203, 123, 0.65);
  box-shadow: inset 0 0 0 1px rgba(239, 203, 123, 0.25);
}

.owner-list-select {
  width: 100%;
  padding: 0.9rem 0.95rem 0.78rem;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.owner-list-select strong {
  display: block;
  color: #f8f2e8;
  font-size: 0.96rem;
}

.owner-list-select span {
  display: block;
  margin-top: 0.32rem;
  color: rgba(248, 242, 232, 0.68);
  font-size: 0.82rem;
  line-height: 1.45;
}

.owner-list-actions {
  display: flex;
  gap: 0.45rem;
  padding: 0 0.95rem 0.9rem;
}

.owner-text-button {
  min-height: 2.15rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 235, 198, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #f8f2e8;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.owner-text-button--danger {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, 0.24);
}

.owner-list-empty {
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(248, 242, 232, 0.72);
  font-size: 0.9rem;
}

.owner-panel-main {
  display: grid;
  gap: 1rem;
  min-height: 0;
  padding: 1.35rem 1.5rem 1.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.owner-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.owner-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.owner-form-card {
  padding: 1.15rem;
  border-radius: 1.45rem;
  background: #ffffff;
  border: 1px solid rgba(160, 173, 191, 0.2);
}

.owner-preview {
  display: grid;
  gap: 0.75rem;
}

.owner-preview-frame {
  position: relative;
  overflow: hidden;
  min-height: 13rem;
  border-radius: 1.25rem;
  background:
    linear-gradient(135deg, rgba(17, 27, 40, 0.94), rgba(32, 47, 69, 0.88)),
    radial-gradient(circle at top left, rgba(215, 176, 108, 0.22), transparent 38%);
  border: 1px solid rgba(160, 173, 191, 0.18);
}

.owner-preview-frame img {
  width: 100%;
  height: 100%;
  min-height: 13rem;
  object-fit: cover;
  display: block;
}

.owner-preview-placeholder {
  display: grid;
  place-items: center;
  min-height: 13rem;
  padding: 1.2rem;
  color: rgba(248, 242, 232, 0.78);
  text-align: center;
  line-height: 1.6;
}

.owner-form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
}

.owner-help-list {
  margin: 0;
  padding-left: 1rem;
  color: #5b6573;
  font-size: 0.9rem;
  line-height: 1.7;
}

body.owner-ui-open {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .owner-panel-shell,
  .owner-form-grid {
    grid-template-columns: 1fr;
  }

  .owner-list {
    max-height: none;
  }
}

@media (max-width: 768px) {
  .owner-grid {
    grid-template-columns: 1fr;
  }

  .owner-dialog,
  .owner-panel-shell {
    width: min(100vw - 1rem, 100%);
    height: calc(100vh - 1rem);
    max-height: calc(100vh - 1rem);
    border-radius: 1.25rem;
  }

  .owner-modal,
  .owner-panel {
    padding: 0.5rem;
  }

  .owner-panel-main,
  .owner-panel-sidebar {
    padding: 1rem;
  }

  .owner-panel-toolbar {
    align-items: stretch;
  }

  .owner-toolbar-actions,
  .owner-actions {
    width: 100%;
  }

  .owner-toolbar-actions .owner-button,
  .owner-actions .owner-button {
    flex: 1 1 auto;
  }
}
