:root {
  --color-primary-1: #ff8f00;
  --color-primary-2: #ffa726;
  --color-primary-3: #e67e22;
  --color-accent-1: #f7c62f;
  --color-accent-2: #f4b400;
  --color-bg-dark-1: #0b0f1a;
  --color-bg-dark-2: #101522;
  --color-light-1: #ffffff;
  --color-light-2: #f5f5f5;
  --gradient-main: linear-gradient(135deg, #ff8f00 0%, #e67e22 100%);
  --gradient-soft: linear-gradient(135deg, #ffa726 0%, #ff8f00 100%);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.28);
}

html {
  font-size: 15px;
  min-height: 100%;
}

@media (min-width: 992px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  color: #2a1d12;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 143, 0, 0.16), transparent 38%),
    radial-gradient(circle at 88% 90%, rgba(230, 126, 34, 0.14), transparent 35%),
    linear-gradient(145deg, #fffdf8, #fff7ef);
  font-family: "Space Grotesk", "Segoe UI", "Trebuchet MS", sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
}

body::before {
  top: 7%;
  right: -120px;
  width: 320px;
  height: 320px;
  border-radius: 44px;
  transform: rotate(24deg);
  background: linear-gradient(145deg, rgba(255, 143, 0, 0.25), rgba(255, 167, 38, 0.12));
}

body::after {
  left: -140px;
  bottom: 8%;
  width: 300px;
  height: 300px;
  border-radius: 36px;
  transform: rotate(-18deg);
  background: linear-gradient(145deg, rgba(230, 126, 34, 0.25), rgba(247, 198, 47, 0.1));
}

a {
  color: var(--color-accent-1);
}

a:hover {
  color: var(--color-light-1);
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 330px;
  position: fixed;
  inset: 0 auto 0 0;
  overflow-y: auto;
  padding: 1.4rem 1rem;
  border-right: 1px solid rgba(255, 167, 38, 0.25);
  background: linear-gradient(180deg, #fff5e8, #fffdf8);
  box-shadow: 0 8px 24px rgba(230, 126, 34, 0.16);
}

.app-brand {
  display: block;
  margin-bottom: 1.2rem;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: #1a1a1a;
  background: var(--gradient-main);
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.app-brand:hover {
  color: #111;
}

.app-menu-group + .app-menu-group {
  margin-top: 1rem;
}

.app-branding-panel {
  margin-bottom: 1.4rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 167, 38, 0.25);
}

.custom-brand-display {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.custom-brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgba(255, 143, 0, 0.15);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.custom-brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.custom-brand-logo span {
  font-weight: 700;
  color: #8f541e;
}

.custom-brand-details {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.custom-brand-title {
  font-weight: 700;
  font-size: 1rem;
  color: #2a1d12;
}

.custom-brand-subtitle {
  color: #7b5a3d;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
}

.branding-preview {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(255, 167, 38, 0.4);
  background: #fff;
}

.app-menu-title {
  margin: 0.2rem 0 0.7rem;
  font-size: 0.83rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(133, 76, 25, 0.9);
}

.app-side-btn {
  display: block;
  width: 100%;
  margin-bottom: 0.6rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 143, 0, 0.35);
  color: #111;
  text-decoration: none;
  font-weight: 700;
  background: var(--gradient-soft);
  box-shadow: 0 6px 14px rgba(255, 143, 0, 0.16);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.app-side-btn:hover,
.app-side-btn:focus {
  color: #111;
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.app-content {
  flex: 1;
  margin-left: 330px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-shell-public .app-content {
  margin-left: 0;
}

.app-shell-public .app-sidebar {
  display: none;
}

.public-content {
  min-height: 100vh;
  padding: 0;
}

.app-topbar {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1rem 0;
}

.app-btn-primary,
.btn-primary {
  border: none;
  border-radius: 999px;
  color: #111;
  font-weight: 700;
  background: var(--gradient-main);
  padding: 0.55rem 1.2rem;
  box-shadow: 0 8px 20px rgba(255, 143, 0, 0.28);
}

.app-btn-primary:hover,
.btn-primary:hover {
  color: #111;
  filter: brightness(1.05);
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus,
.app-side-btn:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 167, 38, 0.32);
}

main {
  margin-top: 0.8rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 167, 38, 0.2);
  background: linear-gradient(160deg, #ffffff, #fff9f2);
  box-shadow: 0 10px 24px rgba(230, 126, 34, 0.12);
  padding: clamp(1rem, 2vw, 1.8rem);
}

.app-shell-public main {
  margin-top: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 167, 38, 0.22);
  background: linear-gradient(160deg, #ffffff, #fff6ec);
  color: #2a1d12;
}

.crud-card {
  box-shadow: 0 10px 22px rgba(230, 126, 34, 0.1);
}

.table-theme {
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(255, 143, 0, 0.05);
  --bs-table-hover-bg: rgba(255, 143, 0, 0.08);
  --bs-table-color: #2a1d12;
}

.table-theme thead th {
  border-bottom: 1px solid rgba(255, 143, 0, 0.24);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8f541e;
}

.table-theme td,
.table-theme th {
  border-color: rgba(255, 143, 0, 0.16);
}

.role-badge {
  background: rgba(255, 143, 0, 0.14);
  color: #8f541e;
  margin-right: 0.25rem;
}

.owner-badge {
  background: rgba(230, 126, 34, 0.2);
  color: #7b3f12;
}

.owner-highlight {
  border: 1px solid rgba(255, 143, 0, 0.26);
  background: linear-gradient(135deg, rgba(255, 167, 38, 0.16), rgba(255, 143, 0, 0.1));
  border-radius: 12px;
  padding: 0.8rem 1rem;
  color: #6d3d14;
}

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

.gallery-card {
  border: 1px solid rgba(255, 143, 0, 0.22);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 18px rgba(230, 126, 34, 0.12);
}

.gallery-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.gallery-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem;
}

.public-gallery-body {
  background: linear-gradient(145deg, #fffdf8, #fff3e0);
  user-select: none;
}

body.public-gallery-body {
  background: linear-gradient(145deg, #fffdf8, #fff3e0);
  user-select: none;
}

.public-gallery-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.public-gallery-header {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffa726, #ff8f00);
  color: #2a1d12;
}

.public-gallery-grid .gallery-card img {
  height: 260px;
}

.protected-photo {
  position: relative;
}

.protected-photo::after {
  content: var(--wm);
  position: absolute;
  inset: 0;
  color: rgba(255, 255, 255, 0.24);
  font-size: 1.1rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.package-card {
  display: block;
  cursor: pointer;
}

.package-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.package-card-body {
  border: 1px solid rgba(255, 143, 0, 0.25);
  border-radius: 12px;
  padding: 0.75rem;
  background: #fff8ef;
  min-height: 140px;
}

.package-card input:checked + .package-card-body {
  border-color: rgba(255, 143, 0, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 143, 0, 0.18);
}

.selectable-photo {
  position: relative;
  cursor: pointer;
}

.selectable-photo input {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
}

.selectable-photo.selected {
  outline: 3px solid rgba(255, 143, 0, 0.85);
}

.alert-success {
  border: 1px solid rgba(76, 175, 80, 0.3);
  background: rgba(76, 175, 80, 0.1);
  color: #1b5e20;
}

.alert-danger {
  border: 1px solid rgba(211, 47, 47, 0.3);
  background: rgba(211, 47, 47, 0.1);
  color: #7f1d1d;
}

.form-control,
.form-select,
.form-floating > .form-control,
.form-floating > .form-control-plaintext {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 167, 38, 0.35);
  background: rgba(255, 255, 255, 0.96);
  color: #1b1b1b;
  min-height: 44px;
}

.hero,
.page-hero,
.jumbotron {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 167, 38, 0.4);
  color: #2a1d12;
  background: var(--gradient-main);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.5rem, 2.4vw, 2.8rem);
}

.app-footer {
  margin-top: auto;
  padding: 0.8rem 0 1rem;
  color: rgba(90, 56, 24, 0.8);
}

.app-footer a {
  color: var(--color-accent-1);
}

.auth-layout-body {
  min-height: 100vh;
}

.auth-layout-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 2.5vw, 2rem);
}

.auth-layout-main {
  width: min(1180px, 100%);
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.auth-page {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 143, 0, 0.2), transparent 38%),
    radial-gradient(circle at 80% 80%, rgba(230, 126, 34, 0.2), transparent 38%),
    linear-gradient(145deg, #ffffff, #fff2e6);
  border-radius: 28px;
}

.auth-hero {
  padding: clamp(1rem, 2vw, 2rem);
  background: linear-gradient(160deg, rgba(255, 143, 0, 0.2), rgba(255, 255, 255, 0.8));
  border-radius: 24px;
  border: 1px solid rgba(255, 143, 0, 0.25);
  box-shadow: 0 18px 40px rgba(230, 126, 34, 0.18);
}

.auth-hero h1 {
  font-family: "Sora", "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 3vw, 2.8rem);
  margin-bottom: 0.8rem;
}

.auth-hero p {
  color: #6b4a2a;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.auth-kicker {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 143, 0, 0.2);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7b3f12;
  font-weight: 700;
  margin-bottom: 1rem;
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.auth-stats div {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 0.8rem;
  border: 1px solid rgba(255, 143, 0, 0.2);
  display: grid;
  gap: 0.3rem;
}

.auth-stats strong {
  font-size: 1.2rem;
  color: #5f2a0b;
}

.auth-stats span {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8b5a2a;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border: 1px solid rgba(255, 143, 0, 0.2);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(230, 126, 34, 0.18);
  padding: 1.6rem;
  justify-self: end;
}

.auth-brand {
  display: inline-block;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  background: var(--gradient-main);
  color: #1a1a1a;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.auth-subtitle {
  color: #7b5a3d;
}

.financial-progress {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 167, 38, 0.18);
}

.financial-progress-bar {
  background: linear-gradient(135deg, #ff8f00, #e67e22);
}

@media (max-width: 992px) {
  .app-shell {
    display: block;
  }

  .app-sidebar {
    position: sticky;
    inset: 0 0 auto 0;
    width: 100%;
    z-index: 1020;
    max-height: 52vh;
  }

  .app-content {
    margin-left: 0;
  }

  .app-side-btn {
    font-size: 0.96rem;
    padding: 0.85rem 0.92rem;
  }

  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-card {
    justify-self: stretch;
  }
}
