/* ===== Treepy Agency - Minimal Design System ===== */
/* Inspired by giampa.site - Dark-first, Monospace */

:root {
  --bg: #000000;
  --fg: #ffffff;
  --border: #161616;
  --accent: #ffffff;
  --muted: #bdbdbd;
  --hover: #111111;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --maxw: 920px;
}

[data-theme="light"] {
  --bg: #ffffff;
  --fg: #000000;
  --border: #e5e5e5;
  --accent: #000000;
  --muted: #555555;
  --hover: #f5f5f5;
}

/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: clamp(14px, 1vw, 16px);
}

body {
  font-family: 'JetBrains Mono', monospace;
  background-color: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===== Topbar ===== */
.topbar {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background-color: var(--bg);
  z-index: 100;
}

.topbar h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.topbar h1 .badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  background-color: var(--accent);
  color: white;
  border-radius: 4px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.header-actions {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.back-link {
  font-size: 0.875rem;
  color: var(--muted);
}

.back-link:hover {
  color: var(--fg);
}

/* ===== Container ===== */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem;
  flex: 1;
}

.section {
  margin-bottom: 2rem;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 3rem 0;
}

.hero h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-subtitle {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.benefit-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: left;
}

.benefit-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.benefit-card p {
  color: var(--muted);
  font-size: 0.875rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.trial-note {
  color: var(--muted);
  font-size: 0.875rem;
}

/* ===== Buttons ===== */
.btn-primary {
  background-color: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  padding: 0.75rem 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 8px;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.8;
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background-color: transparent;
  color: var(--fg);
  border: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: var(--accent);
  background-color: var(--hover);
}

.btn-success {
  background-color: var(--success);
  color: white;
  border: 1px solid var(--success);
  padding: 0.75rem 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
}

.btn-danger {
  background-color: var(--error);
  color: white;
  border: 1px solid var(--error);
  padding: 0.75rem 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
}

.btn-full { width: 100%; }
.btn-small { padding: 0.5rem 1rem; font-size: 0.875rem; }

/* ===== Auth Card ===== */
.auth-card {
  max-width: 450px;
  margin: 2rem auto;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.auth-card-wide {
  max-width: 600px;
}

.auth-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

.auth-switch, .auth-back {
  text-align: center;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  background-color: var(--bg);
  color: var(--fg);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  border-radius: 8px;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-top: 0.25rem;
}

/* ===== Dashboard ===== */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.dashboard-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.subscription-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.5rem;
}

.subscription-badge.trial {
  background-color: var(--warning);
  color: #000;
}

.subscription-badge.active {
  background-color: var(--success);
  color: white;
}

.subscription-badge.expired {
  background-color: var(--error);
  color: white;
}

.dashboard-actions-header {
  display: flex;
  gap: 0.5rem;
}

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--fg);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content {
  min-height: 300px;
}

/* ===== Requests List ===== */
.requests-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.request-card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  transition: border-color 0.2s;
}

.request-card:hover {
  border-color: var(--accent);
}

.request-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.request-meta {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.request-trip {
  font-size: 0.875rem;
  padding: 0.5rem;
  background-color: var(--hover);
  border-radius: 4px;
}

.request-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.request-status {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}

.request-status.pending { background-color: var(--warning); color: #000; }
.request-status.assigned { background-color: var(--accent); color: white; }
.request-status.completed { background-color: var(--success); color: white; }

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 3rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
}

/* ===== Profile Card ===== */
.profile-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.profile-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.profile-card h3:not(:first-child) {
  margin-top: 2rem;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--hover);
}

.profile-label {
  color: var(--muted);
  font-size: 0.875rem;
}

.profile-value {
  font-weight: 500;
}

/* ===== Modal ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  position: relative;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  max-width: 550px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
}

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

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ===== Footer ===== */
.footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .topbar { padding: 1rem; }
  .container { padding: 1rem; }
  .benefits-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
  .hero-actions button { width: 100%; }
  .dashboard-header { flex-direction: column; gap: 1rem; }
  .request-card { flex-direction: column; }
  .tabs { overflow-x: auto; }
}
