:root {
  --blue: #0057b8;
  --blue-dark: #003b7a;
  --blue-deep: #002f63;
  --blue-light: #eaf4ff;
  --blue-lighter: #f4f9ff;

  --orange: #ff7a00;
  --orange-dark: #df6500;
  --orange-light: #fff1e3;
  --orange-lighter: #fff8f0;

  --white: #ffffff;
  --black: #0b1728;
  --text: #26364a;
  --muted: #718096;
  --muted-light: #9aa7b6;

  --border: #e6ebf2;
  --border-strong: #d5dde8;
  --light: #f7f9fc;
  --surface-soft: #fbfcfe;

  --success: #0057b8;
  --success-light: #eaf4ff;

  --danger: #df6500;
  --danger-light: #fff1e3;

  --warning: #df6500;
  --warning-light: #fff1e3;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --shadow-sm: 0 8px 25px rgba(11, 23, 40, 0.06);
  --shadow-md: 0 20px 55px rgba(11, 23, 40, 0.16);
  --shadow-lg: 0 30px 80px rgba(11, 23, 40, 0.22);

  --sidebar-width: 255px;

  --font-body: "DM Sans", sans-serif;
  --font-heading: "Plus Jakarta Sans", sans-serif;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--light);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* =========================================================
   LAYOUT
========================================================= */

.app {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal);
}

.sidebar-brand {
  height: 82px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand img {
  width: 145px;
  max-width: 100%;
  height: auto;
  display: block;
}

.sidebar-nav {
  padding: 22px 14px;
  overflow-y: auto;
  flex: 1;
}

.nav-section-label {
  padding: 0 12px 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar-link {
  min-height: 45px;
  padding: 11px 13px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 11px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.sidebar-link:hover {
  background: var(--light);
  color: var(--blue);
  transform: translateX(1px);
}

.sidebar-link.active {
  background: var(--blue-light);
  color: var(--blue);
}

.sidebar-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
}

.back-site {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition-fast);
}

.back-site:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-lighter);
}

.main {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

/* =========================================================
   TOPBAR
========================================================= */

.topbar {
  height: 82px;
  padding: 0 32px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 800;
  backdrop-filter: blur(12px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mobile-menu {
  width: 42px;
  height: 42px;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 20px;
  transition: var(--transition-fast);
}

.mobile-menu:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.page-heading h1 {
  color: var(--black);
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.page-heading p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.notification-button {
  position: relative;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 17px;
  transition: var(--transition-fast);
}

.notification-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.notification-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--white);
}

.employee {
  display: flex;
  align-items: center;
  gap: 10px;
}

.employee-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
}

.employee-info strong {
  display: block;
  color: var(--black);
  font-size: 13px;
  line-height: 1.2;
}

.employee-info span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

/* =========================================================
   CONTENT
========================================================= */

.content {
  padding: 32px;
  max-width: 1500px;
  margin: 0 auto;
}

.content-header {
  margin-bottom: 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.content-title h2 {
  color: var(--black);
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.content-title p {
  max-width: 650px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

/* =========================================================
   BUTTONS
========================================================= */

.primary-button {
  min-height: 44px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 87, 184, 0.18);
  transition:
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.primary-button:hover {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 11px 25px rgba(0, 87, 184, 0.24);
}

.primary-button:active {
  transform: translateY(0);
}

.primary-button:focus-visible {
  outline: 3px solid rgba(0, 87, 184, 0.18);
  outline-offset: 2px;
}

.secondary-button {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  transition: var(--transition-fast);
}

.secondary-button:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-lighter);
}

/* =========================================================
   STAT CARDS
========================================================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 25px;
}

.stat-card {
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stat-icon {
  width: 35px;
  height: 35px;
  border-radius: 10px;
  background: var(--blue-light);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 15px;
}

.stat-card:nth-child(2) .stat-icon,
.stat-card:nth-child(4) .stat-icon {
  background: var(--orange-light);
  color: var(--orange);
}

.stat-number {
  margin-top: 13px;
  color: var(--black);
  font-family: var(--font-heading);
  font-size: 27px;
  font-weight: 800;
}

.stat-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

/* =========================================================
   TOOLBAR
========================================================= */

.management-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.toolbar {
  padding: 17px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 250px;
}

.search-wrap {
  position: relative;
  width: min(370px, 100%);
}

.search-wrap span {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 13px 0 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: var(--white);
  color: var(--text);
  font-size: 13px;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.08);
}

.filter-select {
  height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  outline: none;
  font-size: 13px;
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.08);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.refresh-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  color: var(--text);
  font-size: 16px;
  transition: var(--transition-fast);
}

.refresh-button:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: var(--blue-lighter);
}

/* =========================================================
   SERVICE LIST
========================================================= */

.service-list {
  width: 100%;
  overflow-x: auto;
  padding: 0 20px 20px;
}

.service-row {
  width: 100%;
  min-width: 920px;
  min-height: 92px;
  padding: 15px 0;

  display: grid;

  grid-template-columns:
    54px
    64px
    minmax(230px, 1fr)
    130px
    145px
    110px
    minmax(220px, auto);

  align-items: center;
  gap: 14px;

  border-bottom: 1px solid var(--border);

  background: var(--white);

  transition:
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.service-row:hover {
  background: var(--blue-lighter);
}

.service-row:last-child {
  border-bottom: 0;
}

/* =========================================================
   SERVICE ORDER
========================================================= */

.service-order {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--blue-light);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
}

/* =========================================================
   SERVICE IMAGE COLUMN
========================================================= */

.service-row-image {
  width: 54px;
  height: 54px;

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 12px;

  background: var(--blue-lighter);

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;
}

.service-row-image img,
.service-thumbnail-image {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
  object-position: center;

  border-radius: inherit;
}

.service-thumbnail-placeholder {
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--blue-light);

  color: var(--blue);

  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 800;

  text-transform: uppercase;
}

/* =========================================================
   OLD THUMBNAIL SUPPORT
========================================================= */

.service-thumbnail {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--blue-lighter);
  display: grid;
  place-items: center;
}

.service-thumbnail img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.service-thumbnail.image-loaded img {
  opacity: 1;
}

.service-thumbnail-loading {
  position: absolute;
  inset: 0;
  z-index: 2;

  background: linear-gradient(
    90deg,
    #eef2f7 25%,
    #f7f9fc 37%,
    #eef2f7 63%
  );

  background-size: 400% 100%;
  animation: serviceImageShimmer 1.4s ease infinite;
}

.service-thumbnail.image-loaded .service-thumbnail-loading {
  display: none;
}

.service-thumbnail-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--blue-light);
  color: var(--blue);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 800;
}

@keyframes serviceImageShimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

/* =========================================================
   SERVICE MAIN TEXT
========================================================= */

.service-row-main {
  min-width: 0;
  width: 100%;
}

.service-row-main h4 {
  margin: 0;

  color: var(--black);

  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;

  line-height: 1.35;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-row-main p {
  margin: 5px 0 0;

  max-width: 100%;

  color: var(--muted);

  font-size: 11px;
  line-height: 1.5;

  overflow: hidden;
  text-overflow: ellipsis;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* =========================================================
   OLD SERVICE NAME SUPPORT
========================================================= */

.service-name-media {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.service-name-copy {
  min-width: 0;
}

.service-name {
  min-width: 0;
}

.service-name strong {
  display: block;
  color: var(--black);
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-name span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =========================================================
   CATEGORY
========================================================= */

.service-row-category {
  min-width: 0;

  color: var(--text);

  font-size: 12px;
  font-weight: 700;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-category {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

/* =========================================================
   PRICE
========================================================= */

.service-row-price {
  min-width: 0;

  color: var(--black);

  font-size: 12px;
  font-weight: 800;

  line-height: 1.4;

  overflow: hidden;
  text-overflow: ellipsis;
}

.service-price {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

/* =========================================================
   STATUS
========================================================= */

.service-row-status {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.status-badge {
  min-height: 28px;

  padding: 0 10px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  border-radius: 999px;

  font-size: 10px;
  font-weight: 800;

  text-transform: capitalize;

  white-space: nowrap;
}

.status-badge::before {
  content: "";

  width: 6px;
  height: 6px;

  flex: 0 0 6px;

  border-radius: 50%;

  background: currentColor;
}

.status-badge.active,
.status-active {
  background: var(--blue-light);
  color: var(--blue);
}

.status-badge.inactive,
.status-inactive {
  background: var(--orange-light);
  color: var(--orange-dark);
}

.status-badge.archived {
  background: #f1f3f6;
  color: #6b7280;
}

/* =========================================================
   SERVICE ACTIONS
========================================================= */

.service-row-actions {
  display: flex;

  align-items: center;
  justify-content: flex-end;

  gap: 6px;

  min-width: 0;
}

.service-row-actions .btn {
  min-height: 34px;

  padding: 0 10px;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--white);

  color: var(--text);

  font-size: 11px;
  font-weight: 700;

  white-space: nowrap;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.service-row-actions .btn:hover {
  border-color: var(--blue);

  background: var(--blue-lighter);

  color: var(--blue);

  transform: translateY(-1px);
}

.service-row-actions .btn[data-action="archive"]:hover {
  border-color: var(--orange);

  background: var(--orange-light);

  color: var(--orange-dark);
}

.service-row-actions .btn[data-action="toggle"] {
  min-width: 76px;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 13px;
  transition: var(--transition-fast);
}

.icon-button:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-lighter);
}

.icon-button.danger:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
  background: var(--orange-light);
}

.service-readonly {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

/* =========================================================
   PAGINATION
========================================================= */

.services-pagination {
  width: 100%;
  padding: 17px 20px;

  border-top: 1px solid var(--border);

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;

  background: var(--white);
}

.services-pagination-info {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.services-pagination-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.services-pagination-button {
  min-width: 34px;
  height: 34px;

  padding: 0 9px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid var(--border);
  border-radius: 9px;

  background: var(--white);
  color: var(--text);

  font-size: 11px;
  font-weight: 700;

  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.services-pagination-button:hover:not(:disabled) {
  border-color: var(--blue);
  background: var(--blue-lighter);
  color: var(--blue);
  transform: translateY(-1px);
}

.services-pagination-button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.services-pagination-button:disabled {
  background: var(--light);
  color: var(--muted-light);
  opacity: 0.65;
}

.services-pagination-ellipsis {
  min-width: 28px;
  height: 34px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: var(--muted);

  font-size: 12px;
  font-weight: 700;
}

.services-pagination[hidden] {
  display: none !important;
}

/* =========================================================
   EMPTY STATE
========================================================= */

.empty-state {
  padding: 70px 25px;
  text-align: center;
  display: none;
}

.empty-state.visible {
  display: block;
}

.empty-state[hidden] {
  display: none !important;
}

.empty-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 17px;
  border-radius: 16px;
  background: var(--blue-light);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 24px;
}

.empty-state h3 {
  color: var(--black);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
}

.empty-state p {
  max-width: 450px;
  margin: 8px auto 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* =========================================================
   MODAL
========================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  width: 100%;
  height: 100%;
  padding: 25px;
  background: rgba(11, 23, 40, 0.58);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow-y: auto;
  isolation: isolate;

  transition:
    opacity var(--transition-normal),
    visibility var(--transition-normal);
}

.modal[hidden] {
  display: none !important;
}

.modal:not([hidden]) {
  display: flex;
}

.modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-card {
  position: relative;
  z-index: 10000;

  width: min(680px, 100%);
  max-height: min(850px, 92vh);

  overflow-y: auto;

  background: var(--white);

  border: 1px solid rgba(230, 235, 242, 0.9);
  border-radius: var(--radius-lg);

  box-shadow: var(--shadow-lg);

  transform: translateY(12px) scale(0.98);

  transition: transform var(--transition-normal);

  scrollbar-width: thin;
}

.modal.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-card::-webkit-scrollbar {
  width: 7px;
}

.modal-card::-webkit-scrollbar-track {
  background: transparent;
}

.modal-card::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 999px;
}

.modal-header {
  padding: 21px 24px;

  border-bottom: 1px solid var(--border);

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 15px;

  position: sticky;
  top: 0;

  background: var(--white);

  z-index: 2;
}

.modal-header h3 {
  color: var(--black);
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 800;
}

.modal-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.modal-close {
  width: 36px;
  height: 36px;

  border: 1px solid var(--border);
  border-radius: 9px;

  background: var(--white);
  color: var(--muted);

  font-size: 18px;

  display: grid;
  place-items: center;

  transition: var(--transition-fast);

  flex: 0 0 auto;
}

.modal-close:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
  background: var(--orange-light);
}

.modal-body {
  padding: 24px;
}

.form-section {
  padding: 0 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.form-section:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.form-section-heading {
  margin-bottom: 17px;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 18px;
}

.form-section-heading h4 {
  color: var(--black);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
}

.form-section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.form-group {
  min-width: 0;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.form-control {
  width: 100%;
  min-height: 44px;

  padding: 10px 12px;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: var(--white);
  color: var(--text);

  outline: none;

  font-size: 13px;

  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.form-control::placeholder {
  color: var(--muted-light);
}

.form-control:hover {
  border-color: var(--border-strong);
}

.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.08);
}

.form-control:invalid:not(:placeholder-shown) {
  border-color: var(--orange);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.form-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.form-control[readonly] {
  background: var(--light);
  color: var(--muted);
  cursor: default;
}

.form-control:disabled {
  background: var(--light);
  color: var(--muted);
  cursor: not-allowed;
}

/* =========================================================
   SERVICE IMAGE UPLOAD
========================================================= */

.service-image-section {
  width: 100%;
}

.service-image-upload {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.service-image-preview {
  position: relative;

  width: 210px;
  height: 155px;

  overflow: hidden;

  border: 1px solid var(--border);
  border-radius: 15px;

  background: var(--surface-soft);

  display: flex;
  align-items: center;
  justify-content: center;
}

.service-image-preview.has-image {
  background: var(--black);
}

.service-image-preview img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
  object-position: center center;
}

.service-image-preview-empty {
  width: 100%;
  height: 100%;

  padding: 20px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.service-image-preview-empty > span {
  width: 44px;
  height: 44px;

  margin-bottom: 10px;

  border-radius: 12px;

  background: var(--blue-light);
  color: var(--blue);

  display: grid;
  place-items: center;

  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
}

.service-image-preview-empty strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.service-image-preview-empty small {
  max-width: 170px;

  margin-top: 5px;

  color: var(--muted);

  font-size: 9px;
  line-height: 1.45;
}

#serviceImageInput {
  display: none;
}

.service-image-upload-actions {
  display: flex;

  align-items: flex-start;

  flex-wrap: wrap;

  gap: 9px;
}

.service-image-upload-actions .secondary-button,
.service-image-upload-actions .danger-button {
  min-height: 42px;
}

.service-image-upload-actions .danger-button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

.service-image-upload-actions .danger-button:hover {
  background: var(--orange-light);
  border-color: var(--orange);
  color: var(--orange-dark);
  transform: none;
}

.service-image-upload-actions button {
  white-space: nowrap;
}

.service-image-file-name {
  min-height: 18px;

  margin-top: 10px;

  color: var(--text);

  font-size: 11px;
  font-weight: 700;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-image-upload-status {
  min-height: 18px;

  margin-top: 6px;

  color: var(--muted);

  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
}

.service-image-upload-status.success {
  color: var(--blue);
}

.service-image-upload-status.error {
  color: var(--orange-dark);
}

.service-image-upload-status.uploading {
  color: var(--blue);
}

.service-image-upload-progress {
  width: 100%;

  height: 6px;

  margin-top: 8px;

  overflow: hidden;

  border-radius: 999px;

  background: var(--border);
}

.service-image-upload-progress[hidden] {
  display: none !important;
}

.service-image-upload-progress-bar {
  width: 0;
  height: 100%;

  border-radius: inherit;

  background: var(--blue);

  transition: width 0.15s ease;
}

.service-image-uploading {
  pointer-events: none;
}

.service-image-preview.uploading::after {
  content: "Uploading image...";

  position: absolute;
  inset: 0;

  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(11, 23, 40, 0.52);

  color: var(--white);

  font-size: 11px;
  font-weight: 800;
}

/* =========================================================
   NUMBER INPUTS
========================================================= */

input[type="number"].form-control {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"].form-control::-webkit-inner-spin-button,
input[type="number"].form-control::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

/* =========================================================
   PRICE INPUT
========================================================= */

.price-input {
  position: relative;
}

.currency-prefix {
  position: absolute;

  left: 12px;
  top: 50%;

  z-index: 1;

  transform: translateY(-50%);

  color: var(--muted);

  font-size: 12px;
  font-weight: 700;

  pointer-events: none;
}

.price-input .form-control {
  padding-left: 50px;
}

/* =========================================================
   PRICING VISIBILITY
========================================================= */

#pricingTiersSection {
  display: block;
}

#pricingTiersSection[hidden],
#basePriceGroup[hidden],
#priceDisplayGroup[hidden],
#pricingNoteGroup[hidden] {
  display: none !important;
}

/* =========================================================
   QUANTITY PRICING
========================================================= */

.pricing-tiers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-tier {
  position: relative;

  padding: 13px;

  background: var(--surface-soft);

  border: 1px solid var(--border);
  border-radius: 12px;

  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.pricing-tier:hover {
  border-color: var(--border-strong);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.pricing-tier-header {
  margin-bottom: 11px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 10px;
}

.pricing-tier-number {
  display: inline-flex;
  align-items: center;
  gap: 7px;

  color: var(--text);

  font-size: 11px;
  font-weight: 800;
}

.pricing-tier-number::before {
  content: "";

  width: 22px;
  height: 22px;

  border-radius: 7px;

  background: var(--blue-light);
  color: var(--blue);

  flex: 0 0 22px;
}

.pricing-tier-remove {
  width: 31px;
  height: 31px;

  display: grid;
  place-items: center;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: var(--white);
  color: var(--muted);

  font-size: 15px;

  transition: var(--transition-fast);
}

.pricing-tier-remove:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
  background: var(--orange-light);
}

.pricing-tier-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    minmax(0, 1fr)
    minmax(0, 1.15fr);

  gap: 10px;
}

.pricing-tier-field {
  min-width: 0;
}

.pricing-tier-field label {
  display: block;

  margin-bottom: 6px;

  color: var(--muted);

  font-size: 10px;
  font-weight: 700;
}

.pricing-tier-field .form-control {
  min-height: 40px;
  padding: 8px 10px;
  font-size: 12px;
}

.pricing-tier-price {
  position: relative;
}

.pricing-tier-price .currency-prefix {
  left: 10px;
  font-size: 11px;
}

.pricing-tier-price .form-control {
  padding-left: 42px;
}

.pricing-tier-range {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.pricing-tier-empty {
  padding: 18px;

  border: 1px dashed var(--border-strong);
  border-radius: 11px;

  background: var(--surface-soft);

  color: var(--muted);

  text-align: center;
}

.pricing-tier-empty[hidden] {
  display: none !important;
}

.pricing-tier-empty span {
  display: block;

  font-size: 11px;
  font-weight: 700;
}

.pricing-tier-empty small {
  display: block;

  margin-top: 4px;

  font-size: 10px;
  line-height: 1.5;
}

/* =========================================================
   ALTERNATIVE PRICING TIER ROW
========================================================= */

.pricing-tier-row {
  display: grid;

  grid-template-columns:
    1fr
    1fr
    1fr
    auto;

  align-items: end;

  gap: 10px;

  padding: 14px;

  border: 1px solid var(--border);
  border-radius: 12px;

  background: var(--surface-soft);
}

.pricing-tier-row .form-group {
  min-width: 0;
}

.pricing-tier-row .form-group label {
  display: block;

  margin-bottom: 6px;

  color: var(--muted);

  font-size: 10px;
  font-weight: 700;
}

.pricing-tier-row .btn {
  min-height: 44px;

  padding: 0 12px;

  border: 1px solid var(--border);

  border-radius: 9px;

  background: var(--white);

  color: var(--text);

  font-size: 11px;
  font-weight: 700;
}

.pricing-tier-row .btn:hover {
  border-color: var(--orange);

  background: var(--orange-light);

  color: var(--orange-dark);
}

/* =========================================================
   PRICING TYPE STATES
========================================================= */

.pricing-type-hint {
  margin-top: 7px;

  padding: 8px 10px;

  border-radius: 8px;

  background: var(--blue-lighter);

  color: var(--blue-dark);

  font-size: 10px;
  line-height: 1.5;
}

.pricing-custom-note {
  padding: 11px 12px;

  border: 1px solid var(--border);
  border-radius: 10px;

  background: var(--orange-lighter);

  color: var(--orange-dark);

  font-size: 11px;
  line-height: 1.55;
}

/* =========================================================
   TOGGLE
========================================================= */

.toggle-row {
  min-height: 44px;

  padding: 11px 12px;

  border: 1px solid var(--border);
  border-radius: 10px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;

  background: var(--surface-soft);
}

.toggle-copy {
  min-width: 0;
}

.toggle-copy strong {
  display: block;

  color: var(--text);

  font-size: 12px;
}

.toggle-copy span {
  display: block;

  margin-top: 3px;

  color: var(--muted);

  font-size: 10px;
  line-height: 1.45;
}

.switch {
  position: relative;

  width: 42px;
  height: 24px;

  flex: 0 0 auto;
}

.switch input {
  position: absolute;

  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: absolute;
  inset: 0;

  border-radius: 999px;

  background: #cbd5e1;

  cursor: pointer;

  transition: var(--transition-fast);
}

.switch-track::after {
  content: "";

  position: absolute;

  width: 18px;
  height: 18px;

  top: 3px;
  left: 3px;

  border-radius: 50%;

  background: var(--white);

  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);

  transition: var(--transition-fast);
}

.switch input:focus-visible + .switch-track {
  outline: 3px solid rgba(0, 87, 184, 0.15);
  outline-offset: 2px;
}

.switch input:checked + .switch-track {
  background: var(--blue);
}

.switch input:checked + .switch-track::after {
  transform: translateX(18px);
}

/* =========================================================
   QUOTE REQUIREMENT SETTINGS
========================================================= */

.quote-requirement-group {
  padding: 15px;

  margin-bottom: 12px;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: var(--surface-soft);

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.quote-requirement-group:last-child {
  margin-bottom: 0;
}

.quote-requirement-group:has(
  .quote-requirement-header input:checked
) {
  border-color: rgba(0, 87, 184, 0.18);
  background: var(--blue-lighter);
  box-shadow: 0 5px 18px rgba(0, 87, 184, 0.04);
}

/* =========================================================
   QUOTE REQUIREMENT HEADER
========================================================= */

.quote-requirement-header {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 15px;
}

.quote-requirement-copy {
  min-width: 0;
}

.quote-requirement-copy strong {
  display: block;

  color: var(--black);

  font-size: 13px;
  font-weight: 800;
}

.quote-requirement-copy span {
  display: block;

  margin-top: 4px;

  color: var(--muted);

  font-size: 10px;
  line-height: 1.55;
}

/* =========================================================
   QUOTE REQUIREMENT SETTINGS
========================================================= */

.quote-requirement-settings {
  margin-top: 15px;

  padding-top: 15px;

  border-top: 1px solid var(--border);
}

.quote-requirement-settings[hidden] {
  display: none !important;
}

#quoteQuantitySettings[hidden],
#quoteSpecificationsSettings[hidden],
#quoteDesignSettings[hidden],
#quoteAdditionalNoteSettings[hidden],
#quoteDeliverySettings[hidden] {
  display: none !important;
}

/* =========================================================
   QUOTE REQUIREMENT INPUTS
========================================================= */

.quote-requirement-settings .form-grid {
  gap: 14px;
}

.quote-requirement-settings .form-control {
  min-height: 42px;
}

.quote-requirement-settings textarea.form-control {
  min-height: 90px;
}

/* =========================================================
   QUOTE ADDITIONAL NOTE
========================================================= */

#quoteAdditionalNoteSettings {
  width: 100%;
}

#quoteAdditionalNoteSettings .form-group {
  min-width: 0;
}

#quoteAdditionalNoteLabel,
#quoteAdditionalNotePlaceholder {
  width: 100%;
}

#quoteAdditionalNoteSettings .form-help {
  max-width: 600px;
}

/* =========================================================
   DISABLED QUOTE SETTINGS
========================================================= */

.quote-requirement-settings
.form-control:disabled {
  background: #f2f4f7;

  color: #9aa7b6;

  cursor: not-allowed;
}

.quote-requirement-settings
.form-control:disabled::placeholder {
  color: #b4bdc8;
}

.quote-requirement-group.is-disabled {
  opacity: 0.7;
}

.quote-requirement-group.is-disabled
.quote-requirement-settings {
  opacity: 0.85;
}

/* =========================================================
   MODAL FOOTER
========================================================= */

.modal-footer {
  padding: 17px 24px;

  border-top: 1px solid var(--border);

  display: flex;
  justify-content: flex-end;

  gap: 9px;

  background: var(--white);

  position: sticky;
  bottom: 0;

  z-index: 2;
}

/* =========================================================
   DELETE MODAL
========================================================= */

.danger-modal {
  z-index: 10000;
}

.danger-modal .modal-card {
  width: min(440px, 100%);
}

.danger-icon {
  width: 52px;
  height: 52px;

  margin-bottom: 16px;

  border-radius: 15px;

  background: var(--orange-light);
  color: var(--orange-dark);

  display: grid;
  place-items: center;

  font-size: 22px;
  font-weight: 800;
}

.danger-modal .modal-body h3 {
  color: var(--black);

  font-family: var(--font-heading);

  font-size: 20px;
  font-weight: 800;
}

.danger-modal .modal-body p {
  margin-top: 9px;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.65;
}

.danger-button {
  min-height: 44px;

  padding: 0 16px;

  border: 0;
  border-radius: 10px;

  background: var(--orange-dark);
  color: var(--white);

  font-size: 13px;
  font-weight: 700;

  transition: var(--transition-fast);
}

.danger-button:hover {
  background: #c95700;
  transform: translateY(-1px);
}

/* =========================================================
   SIDEBAR OVERLAY
========================================================= */

.sidebar-overlay {
  position: fixed;

  inset: 0;

  z-index: 900;

  background: rgba(11, 23, 40, 0.45);

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: var(--transition-normal);
}

.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* =========================================================
   ROLE ACCESS
========================================================= */

[data-role-only] {
  display: none;
}

body.role-owner [data-role-only~="owner"],
body.role-manager [data-role-only~="manager"],
body.role-staff [data-role-only~="staff"],
body.role-designer [data-role-only~="designer"] {
  display: flex;
}

/* =========================================================
   UTILITY STATES
========================================================= */

.is-hidden {
  display: none !important;
}

.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.loading {
  opacity: 0.65;
  pointer-events: none;
}

/* =========================================================
   ARCHIVED SERVICE VISUAL
========================================================= */

.service-row:has(.status-badge.archived) {
  opacity: 0.72;
}

.service-row:has(.status-badge.archived) .service-row-main h4 {
  color: var(--muted);
}

/* =========================================================
   ACTIVE / INACTIVE VISUAL DIFFERENCE
========================================================= */

.service-row:has(.status-badge.active) {
  border-left: 3px solid var(--blue);
  padding-left: 12px;
}

.service-row:has(.status-badge.inactive) {
  border-left: 3px solid var(--orange);
  padding-left: 12px;
}

.service-row:has(.status-badge.archived) {
  border-left: 3px solid #a0a8b3;
  padding-left: 12px;
}

/* =========================================================
   WRITE PERMISSIONS
========================================================= */

[data-service-write][hidden] {
  display: none !important;
}

/* =========================================================
   FIX CURRENT HTML HIDDEN ATTRIBUTE
========================================================= */

#emptyState[hidden] {
  display: none !important;
}

#serviceModal[hidden],
#deleteModal[hidden] {
  display: none !important;
}

/* =========================================================
   LARGE SCREEN SERVICE TEXT
========================================================= */

@media (min-width: 1201px) {
  .service-row-main {
    padding-right: 10px;
  }

  .service-row-main h4 {
    font-size: 14px;
  }

  .service-row-main p {
    max-width: 430px;
  }
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-row {
    grid-template-columns:
      50px
      56px
      minmax(210px, 1fr)
      110px
      120px
      auto;

    min-width: 780px;
  }

  .service-row-category {
    display: none;
  }

  .service-category {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 255px;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .mobile-menu {
    display: flex;
  }

  .topbar {
    padding: 0 20px;
  }

  .content {
    padding: 25px 20px;
  }

  .content-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .service-row {
    min-width: 700px;

    grid-template-columns:
      50px
      56px
      minmax(200px, 1fr)
      110px
      auto;
  }

  .service-row-price {
    display: none;
  }

  .service-price {
    display: none;
  }

  .modal-card {
    width: min(650px, 100%);
  }
}

@media (max-width: 700px) {
  .pricing-tier-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pricing-tier-field:last-child {
    grid-column: 1 / -1;
  }

  .pricing-tier-row {
    grid-template-columns: 1fr 1fr;
  }

  .pricing-tier-row .btn {
    grid-column: 1 / -1;
  }

  .form-section-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .form-section-heading .secondary-button {
    align-self: flex-start;
  }

  .service-list {
    overflow-x: visible;
    padding: 5px 14px 14px;
  }

  .service-row {
    min-width: 0;

    display: grid;

    grid-template-columns:
      48px
      54px
      minmax(0, 1fr);

    gap: 10px;

    padding: 15px 0;
  }

  .service-row-image {
    width: 54px;
    height: 54px;
  }

  .service-thumbnail {
    width: 54px;
    height: 54px;
  }

  .service-row-main {
    min-width: 0;
  }

  .service-row-main h4 {
    font-size: 13px;
  }

  .service-row-main p {
    font-size: 10px;
  }

  .service-row-category,
  .service-row-price,
  .service-row-status {
    grid-column: 3;
  }

  .service-row-category {
    display: block;

    margin-top: -4px;
  }

  .service-row-price {
    display: block;

    margin-top: -4px;
  }

  .service-row-status {
    margin-top: -4px;
  }

  .service-row-actions {
    grid-column: 3;

    justify-content: flex-start;

    flex-wrap: wrap;

    margin-top: 4px;
  }

  .service-row-actions .btn {
    min-height: 32px;

    padding: 0 9px;

    font-size: 10px;
  }

  .service-image-upload {
    grid-template-columns: 1fr;
  }

  .service-image-preview {
    width: 100%;
    height: 220px;
  }

  .service-image-upload-actions {
    width: 100%;
  }

  .service-image-upload-actions button {
    flex: 1;
  }

  .services-pagination {
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .services-pagination-info {
    text-align: center;
  }

  .services-pagination-controls {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 650px) {
  .topbar {
    height: 72px;
  }

  .page-heading p {
    display: none;
  }

  .employee-info {
    display: none;
  }

  .content {
    padding: 20px 15px;
  }

  .content-title h2 {
    font-size: 24px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-number {
    font-size: 23px;
  }

  .toolbar {
    padding: 14px;
  }

  .toolbar-left {
    flex-direction: column;
    align-items: stretch;
  }

  .search-wrap {
    width: 100%;
  }

  .filter-select {
    width: 100%;
  }

  .toolbar-right {
    width: 100%;
    justify-content: flex-end;
  }

  .service-list {
    padding: 4px 14px 14px;
  }

  .service-order {
    width: 34px;
    height: 34px;
  }

  .service-row {
    grid-template-columns:
      40px
      48px
      minmax(0, 1fr);

    gap: 11px;
  }

  .service-row-image,
  .service-thumbnail {
    width: 48px;
    height: 48px;
  }

  .service-name strong {
    font-size: 13px;
  }

  .service-name span {
    font-size: 10px;
  }

  .status-badge {
    font-size: 9px;
  }

  .row-actions {
    grid-column: 3 / -1;
    justify-content: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-group.full {
    grid-column: auto;
  }

  .modal {
    padding: 12px;
    align-items: center;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100vh - 24px);
    border-radius: 20px;
  }

  .modal-body,
  .modal-header,
  .modal-footer {
    padding-left: 17px;
    padding-right: 17px;
  }

  .modal-footer {
    flex-wrap: wrap;
  }

  .modal-footer .primary-button,
  .modal-footer .secondary-button,
  .modal-footer .danger-button {
    flex: 1;
  }

  .pricing-tier-grid {
    grid-template-columns: 1fr;
  }

  .pricing-tier-field:last-child {
    grid-column: auto;
  }

  .pricing-tier {
    padding: 11px;
  }

  .pricing-tier-row {
    grid-template-columns: 1fr;
  }

  .pricing-tier-row .btn {
    grid-column: auto;
  }

  .quote-requirement-header {
    align-items: flex-start;
  }

  .quote-requirement-group {
    padding: 13px;
  }

  .services-pagination-button {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
  }
}

@media (max-width: 480px) {
  .service-image-upload-actions {
    flex-direction: column;
  }

  .service-image-upload-actions .secondary-button,
  .service-image-upload-actions .danger-button {
    width: 100%;
    flex: none;
  }

  .service-row {
    grid-template-columns:
      44px
      48px
      minmax(0, 1fr);

    gap: 8px;
  }

  .service-row-image,
  .service-thumbnail {
    width: 48px;
    height: 48px;
  }

  .service-row-main h4 {
    font-size: 12px;
  }

  .service-row-main p {
    font-size: 9px;
  }

  .status-badge {
    min-height: 25px;
    padding: 0 8px;
    font-size: 9px;
  }

  .service-row-actions {
    gap: 5px;
  }

  .service-row-actions .btn {
    min-height: 31px;
    padding: 0 8px;
    font-size: 9px;
  }

  .pricing-tier-row {
    grid-template-columns: 1fr;
  }

  .pricing-tier-row .btn {
    grid-column: auto;
  }

  .services-pagination {
    padding-left: 10px;
    padding-right: 10px;
  }

  .services-pagination-controls {
    gap: 4px;
  }

  .services-pagination-button {
    min-width: 30px;
    height: 30px;
    font-size: 10px;
  }

  .services-pagination-ellipsis {
    min-width: 20px;
  }
}

@media (max-width: 420px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .topbar-right {
    gap: 8px;
  }

  .notification-button {
    width: 38px;
    height: 38px;
  }

  .employee-avatar {
    width: 38px;
    height: 38px;
  }

  .content-header .primary-button {
    width: 100%;
  }

  .modal-header h3 {
    font-size: 17px;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .modal-footer .primary-button,
  .modal-footer .secondary-button,
  .modal-footer .danger-button {
    width: 100%;
  }

  .form-section-heading .secondary-button {
    width: 100%;
  }

  .pricing-tier-remove {
    width: 34px;
    height: 34px;
  }

  .service-row {
    grid-template-columns:
      36px
      44px
      minmax(0, 1fr);
  }

  .service-row-image,
  .service-thumbnail {
    width: 44px;
    height: 44px;
  }

  .row-actions {
    grid-column: 3;
  }

  .services-pagination-info {
    font-size: 10px;
  }
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* =========================================================
   MODAL BODY SCROLLING
========================================================= */

body:has(.modal:not([hidden]).open) {
  overflow: hidden;
}

/* =========================================================
   FINAL QUOTE SETTINGS VISIBILITY
========================================================= */

#quoteQuantitySettings[hidden],
#quoteSpecificationsSettings[hidden],
#quoteDesignSettings[hidden],
#quoteAdditionalNoteSettings[hidden],
#quoteDeliverySettings[hidden] {
  display: none !important;
}

/* =========================================================
   ADDITIONAL NOTE VISUAL
========================================================= */

.quote-requirement-group
[data-quote-field="additional-note"] {
  width: 100%;
}

/* =========================================================
   SERVICE IMAGE PREVIEW
========================================================= */

.service-image-preview:has(img) {
  background: var(--black);
}

/* =========================================================
   PAGINATION EMPTY / SINGLE PAGE
========================================================= */

.services-pagination.is-single-page {
  justify-content: flex-end;
}

.services-pagination.is-single-page
.services-pagination-controls {
  display: none;
}

/* =========================================================
   END
========================================================= */