/* Geeks Room CRM — branded styles
   Palette derived from Geeks Room Maintenance Options PDF:
   - Primary green: #1F7A1F (deep forest green, used in headers/banners)
   - Dark green:    #0F5A0F (hover / accents)
   - Accent green:  #E8F5DD (pale background blocks)
   - Charcoal:      #1A1A1A (dark header banner like "Basic" / "Essential")
   - Off-white:     #FAFBF7
*/

* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", sans-serif;
  margin: 0;
  background: #FAFBF7;
  color: #1A1A1A;
  border-top: 8px solid #1F7A1F;
}

/* Header */
header.gr-header {
  background: #ffffff;
  border-bottom: 1px solid #e3e8df;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.gr-logo-link { display: inline-block; line-height: 0; }
.gr-logo-img { height: 44px; width: auto; display: block; }
.gr-logo {
  border: 2px solid #1F7A1F;
  padding: 6px 14px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #1F7A1F;
  font-size: 14px;
  line-height: 1.1;
  text-align: center;
  background: #E8F5DD;
}
.gr-logo small { display: block; font-size: 9px; font-weight: 500; color: #1F7A1F; letter-spacing: 0; }
.gr-title { font-size: 15px; color: #1A1A1A; font-weight: 600; margin: 0; }

/* Global search dropdown */
.gr-search-results {
  display: none;
  position: absolute;
  right: 28px;
  top: 64px;
  background: #fff;
  border: 1px solid #cdd5c4;
  border-radius: 6px;
  width: 380px;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(31,122,31,0.15);
  z-index: 100;
}
.gr-search-item {
  display: block;
  padding: 10px 14px;
  text-decoration: none;
  color: #1A1A1A;
  border-bottom: 1px solid #eef2eb;
  font-size: 13px;
}
.gr-search-item:hover { background: #F3F9EC; }
.gr-search-empty { padding: 12px 14px; color: #6b7280; font-size: 13px; }
header nav a {
  color: #4b5563;
  text-decoration: none;
  margin-right: 20px;
  font-size: 14px;
  font-weight: 500;
}
header nav a:hover, header nav a.active { color: #1F7A1F; }
.gr-signout { color: #6b7280; font-size: 13px; text-decoration: none; }
.gr-signout:hover { color: #1F7A1F; }

/* KPI bar (always visible at top) */
.gr-kpi-bar {
  background: linear-gradient(90deg, #1F7A1F 0%, #2C8B2C 100%);
  color: #fff;
  padding: 14px 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 4px 24px;
  border-bottom: 4px solid #0F5A0F;
}
.gr-kpi {
  padding: 4px 8px;
  border-left: 2px solid rgba(255,255,255,0.25);
  padding-left: 14px;
}
.gr-kpi:first-child { border-left: none; padding-left: 0; }
.gr-kpi-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #DDEFD0;
  margin-bottom: 4px;
}
.gr-kpi-value { font-size: 20px; font-weight: 700; color: #fff; }
.gr-kpi-sub { font-size: 11px; color: #DDEFD0; margin-top: 2px; }

main { padding: 24px 28px; max-width: 1400px; margin: 0 auto; }

/* Cards */
.card {
  background: #fff;
  border-radius: 6px;
  padding: 20px 22px;
  box-shadow: 0 1px 2px rgba(31,122,31,.06);
  border: 1px solid #e3e8df;
  margin-bottom: 18px;
}
.card h2 {
  margin: 0 0 14px 0;
  font-size: 14px;
  font-weight: 700;
  color: #1F7A1F;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  border-bottom: 2px solid #1F7A1F;
  padding-bottom: 8px;
  display: inline-block;
}
.card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: #1F7A1F; margin: 18px 0 8px; }

/* Section banner — matches "BASIC MAINTENANCE" green ribbon from PDF */
.gr-banner {
  background: #1F7A1F;
  color: #fff;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 12px;
}
.gr-banner-warn { background: #B58B00 !important; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eef2eb; }
th {
  background: #E8F5DD;
  font-weight: 700;
  color: #1F7A1F;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
tbody tr:hover { background: #F3F9EC; cursor: pointer; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 11px; font-weight: 600; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-green { background: #E8F5DD; color: #1F7A1F; }
.badge-gray { background: #e5e7eb; color: #374151; }

/* Form controls */
input[type=text], input[type=password], input[type=date], input[type=number], input[type=month], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #cdd5c4; border-radius: 4px;
  font-size: 14px; font-family: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #1F7A1F; box-shadow: 0 0 0 3px rgba(31,122,31,0.15); }
textarea { min-height: 80px; resize: vertical; }

/* Buttons */
button, .btn {
  background: #1F7A1F; color: #fff; border: none; padding: 8px 16px; border-radius: 4px;
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
  letter-spacing: 0.3px;
}
button:hover, .btn:hover { background: #0F5A0F; }
.btn-secondary { background: #4b5563; }
.btn-secondary:hover { background: #1f2937; }
.btn-outline { background: transparent; color: #1F7A1F; border: 1.5px solid #1F7A1F; }
.btn-outline:hover { background: #E8F5DD; color: #0F5A0F; }
.btn-danger { background: #b91c1c; }
.btn-danger:hover { background: #7f1d1d; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.filters > * { flex: 1 1 150px; max-width: 220px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 11px; color: #4b5563; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #FAFBF7; }
.login-box {
  max-width: 380px; width: 100%; padding: 36px;
  background: #fff; border-radius: 6px; box-shadow: 0 4px 20px rgba(31,122,31,0.12);
  border-top: 6px solid #1F7A1F;
}
.login-box h1 { margin: 0 0 4px 0; color: #1F7A1F; font-size: 22px; }
.login-box .muted { margin-top: 0; margin-bottom: 20px; }

.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.muted { color: #6b7280; font-size: 13px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: #6b7280; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.kv dd { margin: 0; color: #1A1A1A; font-weight: 500; }

/* Footer accent bar */
.gr-footer { height: 8px; background: #1F7A1F; margin-top: 40px; }
