@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #0A192F; /* Navy Blue */
  --primary-light: #1A365D;
  --primary-hover: #2B4C7E;
  --accent-color: #3182CE;
  --background: #F4F7F6;
  --card-bg: #FFFFFF;
  --text-main: #1A202C;
  --text-muted: #718096;
  --border: #E2E8F0;
  --success: #38A169;
  --danger: #E53E3E;
  --warning: #DD6B20;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 120px; /* Space for bottom nav and FAB */
}

/* Header */
.app-header {
  background-color: var(--primary-color);
  color: white;
  padding: 1.5rem 1rem 1rem 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: var(--shadow-md);
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

/* Main Container */
.main-content {
  padding: 1rem;
  animation: fadeIn 0.3s ease-in-out;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 0.75rem 0 calc(0.75rem + env(safe-area-inset-bottom));
  z-index: 20;
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

.nav-item:hover {
  background: var(--background);
  color: var(--primary-light);
}

.nav-item.active {
  color: var(--primary-color);
  transform: scale(1.05);
}

.nav-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  fill: currentColor;
}

/* Cards & Lists */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.card-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--primary-color);
}

.card-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Typography utilities */
.text-bold { font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary-color); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  outline: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-light);
  transform: translateY(-1px);
}

.btn-icon-only {
  padding: 0.35rem;
  background: transparent;
  color: var(--text-muted);
}

.btn-icon-only:hover {
  background: var(--background);
  color: var(--primary-color);
}

.btn-danger {
  background-color: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn-danger:hover {
  background-color: #FFF5F5;
}

.btn-floating {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 15;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

.btn-floating:hover {
  transform: scale(1.05);
  background-color: var(--primary-light);
}

.btn-floating svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* Progress Bars */
.progress-container {
  width: 100%;
  height: 8px;
  background-color: var(--border);
  border-radius: 4px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: var(--success);
  border-radius: 4px;
  transition: width 0.5s ease-out;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: flex-end; /* Bottom sheet style for mobile */
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: var(--card-bg);
  width: 100%;
  max-width: 600px;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
  box-shadow: var(--shadow-lg);
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
}

.modal-actions button {
  flex: 1;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}
