/* Nitesh Jewellery Admin Panel — custom styles complementing Tailwind */

:root {
  --gold: #c9a961;
  --gold-dark: #a88746;
  --gold-light: #e6d4a8;
  --surface: #fafafa;
  --text-primary: #1a1a1a;
}

html,
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-primary);
  background-color: var(--surface);
}

/* Brand gradient utilities */
.bg-gold-gradient {
  background: linear-gradient(135deg, #d4b876 0%, #c9a961 50%, #a88746 100%);
}

.text-gold-gradient {
  background: linear-gradient(135deg, #c9a961 0%, #a88746 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Brand diamond/logo */
.brand-diamond {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4b876, #a88746);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 8px 24px -8px rgba(168, 135, 70, 0.5);
  position: relative;
}

.brand-diamond::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

/* Sidebar nav active state */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  color: #4b5563;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.15s ease;
  position: relative;
}

.nav-link:hover {
  background-color: #fdf8ec;
  color: #a88746;
}

.nav-link.active {
  background: linear-gradient(135deg, #fdf8ec 0%, #f6ebcc 100%);
  color: #a88746;
  font-weight: 600;
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: linear-gradient(180deg, #c9a961, #a88746);
  border-radius: 0 4px 4px 0;
}

/* Inputs */
.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.375rem;
}

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  border-radius: 0.625rem;
  border: 1px solid #e5e7eb;
  background-color: #ffffff;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  color: #111827;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  border-color: #c9a961;
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.18);
}

.field-input.error,
.field-select.error,
.field-textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.field-error {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #dc2626;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #c9a961 0%, #a88746 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px -4px rgba(168, 135, 70, 0.45);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 6px 16px -4px rgba(168, 135, 70, 0.6);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: #ffffff;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #f9fafb;
  border-color: #d1d5db;
}

.btn-danger {
  background-color: #dc2626;
  color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
  background-color: #b91c1c;
}

.btn-ghost {
  color: #4b5563;
  background-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background-color: #f3f4f6;
  color: #111827;
}

.btn-icon {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 0.5rem;
}

/* Cards */
.card {
  background-color: #ffffff;
  border-radius: 1rem;
  border: 1px solid #f1f0eb;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border-radius: 1rem;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

table.data-table thead th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  padding: 0.875rem 1rem;
  background-color: #fafafa;
  border-bottom: 1px solid #f1f0eb;
  white-space: nowrap;
}

table.data-table tbody td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: #1f2937;
  border-bottom: 1px solid #f5f4ef;
  vertical-align: middle;
}

table.data-table tbody tr:hover {
  background-color: #fdfcf6;
}

/* Drag & drop upload */
.dropzone {
  border: 2px dashed #d1d5db;
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  background-color: #fafafa;
  transition: all 0.15s;
  cursor: pointer;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: #c9a961;
  background-color: #fdf8ec;
}

.thumb {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 0.625rem;
  overflow: hidden;
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb .thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

.thumb .thumb-remove:hover {
  background: #dc2626;
}

.thumb .thumb-progress {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* Toggle switches */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle .track {
  width: 40px;
  height: 22px;
  background-color: #e5e7eb;
  border-radius: 999px;
  transition: background-color 0.2s;
  position: relative;
}

.toggle .track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.toggle input:checked + .track {
  background: linear-gradient(135deg, #c9a961, #a88746);
}

.toggle input:checked + .track::after {
  transform: translateX(18px);
}

/* Stat cards */
.stat-card {
  background: white;
  border-radius: 1rem;
  padding: 1.25rem;
  border: 1px solid #f1f0eb;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadein {
  animation: fadeIn 0.18s ease-out;
}

/* Empty state */
.empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: #9ca3af;
}

.empty-state i {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  color: #d1d5db;
}

/* Scrollbar polish */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #d1d5db;
}

/* Mobile sidebar */
@media (max-width: 1023px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }
  .sidebar.open {
    transform: translateX(0);
  }
}

/* Print friendly tweaks */
@media print {
  .sidebar,
  .topbar,
  .no-print {
    display: none !important;
  }
}
