/* ===================================================
   Admin Dashboard — Professional Enhancement Styles
   =================================================== */

/* --- Base & Typography --- */
.admin-body {
    background: #f1f5f9;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Header status chips --- */
.ah-chip {
  display: inline-flex;
  align-items: center;
  font-size: .7rem;
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 600;
  padding: .18rem .45rem;
  border-radius: 20px;
  white-space: nowrap;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: default;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.2);
}
.ah-chip-link { cursor: pointer; }
.ah-chip-link:hover { background: rgba(255,255,255,0.22); color: #fff; }
.ah-chip-btn {
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.18);
  font-size: .7rem;
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 600;
  padding: .18rem .45rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.18);
  white-space: nowrap;
  line-height: 1;
}
.ah-chip-btn:hover { background: rgba(255,255,255,0.22); color: #fff; }
.ah-chip-plan   { background: rgba(255,255,255,0.18); }
.ah-chip-active { background: rgba(34,197,94,0.25); border-color: rgba(34,197,94,0.4); color: #86efac; }
.ah-chip-trial  { background: rgba(245,158,11,0.25); border-color: rgba(245,158,11,0.4); color: #fcd34d; }
.ah-chip-currency { background: rgba(255,255,255,0.1); }
.ah-chip-on  { background: rgba(34,197,94,0.22); border-color: rgba(34,197,94,0.35); color: #86efac; }
.ah-chip-off { background: rgba(239,68,68,0.22);  border-color: rgba(239,68,68,0.35);  color: #fca5a5; }

/* --- Sticky Header w/ Glassmorphism --- */
.admin-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.82);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 0.75rem 0;
}

/* --- Restaurant Info Card --- */
.admin-info-card {
    background: white;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
    padding: 1.25rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.admin-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.admin-info-card h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
}

/* --- Image Control Buttons --- */
#change-image-btn, #remove-image-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    border-radius: 6px;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    min-width: 90px;
    justify-content: center;
}

#change-image-btn {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #475569;
}

#change-image-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

#remove-image-btn {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

#remove-image-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

/* --- Toggle Switches --- */
.admin-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border-radius: 10px;
    margin-top: 0.5rem;
    transition: background 0.2s;
}

.admin-toggle-row:hover {
    background: #f1f5f9;
}

.admin-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.admin-toggle-label span {
    font-weight: 600;
    font-size: 0.95rem;
    color: #334155;
}

/* Custom switch */
.admin-switch {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.admin-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.admin-switch-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.admin-switch-slider::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.admin-switch input:checked+.admin-switch-slider {
    background: #22c55e;
}

.admin-switch input:checked+.admin-switch-slider::before {
    transform: translateX(22px);
}

.admin-switch input:focus-visible+.admin-switch-slider {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Toggle status badge */
.admin-toggle-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.admin-toggle-status.on {
    color: #16a34a;
    background: #f0fdf4;
}

.admin-toggle-status.off {
    color: #dc2626;
    background: #fef2f2;
}

/* --- Accordion Sections --- */
.admin-accordion {
    background: white;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin-top: 0.75rem;
}

.admin-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    background: white;
    border: none;
    transition: background 0.2s;
}

.admin-accordion-header:hover {
    background: #f8fafc;
}

.admin-accordion-icon {
    font-size: 0.75rem;
    color: #94a3b8;
    transition: transform 0.3s ease;
    display: inline-flex;
}

.admin-accordion.open .admin-accordion-icon {
    transform: rotate(90deg);
}

.admin-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.25s ease;
    padding: 0 1.25rem;
}

.admin-accordion.open .admin-accordion-body {
    max-height: 5000px;
    padding: 0 1.25rem 1.25rem;
}

/* --- Menu Items Section --- */
.admin-items-card {
    background: white;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 1.25rem 1.5rem;
    margin-top: 0.75rem;
}

.admin-items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.admin-items-header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.admin-item-count {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    background: #f1f5f9;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
}

/* Menu item rows — compact */
.admin-item-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.admin-item-row:last-child {
    border-bottom: none;
}

.admin-item-row:hover {
    background: #fafbfc;
    border-radius: 8px;
}

.admin-item-row .item-thumbnail {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.admin-item-info {
    flex: 1;
    min-width: 0;
}

.admin-item-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-item-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-item-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #667eea;
    flex-shrink: 0;
}

.admin-item-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.admin-item-actions button {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
}

.admin-item-actions button:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.admin-item-actions button.delete-btn {
    border-color: #fecaca;
}

.admin-item-actions button.delete-btn:hover {
    background: #fef2f2;
    border-color: #f87171;
}

/* Category group header */
.admin-category-group {
    margin-bottom: 0.5rem;
}

.admin-category-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    margin-top: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.admin-category-group-header:first-child {
    margin-top: 0;
}

.admin-category-group-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #667eea;
}

.admin-category-time {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* --- Form Styling --- */
.admin-accordion input:not([type="checkbox"]):not([type="file"]):not([type="radio"]),
.admin-accordion textarea,
.admin-accordion select {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    font-size: 0.92rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafbfc;
}

.admin-accordion input:focus,
.admin-accordion textarea:focus,
.admin-accordion select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
    outline: none;
    background: white;
}

/* Save / Reset buttons */
.admin-accordion .btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    font-size: 0.92rem;
    transition: all 0.2s;
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .admin-info-card {
        padding: 1rem;
    }

    .admin-toggle-row {
        padding: 0.75rem 0.85rem;
    }

    .admin-accordion-header {
        padding: 0.85rem 1rem;
        font-size: 0.95rem;
    }

    .admin-items-card {
        padding: 1rem;
    }

    .admin-item-row {
        gap: 0.5rem;
        padding: 0.5rem 0.25rem;
    }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {

    .admin-switch-slider::before,
    .admin-accordion-icon,
    .admin-accordion-body {
        transition: none;
    }
}

/* --- Spot (Inline) Edit --- */
.spot-edit-active {
    border: 2px solid #667eea !important;
    border-radius: 10px;
    background: #f8faff !important;
    padding: 0.85rem !important;
}

.spot-edit-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.spot-edit-row {
    display: flex;
    gap: 0.6rem;
}

.spot-edit-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.spot-edit-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.spot-edit-input {
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.5rem 0.65rem;
    font-size: 0.92rem;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.spot-edit-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
    outline: none;
}

.spot-edit-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.2rem;
}

.spot-edit-save,
.spot-edit-cancel {
    padding: 0.45rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
}

.spot-edit-save {
    background: #22c55e;
    color: white;
}

.spot-edit-save:hover {
    background: #16a34a;
}

.spot-edit-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.spot-edit-cancel {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.spot-edit-cancel:hover {
    background: #e2e8f0;
}

@media (max-width: 640px) {
    .spot-edit-row {
        flex-direction: column;
    }
}

/* ── Featured item rows ── */
.featured-item-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    user-select: none;
    background: white;
}
.featured-item-row.is-featured {
    background: #fffbeb;
    border-color: #fbbf24;
}
.featured-item-row input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #f59e0b;
    flex-shrink: 0;
}
.featured-item-name {
    flex: 1;
    font-size: 0.87rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #374151;
}
.featured-item-name.is-featured { font-weight: 600; color: #92400e; }
.featured-item-star {
    font-size: 0.7rem;
    background: #f59e0b;
    color: white;
    padding: 0.12rem 0.4rem;
    border-radius: 9px;
    font-weight: 700;
    flex-shrink: 0;
}
.featured-item-price {
    font-size: 0.8rem;
    color: #6b7280;
    flex-shrink: 0;
}

/* ── Offer cards (combo / discount) ── */
.offer-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    background: white;
    border-radius: 9px;
    margin-bottom: 0.45rem;
}
.offer-card-combo    { border: 1px solid #ddd6fe; }
.offer-card-discount { border: 1px solid #fbcfe8; }

.offer-card-body { flex: 1; min-width: 0; }

.offer-card-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}
.offer-card-title strong {
    font-size: 0.88rem;
    color: #1f2937;
}
.offer-badge {
    padding: 0.15rem 0.45rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}
.offer-badge-combo    { background: #8b5cf6; color: white; }
.offer-badge-savings  { background: #dcfce7; color: #16a34a; }
.offer-badge-discount { background: #ec4899; color: white; }

.offer-desc {
    font-size: 0.78rem;
    color: #6b7280;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.offer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.2rem;
}
.offer-chip           { background: #f3f4f6; color: #374151; padding: 0.1rem 0.4rem; border-radius: 5px; font-size: 0.73rem; }
.offer-chip-date-from { background: #eff6ff; color: #1d4ed8; }
.offer-chip-date-till { background: #fef3c7; color: #92400e; }
.offer-chip-cat       { background: #fdf4ff; color: #86198f; border: 1px solid #f0abfc; }
.offer-chip-all       { background: #f0fdf4; color: #166534; }
.offer-chip-time      { background: #fdf4ff; color: #7e22ce; }
.offer-chip-day       { background: #f0fdf4; color: #166534; }

.offer-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex-shrink: 0;
}
.offer-act-btn {
    padding: 0.35rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.offer-act-edit-combo     { background: #ede9fe; color: #7c3aed; }
.offer-act-edit-discount  { background: #eff6ff; color: #2563eb; }
.offer-act-del            { background: #fee2e2; color: #dc2626; }

@media (max-width: 520px) {
    .offer-card { padding: 0.45rem 0.5rem; gap: 0.4rem; }
    .offer-card-title strong { font-size: 0.83rem; }
    .offer-chip { font-size: 0.68rem; }
    .featured-item-row { padding: 0.38rem 0.5rem; }
    .featured-item-name { font-size: 0.82rem; }
}

/* ── Menu Items list ── */
.menu-cat-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid #e5e7eb;
}
.menu-cat-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1f2937;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.menu-cat-time {
    font-size: 0.7rem;
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.1rem 0.45rem;
    border-radius: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}
.menu-cat-edit-btn {
    padding: 0.25rem;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    color: #6b7280;
}
.menu-cat-edit-btn:hover { background: #e5e7eb; }

.menu-item-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 0.35rem;
    min-width: 0;
}
.menu-item-row.unavailable {
    opacity: 0.55;
}
.menu-item-avail {
    width: 15px;
    height: 15px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #22c55e;
}
.menu-item-thumb {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.menu-item-info {
    flex: 1;
    min-width: 0;
}
.menu-item-top {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 0;
}
.menu-item-name {
    font-size: 0.87rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1f2937;
    flex: 1;
    min-width: 0;
}
.menu-item-price {
    font-size: 0.83rem;
    font-weight: 600;
    color: #374151;
    flex-shrink: 0;
}
.menu-item-desc {
    font-size: 0.75rem;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0.1rem;
}
.menu-item-actions {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}
.menu-item-edit-btn {
    padding: 0.3rem;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #374151;
}
.menu-item-edit-btn:hover { background: #e5e7eb; }
.menu-item-del-btn {
    padding: 0.3rem;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #fee2e2;
    border: 1px solid #fecaca;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #dc2626;
}
.menu-item-del-btn:hover { background: #fecaca; }

.menu-item-maestro-btn {
    padding: 0.3rem;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f3f4f6;
    border: 1.5px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #c4c9d4;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.menu-item-maestro-btn:hover { background: #fff7ed; border-color: #fdba74; color: #f97316; border-style: solid; }
.menu-item-maestro-btn.maestro-on {
    background: #FF8400;
    border: 1.5px solid #e07200;
    color: #fff;
}
.menu-item-maestro-btn.maestro-on:hover { background: #e07200; border-color: #c96800; }
.menu-item-maestro-btn.cat-maestro-off,
.menu-item-maestro-btn[disabled] {
    opacity: 0.22;
    cursor: not-allowed;
    pointer-events: none;
}

.menu-item-fire-btn {
    padding: 0.3rem;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0.4;
    transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}
.menu-item-fire-btn:hover { opacity: 0.75; background: #fff7ed; border-color: #fdba74; }
.menu-item-fire-btn.fire-active {
    opacity: 1;
    background: #fff7ed;
    border-color: #f97316;
}

/* ── Admin category filter pills ── */
.admin-cat-filter-wrap {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
    padding: 0.1rem 0 0.55rem 0;
    margin-bottom: 0.5rem;
    position: relative;
    /* fade-out hint on right edge */
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 32px), transparent 100%);
    mask-image: linear-gradient(to right, black calc(100% - 32px), transparent 100%);
}
.admin-cat-filter-wrap::-webkit-scrollbar {
    height: 3px;
}
.admin-cat-filter-wrap::-webkit-scrollbar-track { background: transparent; }
.admin-cat-filter-wrap::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}
.admin-cat-filter-wrap:empty { display: none; }

.admin-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.32rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    border: 1.5px solid #e5e7eb;
    background: #f3f4f6;
    color: #374151;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.admin-cat-pill:hover {
    background: #e5e7eb;
    color: #111827;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}
.admin-cat-pill:active { transform: translateY(1px) scale(0.96); }
.admin-cat-pill.active {
    background: linear-gradient(135deg, #312e81 0%, #4338ca 100%);
    color: #fff;
    border-color: #4338ca;
    box-shadow: 0 3px 10px rgba(67,56,202,0.3);
}
.admin-cat-pill .pill-count {
    font-size: 0.7rem;
    opacity: 0.75;
    font-weight: 500;
}

    .menu-item-thumb { width: 36px; height: 36px; }
}

/* ── Offer on/off toggle ── */
.offer-card--inactive { opacity: 0.5; }

.offer-toggle {
    position: relative;
    width: 34px;
    height: 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}
.offer-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: white;
    transition: left 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.offer-toggle.on  { background: #22c55e; }
.offer-toggle.on::after  { left: 17px; }
.offer-toggle.off { background: #d1d5db; }
.offer-toggle.off::after { left: 3px; }

/* ── Inline / spot edit ── */
.item-inline-edit {
    background: #f9fafb;
    border: 1.5px solid #e0e7ff;
    border-radius: 10px;
    padding: 0.7rem 0.8rem 0.6rem;
    margin: 0 0 0.5rem;
}
.item-inline-edit label {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.18rem;
}
.item-inline-edit input[type="text"],
.item-inline-edit input[type="number"],
.item-inline-edit input[list],
.item-inline-edit textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.35rem 0.55rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    background: #fff;
    color: #1f2937;
    outline: none;
    transition: border-color 0.15s;
}
.item-inline-edit input:focus,
.item-inline-edit textarea:focus { border-color: #6366f1; }
.item-inline-edit textarea { resize: vertical; }
.inline-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}
.inline-edit-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
}
.inline-save-btn {
    padding: 0.35rem 0.9rem;
    border-radius: 6px;
    border: none;
    background: #6366f1;
    color: #fff;
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.inline-save-btn:hover:not(:disabled) { background: #4f46e5; }
.inline-save-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.inline-cancel-btn {
    padding: 0.35rem 0.9rem;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #f3f4f6;
    color: #374151;
    font-size: 0.83rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.inline-cancel-btn:hover { background: #e5e7eb; }
.inline-edit-error {
    color: #dc2626;
    font-size: 0.78rem;
    margin-top: 0.25rem;
    min-height: 1em;
}

/* Inline Edit Form */
.inline-edit-form {
    background: #f9fafb;
    border: 1.5px solid #e0e7ff;
    border-radius: 10px;
    padding: 0.8rem;
    margin: 0.5rem 0;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inline-edit-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
}

.inline-field {
    grid-column: span 2;
}

.inline-field-half {
    grid-column: span 1;
}

.inline-field-checkbox {
    display: flex;
    align-items: center;
}

.inline-field label {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.2rem;
}

.inline-field-checkbox label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0;
}

.inline-field input[type="text"],
.inline-field input[type="number"],
.inline-field select,
.inline-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.4rem 0.6rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    background: #fff;
    color: #1f2937;
    outline: none;
    transition: border-color 0.15s;
}

.inline-field input:focus,
.inline-field select:focus,
.inline-field textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.inline-field textarea {
    resize: vertical;
    font-family: inherit;
}

.inline-field input[type="checkbox"] {
    width: auto;
    margin: 0;
}

@media (max-width: 640px) {
    .inline-edit-fields {
        grid-template-columns: 1fr;
    }
    .inline-field-half {
        grid-column: span 1;
    }
}

/* Inline Image Controls */
.inline-image-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.inline-image-preview {
    width: 100%;
    max-width: 200px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #d1d5db;
}

.inline-image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.inline-image-buttons {
    display: flex;
    gap: 0.5rem;
}

.inline-change-img-btn,
.inline-remove-img-btn,
.inline-upload-img-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
}

.inline-change-img-btn:hover,
.inline-upload-img-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.inline-remove-img-btn {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.inline-remove-img-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}
}