/* ============================================
   Sleep Dashboard Page Styles
   ============================================ */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #000;
  color: #fff;
  min-height: 100vh;
  padding: 40px 30px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* Back Button */
.back-button {
  display: inline-block;
  margin-bottom: 24px;
  padding: 8px;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
  cursor: pointer;
}

.back-button:hover {
  opacity: 0.7;
}

.back-arrow {
  display: inline-block;
  width: 32px;
  height: 16px;
  position: relative;
}

.back-arrow::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 24px;
  height: 1px;
  background: #fff;
  transform: translateY(-50%);
}

.back-arrow::after {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  border-left: 1px solid #fff;
  border-bottom: 1px solid #fff;
  transform: translateY(-50%) rotate(45deg);
}

/* Page Title */
.page-title {
  font-size: 32px;
  font-weight: 300;
  margin-bottom: 32px;
  letter-spacing: -1px;
}

/* Loading */
.loading {
  color: #888;
  font-size: 14px;
}

/* Card Sections */
.card {
  border: 1px solid #333;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #888;
  font-weight: 400;
}

.card-period {
  font-size: 12px;
  color: #666;
}

/* Stats Card */
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.stat-label {
  font-size: 14px;
  color: #888;
}

.stat-value {
  font-size: 28px;
  font-weight: 300;
  color: #fff;
}

/* Recovery Card */
.recovery-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #222;
}

.recovery-row:last-child {
  border-bottom: none;
}

.recovery-label {
  font-size: 14px;
  color: #888;
}

.recovery-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #fff;
}

.trend-indicator {
  font-size: 14px;
}

.trend-up {
  color: #4ade80;
}

.trend-down {
  color: #f87171;
}

.trend-stable {
  color: #888;
}

/* Volume Section */
.volume-section {
  margin-top: 8px;
}

.volume-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.volume-label {
  width: 60px;
  font-size: 14px;
  color: #888;
}

.volume-bar-container {
  flex: 1;
  height: 24px;
  background: #111;
  border-radius: 4px;
  overflow: hidden;
  margin-right: 12px;
}

.volume-bar {
  height: 100%;
  background: linear-gradient(90deg, #333, #555);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.volume-value {
  width: 80px;
  font-size: 14px;
  color: #fff;
  text-align: right;
}

/* Period Selector */
.period-selector {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.period-btn {
  background: transparent;
  border: 1px solid #333;
  color: #888;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
  margin-left: 8px;
  transition: all 0.2s;
}

.period-btn:hover {
  border-color: #555;
  color: #fff;
}

.period-btn.active {
  background: #fff;
  color: #000;
  border-color: #fff;
}
