/* ═══════════════════════════════════════════════════════════════════════════
   Kaizen AI – Shared Styles
   Minimalistic pixel-inspired theme with soft pink accents
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ───────────────────────────────────────────────────────── */
:root {
  --bg-primary: #faf6f8;
  --bg-secondary: #fff;
  --bg-card: #fff;
  --bg-hover: #fdf0f4;
  --border-color: #e8c8d4;
  --border-light: #f0dce4;
  --accent: #d4788c;
  --accent-light: #f5d0dc;
  --accent-dark: #b85a6e;
  --text-primary: #2c2433;
  --text-secondary: #6b5e72;
  --text-muted: #a8949e;
  --shadow-sm: 0 1px 3px rgba(180, 120, 140, 0.08);
  --shadow-md: 0 2px 8px rgba(180, 120, 140, 0.12);
  --shadow-lg: 0 4px 16px rgba(180, 120, 140, 0.16);
  --radius-sm: 3px;
  --radius-md: 4px;
  --font-base: 'Courier New', Courier, monospace;
  --font-heading: 'Courier New', Courier, monospace;
  --transition: 0.2s ease;
}

/* ── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-base);
  background: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { color: var(--accent); }

.hidden { display: none !important; }

/* ── Layout Container ────────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header / Navigation ─────────────────────────────────────────────────── */
.kaizen-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 2px solid var(--border-color);
  flex-wrap: wrap;
  gap: 8px;
}

.kaizen-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  font-size: 1.1em;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.kaizen-logo img {
  height: 50px;
width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.kaizen-logo img:hover {
  transform: scale(1.08);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.85em;
  transition: all var(--transition);
}

.nav-links a:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
  color: var(--accent-dark);
}

.nav-links a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-dark);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 8px 16px;
  cursor: pointer;
  font-family: var(--font-base);
  font-size: 0.9em;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all var(--transition);
  text-align: center;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-dark);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 0.8em;
}

.btn-signout {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-muted);
  font-size: 0.8em;
  padding: 4px 12px;
}

.btn-signout:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

/* ── Cards (Pixel Panel Style) ───────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  padding: 18px;
  box-shadow: 0 6px 16px rgba(44, 36, 51, 0.06);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card h3 {
  margin: 0 0 8px 0;
  font-size: 1em;
  color: var(--accent-dark);
  letter-spacing: 0.3px;
}

/* ── Section Spacing ─────────────────────────────────────────────────────── */
.section {
  margin: 24px 0;
}

.section-title {
  font-size: 1.15em;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

/* ── Grid Layouts ────────────────────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ── Form Inputs ─────────────────────────────────────────────────────────── */
input[type="text"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 8px 10px;
  font-family: var(--font-base);
  font-size: 0.9em;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: border-color var(--transition);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
}

label {
  display: block;
  font-size: 0.85em;
  color: var(--text-secondary);
  margin: 8px 0 4px;
  font-weight: bold;
}

/* ── Mascot Containers ───────────────────────────────────────────────────── */
.mascot-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mascot-container img {
  max-width: 100px;
  max-height: 100px;
  border-radius: var(--radius-md);
  image-rendering: auto;
  animation: none;
}

.mascot-container-sm img {
  max-width: 60px;
  max-height: 60px;
}

.mascot-container-lg img {
  max-width: 140px;
  max-height: 140px;
}

/* ── Mascot: top-left positioning helper ─────────────────────────────────── */
.mascot-topleft {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin: 14px 0 0;
}
.mascot-topleft .mascot-container {
  justify-content: flex-start;
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes mascot-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes mascot-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in-up 0.5s ease-out forwards;
  opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ── Progress Bars ───────────────────────────────────────────────────────── */
.progress-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.progress-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.dot-red    { background: #e57373; }
.dot-yellow { background: #ffb74d; }
.dot-green  { background: #81c784; }

.progress-bar-bg {
  flex: 1;
  height: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  transition: width 0.5s ease;
}

.fill-red    { background: #e57373; }
.fill-yellow { background: #ffb74d; }
.fill-green  { background: #81c784; }

/* ── Score Colors ────────────────────────────────────────────────────────── */
.score-green  { color: #4caf50; }
.score-yellow { color: #ff9800; }
.score-red    { color: #e57373; }

/* ── Quick Access Buttons ────────────────────────────────────────────────── */
.quick-btn {
  display: inline-block;
  padding: 10px 16px;
  margin: 4px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font-base);
  font-size: 0.85em;
  cursor: pointer;
  transition: all var(--transition);
}

.quick-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ── Streak Info ─────────────────────────────────────────────────────────── */
.streak-info {
  font-size: 0.85em;
  color: var(--text-muted);
}

/* ── Pixel Divider ───────────────────────────────────────────────────────── */
.pixel-divider {
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    var(--border-color) 0px,
    var(--border-color) 4px,
    transparent 4px,
    transparent 8px
  );
  margin: 16px 0;
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85em; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
