/* Стилове само за админ панела. Цветовете и бутоните идват от style.css. */

.login {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 1.5rem;
  background: var(--asphalt);
}

.login-card {
  width: min(100%, 24rem);
  padding: 2rem;
  border-radius: 12px;
  background: var(--white);
}

.login-card h1 {
  margin: 1.25rem 0;
  font-size: 2rem;
}

.login-back {
  margin: 1.25rem 0 0;
  text-align: center;
}

.app {
  display: grid;
  grid-template-columns: 16rem 1fr;
  min-height: 100dvh;
}

/* ---------- странично меню ---------- */

.side {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  height: 100dvh;
  padding: 1.25rem 1rem;
  background: var(--asphalt);
  color: var(--white);
}

.side .logo {
  align-self: flex-start;
}

.side-nav {
  display: grid;
  gap: 0.25rem;
}

.side-nav button,
.side-foot button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 0;
  border-left: 4px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #d5dde3;
  font: 500 1rem/1.2 var(--font);
  text-align: left;
  cursor: pointer;
}

.side-nav button:hover,
.side-foot button:hover {
  background: var(--asphalt-2);
  color: var(--white);
}

.side-nav button.is-active {
  border-left-color: var(--yellow);
  background: var(--asphalt-2);
  color: var(--white);
  font-weight: 700;
}

.badge {
  min-width: 1.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 99px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.side-foot {
  display: grid;
  gap: 0.25rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #435662;
}

.side-foot a {
  padding: 0.65rem 0.8rem 0.65rem calc(0.8rem + 4px);
  color: var(--yellow);
}

/* ---------- съдържание ---------- */

.main {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2.5rem);
}

.view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.view-head h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.main h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.6rem;
}

.note {
  max-width: 44rem;
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filters button {
  padding: 0.4rem 0.9rem;
  border: 1.5px solid #8d9aa5;
  border-radius: 99px;
  background: var(--white);
  color: var(--ink);
  font: 500 0.98rem/1.2 var(--font);
  cursor: pointer;
}

.filters button.is-active {
  border-color: var(--asphalt);
  background: var(--asphalt);
  color: var(--white);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
}

.tile {
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--yellow);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tile:hover {
  border-color: var(--asphalt);
  border-left-color: var(--yellow);
}

.tile strong {
  display: block;
  font: 800 2.75rem/1 var(--font-head);
}

/* ---------- таблици ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.table th,
.table td {
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.table thead th {
  border-top: 0;
  background: #f4f6f7;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.table small {
  display: block;
  color: var(--muted);
}

.table .num,
.table .when,
.table a[href^='tel'] {
  white-space: nowrap;
}

.table .num {
  text-align: right;
}

.table .actions {
  text-align: right;
  white-space: nowrap;
}

.is-hidden-row {
  background: #f6f7f8;
  color: var(--muted);
}

.item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 14rem;
}

.thumb {
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 3rem;
  height: 3rem;
  border-radius: 6px;
  background: #e4e8eb;
  color: var(--muted);
  font: 800 1.1rem/1 var(--font-head);
}

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

.qty {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.qty button {
  width: 2rem;
  height: 2rem;
  border: 1.5px solid #8d9aa5;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  font: 700 1.1rem/1 var(--font);
  cursor: pointer;
}

.qty button:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--yellow);
}

.qty button:disabled {
  color: #b5bec5;
  cursor: not-allowed;
}

.qty output {
  min-width: 2.25rem;
  font-weight: 700;
  text-align: center;
}

.qty-zero output {
  color: var(--red);
}

.link-btn {
  padding: 0.3rem 0.4rem;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.link-btn.is-danger {
  color: var(--red);
}

.link-btn.is-armed {
  border-radius: 4px;
  background: var(--red);
  color: var(--white);
  text-decoration: none;
}

.status {
  width: auto;
  min-height: 2.25rem;
  padding: 0.25rem 0.5rem;
  border-left-width: 6px;
  font-weight: 700;
}

.status-new {
  border-left-color: var(--yellow);
}

.status-confirmed {
  border-left-color: var(--blue);
}

.status-completed {
  border-left-color: var(--green);
}

.status-cancelled {
  border-left-color: #9aa7b1;
  color: var(--muted);
}

/* ---------- форми в админ панела ---------- */

.choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.choice label,
.check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.check {
  margin-bottom: 1rem;
  font-weight: 500;
}

.field-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.image-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.image-row img {
  width: 6rem;
  height: 4.5rem;
  border-radius: 6px;
  object-fit: cover;
}

.settings-form {
  max-width: 24rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 30;
  max-width: calc(100% - 2.5rem);
  margin: 0;
  padding: 0.8rem 1.1rem;
  border-left: 6px solid var(--yellow);
  border-radius: 6px;
  background: var(--ink);
  color: var(--white);
  font-weight: 500;
}

.toast.is-error {
  border-left-color: var(--red);
}

/* ---------- малки екрани ---------- */

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

  .side {
    position: static;
    height: auto;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .side-nav {
    display: flex;
    overflow-x: auto;
  }

  .side-nav button {
    flex: none;
    width: auto;
    border-left: 0;
    border-bottom: 4px solid transparent;
  }

  .side-nav button.is-active {
    border-bottom-color: var(--yellow);
  }

  .side-foot {
    display: flex;
    margin-top: 0;
    padding-top: 0.5rem;
  }

  .side-foot button {
    width: auto;
  }
}

@media (max-width: 560px) {
  .field-row-3 {
    grid-template-columns: 1fr;
  }
}
