* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #1e293b;
  --navy-light: #334155;
  --navy-dark: #0f172a;
  --orange: #f97316;
  --orange-hover: #ea580c;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
  --white: #ffffff;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--navy);
  min-height: 100vh;
}

/* Login */
.login-container {
  max-width: 400px;
  margin: 15vh auto;
  padding: 40px;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  text-align: center;
}

.login-logo h1 {
  font-size: 28px;
  color: var(--navy);
  margin-bottom: 4px;
}

.login-logo p {
  color: var(--gray-400);
  font-size: 14px;
  margin-bottom: 32px;
}

.login-form label {
  display: block;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.login-form input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 16px;
  outline: none;
  transition: border 0.2s;
}

.login-form input:focus { border-color: var(--orange); }

.login-message {
  margin-top: 16px;
  color: var(--green);
  font-size: 14px;
}

.login-error {
  margin-top: 12px;
  color: var(--red);
  font-size: 14px;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
}

.btn-primary:hover { background: var(--orange-hover); }

.btn-secondary {
  background: var(--gray-100);
  color: var(--navy);
}

.btn-secondary:hover { background: var(--gray-200); }

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-danger {
  background: var(--red);
  color: var(--white);
}

/* Layout */
#mainApp {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--navy);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 10;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--navy-light);
}

.sidebar-header h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

.client-label {
  font-size: 13px;
  color: var(--orange);
}

.nav-links {
  list-style: none;
  padding: 12px 0;
  flex: 1;
}

.nav-link {
  display: block;
  padding: 10px 20px;
  color: var(--gray-300);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s;
}

.nav-link:hover { color: var(--white); background: var(--navy-light); }
.nav-link.active { color: var(--orange); background: var(--navy-dark); border-left: 3px solid var(--orange); }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--navy-light);
  font-size: 13px;
}

.sidebar-footer p { margin-bottom: 8px; color: var(--gray-400); }

.content {
  flex: 1;
  margin-left: 240px;
  padding: 32px;
  max-width: 1100px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.stat-card {
  background: var(--white);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  margin: 8px 0 4px;
}

.stat-sub {
  font-size: 13px;
  color: var(--gray-400);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.card h3 {
  margin-bottom: 16px;
  font-size: 16px;
}

/* Quick Actions */
.quick-actions { margin-top: 32px; }
.quick-actions h2 { font-size: 18px; margin-bottom: 12px; }
.actions-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  border-bottom: 2px solid var(--gray-200);
}

.data-table td {
  padding: 10px 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-100);
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-sent { background: #dbeafe; color: #1e40af; }
.badge-completed { background: #dcfce7; color: #166534; }

/* Review Form */
.contact-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}

.contact-row input {
  padding: 10px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}

.contact-row input:focus { border-color: var(--orange); }
.contact-name { flex: 2; }
.contact-phone { flex: 2; }
.contact-email { flex: 2; }
.contact-date { flex: 1.5; }

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.form-message {
  margin-top: 12px;
  font-size: 14px;
  color: var(--green);
}

/* Photos */
.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.upload-zone:hover { border-color: var(--orange); background: #fff7ed; }

.upload-zone p { color: var(--gray-500); margin-bottom: 12px; }

.upload-zone select {
  padding: 8px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 6px;
  font-size: 14px;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.photo-card {
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.photo-card img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.photo-card .photo-info {
  padding: 8px 12px;
  font-size: 12px;
}

.photo-card .photo-info .photo-category {
  color: var(--gray-500);
  text-transform: capitalize;
}

.photo-card .photo-info .photo-gbp {
  color: var(--green);
  font-weight: 600;
}

/* Reports List */
.reports-list { display: flex; flex-direction: column; gap: 12px; }

.report-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  padding: 16px 20px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.report-item .report-info { display: flex; flex-direction: column; }
.report-item .report-title { font-weight: 600; font-size: 15px; }
.report-item .report-date { font-size: 13px; color: var(--gray-400); margin-top: 2px; }

.empty-state {
  color: var(--gray-400);
  text-align: center;
  padding: 24px;
  font-size: 14px;
}

/* View titles */
.view h1 { font-size: 24px; margin-bottom: 4px; }
.view-subtitle { color: var(--gray-500); font-size: 14px; margin-bottom: 24px; }

/* Mobile */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .content { margin-left: 0; padding: 16px; }
  .contact-row { flex-wrap: wrap; }
  .contact-row input { flex: 1 1 45%; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
