/* 
  Kodari Premium Design System 🐟
  Theme: Healing & Gentle (Healthcare Diary)
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
  --primary: #6366f1; /* Indigo */
  --primary-light: #e0e7ff;
  --secondary: #ec4899; /* Pink for accents */
  --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --card-bg: rgba(255, 255, 255, 0.85);
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 20px;
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', 'Noto Sans KR', sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
}

#app {
  width: 100%;
  max-width: 480px; /* Mobile-first width */
  min-height: 100vh;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Header Section */
header {
  padding: 24px 20px;
  background: white;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Navigation Bar */
nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: white;
  display: flex;
  justify-content: space-around;
  padding: 12px 0;
  border-top: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 -4px 10px rgba(0,0,0,0.05);
  z-index: 1000;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: 0.3s;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

/* Main Content Area */
main {
  flex: 1;
  padding: 20px;
  padding-bottom: 100px; /* Spacing for nav */
}

/* Card Components */
.card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
}

.card:active {
  transform: scale(0.98);
}

/* Input Fields */
input, select, textarea {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  font-size: 1rem;
  margin-bottom: 12px;
  outline: none;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* Buttons */
.btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

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

.btn-primary:hover {
  background: #4f46e5;
}

/* Calendar Section Mockup */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
}

.calendar-day:hover {
  background: var(--primary-light);
}

.calendar-day.has-record {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  position: relative;
}

.calendar-day.is-hospitalized {
  background: #d1fae5; /* Soft Green for Hospitalization Block */
  color: #065f46;
}

.calendar-day.is-hospitalized.has-record {
  background: #a7f3d0; /* Darker green if both hospitalized and has record */
  color: #047857;
}

.calendar-day.has-record::after {
  content: '';
  width: 4px;
  height: 4px;
  background: currentColor;
  border-radius: 50%;
  position: absolute;
  bottom: 4px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.view {
  animation: fadeIn 0.4s ease-out forwards;
}
