:root {
  --primary: #8C1D18;
  --primary-light: #FDF3F2;
  --text: #4A4A4A;
  --border: #E0E0E0;
  --sidebar-width: 260px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background: #F9F9F9;
  color: var(--text);
  height: 100vh;
  overflow: hidden; /* App-like feel */
}

/* LOGIN SCREEN */
.login-screen {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-screen.hidden { display: none; }
.login-box {
  text-align: center;
  max-width: 400px;
  padding: 40px;
}
.login-box h1 {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  margin-bottom: 10px;
}
.login-box p { margin-bottom: 30px; opacity: 0.7; }

/* BUTTONS */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 20px;
  border-radius: 99px;
  font-weight: 600;
  cursor: pointer;
}

.btn-cancel {
  background: transparent;
  border: none;
  color: #666;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 20px;
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  color: #666;
}
.btn-icon:hover { background: rgba(0,0,0,0.05); }

.btn-danger {
  background: #ffebee;
  color: #c62828;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
}

/* LAYOUT */
.admin-panel {
  display: flex;
  height: 100vh;
}
.admin-panel.hidden { display: none; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-width);
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.brand {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
}
.menu {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: #666;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.menu button:hover { background: #f5f5f5; color: var(--primary); }
.menu button.active { background: var(--primary-light); color: var(--primary); }
.menu button .material-icons { font-size: 20px; }

.separator {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #999;
  font-weight: 700;
  margin: 16px 0 8px 16px;
  letter-spacing: 0.5px;
}

.user-info {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fdfdfd;
}
.user-info .email {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.btn-logout {
  background: transparent;
  border: 1px solid #ddd;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #FAFAFA;
  overflow: hidden;
}
.top-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.top-header h2 { font-size: 1.25rem; margin: 0; font-family: 'Playfair Display', serif; }

.view-container {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}

/* DATA TABLE */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.data-table th, .data-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.data-table th {
  background: #f9f9f9;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #888;
}
.data-table tr:last-child td { border-bottom: none; }
.status-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}
.status-badge.published { background: #e8f5e9; color: #2e7d32; }
.status-badge.draft { background: #fff3e0; color: #ef6c00; }

.empty-state {
  text-align: center;
  padding: 60px;
  color: #999;
}

/* FORM STYLES */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; }
.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
}
.form-group textarea { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(2px);
}
.modal-overlay.hidden { display: none; }
.modal {
  background: #fff;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 { margin: 0; font-family: 'Playfair Display', serif; }
.modal-body {
  padding: 24px;
  overflow-y: auto;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #fbfbfb;
  border-radius: 0 0 12px 12px;
}

/* MAP SPECIFIC */
.map-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.photo-preview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.photo-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ddd;
}
