/* ── RogueHealth Shared Styles ─────────────────────────── */

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

:root {
  --forest: #1a3a2a;
  --sage: #4a7c5c;
  --mist: #e8f0eb;
  --cream: #faf8f5;
  --rust: #c85a3a;
  --slate: #3d4f5f;
  --white: #ffffff;
  --danger: #dc3545;
  --success: #28a745;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--cream);
  color: var(--forest);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Navigation ────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--forest);
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-logo span {
  color: var(--rust);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.nav-link.active {
  color: var(--white);
  background: rgba(255,255,255,0.12);
}

.nav-link.cta {
  background: var(--rust);
  color: var(--white);
  font-weight: 600;
}

.nav-link.cta:hover {
  background: #b8502f;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--forest);
    flex-direction: column;
    padding: 16px 20px;
    gap: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-link { width: 100%; padding: 12px 16px; }
}

/* ── Page Container ────────────────────────────────────── */

.page {
  padding-top: 64px;
  min-height: 100vh;
}

.page-header {
  background: linear-gradient(165deg, var(--forest) 0%, #2a5a3a 55%, var(--sage) 100%);
  color: var(--white);
  padding: 60px 40px 80px;
  position: relative;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--cream);
  clip-path: ellipse(60% 100% at 50% 100%);
}

.page-header-inner {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.page-header p {
  font-size: 1.1rem;
  opacity: 0.8;
  max-width: 600px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px;
}

@media (max-width: 640px) {
  .page-header { padding: 40px 24px 60px; }
  .container { padding: 24px; }
}

/* ── Cards ─────────────────────────────────────────────── */

.card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(74,124,92,0.1);
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,58,42,0.08);
}

/* ── Forms ─────────────────────────────────────────────── */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--rust);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  color: var(--forest);
  background: var(--white);
  border: 1.5px solid rgba(74,124,92,0.2);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(74,124,92,0.12);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(61,79,95,0.4);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-hint {
  font-size: 0.8rem;
  color: var(--slate);
  margin-top: 4px;
  opacity: 0.7;
}

/* ── Buttons ───────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: #b8502f;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--mist);
  color: var(--forest);
}

.btn-secondary:hover {
  background: #d4e5da;
}

.btn-outline {
  background: transparent;
  color: var(--sage);
  border: 1.5px solid var(--sage);
}

.btn-outline:hover {
  background: var(--mist);
}

.btn-sm {
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 8px;
}

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

/* ── Shift Cards ───────────────────────────────────────── */

.shifts-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shift-card {
  background: var(--white);
  border-radius: 16px;
  border: 1px solid rgba(74,124,92,0.1);
  padding: 24px 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shift-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,58,42,0.08);
}

.shift-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 16px;
}

.shift-role {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--forest);
}

.shift-pay {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--rust);
  white-space: nowrap;
}

.shift-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.shift-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--slate);
}

.shift-meta-icon {
  font-size: 1rem;
  opacity: 0.7;
}

.shift-facility {
  font-size: 0.88rem;
  color: var(--slate);
  opacity: 0.8;
  margin-bottom: 12px;
}

.shift-desc {
  font-size: 0.92rem;
  color: var(--slate);
  line-height: 1.6;
  margin-bottom: 16px;
}

.shift-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Tags / Badges ─────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
}

.badge-open {
  background: rgba(40,167,69,0.1);
  color: var(--success);
}

.badge-claimed {
  background: rgba(200,90,58,0.1);
  color: var(--rust);
}

.badge-location {
  background: var(--mist);
  color: var(--sage);
}

/* ── Filters ───────────────────────────────────────────── */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
}

.filter-select {
  padding: 10px 14px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.88rem;
  color: var(--forest);
  background: var(--white);
  border: 1.5px solid rgba(74,124,92,0.2);
  border-radius: 10px;
  outline: none;
  min-width: 160px;
  cursor: pointer;
}

.filter-select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(74,124,92,0.12);
}

/* ── Empty State ───────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 60px 24px;
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--forest);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.95rem;
  color: var(--slate);
  max-width: 400px;
  margin: 0 auto 24px;
}

/* ── Modal ─────────────────────────────────────────────── */

.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(26,58,42,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mist);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--slate);
  transition: background 0.2s ease;
}

.modal-close:hover {
  background: #d4e5da;
}

.modal h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  padding-right: 40px;
}

.modal p {
  font-size: 0.92rem;
  color: var(--slate);
  margin-bottom: 24px;
}

/* ── Alerts ────────────────────────────────────────────── */

.alert {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 20px;
  display: none;
}

.alert.show { display: block; }

.alert-success {
  background: rgba(40,167,69,0.08);
  color: #1b7a34;
  border: 1px solid rgba(40,167,69,0.2);
}

.alert-error {
  background: rgba(220,53,69,0.08);
  color: #a71d2a;
  border: 1px solid rgba(220,53,69,0.2);
}

/* ── Loading ───────────────────────────────────────────── */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  gap: 12px;
  color: var(--slate);
  font-size: 0.95rem;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--mist);
  border-top-color: var(--sage);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Footer ────────────────────────────────────────────── */

.app-footer {
  padding: 32px 40px;
  background: var(--forest);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

.app-footer a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
}

.app-footer a:hover {
  color: rgba(255,255,255,0.7);
}

/* ── Claim count badge ─────────────────────────────────── */

.claim-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--sage);
  font-weight: 600;
}
