:root {
  --ink-950: #0f1724;
  --ink-800: #1f2b3d;
  --ink-700: #2d3d57;
  --ink-500: #4b5f7f;
  --paper-100: #f2f4f8;
  --paper-50: #fbfcfe;
  --accent-500: #ef7e3b;
  --accent-600: #d56527;
  --accent-100: #ffe7d8;
  --signal-green: #2f9e67;
  --signal-amber: #b57e00;
  --signal-blue: #2367d1;
  --signal-slate: #5c6c87;
  --container: min(1150px, 92vw);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-xl: 0 24px 80px rgba(15, 23, 36, 0.18);
  --shadow-md: 0 14px 30px rgba(15, 23, 36, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  color: var(--ink-800);
  background: radial-gradient(circle at 10% 0%, #dbe9ff 0%, #f6f9ff 30%, #f6f8fb 60%, #eef2f8 100%);
  font-family: "Manrope", "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.site-shell {
  max-width: var(--container);
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(251, 252, 254, 0.8);
  border-bottom: 1px solid rgba(31, 43, 61, 0.08);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand-mark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(15, 23, 36, 0.1);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-title {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-950);
}

.brand-sub {
  margin: 0;
  font-size: 0.76rem;
  color: var(--ink-500);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-primary-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.22rem;
  padding: 0.2rem;
  border-radius: 999px;
  border: 1px solid rgba(31, 43, 61, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.nav-primary-group .nav-link {
  font-weight: 600;
  padding: 0.45rem 0.86rem;
}

.nav-link,
.nav-button {
  border: 0;
  border-radius: 999px;
  padding: 0.48rem 0.95rem;
  font-size: 0.92rem;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  color: var(--ink-800);
}

.nav-link:hover,
.nav-button:hover {
  background: rgba(31, 43, 61, 0.08);
}

.nav-link.active {
  background: rgba(35, 103, 209, 0.16);
  color: var(--signal-blue);
  box-shadow: inset 0 0 0 1px rgba(35, 103, 209, 0.28);
  font-weight: 700;
}

.nav-link.primary,
.nav-button.primary,
.button.primary {
  background: linear-gradient(145deg, var(--accent-500), var(--accent-600));
  color: #fff;
  box-shadow: 0 8px 22px rgba(213, 101, 39, 0.34);
}

.nav-link.primary:hover,
.nav-button.primary:hover,
.button.primary:hover {
  filter: brightness(1.03);
}

.user-chip {
  display: none;
  position: relative;
}

.user-chip-button {
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.7rem 0.35rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(31, 43, 61, 0.14);
  box-shadow: 0 2px 8px rgba(15, 23, 36, 0.06);
  color: var(--ink-800);
  cursor: pointer;
  font: inherit;
}

.user-chip-button:hover {
  background: #fff;
}

.user-chip.open .user-chip-button {
  box-shadow: 0 4px 12px rgba(15, 23, 36, 0.1);
}

.user-avatar {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #2b4f86, #1f3e6a);
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.user-name {
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--ink-950);
}

.user-role {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-500);
}

.user-caret {
  font-size: 0.72rem;
  color: var(--ink-500);
  padding-left: 0.08rem;
}

.user-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  min-width: 170px;
  padding: 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(31, 43, 61, 0.16);
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 36, 0.16);
  z-index: 40;
}

.user-menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-800);
  font: inherit;
  text-decoration: none;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
}

.user-menu-item:hover {
  background: rgba(31, 43, 61, 0.08);
}

.user-menu-separator {
  height: 1px;
  margin: 0.35rem 0;
  background: rgba(31, 43, 61, 0.14);
}

.user-menu-group-label {
  margin: 0.2rem 0.45rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.admin-subnav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  padding: 0.3rem;
  border: 1px solid rgba(31, 43, 61, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
}

.admin-subnav-label {
  margin: 0 0 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.main {
  padding: 2rem 0 3.5rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 2.3rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #10203d 0%, #1b3362 52%, #274d89 100%);
  color: #f9fbff;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 290px;
  height: 290px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 126, 59, 0.7) 0%, rgba(239, 126, 59, 0) 72%);
}

.hero h1 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.15;
}

.hero p {
  font-size: 1.05rem;
  margin: 1rem 0 1.35rem;
  color: rgba(244, 248, 255, 0.93);
}

.button-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.delete-user-btn {
  background: rgba(172, 34, 34, 0.92);
  color: #fff;
}

.delete-user-btn:hover {
  filter: brightness(1.05);
}

.delete-user-btn[disabled] {
  background: rgba(128, 138, 156, 0.5);
  color: rgba(255, 255, 255, 0.85);
  cursor: not-allowed;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-media {
  border-radius: calc(var(--radius-lg) - 6px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 34px rgba(5, 10, 18, 0.45);
}

.hero-media img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.section {
  margin-top: 2.4rem;
}

.section h2 {
  margin: 0 0 0.9rem;
  font-family: "Sora", sans-serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  color: var(--ink-950);
}

.section p.lead {
  max-width: 760px;
  color: var(--ink-700);
  margin-top: 0;
}

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

.card {
  border-radius: var(--radius-md);
  background: var(--paper-50);
  border: 1px solid rgba(15, 23, 36, 0.1);
  box-shadow: var(--shadow-md);
  padding: 1rem;
}

.card h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.03rem;
}

.card p {
  margin: 0.55rem 0 0;
  color: var(--ink-700);
  font-size: 0.95rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(15, 23, 36, 0.08);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.photo-library-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.photo-tile {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  border: 2px solid rgba(31, 43, 61, 0.12);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.photo-tile img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.photo-tile.active {
  border-color: rgba(47, 158, 103, 0.75);
}

.photo-tile.inactive {
  border-color: rgba(120, 131, 152, 0.45);
  opacity: 0.82;
}

.photo-remove-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  background: rgba(172, 34, 34, 0.92);
  color: #fff;
  font-size: 0.76rem;
  cursor: pointer;
}

.photo-remove-btn:hover {
  filter: brightness(1.06);
}

.photo-tile-meta {
  padding: 0.62rem 0.72rem 0.74rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.photo-tile-meta strong {
  font-size: 0.86rem;
}

.photo-tile-meta small {
  color: var(--ink-700);
  font-size: 0.77rem;
}

.panel {
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 36, 0.1);
  box-shadow: var(--shadow-md);
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

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

.field label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-700);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(31, 43, 61, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.72rem;
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
}

.field textarea {
  min-height: 115px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--signal-blue);
  box-shadow: 0 0 0 4px rgba(35, 103, 209, 0.12);
  outline: none;
}

.upload-dropzone {
  width: 100%;
  border: 1px dashed rgba(31, 43, 61, 0.28);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
  padding: 0.85rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  cursor: pointer;
}

.upload-dropzone small {
  color: var(--ink-600, #56657d);
}

.upload-dropzone.drag-active {
  border-color: var(--signal-blue);
  background: rgba(35, 103, 209, 0.08);
  box-shadow: 0 0 0 4px rgba(35, 103, 209, 0.12);
}

.file-chip-list {
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(35, 103, 209, 0.12);
  border-radius: 999px;
  padding: 0.22rem 0.35rem 0.22rem 0.6rem;
}

.file-chip-text {
  font-size: 0.8rem;
  color: var(--signal-blue);
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip-remove {
  border: 0;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: rgba(15, 23, 36, 0.22);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  font-size: 0.95rem;
}

.file-chip-remove:hover {
  background: rgba(153, 42, 42, 0.88);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.feedback {
  margin-top: 0.9rem;
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.82rem;
  font-size: 0.9rem;
  display: none;
}

.feedback.error {
  display: block;
  background: #ffe4e4;
  color: #8e2020;
  border: 1px solid #ffc1c1;
}

.feedback.success {
  display: block;
  background: #dff4e6;
  color: #1f7648;
  border: 1px solid #b9e4c9;
}

.orders-list {
  display: grid;
  gap: 1rem;
}

.order-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 43, 61, 0.13);
  background: #fff;
  padding: 1rem;
}

.order-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.order-card-head h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1.04rem;
}

.order-number {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-500);
}

.order-details-grid {
  margin: 0.85rem 0 0;
  padding: 0.72rem;
  border-radius: 12px;
  border: 1px solid rgba(31, 43, 61, 0.1);
  background: rgba(31, 43, 61, 0.04);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.6rem;
}

.order-detail {
  margin: 0;
}

.order-detail dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.order-detail dd {
  margin: 0.17rem 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-900, #172235);
}

.order-section {
  margin-top: 0.8rem;
}

.order-section-label {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.order-description,
.order-note {
  margin: 0.26rem 0 0;
  font-size: 0.95rem;
}

.order-file-list,
.attachment-list {
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.42rem;
  font-size: 0.83rem;
}

.order-timestamp {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-500);
}

.attachment-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.52rem;
  background: rgba(35, 103, 209, 0.12);
  color: var(--signal-blue);
  text-decoration: none;
}

.attachment-link:hover {
  background: rgba(35, 103, 209, 0.2);
}

.badge {
  border-radius: 999px;
  padding: 0.27rem 0.58rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(44, 58, 82, 0.11);
  color: var(--ink-700);
}

.badge.received,
.badge.in-review {
  background: rgba(35, 103, 209, 0.15);
  color: var(--signal-blue);
}

.badge.quoted,
.badge.ready-for-pickup {
  background: rgba(181, 126, 0, 0.18);
  color: var(--signal-amber);
}

.badge.in-production,
.badge.completed,
.badge.shipped {
  background: rgba(47, 158, 103, 0.16);
  color: var(--signal-green);
}

.badge.cancelled {
  background: rgba(153, 42, 42, 0.15);
  color: #9a2323;
}

.admin-orders-list {
  display: grid;
  gap: 1rem;
  margin-top: 0.8rem;
}

.admin-order-card {
  border-radius: 14px;
  border: 1px solid rgba(31, 43, 61, 0.13);
  background: #fff;
  padding: 0.95rem;
}

.admin-order-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.admin-order-head h3 {
  margin: 0;
  font-family: "Sora", sans-serif;
  font-size: 1rem;
}

.admin-order-number {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-500);
}

.admin-order-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.admin-order-block {
  margin-top: 0.8rem;
}

.admin-order-grid .admin-order-block {
  margin-top: 0;
  padding: 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(31, 43, 61, 0.1);
  background: rgba(31, 43, 61, 0.04);
}

.admin-order-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.admin-order-value {
  margin: 0.22rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-950);
}

.admin-order-sub {
  margin: 0.22rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-700);
}

.admin-order-description {
  margin: 0.3rem 0 0;
  font-size: 0.95rem;
}

.admin-order-files .attachment-list {
  margin-top: 0.38rem;
}

.admin-order-controls {
  margin-top: 0.9rem;
  border-top: 1px solid rgba(31, 43, 61, 0.12);
  padding-top: 0.85rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.admin-control label {
  display: block;
  margin-bottom: 0.32rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.admin-control-notes {
  grid-column: 1 / -1;
}

.admin-control-notes .inline-textarea {
  min-height: 84px;
}

.admin-control-action {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(31, 43, 61, 0.09);
  padding: 0.7rem 0.48rem;
  font-size: 0.88rem;
}

.admin-table th {
  font-family: "Sora", sans-serif;
  color: var(--ink-950);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.inline-input,
.inline-select,
.inline-textarea {
  width: 100%;
  border: 1px solid rgba(31, 43, 61, 0.2);
  border-radius: 8px;
  padding: 0.45rem;
  font-family: inherit;
  font-size: 0.85rem;
}

.inline-textarea {
  min-height: 62px;
}

.footer {
  margin-top: 2.8rem;
  padding: 1.4rem 0 2.8rem;
  border-top: 1px solid rgba(31, 43, 61, 0.1);
  color: var(--ink-700);
  font-size: 0.9rem;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero,
.section,
.panel {
  animation: riseIn 0.55s ease-out both;
}

.section:nth-child(2) {
  animation-delay: 0.08s;
}

.section:nth-child(3) {
  animation-delay: 0.16s;
}

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

  .order-details-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-order-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card-grid,
  .gallery,
  .form-grid,
  .photo-library-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .header-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-details-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-order-grid,
  .admin-order-controls {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .gallery,
  .form-grid,
  .photo-library-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item img {
    height: 210px;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }

  .upload-dropzone {
    flex-direction: column;
    align-items: flex-start;
  }

  .file-chip-text {
    max-width: 210px;
  }
}
