/* =========================================================
   لوحة التحكم — Styles
   ========================================================= */

.tab-btn {
  cursor: pointer;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  background: #fff;
  color: #44403C;
  border: 1px solid rgba(28,25,23,0.1);
  transition: all 0.2s ease;
}
.tab-btn:hover {
  border-color: #C9A227;
  color: #1C1917;
}
.tab-btn.active {
  background: #1C1917;
  color: #FDF8F3;
  border-color: #1C1917;
}

.card {
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid rgba(28,25,23,0.06);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 30px -20px rgba(28,25,23,0.15);
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #44403C;
  margin-bottom: 0.4rem;
}

.field-input {
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(28,25,23,0.15);
  background: #FDF8F3;
  font-family: inherit;
  font-size: 0.95rem;
  color: #1C1917;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field-input:focus {
  outline: none;
  border-color: #C9A227;
  box-shadow: 0 0 0 3px rgba(201,162,39,0.15);
}

.btn-primary {
  cursor: pointer;
  background: #1C1917;
  color: #FDF8F3;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 999px;
  transition: background 0.2s ease;
  border: none;
}
.btn-primary:hover {
  background: #C9A227;
  color: #1C1917;
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  cursor: pointer;
  background: transparent;
  color: #44403C;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(28,25,23,0.15);
  transition: all 0.2s ease;
}
.btn-secondary:hover {
  border-color: #C9A227;
  color: #1C1917;
}

.btn-icon {
  cursor: pointer;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(28,25,23,0.1);
  color: #44403C;
  background: #fff;
  transition: all 0.2s ease;
}
.btn-icon:hover {
  border-color: #C9A227;
  color: #1C1917;
}
.btn-icon.danger:hover {
  border-color: #DC2626;
  color: #DC2626;
}
.btn-icon:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}
.btn-icon:disabled:hover {
  border-color: rgba(28,25,23,0.1);
  color: #44403C;
}

/* ---------------------------------------------------------
   Image library grid
--------------------------------------------------------- */
.image-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.6rem;
  max-height: 420px;
  overflow-y: auto;
  padding: 0.25rem;
}
.lib-item {
  cursor: pointer;
  position: relative;
  aspect-ratio: 1;
  border-radius: 0.6rem;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.lib-item:hover {
  border-color: #C9A227;
  transform: scale(1.03);
}
.lib-item.selected {
  border-color: #1C1917;
}
.lib-item img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.lib-item.used::after {
  content: '✓';
  position: absolute;
  top: 4px; left: 4px;
  width: 1.2rem; height: 1.2rem;
  background: #C9A227;
  color: #1C1917;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------------------------------------------------
   Work / Event item cards (admin lists)
--------------------------------------------------------- */
.item-card {
  border: 1px solid rgba(28,25,23,0.08);
  border-radius: 1rem;
  overflow: hidden;
  background: #FDF8F3;
  display: flex;
  flex-direction: column;
}
.item-card .item-img {
  aspect-ratio: 4/3;
  overflow: hidden;
}
.item-card .item-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.item-card .item-body {
  padding: 0.9rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.item-card .item-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
}
.item-card .item-meta {
  font-size: 0.75rem;
  color: #C9A227;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.item-card .item-desc {
  font-size: 0.85rem;
  color: #78716C;
  line-height: 1.5;
}
.item-card .item-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

/* quote / category rows */
.row-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background: #FDF8F3;
  border: 1px solid rgba(28,25,23,0.08);
  border-radius: 0.85rem;
  padding: 0.9rem 1.1rem;
}

/* ---------------------------------------------------------
   Toast
--------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1C1917;
  color: #FDF8F3;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 200;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.4);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.error {
  background: #DC2626;
}
