/* Delivery City - Main Styles */

/* Base styles */
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: #0f172a;
  color: #e2e8f0;
}

/* Header */
header {
  padding: 16px 20px;
  border-bottom: 1px solid #334155;
  background: #111827;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
  min-height: 56px;
}

#logo, .brand {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  line-height: 1.2 !important;
  padding: 8px 0;
  margin: 0 !important;
}

/* Admin Navigation */
.admin-nav {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-left: 20px;
  flex-wrap: nowrap;
}

.admin-nav .nav-link {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  color: #94a3b8;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s;
  font-weight: 500;
}

.admin-nav .nav-link:hover {
  color: #e2e8f0;
  background: #1e293b;
  text-decoration: none;
}

.admin-nav .nav-link.active {
  color: #fbbf24;
  background: #1e293b;
}

/* Auth box */
#authbox {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  white-space: nowrap;
}

/* Main content */
main {
  padding: 20px;
}

/* Links */
a {
  color: #38bdf8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Cards */
.card {
  background: #111827;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px;
}

.card-orange {
  background: #7c2d12;
  border-color: #f59e0b;
}

.card-green {
  background: #064e3b;
  border-color: #10b981;
}

.card-blue {
  background: #0e3a5b;
  border-color: #38bdf8;
}

/* Buttons */
.btn {
  display: inline-block;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 12px;
  color: #e2e8f0;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}

.btn:hover {
  background: #0ea5e9;
  border-color: #0284c7;
}

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

.danger {
  background: #7f1d1d;
  border-color: #b91c1c;
}

.danger:hover {
  background: #ef4444;
  border-color: #dc2626;
}

/* Text styles */
.muted {
  color: #94a3b8;
}

.error {
  color: #f87171;
}

.ok {
  color: #4ade80;
}

.hl {
  color: #fbbf24;
  font-weight: 700;
}

.hl-green {
  color: #10b981;
  font-weight: 700;
}

.zip {
  color: #fbbf24;
  font-weight: 700;
}

/* Layout helpers */
.row {
  margin: 8px 0;
}

.link {
  display: inline-block;
  margin: 6px 0;
}

.back {
  margin-top: 16px;
  display: inline-block;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 16px;
  flex-wrap: wrap;
}

.tab {
  padding: 8px 12px;
  border: 1px solid #334155;
  border-radius: 8px;
  background: #111827;
  color: #e2e8f0;
}

.tab.active {
  background: #0ea5e9;
  border-color: #0284c7;
}

.tab a {
  color: inherit;
  text-decoration: none;
}

/* Forms */
.form {
  background: #0b1220;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px;
  margin: 12px 0;
}

.form .row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.form input,
.form select,
.form textarea {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #111827;
  color: #e2e8f0;
  font-family: inherit;
}

.form textarea {
  min-width: 460px;
  min-height: 80px;
}

.input {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #111827;
  color: #e2e8f0;
}

/* Actions */
.actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: nowrap;
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.toolbar .right {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* List rows */
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px;
  margin: 4px 0;
  border: 1px solid #334155;
  border-radius: 4px;
  cursor: pointer;
}

.list-row:hover {
  background: #1e293b;
}

/* Dropdowns */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #0b1220;
  border: 1px solid #334155;
  border-radius: 8px;
  z-index: 20;
  max-height: 220px;
  overflow: auto;
  display: none;
}

.dropdown-item {
  padding: 8px 10px;
  border-bottom: 1px solid #1f2937;
  cursor: pointer;
}

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

.dropdown-item:hover {
  background: #1e293b;
}

/* Animations */
@keyframes blink {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

.blink {
  animation: blink 1s linear infinite;
}

/* Catalog specific styles */
.catalog-row {
  display: grid;
  grid-template-columns: minmax(480px, 720px) 120px auto;
  gap: 20px;
  align-items: center;
}

.catalog-name {
  padding-right: 28px;
  overflow-wrap: anywhere;
}

.product-row {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 120px 280px;
  gap: 16px;
  align-items: center;
}

.catalog-products {
  grid-template-columns: repeat(auto-fill, minmax(1024px, 1fr));
}

.left-pane {
  position: relative;
  z-index: 2;
}

.right-pane {
  position: relative;
  z-index: 1;
  overflow-x: auto;
  max-width: 1280px;
  margin: 0 auto;
}
