/* Staff portal — extends main site styles.css */

.portal-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(160deg, var(--charcoal), #3a1010);
}

.portal-login-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 2rem;
  width: min(380px, 100%);
  border-top: 5px solid var(--diner-red);
  box-shadow: var(--shadow);
}

.portal-login-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}
.portal-login-head img { border-radius: 4px; }
.portal-login-head h1 {
  font-size: 1.6rem;
  color: var(--diner-red);
  line-height: 1;
}
.portal-login-head span {
  display: block;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
}

.portal-login-sub { color: #666; margin-bottom: 1.25rem; font-size: 0.95rem; }

.portal-login-card label {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
  margin-top: 0.75rem;
}
.portal-login-card input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #ddd;
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  background: #fff;
}
.portal-login-card input:focus {
  outline: none;
  border-color: var(--diner-red);
}
.portal-login-card .btn { margin-top: 1.25rem; }

.portal-back {
  display: inline-block;
  margin-top: 1rem;
  color: var(--diner-red);
  font-weight: 600;
  font-size: 0.9rem;
}

/* App shell */
.portal-app {
  min-height: 100vh;
  background: var(--cream);
  padding-top: var(--nav-height);
}

.portal-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}
.portal-nav .nav-logo span { font-size: 1.25rem; }
.portal-staff-tag {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.65rem;
  background: var(--mustard);
  color: var(--charcoal);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  vertical-align: middle;
  letter-spacing: 0.06em;
}

.portal-nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.portal-status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 50px;
  background: rgba(255,255,255,0.1);
  color: var(--cream);
}
.portal-status.ok { background: rgba(42,157,143,0.35); color: #9efff0; }
.portal-status.error { background: rgba(139,0,0,0.45); color: #ffb3b3; }

.portal-banner {
  background: #fff3cd;
  color: #664d03;
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  border-bottom: 2px solid #ffc107;
}

.portal-wrap {
  padding: 1.5rem 1rem 4rem;
  max-width: 820px;
}

.portal-welcome {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: #fff;
  border-radius: var(--radius);
  border-left: 4px solid var(--diner-red);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.portal-welcome h2 {
  font-size: 1.75rem;
  color: var(--diner-red);
  margin-bottom: 0.35rem;
}
.portal-welcome p { color: #555; font-size: 0.95rem; }

/* Tabs */
.portal-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.portal-tab {
  flex: 1;
  min-width: 120px;
  padding: 0.85rem 1rem;
  border: 2px solid #e0d8c8;
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s;
  min-height: 48px;
}
.portal-tab:hover { border-color: var(--diner-red); }
.portal-tab.active {
  background: var(--diner-red);
  color: #fff;
  border-color: var(--diner-red);
  box-shadow: none;
}

.portal-count {
  background: var(--mustard);
  color: var(--charcoal);
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 50px;
  margin-left: 0.25rem;
}

/* Panels */
.portal-panel { display: none; }
.portal-panel.active { display: block; }

.portal-panel .section-header {
  margin-bottom: 1.25rem;
  text-align: left;
}
.portal-panel .section-header h2 { font-size: 2rem; }
.portal-app .divider,
.portal-panel .section-header .divider {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  background: none !important;
  overflow: hidden !important;
}
.portal-panel .section-header p {
  margin-left: 0;
  margin-right: auto;
  max-width: none;
}

/* Cards */
.portal-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid #e8dcc8;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.portal-card-title {
  font-size: 1.15rem;
  color: var(--diner-red);
  margin-bottom: 1rem;
}

.portal-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.portal-card-head .portal-card-title { margin-bottom: 0; }

.portal-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.portal-card label {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
  margin-top: 0.75rem;
}
.portal-card label:first-of-type { margin-top: 0; }

.muted { font-weight: 400; color: #999; text-transform: none; }

.portal-input,
.portal-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #ddd;
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  background: var(--cream);
}
.portal-textarea { min-height: 100px; resize: vertical; }
.portal-input:focus,
.portal-textarea:focus {
  outline: none;
  border-color: var(--diner-red);
  background: #fff;
}

.btn-outline-dark {
  background: transparent;
  color: var(--diner-red);
  border: 2px solid var(--diner-red);
  box-shadow: none;
}
.btn-outline-dark:hover { background: rgba(139,0,0,0.06); }

.portal-hint {
  font-size: 0.88rem;
  color: #777;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.portal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.portal-actions .portal-save { margin-top: 0; }

/* Flat buttons in admin — 3D shadows looked like divider lines between sections */
.portal-app .btn {
  box-shadow: none;
  transform: none;
}
.portal-app .btn:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transform: none;
}
.portal-app .btn:active {
  transform: scale(0.98);
}
.portal-app .btn-primary:hover {
  background: var(--diner-red-light);
}
.portal-app .btn-mustard:hover {
  filter: brightness(1.05);
}

.admin-file-hidden {
  position: fixed !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.btn-delete {
  background: var(--diner-red);
  color: #fff;
  box-shadow: none;
  width: 100%;
}
.btn-delete:hover {
  background: var(--diner-red-light);
  box-shadow: 0 2px 8px rgba(139, 0, 0, 0.25);
}

.portal-save { margin-top: 0.5rem; }
.portal-saved {
  text-align: center;
  color: var(--teal);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Preview board */
.portal-preview {
  padding: 1.5rem;
  background: linear-gradient(180deg, #2a1515, var(--charcoal));
}
.preview-headline {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.75rem;
  color: var(--mustard);
  text-align: center;
  margin-bottom: 0.25rem;
}
.preview-tagline {
  text-align: center;
  color: var(--cream);
  opacity: 0.85;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.preview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}
.preview-card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 0.75rem;
  border-bottom: 3px solid var(--diner-red);
  position: relative;
  overflow: hidden;
}
.preview-card img {
  width: calc(100% + 1.5rem);
  margin: -0.75rem -0.75rem 0.5rem;
  height: 70px;
  object-fit: cover;
}
.preview-card h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1rem;
  color: var(--charcoal);
}
.preview-card .price {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  color: var(--diner-red);
}
.preview-card .desc { font-size: 0.75rem; color: #666; }
.preview-card .badge {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  background: var(--diner-red);
  color: #fff;
  font-size: 0.6rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
}
.preview-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(255,248,231,0.45);
  padding: 1rem;
}
.preview-footer {
  text-align: center;
  margin-top: 1rem;
  font-family: 'Bebas Neue', sans-serif;
  color: var(--cream);
  font-size: 0.95rem;
}

/* Special items */
.special-row {
  border: 2px solid #ece3d0;
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--cream);
  margin-bottom: 0.75rem;
}
.special-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e8dcc8;
}
.special-row-head strong {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--diner-red);
  font-size: 1.05rem;
}
.special-row .field-pair {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0.75rem;
}

/* Photo upload */
.portal-photo {
  position: relative;
  border: 2px dashed #ccc;
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: #fafafa;
  transition: border-color 0.2s;
}
.portal-photo:hover { border-color: var(--diner-red); }
.portal-photo.uploading { opacity: 0.5; pointer-events: none; }

.portal-photo-empty {
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.portal-photo-empty span { font-size: 2rem; }

.portal-photo-img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
}
.special-row .portal-photo-img { max-height: 100px; }
.special-row .portal-photo-empty { padding: 1rem; }

.portal-photo-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 2;
}

/* Filters */
.portal-filters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  justify-content: center;
}
.portal-filter {
  padding: 0.5rem 1rem;
  border: 2px solid #ddd;
  border-radius: 50px;
  background: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  min-height: 40px;
}
.portal-filter.active {
  background: var(--diner-red);
  color: #fff;
  border-color: var(--diner-red);
}

.portal-export-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  background: #fff;
  border: 1px solid #e8dcc8;
  border-radius: var(--radius);
}
.portal-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.menu-category-block {
  margin-bottom: 1rem;
}

.menu-category-block .add-menu-item-btn {
  margin-top: 0.75rem;
}

.gallery-panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 1.25rem 1.5rem 1.5rem;
  overflow: hidden;
}

.gallery-panel-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.15rem;
  color: var(--diner-red);
  margin-bottom: 0.75rem;
}

.gallery-panel-note {
  font-size: 0.88rem;
  color: #777;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.gallery-panel-add {
  padding-bottom: 0.25rem;
  margin-bottom: 0;
}

.gallery-panel-list {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  padding-top: 1rem;
  position: relative;
  z-index: 2;
}

.gallery-panel-actions {
  margin-top: 1rem;
}

.gallery-upload {
  position: relative;
  border-radius: var(--radius);
  background: #f7f3ea;
  min-height: 120px;
  margin-bottom: 1rem;
  overflow: hidden;
  cursor: pointer;
}

.gallery-upload.uploading {
  opacity: 0.55;
  pointer-events: none;
}

.gallery-upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  color: #666;
  font-weight: 600;
  text-align: center;
}

.gallery-upload-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--diner-red);
  line-height: 1;
}

.gallery-upload-preview {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-upload-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 2;
}

.gallery-field-label {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
  margin-top: 0.75rem;
}

.gallery-field-label:first-of-type {
  margin-top: 0;
}

.gallery-field-input {
  border-color: #e8dcc8;
  background: #fffdf8;
}

.gallery-add-btn {
  margin-top: 1rem;
  margin-bottom: 0;
  box-shadow: none !important;
}

#galleryItems {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gallery-admin-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 0.85rem;
  background: #faf8f3;
  border-radius: var(--radius);
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: none;
  box-shadow: none;
}

.gallery-admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.gallery-admin-head strong {
  font-family: 'Bebas Neue', sans-serif;
  color: var(--diner-red);
  font-size: 1.05rem;
}

.gallery-admin-head .btn-delete {
  width: auto;
  min-height: 34px;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.gallery-admin-preview {
  width: 96px;
  min-width: 96px;
  height: 72px;
  background: #ebe4d6;
  border-radius: 6px;
  overflow: hidden;
}

.gallery-admin-preview img {
  width: 100%;
  height: 72px;
  object-fit: cover;
  display: block;
}

.gallery-admin-fields {
  min-width: 0;
}

.gallery-admin-fields label {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
  margin-top: 0.65rem;
}

.gallery-admin-fields label:first-of-type {
  margin-top: 0;
}

.gallery-admin-fields .portal-input {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .gallery-panel {
    padding: 1rem;
  }
  .gallery-admin-row {
    grid-template-columns: 1fr;
  }
  .gallery-admin-preview {
    width: 100%;
    min-width: 0;
    height: 140px;
  }
  .gallery-admin-preview img {
    height: 140px;
  }
}

/* Message cards */
.msg-item {
  background: #fff;
  border: 1px solid #e8dcc8;
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
}
.msg-item.unread {
  border-left-color: var(--mustard);
  background: #fffdf5;
}
.msg-item-top {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: #888;
  margin-bottom: 0.5rem;
}
.msg-new {
  background: var(--mustard);
  color: var(--charcoal);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
}
.msg-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.75rem; }

/* News */
.portal-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.portal-types label { cursor: pointer; margin-top: 0; }
.portal-types input { display: none; }
.portal-types span {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 2px solid #ddd;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
}
.portal-types input:checked + span {
  background: var(--diner-red);
  color: #fff;
  border-color: var(--diner-red);
}

.portal-check {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0 !important;
  text-transform: none !important;
  font-size: 0.95rem !important;
}
.portal-check input { width: 18px; height: 18px; accent-color: var(--diner-red); }

.portal-list-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--charcoal);
}

.post-item {
  background: #fff;
  border: 1px solid #e8dcc8;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.post-item.dimmed { opacity: 0.5; }
.post-item img { width: 100%; max-height: 180px; object-fit: cover; }
.post-item-body { padding: 1.25rem; }
.post-item h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  color: var(--charcoal);
  margin-bottom: 0.35rem;
}
.post-tags { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.post-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  background: #eee;
}
.post-tag-live { background: var(--teal); color: #fff; }
.post-tag-pin { background: var(--mustard); }
.post-meta { font-size: 0.78rem; color: #aaa; margin-top: 0.5rem; }
.post-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.75rem; }

.empty-box {
  text-align: center;
  padding: 2rem;
  color: #999;
  background: #fff;
  border: 1px dashed #ddd;
  border-radius: var(--radius);
}

/* Alerts & toast */
.portal-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.portal-alert-error { background: #fde8e8; color: #8B0000; border: 1px solid #f0b8b8; }

.portal-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--charcoal);
  color: var(--cream);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--teal);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 300;
  width: min(420px, calc(100% - 2rem));
  animation: slideUp 0.3s ease;
}
.portal-toast.error { border-left-color: #f87171; }
.portal-toast #toastIcon {
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  background: var(--teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.portal-toast.error #toastIcon { background: var(--diner-red); }
.portal-toast strong { display: block; font-size: 0.95rem; }
.portal-toast p { font-size: 0.82rem; opacity: 0.85; margin: 0; }
.portal-toast button {
  background: none;
  border: none;
  color: var(--cream);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0.6;
  margin-left: auto;
}
.portal-toast button:hover { opacity: 1; }

@keyframes slideUp {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.portal-loading {
  position: fixed;
  inset: 0;
  background: rgba(255,248,231,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 250;
  gap: 1rem;
}
.portal-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e8dcc8;
  border-top-color: var(--diner-red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

@media (max-width: 600px) {
  .special-row .field-pair { grid-template-columns: 1fr; }
  .portal-nav-right .btn-mustard { display: none; }
  .preview-cards { grid-template-columns: 1fr 1fr; }
}