/* =========================================================
   Связаны Flowers — admin panel styles
   ========================================================= */

/* ---- login ---- */
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--cream-deep); }
.admin-login__card { width: 100%; max-width: 380px; padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; text-align: center; }
.admin-login__card .logo { align-self: center; }
.admin-login__card .field { text-align: left; }
.admin-login__back { background: none; border: 0; color: var(--ink-soft); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; }
.admin-login__back:hover { color: var(--ink); }

/* ---- shell ---- */
.admin { min-height: 100vh; background: var(--cream-deep); }
.admin__side { display: none; }
.admin__main { padding: 18px 16px 60px; }

.admin__mtabs { display: flex; gap: 8px; margin-bottom: 22px; padding-bottom: 2px; }
.admin__mtab { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft); padding: 10px 15px; border-radius: 999px; font-weight: 600; font-size: 14px; }
.admin__mtab.is-on { background: var(--ink); color: var(--cream); border-color: var(--ink); }

@media (min-width: 900px) {
  .admin { display: grid; grid-template-columns: 248px 1fr; }
  .admin__side { display: flex; flex-direction: column; background: var(--ink); color: var(--cream); padding: 22px 16px; position: sticky; top: 0; height: 100vh; }
  .admin__brand { padding: 6px 8px 22px; }
  .admin__brand .logo span:first-of-type { color: var(--cream) !important; }
  .admin__nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
  .admin__navbtn { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: var(--r-md); border: 0; background: none; color: rgba(239,231,214,.7); font-weight: 600; font-size: 15px; text-align: left; transition: all .16s ease; }
  .admin__navbtn:hover { background: rgba(239,231,214,.08); color: var(--cream); }
  .admin__navbtn.is-on { background: var(--rose-deep); color: #fff; }
  .admin__side-foot { border-top: 1px solid rgba(239,231,214,.14); padding-top: 10px; }
  .admin__mtabs { display: none; }
  .admin__main { padding: 34px 38px 70px; max-height: 100vh; overflow-y: auto; }
}

/* ---- views ---- */
.admin-view { max-width: 1000px; }
.admin-view__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.admin-view__title { font-size: clamp(24px, 6vw, 32px); font-weight: 700; letter-spacing: -.01em; }
.admin-count { font-size: 15px; font-weight: 600; color: var(--ink-faint); margin-left: 6px; }

/* stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 22px; }
.stat-card { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 18px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow-sm); position: relative; }
.stat-card__ic { position: absolute; top: 16px; right: 16px; width: 36px; height: 36px; border-radius: 50%; background: var(--rose-tint); color: var(--rose-deep); display: grid; place-items: center; }
.stat-card__v { font-size: clamp(22px, 5vw, 30px); font-weight: 700; letter-spacing: -.02em; }
.stat-card__t { font-size: 14px; font-weight: 600; margin-top: 4px; }
.stat-card__sub { font-size: 12.5px; }
@media (min-width: 760px) { .stat-cards { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

.admin-grid2 { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 820px) { .admin-grid2 { grid-template-columns: 1.4fr 1fr; } }
.admin-panel { padding: 22px; }
.admin-panel__h { font-size: 16px; font-weight: 700; margin-bottom: 18px; }

/* bars */
.bars { display: flex; flex-direction: column; gap: 14px; }
.bar { display: grid; grid-template-columns: 84px 1fr auto; align-items: center; gap: 12px; }
.bar__label { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.bar__track { height: 12px; background: var(--cream-deep); border-radius: 999px; overflow: hidden; }
.bar__fill { height: 100%; background: linear-gradient(90deg, var(--rose), var(--rose-deep)); border-radius: 999px; transition: width .5s cubic-bezier(.2,.7,.3,1); min-width: 4px; }
.bar__val { font-size: 13px; font-weight: 700; white-space: nowrap; }

.status-list { display: flex; flex-direction: column; gap: 10px; }
.status-row { display: flex; align-items: center; justify-content: space-between; }
.status-row__n { font-weight: 700; font-size: 16px; }

/* status pills */
.st-pill { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.st-new    { background: var(--rose-tint); color: var(--rose-deep); }
.st-acc    { background: #e2ddef; color: #6a5b9a; }
.st-asm    { background: #f3e6cf; color: #a07b3e; }
.st-del    { background: #d8e6ef; color: #4a7593; }
.st-done   { background: var(--sage-tint); color: var(--sage-deep); }
.st-cancel { background: #eadbd8; color: #9a6b63; }

/* admin rows (products & cats) */
.admin-rows { display: flex; flex-direction: column; gap: 10px; }
.admin-row { display: flex; align-items: center; gap: 14px; background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.admin-row__media { width: 46px; height: 56px; flex-shrink: 0; }
.admin-row__media .ph { width: 100%; height: 100%; border-radius: 8px; }
.admin-row__media .ph__tag { display: none; }
.admin-row__main { flex: 1; min-width: 0; }
.admin-row__name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-row__sub { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-row__price { font-weight: 700; white-space: nowrap; }
.admin-row__acts { display: flex; gap: 6px; flex-shrink: 0; }
.cat-reorder { display: flex; flex-direction: column; gap: 2px; }

/* admin form */
.admin-form { display: flex; flex-direction: column; gap: 16px; margin-top: 18px; }

/* orders */
.orders { display: flex; flex-direction: column; gap: 12px; }
.order-card { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--r-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.order-card.is-open { box-shadow: var(--shadow-md); }
.order-card__head { display: grid; grid-template-columns: auto 1fr auto; gap: 10px 16px; align-items: center; width: 100%; background: none; border: 0; padding: 16px; text-align: left; }
.order-card__id { display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.order-card__id strong { font-size: 16px; }
.order-card__cust { display: flex; flex-direction: column; min-width: 0; }
.order-card__cust span:first-child { font-weight: 600; font-size: 14.5px; }
.order-card__cust span:last-child { font-size: 12.5px; }
.order-card__total { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); }
.order-card__total svg { color: var(--ink-faint); }

.order-card__body { padding: 0 16px 18px; border-top: 1px solid var(--line-soft); animation: fade .25s ease; }
.order-detail { display: grid; grid-template-columns: 1fr; gap: 16px; padding: 16px 0; }
.order-detail__h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); margin-bottom: 6px; }
.order-detail__col p { font-size: 14.5px; margin-bottom: 3px; }
.order-detail__col a { color: var(--rose-deep); font-weight: 600; }
.order-note { display: flex; gap: 7px; align-items: flex-start; background: var(--cream-deep); border-radius: 8px; padding: 8px 11px; margin-top: 6px; font-size: 13.5px; }
.order-note svg { flex-shrink: 0; margin-top: 2px; color: var(--ink-faint); }
@media (min-width: 620px) { .order-detail { grid-template-columns: 1fr 1fr; gap: 30px; } }

.order-items { background: var(--cream-deep); border-radius: var(--r-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.order-item { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; }
.order-item--total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; font-size: 15px; }

.order-status-bar { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.status-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.status-opt { border: 1px solid transparent; font-size: 12.5px; font-weight: 700; padding: 8px 13px; border-radius: 999px; opacity: .55; transition: all .15s ease; }
.status-opt:hover { opacity: 1; }
.status-opt.is-on { opacity: 1; box-shadow: 0 0 0 2px var(--ink) inset; }
