/*
 * BOHO.TEAM - Hyper Modern Design System
 * Inspiration: A16Z, Pentagram, Clean SaaS
 */

:root {
  /* Colors */
  --bg-body: #ffffff;
  --bg-surface: #f7f7f7;
  --bg-panel: #ffffff;
  --bg-hover: #f0f0f0;

  --text-primary: #111111;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  
  --accent: #000000; /* Stark black for impact */
  --accent-secondary: #333333;
  --accent-soft: #e5e5e5;
  
  --brand-color: #24b47e; /* Keeping the boho green but using it sparingly */
  
  --border-light: #eaeaea;
  --border-medium: #dddddd;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-3xl: 3rem;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-subtle: 0 1px 2px rgba(0,0,0,0.03);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.05);
}

/* Base */
* {
  box-sizing: border-box;
}

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

h1, h2, h3, h4 {
  margin: 0 0 var(--space-3) 0;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: var(--text-3xl); line-height: 1.1; }
h2 { font-size: var(--text-2xl); line-height: 1.2; }
h3 { font-size: var(--text-xl); line-height: 1.3; }

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--text-secondary);
}

/* Layout - Sidebar & Main */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 280px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

/* .main-content styles moved to base.html for Discord layout */

/* Sidebar Elements */
.logo {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-6);
  display: block;
  letter-spacing: -0.03em;
}

.nav-group {
  margin-bottom: var(--space-6);
}

.nav-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: var(--space-3);
  padding-left: var(--space-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: #fff;
  color: var(--text-primary);
  box-shadow: var(--shadow-subtle);
}

.nav-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2px;
}

/* Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-light);
}

.page-title {
  font-size: var(--text-2xl);
  font-weight: 600;
  margin: 0;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-5);
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.card-header {
  margin-bottom: var(--space-3);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0;
}

.card-meta {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-body {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  flex: 1;
}

.card-footer {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* Charts */
.chart-container {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  height: 400px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text-primary);
  color: #fff;
}

.btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
}

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

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

.btn-sm {
    padding: 4px 10px;
    font-size: var(--text-xs);
}

/* Todo / Task List */
.task-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.task-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  margin-bottom: var(--space-2);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.task-item:hover {
  border-color: var(--border-medium);
  background: var(--bg-hover);
}

.task-checkbox {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid var(--border-medium);
  cursor: pointer;
  appearance: none;
  position: relative;
  transition: all 0.2s;
}

.task-checkbox:checked {
  background: var(--text-primary);
  border-color: var(--text-primary);
}

.task-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 10px;
  height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
}

.task-content {
  flex: 1;
}

.task-title {
  font-weight: 500;
  color: var(--text-primary);
}

.task-meta {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  width: 100%;
  max-width: 500px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
}

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

/* Auth Pages */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-surface);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-hover);
}
.auth-header {
  text-align: center;
  margin-bottom: var(--space-6);
}
.auth-logo {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.auth-subtitle {
  color: var(--text-secondary);
}
.form-group {
  margin-bottom: var(--space-4);
}
.form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  color: var(--text-secondary);
}
.form-input {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
}
.form-input:focus {
  outline: none;
  border-color: var(--text-primary);
}
.auth-btn {
  width: 100%;
  justify-content: center;
  padding: 12px;
}
.auth-footer {
  text-align: center;
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Helpers */
.text-muted { color: var(--text-tertiary); }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.badge-success { background: #e6f7ef; color: #0d9963; border-color: #bbf0d8; }
.badge-warning { background: #fff8e6; color: #b8860b; border-color: #ffeeb0; }
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}
.flash {
    padding: 12px 24px;
    background: var(--text-primary);
    color: white;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    box-shadow: var(--shadow-hover);
}