﻿/* Waveriders Support Portal — Dark Theme */
/* Brand tokens from surfscan.net admin.css */

:root {
  /* Waveriders Brand Colors */
  --wv-primary: #00c853;
  --wv-primary-hover: #00a844;
  --wv-primary-subtle: rgba(0, 200, 83, 0.1);
  --wv-danger: #dc3545;

  /* Dark Theme Backgrounds */
  --wv-bg-darkest: #121212;
  --wv-bg-elevated: #1e1e1e;
  --wv-bg-card: #212121;
  --wv-bg-card-hover: #282828;

  /* Text Colors */
  --wv-text-primary: #ffffff;
  --wv-text-secondary: #b0b0b0;
  --wv-text-muted: #9e9e9e;

  /* Borders */
  --wv-border: #333333;
  --wv-border-light: #2a2a2a;

  /* Shadows */
  --shadow: 0 2px 4px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.5);
  --radius: 12px;
  --radius-sm: 8px;
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--wv-bg-darkest);
  color: var(--wv-text-primary);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--wv-border-light);
}

.wordmark {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--wv-text-primary);
}

/* Main */
.main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* Views — only .active is visible */
.view {
  display: none;
  width: 100%;
  max-width: 560px;
  animation: fadeIn 0.25s ease;
}

.view.active {
  display: block;
}

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

/* Card */
.card {
  background: var(--wv-bg-elevated);
  border: 1px solid var(--wv-border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.card-narrow {
  max-width: 440px;
  margin: 0 auto;
}

/* Typography */
.headline {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.subtext {
  color: var(--wv-text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.subtext.muted {
  color: var(--wv-text-muted);
  font-size: 0.875rem;
}

.error-text {
  color: var(--wv-danger);
  font-size: 0.875rem;
  margin-top: 0.75rem;
}

/* Forms */
.form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

input[type="email"],
input[type="text"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--wv-bg-card);
  border: 1px solid var(--wv-border);
  border-radius: var(--radius-sm);
  color: var(--wv-text-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.15s;
}

input:focus,
textarea:focus {
  border-color: var(--wv-primary);
  box-shadow: 0 0 0 2px var(--wv-primary-subtle);
}

input::placeholder,
textarea::placeholder {
  color: var(--wv-text-muted);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--wv-primary);
  color: #000;
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--wv-text-muted);
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.btn-ghost:hover {
  color: var(--wv-text-secondary);
}

/* Loading state */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.btn-primary.loading::after {
  border-top-color: #000;
}

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

/* Icon circle */
.icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--wv-primary-subtle);
  color: var(--wv-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.icon-success {
  background: var(--wv-primary-subtle);
  color: var(--wv-primary);
}

/* Fork cards */
.fork-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.fork-card {
  background: var(--wv-bg-card);
  border: 1px solid var(--wv-border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  text-align: left;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  font-size: inherit;
  display: block;
  width: 100%;
}

.fork-card:hover {
  background: var(--wv-bg-card-hover);
  border-color: var(--wv-primary);
}

.fork-icon {
  color: var(--wv-primary);
  margin-bottom: 0.75rem;
}

.fork-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.fork-card p {
  font-size: 0.8125rem;
  color: var(--wv-text-muted);
  line-height: 1.4;
}

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

.footer a {
  color: var(--wv-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

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

.dot {
  margin: 0 0.5rem;
}

/* Responsive */
@media (max-width: 600px) {
  .main {
    padding: 1.5rem 1rem;
    align-items: flex-start;
    padding-top: 3rem;
  }

  .card {
    padding: 1.5rem;
  }

  .fork-cards {
    grid-template-columns: 1fr;
  }

  .header {
    padding: 1rem;
  }
}

/* OTP code input */
input#otp-input {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.5em;
  padding: 0.875rem 1rem;
}

/* Dashboard layout */
.header-dash {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-email {
  font-size: 0.8125rem;
  color: var(--wv-text-muted);
}

.dash-main {
  max-width: 680px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.dash-greeting {
  margin-bottom: 2rem;
}

.dash-greeting h1 {
  font-size: 1.75rem;
  font-weight: 600;
}

.dash-section {
  margin-bottom: 2rem;
}

.dash-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--wv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

/* Ticket cards */
.tickets-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ticket-card {
  background: var(--wv-bg-elevated);
  border: 1px solid var(--wv-border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

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

.ticket-id {
  font-size: 0.75rem;
  color: var(--wv-text-muted);
  font-weight: 500;
}

.ticket-status {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-open { background: rgba(243, 156, 18, 0.15); color: #f39c12; }
.status-in-progress { background: var(--wv-primary-subtle); color: var(--wv-primary); }
.status-resolved { background: rgba(255,255,255,0.06); color: var(--wv-text-muted); }

.ticket-title {
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.ticket-type {
  font-size: 0.75rem;
  color: var(--wv-text-muted);
  background: rgba(255,255,255,0.06);
  padding: 0.0625rem 0.375rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.375rem;
}

.ticket-date {
  font-size: 0.75rem;
  color: var(--wv-text-muted);
}

/* Success box */
.success-box {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--wv-primary-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 200, 83, 0.2);
}

.success-title {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--wv-primary);
  margin-bottom: 0.375rem;
}

.success-ack {
  font-size: 0.875rem;
  color: var(--wv-text-secondary);
  line-height: 1.5;
}

/* Preference toggle row */
.pref-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.pref-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--wv-border);
  background: var(--wv-bg-card);
  color: var(--wv-text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
}

.pref-btn:hover {
  border-color: var(--wv-primary);
  color: var(--wv-text-primary);
}

.pref-btn.active {
  background: var(--wv-primary-subtle);
  border-color: var(--wv-primary);
  color: var(--wv-primary);
  font-weight: 500;
}

.link {
  color: var(--wv-primary);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}
