/* ─── Timequal App Theme ─── */
/* Matches landing page design language */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:wght@400;500&display=swap');

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

:root {
  --tq-dark: #f8f6f3;
  --tq-surface: #fef7f0;
  --tq-card: #fffcf7;
  --tq-border: #ede5dc;
  --tq-accent: #9575cd;
  --tq-accent-light: #a88fd6;
  --tq-accent-hover: #8b66c1;
  --tq-green: #7fb392;
  --tq-green-dim: rgba(127, 179, 146, 0.12);
  --tq-amber: #d9a574;
  --tq-amber-dim: rgba(217, 165, 116, 0.12);
  --tq-red: #c88b84;
  --tq-red-dim: rgba(200, 139, 132, 0.12);
  --tq-text: #3d3528;
  --tq-muted: #8b7d6e;
  --tq-radius: 12px;
  --tq-radius-lg: 16px;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--tq-dark);
  color: var(--tq-text);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
}

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

/* ─── NAVBAR ─── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--tq-border);
  background: var(--tq-surface);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--tq-text);
  text-decoration: none;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar-links a {
  color: var(--tq-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.navbar-links a:hover,
.navbar-links a.active {
  color: var(--tq-text);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-balance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--tq-green-dim);
  color: var(--tq-green);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
}

.navbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tq-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
}

/* ─── LAYOUT ─── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

.container-sm {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px;
}

.page-header {
  margin-bottom: 36px;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--tq-muted);
  font-size: 1.05rem;
}

.section-label {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--tq-accent-light);
  margin-bottom: 8px;
}

/* ─── CARDS ─── */
.card {
  background: var(--tq-surface);
  border: 1px solid var(--tq-border);
  border-radius: var(--tq-radius-lg);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.card-clickable {
  cursor: pointer;
}
.card-clickable:hover {
  transform: translateY(-2px);
  border-color: var(--tq-accent);
}

/* ─── EXPERT CARD ─── */
.expert-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.expert-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--tq-accent), var(--tq-green));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  font-family: 'Space Grotesk', sans-serif;
}

.expert-info {
  flex: 1;
  min-width: 0;
}

.expert-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.expert-title {
  color: var(--tq-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.expert-bio {
  color: var(--tq-muted);
  font-size: 0.88rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.expert-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.expert-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 500;
}

.badge-category {
  background: rgba(99, 102, 241, 0.12);
  color: var(--tq-accent-light);
}

.badge-rate {
  background: var(--tq-green-dim);
  color: var(--tq-green);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
}

.badge-rating {
  background: var(--tq-amber-dim);
  color: var(--tq-amber);
}

.badge-sessions {
  background: rgba(99, 102, 241, 0.08);
  color: var(--tq-muted);
}

.badge-available {
  background: var(--tq-green-dim);
  color: var(--tq-green);
}

.badge-unavailable {
  background: var(--tq-red-dim);
  color: var(--tq-red);
}

.expert-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.expert-rate-big {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--tq-green);
}

.expert-rate-label {
  font-size: 0.75rem;
  color: var(--tq-muted);
}

/* ─── EXPERT GRID ─── */
.expert-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── FILTERS ─── */
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-pill {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--tq-border);
  background: transparent;
  color: var(--tq-muted);
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--tq-accent);
  color: var(--tq-text);
}

.filter-pill.active {
  background: var(--tq-accent);
  border-color: var(--tq-accent);
  color: white;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 18px;
  border-radius: 100px;
  border: 1px solid var(--tq-border);
  background: var(--tq-surface);
  color: var(--tq-text);
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: var(--tq-accent);
}

.search-input::placeholder {
  color: var(--tq-muted);
}

.sort-select {
  padding: 10px 18px;
  border-radius: 100px;
  border: 1px solid var(--tq-border);
  background: var(--tq-surface);
  color: var(--tq-text);
  font-size: 0.85rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b8ba3'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* ─── FORMS ─── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--tq-muted);
  margin-bottom: 8px;
  font-family: 'Space Grotesk', sans-serif;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--tq-radius);
  border: 1px solid var(--tq-border);
  background: var(--tq-card);
  color: var(--tq-text);
  font-size: 0.95rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

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

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238b8ba3'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--tq-muted);
  margin-top: 6px;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--tq-radius);
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--tq-accent);
  color: white;
}
.btn-primary:hover {
  background: #8b66c1;
  transform: translateY(-1px);
}

.btn-green {
  background: var(--tq-green);
  color: var(--tq-dark);
}
.btn-green:hover {
  background: #6d9778;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--tq-text);
  border: 1px solid var(--tq-border);
}
.btn-outline:hover {
  border-color: var(--tq-accent);
  color: var(--tq-accent-light);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── GRID HELPERS ─── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

/* ─── WALLET ─── */
.wallet-balance-card {
  background: linear-gradient(135deg, var(--tq-surface), var(--tq-card));
  border: 1px solid var(--tq-border);
  border-radius: var(--tq-radius-lg);
  padding: 32px;
  text-align: center;
  margin-bottom: 32px;
}

.wallet-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--tq-green);
  margin: 12px 0;
}

.wallet-label {
  color: var(--tq-muted);
  font-size: 0.9rem;
}

/* ─── TRANSACTION LIST ─── */
.tx-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tx-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--tq-surface);
  border-radius: var(--tq-radius);
}

.tx-item:first-child { border-radius: var(--tq-radius) var(--tq-radius) 4px 4px; }
.tx-item:last-child { border-radius: 4px 4px var(--tq-radius) var(--tq-radius); }
.tx-item:only-child { border-radius: var(--tq-radius); }

.tx-desc {
  font-size: 0.9rem;
}

.tx-date {
  font-size: 0.8rem;
  color: var(--tq-muted);
  margin-top: 2px;
}

.tx-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
}

.tx-amount.positive { color: var(--tq-green); }
.tx-amount.negative { color: var(--tq-red); }

/* ─── SESSION PAGE ─── */
.session-hero {
  text-align: center;
  padding: 60px 0 40px;
}

.session-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.status-pending {
  background: var(--tq-amber-dim);
  color: var(--tq-amber);
}

.status-active {
  background: var(--tq-green-dim);
  color: var(--tq-green);
}

.status-completed {
  background: rgba(99, 102, 241, 0.12);
  color: var(--tq-accent-light);
}

.session-timer {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--tq-text);
  margin: 20px 0;
}

.session-cost {
  font-size: 1.2rem;
  color: var(--tq-muted);
}

.session-cost span {
  color: var(--tq-green);
  font-weight: 600;
}

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

.modal {
  background: var(--tq-card);
  border: 1px solid var(--tq-border);
  border-radius: var(--tq-radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 420px;
  position: relative;
}

.modal h2 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.modal p {
  color: var(--tq-muted);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--tq-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--tq-muted);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.2rem;
  color: var(--tq-text);
  margin-bottom: 8px;
}

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: var(--tq-radius);
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 2000;
  animation: slideIn 0.3s ease;
}

.toast-success {
  background: var(--tq-green);
  color: var(--tq-dark);
}

.toast-error {
  background: var(--tq-red);
  color: white;
}

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ─── LOADING ─── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--tq-border);
  border-top-color: var(--tq-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── DOT PULSE ─── */
.dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tq-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 16px;
  }
  .navbar-links {
    gap: 14px;
  }
  .container, .container-sm {
    padding: 24px 16px;
  }
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  .expert-card {
    flex-direction: column;
  }
  .expert-right {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
  }
  .filters {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-pill {
    text-align: center;
  }
  .session-timer {
    font-size: 2.5rem;
  }
  .wallet-amount {
    font-size: 2.2rem;
  }
}
