/* ============================================================
   NOMEIN TATTOO — ADMIN PANEL STYLES
   ============================================================ */

.admin-body {
  background: #f2f0ed;
  min-height: 100vh;
  background-image: none;
}

/* ---- HEADER ---- */
.admin-header {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: var(--border);
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.9rem 2rem;
  z-index: 100;
  flex-wrap: wrap;
}

.admin-tabs {
  display: flex;
  gap: 0;
  flex: 1;
  flex-wrap: wrap;
}
.admin-tab {
  font-family: var(--font);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.6rem 1.4rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--grey-mid);
  transition: color 0.2s, border-color 0.2s;
  border-radius: 0;
}
.admin-tab:hover { color: var(--black); }
.admin-tab.active {
  color: var(--black);
  border-bottom-color: var(--black);
}

/* ---- LOGIN ---- */
.admin-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.admin-login-box {
  width: 100%;
  max-width: 400px;
  border: var(--border);
  background: var(--white);
  padding: 3rem 2.5rem;
}
.admin-logo-mark {
  font-size: 2rem;
  font-weight: 300;
  font-style: italic;
  margin-bottom: 0.5rem;
  display: block;
}
.admin-login-title {
  font-size: 1.6rem;
  font-weight: 300;
  font-style: italic;
  margin-bottom: 2.5rem;
  color: var(--black);
}

/* ---- MAIN ---- */
.admin-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

.admin-panel-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
  border-bottom: var(--border);
  padding-bottom: 1rem;
}
.admin-panel-title {
  font-size: 1.6rem;
  font-weight: 300;
  font-style: italic;
}
.admin-badge {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  font-weight: 600;
  background: var(--black);
  color: var(--white);
  padding: 0.2rem 0.6rem;
}

/* ---- CARD ---- */
.admin-card {
  background: var(--white);
  border: var(--border);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.admin-card-title {
  font-size: 1.1rem;
  font-weight: 400;
  font-style: italic;
  margin-bottom: 0.5rem;
}
.admin-hint {
  font-size: 0.82rem;
  font-weight: 300;
  font-style: italic;
  color: var(--grey-mid);
  margin-bottom: 1rem;
  line-height: 1.5;
}

/* ---- TABLE ---- */
.admin-table-wrap {
  overflow-x: auto;
  border: var(--border);
  background: var(--white);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-weight: 300;
  white-space: nowrap;
}
.admin-table thead {
  border-bottom: var(--border);
  background: rgba(0,0,0,0.03);
}
.admin-table th {
  padding: 0.7rem 1rem;
  text-align: left;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--grey);
}
.admin-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(0,0,0,0.02); }

.admin-empty {
  padding: 3rem;
  text-align: center;
  font-style: italic;
  color: var(--grey-light);
  font-weight: 300;
}

.contacted-badge {
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border: var(--border);
}
.contacted-badge.yes { background: var(--black); color: var(--white); }

/* ---- DESIGNS GRID ---- */
.admin-designs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}
.admin-design-item {
  position: relative;
  border: var(--border);
  overflow: hidden;
}
.admin-design-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  filter: grayscale(0.3);
}
.admin-design-item .item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.admin-design-item:hover .item-overlay { opacity: 1; }
.admin-design-item .item-label {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--white);
  text-align: center;
}

/* ---- FILE INPUT ---- */
input[type="file"] {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--black);
  cursor: pointer;
  min-height: 48px;
  padding: 0.6rem 0;
  display: block;
  width: 100%;
}

/* ---- PROGRESS BAR ---- */
.upload-progress {
  margin-top: 1rem;
}
.progress-bar {
  width: 100%;
  height: 2px;
  background: rgba(0,0,0,0.1);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--black);
  width: 0%;
  transition: width 0.3s ease;
}

/* ---- DROP ZONE ---- */
.drop-zone {
  border: 1px dashed rgba(0,0,0,0.3);
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 1rem;
  position: relative;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--black);
  background: rgba(0,0,0,0.03);
}
.drop-zone-label {
  font-size: 0.9rem;
  font-weight: 300;
  font-style: italic;
  color: var(--grey-mid);
  margin: 0;
  pointer-events: none;
}
.drop-zone-label span {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-style: normal;
  font-weight: 500;
  color: var(--black);
}

/* ---- UPLOAD THUMBS ---- */
.upload-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}
.upload-thumb {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: var(--border);
}
.upload-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- FLASH SET ROWS ---- */
.flash-set-row {
  border: var(--border);
  margin-bottom: 0.6rem;
  background: var(--white);
}
.flash-set-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1.2rem;
  gap: 1rem;
}
.flash-set-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0;
  text-align: left;
  flex: 1;
  color: var(--black);
}
.flash-set-toggle:hover { opacity: 0.55; }
.flash-set-arrow {
  font-size: 0.55rem;
  color: var(--grey-mid);
  width: 1em;
  display: inline-block;
}
.flash-set-designs {
  border-top: var(--border);
  padding: 1rem 1.2rem;
}

/* ---- DANGER BUTTON ---- */
.btn.btn-danger {
  border-color: rgba(160, 30, 30, 0.45);
  color: rgb(150, 25, 25);
}
.btn.btn-danger:hover {
  background: rgb(150, 25, 25);
  color: var(--white);
  border-color: rgb(150, 25, 25);
}

/* ---- EDIT CONTENT LAYOUT ---- */
.ec-price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.ec-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .ec-price-grid { grid-template-columns: 1fr; }
  .ec-two-col    { grid-template-columns: 1fr; }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  /* Header: stacks nicely, tabs scroll horizontally */
  .admin-header {
    padding: 0.7rem 1rem;
    gap: 0.8rem;
    flex-wrap: nowrap;
    overflow-x: hidden;
  }
  .admin-header > a { font-size: 0.9rem; flex-shrink: 0; }

  /* Tabs: horizontal scroll, no wrap */
  .admin-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
  }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tab {
    white-space: nowrap;
    min-height: 44px;
    flex-shrink: 0;
    padding: 0.6rem 1rem;
  }

  /* Logout button: compact */
  #logout-btn { flex-shrink: 0; padding: 0.4rem 0.9rem; font-size: 0.65rem; }

  /* Main content */
  .admin-main { padding: 1.2rem 1rem; }
  .admin-card { padding: 1.4rem 1rem; }

  /* Login box: full width, comfortable */
  .admin-login-box { padding: 2.5rem 1.4rem; }
  .admin-login-title { font-size: 1.4rem; }

  /* Table: horizontal scroll */
  .admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.9rem;
    font-size: 0.85rem;
  }
  .admin-table th { font-size: 0.6rem; }

  /* Buttons in admin: large touch targets */
  .admin-card .btn,
  .admin-card button.btn {
    min-height: 48px;
    width: 100%;
    margin-bottom: 0.5rem;
  }
  .admin-card div[style*="display:flex"] {
    flex-direction: column;
  }

  /* Designs grid: larger thumbnails on mobile */
  .admin-designs-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.6rem;
  }

  /* Panel header */
  .admin-panel-header { flex-wrap: wrap; gap: 0.8rem; }

  /* Form inputs in admin */
  .admin-card .form-group input,
  .admin-card .form-group textarea,
  .admin-card .form-group select {
    font-size: 1rem;
    padding: 0.85rem 0;
  }
}
