/* Main CSS file for the frontend application */
:root {
  /* --- Refuge & Hope International brand palette --- */

  /* Primary: the dark teal from the logo background */
  --color-primary:       #2a5162;
  --color-primary-light: #3a7a96;
  --color-primary-dark:  #1c3a47;

  /* Accent 1: olive green from "Refuge" lettering */
  --color-green:         #6b9940;
  --color-green-light:   #89b85a;
  --color-green-dark:    #4e7230;

  /* Accent 2: sky blue from "Hope" lettering */
  --color-sky:           #5bb8d4;
  --color-sky-light:     #8bcce2;
  --color-sky-dark:      #3a94b0;

  /* Accent 3: sun yellow from the logo rays */
  --color-sun:           #c8d44a;

  /* Feedback colours */
  --color-success:       #4e7230;
  --color-error:         #c0392b;
  --color-warning:       #d68910;

  /* Neutral surfaces */
  --color-bg:            #f0f4f6;
  --color-surface:       #ffffff;
  --color-border:        #c8d4da;
  --color-text:          #1a2e38;
  --color-text-muted:    #607a86;

  /* Utilities */
  --radius:              8px;
  --shadow:              0 2px 8px rgba(42, 81, 98, 0.10);
  --transition:          0.2s ease;
}

/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}
/* Header styles */
.app-header {
  background-color: var(--color-primary);
  color: white;
  padding: 0 1.5rem;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.app-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background-color: rgba(255,255,255,0.15);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
}
a.app-logo {
  color: white;
  text-decoration: none;
}
.app-title {
  font-size: 1rem;
  font-weight: 500;
  flex: 1;
}
/* Sync status styles */
.sync-status {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background-color: rgba(255,255,255,0.1);
  white-space: nowrap;
}

.sync-status.online {
  background-color: rgba(75, 114, 48, 0.35);
  color: #b8d98a;
}

.sync-status.offline {
  background-color: rgba(192, 57, 43, 0.35);
  color: #f1948a;
}
/* Main content styles */
.page-main {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Utility classes */
.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-text);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 999;
  box-shadow: var(--shadow);
  transition: opacity var(--transition);
}

.toast.success {
  background-color: var(--color-success);
}

.toast.error {
  background-color: var(--color-error);
}

.sync-status.syncing {
  background-color: rgba(200, 212, 74, 0.3);
  color: #e8f08c;
}

.sync-status.pending {
  background-color: rgba(214, 137, 16, 0.3);
  color: #f5cba7;
}
/* ── Shared button + link-as-button styles ── */

a.btn-primary {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition);
  white-space: nowrap;
}

a.btn-primary:hover {
  background-color: var(--color-primary-light);
  color: white;
}

a.btn-primary:active {
  transform: scale(0.98);
}