/* ════════════════════════════════════════════════════════════════
   J. O'Brien Coaching — V2 Platform Styles
   ════════════════════════════════════════════════════════════════ */

/* ── Base ───────────────────────────────────────────────────── */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Avenir Next', 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-spin { animation: spin 1s linear infinite; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.2s ease-out; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-slide-up { animation: slideUp 0.3s ease-out; }

/* ── Toast notifications ────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: slideUp 0.3s ease-out;
}
.toast-success { background: #065f46; color: #fff; }
.toast-error { background: #991b1b; color: #fff; }
.toast-info { background: #1e3a5f; color: #fff; }

/* ── Card hover states ──────────────────────────────────────── */
.card-interactive {
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card-interactive:hover {
  border-color: rgba(201, 169, 110, 0.4);
  box-shadow: 0 1px 4px rgba(201, 169, 110, 0.1);
}

/* ── Form inputs ────────────────────────────────────────────── */
input:focus, textarea:focus, select:focus {
  outline: none;
  ring: 2px;
  ring-color: rgba(201, 169, 110, 0.4);
  border-color: #c9a96e;
}

/* ── Print styles ───────────────────────────────────────────── */
@media print {
  nav, aside, header, footer, .no-print { display: none !important; }
  body { background: #fff; }
  main { padding: 0; }
}

/* ── Tool shell sections ────────────────────────────────────── */
.tool-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
}
.tool-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #c9a96e;
  margin-bottom: 12px;
}

/* ── Tab bar (consistent across tools) ──────────────────────── */
.tab-bar {
  display: flex;
  gap: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid #c9a96e;
}
.tab-btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.tab-btn:hover { color: #0f1628; background: #faf6ee; }
.tab-btn.active {
  color: #0f1628;
  border-bottom-color: #c9a96e;
  background: #fff;
}

/* ── Responsive tab bar ─────────────────────────────────────── */
@media (max-width: 768px) {
  .tab-bar {
    flex-direction: column;
  }
  .tab-btn.active {
    border-bottom-color: transparent;
    border-left: 3px solid #c9a96e;
  }
}

/* ── Badge ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 100px;
}
.badge-green { background: #dcfce7; color: #166534; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f3f4f6; color: #4b5563; }

/* ── Gold button ────────────────────────────────────────────── */
.btn-gold {
  background: #c9a96e;
  color: #fff;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-gold:hover { background: #b8944f; }
.btn-gold:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Navy button ────────────────────────────────────────────── */
.btn-navy {
  background: #0f1628;
  color: #fff;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-navy:hover { background: #1a2540; }

/* ── Login page ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: #0f1628;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.login-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 40% 40%, rgba(201,169,110,0.07) 0%, transparent 55%);
  pointer-events: none;
}
.login-card {
  background: #fff;
  border-radius: 20px;
  width: 440px;
  max-width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.login-header {
  background: #0f1628;
  padding: 32px 40px;
  text-align: center;
  border-bottom: 3px solid #c9a96e;
}
.login-header img {
  height: 64px;
  width: auto;
  max-width: 80%;
}
.login-body {
  padding: 36px 40px 32px;
}
.login-title {
  font-size: 22px;
  font-weight: 600;
  color: #0f1628;
  margin-bottom: 4px;
}
.login-subtitle {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 24px;
  line-height: 1.5;
}
.login-error {
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 9px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid #fecaca;
}
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: #f9fafb;
  color: #6b7280;
  font-family: inherit;
  transition: all 0.2s;
}
.auth-tab.active {
  background: #0f1628;
  color: #fff;
}
.auth-tab:hover:not(.active) {
  background: #f3f4f6;
}
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #0f1628;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 9px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}
.form-input:focus {
  border-color: #c9a96e;
  box-shadow: 0 0 0 3px rgba(201,169,110,0.12);
}
.input-wrap { position: relative; }
.pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 2px;
  display: flex;
}
.pw-toggle:hover { color: #0f1628; }

.login-btn-primary {
  width: 100%;
  padding: 13px;
  background: #c9a96e;
  color: #0f1628;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.3px;
  font-family: inherit;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.login-btn-primary:hover:not(:disabled) {
  background: #d4b97e;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201,169,110,0.3);
}
.login-btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.login-btn-secondary {
  width: 100%;
  padding: 13px;
  background: transparent;
  color: #0f1628;
  border: 1.5px solid #e5e7eb;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.login-btn-secondary:hover:not(:disabled) {
  border-color: #c9a96e;
  background: rgba(201,169,110,0.05);
}
.login-btn-secondary:disabled { opacity: 0.55; cursor: not-allowed; }
.login-footer {
  text-align: center;
  padding: 0 40px 28px;
  font-size: 11px;
  color: #6b7280;
  line-height: 1.6;
}
.login-footer a {
  color: #b8944f;
  text-decoration: none;
}
.login-footer a:hover { text-decoration: underline; }
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(15,22,40,0.2);
  border-top-color: #0f1628;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@media (max-width: 480px) {
  .login-body { padding: 28px 24px 24px; }
  .login-header { padding: 24px; }
  .login-footer { padding: 0 24px 24px; }
}

/* ── App layout — full-bleed responsive shell ───────────────── */
.app-shell {
  min-height: 100vh;
  display: flex;
  background: #f9fafb;
}
.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.app-content {
  flex: 1;
  width: 100%;
  padding: 24px 28px;
}
@media (min-width: 1280px) {
  .app-content { padding: 28px 36px; }
}
@media (min-width: 1600px) {
  .app-content { padding: 32px 48px; }
}
