/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; background: #f4f4f4; color: #222; }

/* === LOGIN === */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #c0000c 0%, #7a0008 100%);
}
.login-box {
  background: #fff;
  border-radius: 14px;
  padding: 48px 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}
.login-logo {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 1px;
}
.logo-arts { color: #c0000c; }
.logo-comercial { color: #333; }
.login-box h2 { font-size: 15px; color: #666; text-align: center; font-weight: 400; }
.login-box input {
  padding: 12px 14px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
}
.login-box input:focus { border-color: #c0000c; }
.login-box button {
  background: #c0000c;
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.login-box button:hover { background: #8b0000; }
.login-error { color: #c0000c; font-size: 13px; text-align: center; min-height: 18px; }

/* === ADMIN HEADER === */
.adm-header {
  background: #c0000c;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.adm-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { font-size: 20px; font-weight: 800; letter-spacing: 1px; display: flex; align-items: center; gap: 10px; }
.adm-label {
  background: rgba(255,255,255,.2);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: .5px;
}
.adm-header-actions { display: flex; gap: 10px; }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.6);
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.btn-outline:hover { background: rgba(255,255,255,.15); border-color: #fff; }

/* === SIDE NAV === */
.side-nav {
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  width: 76px;
  background: #fff;
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding-top: 16px;
  z-index: 150;
}
.side-nav-item {
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 4px;
  border-radius: 10px;
  color: #555;
  font-size: 11px;
  font-weight: 600;
  transition: background .15s, color .15s;
}
.side-nav-item:hover { background: #ffeaea; color: #c0000c; }
.side-nav-icon { font-size: 22px; }
.side-nav-label { line-height: 1.2; text-align: center; }

/* === SIDE PANEL === */
.side-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 299;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s;
}
.side-panel-overlay.open { opacity: 1; visibility: visible; }
.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: #fff;
  z-index: 300;
  box-shadow: -4px 0 20px rgba(0,0,0,.15);
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
}
.side-panel.open { transform: translateX(0); }
.side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #eee;
}
.side-panel-header h2 { font-size: 17px; font-weight: 700; }
.side-panel-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #888;
}
.side-panel-close:hover { color: #c0000c; }
.side-panel-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.side-panel-content { display: none; }
.side-panel-content.active { display: block; }

@media (max-width: 768px) {
  .side-nav {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
    padding-top: 0;
    border-right: none;
    border-top: 1px solid #eee;
  }
  .side-nav-item { flex-direction: column; gap: 2px; width: auto; padding: 6px 12px; font-size: 10px; }
  .side-nav-icon { font-size: 20px; }
  .adm-layout { margin-left: 0; padding-bottom: 76px; padding-left: 12px; padding-right: 12px; }
  .side-panel { width: 100%; max-width: 100%; }
  .adm-header-inner { padding: 0 12px; }
  .adm-header-actions { gap: 6px; }
  .adm-header-actions .btn-outline { padding: 6px 10px; font-size: 12px; }
  .adm-section { padding: 16px; }
  .list-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .list-header > div { width: 100%; }
  #clientSearch { width: 100%; }
}

@media (min-width: 769px) {
  .adm-layout { margin-left: 76px; }
}

/* === ADMIN LAYOUT === */
.adm-layout {
  max-width: 1200px;
  margin: 28px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* === STATS === */
.stats-row { display: flex; gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: #fff;
  border-radius: 10px;
  padding: 20px 28px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 140px;
}
.stat-card span { font-size: 32px; font-weight: 800; color: #c0000c; }
.stat-card label { font-size: 12px; color: #888; }

/* === SECTION === */
.adm-section {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  margin-bottom: 24px;
}
.adm-section h2 { font-size: 17px; font-weight: 700; color: #222; }

/* === COLLAPSIBLE === */
.collapsible-section { padding: 0; overflow: hidden; }
.section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.section-toggle:hover { background: #fafafa; }
.toggle-arrow { transition: transform .25s; flex-shrink: 0; color: #aaa; }
.section-toggle.open .toggle-arrow { transform: rotate(180deg); }

.section-body {
  padding: 0 28px 24px;
  overflow: hidden;
  max-height: 2000px;
  transition: max-height .35s ease, padding .35s ease, opacity .3s ease;
  opacity: 1;
}
.section-body.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}

/* === FORM === */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.span2 { grid-column: span 2; }
.form-group label { font-size: 13px; font-weight: 600; color: #444; }
.form-group input,
.form-group textarea,
.form-group select {
  padding: 9px 12px;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus { border-color: #c0000c; }

.img-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.img-input-row input { flex: 1; min-width: 180px; }
.or-label { font-size: 13px; color: #aaa; }
.btn-download-url {
  background: #c0000c;
  color: #fff;
  border: none;
  padding: 9px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.btn-download-url:hover { background: #8b0000; }
.btn-download-url:disabled { background: #e08080; cursor: not-allowed; }

.btn-upload {
  background: #f4f4f4;
  border: 1.5px solid #ddd;
  padding: 9px 14px;
  border-radius: 7px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.btn-upload:hover { background: #ffeaea; border-color: #c0000c; color: #c0000c; }
.btn-remove-img {
  background: none;
  border: none;
  color: #c0000c;
  cursor: pointer;
  font-size: 13px;
  margin-left: 10px;
  font-weight: 600;
}

.form-actions { display: flex; gap: 12px; margin-top: 20px; }
.btn-primary {
  background: #c0000c;
  color: #fff;
  border: none;
  padding: 11px 28px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.btn-primary:hover { background: #8b0000; }
.btn-secondary {
  background: #f4f4f4;
  color: #555;
  border: 1.5px solid #ddd;
  padding: 11px 20px;
  border-radius: 7px;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s;
}
.btn-secondary:hover { background: #e8e8e8; }

/* === TABLE === */
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 16px;
}
.list-header input {
  padding: 8px 12px;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  font-size: 13px;
  outline: none;
  width: 220px;
}
.list-header input:focus { border-color: #c0000c; }
.adm-table-wrap { overflow-x: auto; }
.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.adm-table th {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 2px solid #f0f0f0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #888;
}
.adm-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f5f5f5;
  vertical-align: middle;
}
.adm-table tr:hover td { background: #fffafa; }
.btn-row {
  background: transparent;
  color: #c0000c;
  border: 1.5px solid #c0000c;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.btn-row:hover { background: #c0000c; color: #fff; }

.columns-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 50;
  min-width: 160px;
}
.columns-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #444;
  cursor: pointer;
  white-space: nowrap;
}

.adm-table.hide-col-1 th:nth-child(1), .adm-table.hide-col-1 td:nth-child(1) { display: none; }
.adm-table.hide-col-2 th:nth-child(2), .adm-table.hide-col-2 td:nth-child(2) { display: none; }
.adm-table.hide-col-3 th:nth-child(3), .adm-table.hide-col-3 td:nth-child(3) { display: none; }
.adm-table.hide-col-4 th:nth-child(4), .adm-table.hide-col-4 td:nth-child(4) { display: none; }
.adm-table.hide-col-5 th:nth-child(5), .adm-table.hide-col-5 td:nth-child(5) { display: none; }
.adm-table.hide-col-6 th:nth-child(6), .adm-table.hide-col-6 td:nth-child(6) { display: none; }
.adm-table.hide-col-7 th:nth-child(7), .adm-table.hide-col-7 td:nth-child(7) { display: none; }
.adm-table.hide-col-8 th:nth-child(8), .adm-table.hide-col-8 td:nth-child(8) { display: none; }
.adm-table.hide-col-9 th:nth-child(9), .adm-table.hide-col-9 td:nth-child(9) { display: none; }
.adm-table.hide-col-10 th:nth-child(10), .adm-table.hide-col-10 td:nth-child(10) { display: none; }
.adm-table.hide-col-11 th:nth-child(11), .adm-table.hide-col-11 td:nth-child(11) { display: none; }

.collapsible-header { cursor: pointer; display: flex; align-items: center; justify-content: space-between; user-select: none; }
.collapsible-arrow { font-size: 12px; transition: transform 0.2s; }
.collapsible-arrow.collapsed { transform: rotate(180deg); }

/* Metric collapsible blocks */
.metric-block { padding-bottom: 0; }
.metric-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 700;
  color: #222;
}
.metric-toggle:hover { color: #c0000c; }
.metric-arrow {
  font-size: 11px;
  color: #aaa;
  transition: transform 0.2s;
}
.metric-toggle.open .metric-arrow { transform: rotate(180deg); }
.metric-body { padding-bottom: 16px; }
#clientFormBody.collapsed { display: none; }
.adm-table .thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #eee;
  background: #fafafa;
}
.adm-table .thumb-placeholder {
  width: 48px;
  height: 48px;
  background: #f0f0f0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #ccc;
}
.actions-cell { display: flex; align-items: center; gap: 6px; }
.name-cell { display: flex; align-items: center; gap: 6px; }

.btn-eye {
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.btn-eye.eye-on { background: #e8f5e9; color: #2e7d32; }
.btn-eye.eye-on:hover { background: #2e7d32; color: #fff; }
.btn-eye.eye-off { background: #f4f4f4; color: #bbb; }
.btn-eye.eye-off:hover { background: #555; color: #fff; }

.row-hidden td { opacity: .55; }
.badge-hidden {
  background: #f4f4f4;
  color: #aaa;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
}

.btn-edit, .btn-delete {
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-edit { background: #ffeaea; color: #c0000c; }
.btn-edit:hover { background: #c0000c; color: #fff; }
.btn-delete { background: #f4f4f4; color: #888; }
.btn-delete:hover { background: #333; color: #fff; }
.adm-empty { text-align: center; padding: 48px; color: #bbb; font-size: 15px; }

.dots-menu-wrap { position: relative; }

.btn-dots {
  background: #f4f4f4;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  width: 36px; height: 36px;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
  line-height: 1;
}
.btn-dots:hover { background: #e0e0e0; }

.dots-dropdown {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 6px);
  background: #fff;
  border: 1.5px solid #eee;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  min-width: 180px;
  z-index: 50;
  overflow: hidden;
}
.dots-dropdown.open { display: block; }
.dots-dropdown button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background .15s;
  color: #333;
}
.dots-dropdown button:hover { background: #ffeaea; color: #c0000c; }
.dots-dropdown button + button { border-top: 1px solid #f0f0f0; }

.btn-toggle-all {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.btn-all-on  { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.btn-all-on:hover  { background: #2e7d32; color: #fff; border-color: #2e7d32; }
.btn-all-off { background: #f4f4f4; color: #888; border-color: #ddd; }
.btn-all-off:hover { background: #555; color: #fff; border-color: #555; }
.category-badge {
  background: #ffeaea;
  color: #c0000c;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

/* === PROMO SELECTOR === */
.promo-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}
.promo-selector-card {
  border: 2px solid #eee;
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color .15s, background .15s;
  position: relative;
  text-align: center;
}
.promo-selector-card:hover { border-color: #c0000c; background: #fffafa; }
.promo-selector-card.selected { border-color: #c0000c; background: #ffeaea; }
.promo-selector-card img {
  width: 70px; height: 70px;
  object-fit: contain;
  border-radius: 6px;
  background: #f5f5f5;
}
.promo-selector-card .placeholder-icon {
  width: 70px; height: 70px;
  background: #f0f0f0;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.promo-selector-card span { font-size: 12px; font-weight: 600; line-height: 1.3; color: #333; }
.promo-check {
  position: absolute;
  top: 6px; right: 6px;
  width: 20px; height: 20px;
  background: #c0000c;
  color: #fff;
  border-radius: 50%;
  font-size: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.promo-selector-card.selected .promo-check { display: flex; }

/* === BANNERS === */
.banner-form {
  background: #fafafa;
  border: 1.5px solid #eee;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 4px;
}
.banner-list { display: flex; flex-direction: column; gap: 12px; }
.banner-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fafafa;
  border: 1.5px solid #eee;
  border-radius: 10px;
  padding: 12px 16px;
  transition: border-color .15s;
}
.banner-item:hover { border-color: #c0000c; }
.banner-item.inactive { opacity: .5; }
.banner-thumb {
  width: 120px; height: 60px;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
  flex-shrink: 0;
}
.banner-thumb-placeholder {
  width: 120px; height: 60px;
  background: #f0f0f0;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #ccc; flex-shrink: 0;
}
.banner-info { flex: 1; min-width: 0; }
.banner-info strong { font-size: 14px; display: block; }
.banner-info span { font-size: 12px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 300px; }
.banner-order { display: flex; flex-direction: column; gap: 4px; }
.btn-order {
  background: #f0f0f0; border: none; border-radius: 4px;
  width: 28px; height: 28px; cursor: pointer; font-size: 14px;
  transition: background .15s;
}
.btn-order:hover { background: #c0000c; color: #fff; }

/* === TOAST === */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #222;
  color: #fff;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s, transform .25s;
  z-index: 999;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: #1a7a3f; }
.toast.error { background: #c0000c; }

/* === FILTROS === */
.filter-chip {
  padding: 6px 13px;
  border: 1.5px solid #ddd;
  border-radius: 20px;
  background: #fff;
  color: #666;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.filter-chip:hover { border-color: #c0000c; color: #c0000c; background: #ffeaea; }
.filter-chip.active { background: #c0000c; border-color: #c0000c; color: #fff; }

/* === PAGINAÇÃO === */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 0 4px;
  flex-wrap: wrap;
}
.page-info {
  font-size: 13px;
  color: #888;
  margin-right: 8px;
}
.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1.5px solid #e0e0e0;
  border-radius: 7px;
  background: #fff;
  color: #444;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.page-btn:hover:not(:disabled) { background: #ffeaea; border-color: #c0000c; color: #c0000c; }
.page-btn.active { background: #c0000c; border-color: #c0000c; color: #fff; }
.page-btn:disabled { opacity: .35; cursor: not-allowed; }
.page-ellipsis { font-size: 14px; color: #aaa; padding: 0 4px; }

/* === BOTÃO CÂMERA === */
.btn-camera {
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.btn-camera.has-photo { background: #e8f0ff; color: #1a56db; }
.btn-camera.has-photo:hover { background: #1a56db; color: #fff; }
.btn-camera.no-photo { background: #fff3e0; color: #e65100; }
.btn-camera.no-photo:hover { background: #e65100; color: #fff; }

/* === MODAL FOTO RÁPIDA === */
.photo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.photo-modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 12px 48px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.photo-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.photo-modal-title { font-size: 17px; font-weight: 700; color: #222; }
.photo-modal-sub { font-size: 13px; color: #888; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 340px; }
.photo-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  flex-shrink: 0;
  padding: 0 4px;
  transition: color .15s;
}
.photo-modal-close:hover { color: #333; }

.photo-modal-preview-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fafafa;
  border: 1.5px solid #eee;
  border-radius: 10px;
  padding: 12px 16px;
}
.photo-modal-preview-wrap img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 8px;
  background: #f0f0f0;
  border: 1px solid #eee;
}
.photo-modal-empty {
  height: 90px;
  background: #fafafa;
  border: 1.5px dashed #ddd;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 14px;
}
.photo-modal-inputs { display: flex; flex-direction: column; }
.photo-modal-actions { display: flex; gap: 10px; }

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-group.span2 { grid-column: span 1; }
  .stats-row { flex-wrap: wrap; }
  .login-box { padding: 32px 20px; }
  .btn-row { padding: 5px 8px; font-size: 12px; }
  .form-actions { flex-wrap: wrap; }
  .form-actions button { flex: 1; min-width: 120px; }
  .photo-modal-box { padding: 16px; }
  .photo-modal-actions { flex-wrap: wrap; }
  .photo-modal-actions button { flex: 1; }
}

/* === LOGS === */
.logs-list { max-height: 400px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.log-item { font-size: 13px; padding: 8px 10px; background: #f9f9f9; border-radius: 6px; border: 1px solid #eee; }
.log-date { color: #999; margin-right: 8px; }
.log-details { color: #777; }

/* === NOVA SIDEBAR (admin.html) === */
.adm-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 149;
}
.adm-sidebar-overlay.open { display: block; }

.adm-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 220px;
  background: #fff;
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
  z-index: 150;
  transition: transform .25s ease;
  box-shadow: 2px 0 12px rgba(0,0,0,.06);
}

.adm-sidebar-logo {
  padding: 20px 18px 16px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.adm-sidebar-nav {
  flex: 1;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.adm-nav-divider {
  height: 1px;
  background: #eee;
  margin: 6px 4px;
  flex-shrink: 0;
}

.adm-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #444;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.adm-nav-item:hover { background: #ffeaea; color: #c0000c; }
.adm-nav-item.active { background: #c0000c; color: #fff; font-weight: 700; }
.adm-nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }

.adm-sidebar-footer {
  padding: 8px 8px 12px;
  flex-shrink: 0;
}
.adm-sidebar-user {
  padding: 8px 12px 2px;
  font-size: 12px;
  color: #aaa;
  font-weight: 600;
}

/* === HAMBURGER === */
.adm-hamburger {
  display: none;
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  background: #c0000c;
  color: #fff;
  border: none;
  border-radius: 8px;
  width: 40px; height: 40px;
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* === MAIN WRAPPER (admin.html) === */
.adm-main { min-height: 100vh; }

.adm-sidebar-page .adm-layout { margin-left: 0; padding: 32px 28px; }

@media (min-width: 769px) {
  .adm-sidebar-page .adm-main { margin-left: 220px; }
  .adm-hamburger { display: none !important; }
}

@media (max-width: 768px) {
  .adm-sidebar { transform: translateX(-220px); }
  .adm-sidebar.open { transform: translateX(0); }
  .adm-hamburger { display: flex; }
  .adm-sidebar-page .adm-layout { padding-top: 60px; padding-bottom: 20px; }
}

/* === PAGE HEADER === */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.page-title { font-size: 24px; font-weight: 800; color: #222; }
.page-subtitle { font-size: 13px; color: #aaa; margin-top: 2px; }
.page-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-stock {
  background: #fff;
  color: #c0000c;
  border: 2px solid #c0000c;
  padding: 10px 20px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.btn-stock:hover { background: #c0000c; color: #fff; }

/* === STOCK MODAL === */
.stock-product-list {
  border: 1.5px solid #eee;
  border-radius: 7px;
  margin-top: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.stock-product-item {
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid #f5f5f5;
  transition: background .12s;
}
.stock-product-item:last-child { border-bottom: none; }
.stock-product-item:hover { background: #ffeaea; }
.stock-product-item strong { font-size: 14px; color: #222; }
.stock-product-item span { font-size: 12px; color: #888; }
.stock-no-result { cursor: default; color: #bbb; font-size: 13px; }
.stock-no-result:hover { background: none; }
.stock-product-info {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fafafa;
  border: 1.5px solid #eee;
  border-radius: 7px;
  font-size: 13px;
  color: #444;
}
.stock-op-btn {
  flex: 1;
  padding: 9px 12px;
  border: 1.5px solid #ddd;
  border-radius: 7px;
  background: #f4f4f4;
  color: #666;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.stock-op-btn.active { background: #c0000c; color: #fff; border-color: #c0000c; }
.stock-op-btn:hover:not(.active) { border-color: #c0000c; color: #c0000c; background: #ffeaea; }

/* === STOCK === */
.stock-low { color: #c0000c; font-weight: 700; }
.stock-badge {
  display: inline-block;
  background: #ffeaea;
  color: #c0000c;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

/* === METRICS GRID === */
@media (max-width: 768px) { #metricsWrap > div[style*='grid'] { grid-template-columns: 1fr !important; } }
