:root {
  /* Seed Palette */
  --primary: #0ea5e9;
  /* Sky 500 */
  --primary-dark: #0284c7;
  /* Sky 600 */
  --primary-light: #e0f2fe;
  /* Sky 100 */
  --primary-fade: rgba(14, 165, 233, 0.1);

  --secondary: #64748b;
  /* Slate 500 */

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  /* Neutrals */
  --bg-body: #f8fafc;
  /* Slate 50 */
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  /* Slate 100 */

  --text-primary: #0f172a;
  /* Slate 900 */
  --text-secondary: #475569;
  /* Slate 600 */
  --text-muted: #94a3b8;
  /* Slate 400 */

  --border-color: #e2e8f0;
  /* Slate 200 */

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;

  /* Border radius */
  --radius-md: 0.5rem;
  /* 8px */
  --radius-lg: 0.75rem;
  /* 12px */
  --radius-xl: 1rem;
  /* 16px */
  --radius-full: 9999px;
}

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

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

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--spacing-lg);
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md) var(--spacing-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.logo h1 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.logo-brand {
  font-weight: 800;
  color: #1e293b;
  margin-right: 4px;
}

/* User Info */
.user-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.status-pill {
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  text-transform: uppercase;
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-check {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.logout-btn {
  color: var(--text-muted);
  transition: color 0.2s;
  background: #e2e8f0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logout-btn:hover {
  color: var(--text-primary);
  background: #cbd5e1;
}


/* Cards */
.voice-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  margin-bottom: var(--spacing-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

/* Voice Button Area */
.voice-status span {
  color: var(--text-secondary);
  font-weight: 500;
}

.voice-btn {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  border: none;
  color: white;
  box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.4);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem auto;
}

.voice-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 30px -5px rgba(14, 165, 233, 0.5);
}

.voice-btn.listening {
  animation: pulse 2s infinite;
  background: #ef4444;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }

  70% {
    box-shadow: 0 0 0 20px rgba(239, 68, 68, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}

/* Transcription Box */
.transcription {
  background: var(--bg-input);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 2rem;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-style: italic;
}

/* Quick Actions */
.quick-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.quick-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.quick-btn:hover {
  background: white;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.quick-btn.primary {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: transparent;
}


/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: #60a5fa;
  /* Soft Blue */
  line-height: 1;
}

.stat-value small {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Recent Entries */
.recent-section {
  background: var(--bg-body);
  /* Should contrast slightly or match? Image shows clear section */
  /* Actually image shows it inside a big white card container or just listed? 
       It looks like a card wrapper around the list */
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--bg-input);
}

.section-header h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}

.entries-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.entry-item {
  background: var(--primary-light);
  /* Very light blue bg */
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.entry-item:hover {
  border-color: var(--primary);
}

.entry-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.entry-project {
  font-weight: 700;
  color: #60a5fa;
  /* Light Blue text */
  font-size: 1rem;
}

.entry-hours {
  font-weight: 700;
  color: #60a5fa;
  font-size: 1.1rem;
}

.entry-task {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.entry-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}


/* Login */
.login-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}

.login-card {
  background: white;
  padding: 3rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.google-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: white;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 4px;
  padding: 8px 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}

.google-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* Modal form adjustments */
.modal-content {
  background: white;
  color: var(--text-primary);
}

.modal-header {
  border-bottom-color: var(--border-color);
}

.modal-footer {
  border-top-color: var(--border-color);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-input);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.form-group label {
  color: var(--text-secondary);
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
  padding: 0.75rem;
}

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

.btn-secondary {
  background: white;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--bg-input);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-secondary-small {
  padding: 0.4rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-secondary-small:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.btn-danger-small {
  padding: 0.4rem 1rem;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  color: #dc2626;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger-small:hover {
  background: #fecaca;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.1);
}

.btn-stop-action {
  padding: 0.5rem 1rem;
  background: #ef4444;
  /* Red-500 */
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.2);
}

.btn-stop-action:hover {
  background: #dc2626;
  /* Red-600 */
  transform: translateY(-1px);
  box-shadow: 0 6px 8px -1px rgba(239, 68, 68, 0.3);
}

/* Browser Warning */
.browser-warning {
  background: #fef2f2 !important;
  border: 1px solid #fee2e2 !important;
  color: #991b1b !important;
}

/* Timer Active State */
.timer-card {
  background: white;
  border-top: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.timer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--primary-light);
  opacity: 0.3;
  z-index: 0;
}

.timer-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.timer-info {
  position: relative;
  z-index: 1;
}

.timer-duration {
  color: var(--primary-dark);
  font-size: 3rem;
  font-weight: 800;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  /* Darker overlay */
  backdrop-filter: blur(8px);
  /* Stronger blur */
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
}

.modal.active {
  display: flex !important;
}

.modal-content {
  background: #f8fafc;
  /* Very light slate background (not pure white) */
  border: none;
  border-radius: 20px;
  /* Rounder corners */
  max-width: 440px;
  /* Narrower width */
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.75rem 0.5rem 1.75rem;
  /* More spacing top */
  border-bottom: none;
  background: transparent;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: -0.02em;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 1rem 1.75rem;
}

.modal-footer {
  display: flex;
  gap: var(--spacing-md);
  padding: 0.5rem 1.75rem 1.75rem 1.75rem;
  border-top: none;
  background: transparent;
  justify-content: flex-end;
}

.modal-footer button {
  flex: 0 0 auto;
  min-width: 100px;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: flex;
  /* Align icons */
  align-items: center;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: #475569;
  font-size: 0.85rem;
}

.form-group label small {
  font-weight: 400;
  color: #94a3b8;
  margin-left: 4px;
  font-size: 0.8em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  /* Smoother radius */
  color: #1e293b;
  font-size: 0.95rem;
  transition: all 0.2s;
  background: #ffffff;
  /* White inputs */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

/* Custom Checkbox */
.custom-checkbox-wrapper {
  background: #f1f5f9;
  /* Light gray box for checkbox area */
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 1rem;
  display: flex !important;
  align-items: center;
}

.custom-checkbox-wrapper input[type="checkbox"] {
  display: none;
  /* Hide default */
}

/* Check circle container */
.custom-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e2e8f0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

/* Checked state */
.custom-checkbox-wrapper input[type="checkbox"]:checked+label .custom-check {
  background: #0ea5e9;
  /* Sky 500 */
}

.btn-primary {
  background: #87ceeb;
  /* Initial color from screenshot is lighter? No, use sky-400 equivalent */
  background: #7dd3fc;
  background: linear-gradient(to bottom, #7dd3fc, #38bdf8);
  /* Nice gradient */
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(to bottom, #38bdf8, #0ea5e9);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #64748b;
  font-weight: 600;
  border-radius: 10px;
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: #334155;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: var(--spacing-lg);
  right: var(--spacing-lg);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.toast {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  animation: slideInRight 0.3s ease-out;
  font-size: 0.9rem;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.warning {
  border-left: 4px solid var(--warning);
}

.toast.info {
  border-left: 4px solid var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: var(--spacing-md);
  }

  .header {
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}