/* AquaHub — shared styles
   Phone-first, light theme, designed to feel native on mobile. */

:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --teal: #14b8a6;
  --bg: #f0f9ff;
  --surface: #ffffff;
  --surface-raised: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --success: #22c55e;
  --success-bg: #f0fdf4;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.07), 0 4px 16px rgba(0, 0, 0, 0.05);
}

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

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* Auth screen layout */
.auth-shell {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #0c4a6e 0%, #0e7490 50%, #0f766e 100%);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: 20px;
  padding: 32px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.brand {
  text-align: center;
  margin-bottom: 24px;
}

.brand-logo {
  font-size: 2rem;
  margin-bottom: 6px;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Tabs */
.auth-tabs {
  display: flex;
  background: var(--surface-raised);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
}

.auth-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.auth-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

/* Forms */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s;
}

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

.btn-primary {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: white;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
  margin-top: 8px;
}

.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

/* Messages */
.alert {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 14px;
  display: none;
}

.alert.show {
  display: block;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #fecaca;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid #bbf7d0;
}

/* App shell */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: linear-gradient(135deg, #0c4a6e, #0e7490, #0f766e);
  color: white;
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-header h1 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app-main {
  flex: 1;
  padding: 24px 20px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.card h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.btn-link {
  background: none;
  border: none;
  color: white;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
}
