/* ========================================
   GOTM Labz Dashboard - Shared Layout Styles
   ======================================== */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0A0A0A;
  color: #ECEDEE;
  min-height: 100vh;
  margin: 0;
  padding-top: 64px; /* Offset for fixed site header */
}

/* ========== Dashboard Header ========== */
.dashboard-header {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #222;
  padding: 12px 0;
}

.dashboard-header__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.dashboard-header__brand img {
  border-radius: 8px;
}

.dashboard-header__name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.dashboard-header__wallet {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-header__wallet-btn {
  background: linear-gradient(90deg, #6cff8f 0%, #00d4ff 100%);
  color: #0A0A0A;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-header__wallet-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(108, 255, 143, 0.3);
}

.dashboard-header__wallet-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.dashboard-header__wallet-btn svg {
  stroke: #0A0A0A;
}

.dashboard-header__wallet-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(108, 255, 143, 0.1);
  border: 1px solid rgba(108, 255, 143, 0.3);
  padding: 8px 12px;
  border-radius: 8px;
}

.dashboard-header__wallet-info .wallet-address {
  color: #6cff8f;
  font-size: 14px;
  font-weight: 500;
  font-family: monospace;
}

.dashboard-header__wallet-info .wallet-disconnect {
  background: transparent;
  border: none;
  color: #9CA3AF;
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.dashboard-header__wallet-info .wallet-disconnect:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #EF4444;
}

@media (max-width: 480px) {
  .dashboard-header__name {
    display: none;
  }
  .dashboard-header__wallet-btn .wallet-text {
    display: none;
  }
  .dashboard-header__wallet-btn {
    padding: 10px;
  }
}

/* ========== Dashboard Tab Navigation ========== */
.dashboard-tabs {
  background: #111;
  border-bottom: 1px solid #222;
}

/* Row wrapper for tabs - created by layout.js */
.dashboard-tabs__row {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.dashboard-tabs__container {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  /* Remove centering - let row handle it */
  max-width: none;
  margin: 0;
  padding: 0;
}

.dashboard-tabs__container::-webkit-scrollbar {
  display: none;
}

.dashboard-tabs__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  color: #9CA3AF;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}

.dashboard-tabs__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.dashboard-tabs__link.active {
  color: #6cff8f;
  border-bottom-color: #6cff8f;
}

.dashboard-tabs__link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* User mode: left-align tabs (same as founder mode now) */
.dashboard-tabs--user-mode .dashboard-tabs__row {
  justify-content: flex-start;
}

.dashboard-tabs--user-mode .dashboard-tabs__container {
  justify-content: flex-start;
}

@media (max-width: 600px) {
  .dashboard-tabs__link {
    padding: 14px 16px;
    font-size: 13px;
  }
  .dashboard-tabs__link svg {
    width: 16px;
    height: 16px;
  }
}

/* ========== Dashboard Layout ========== */
.dashboard {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

.dashboard__header {
  margin-bottom: 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
}

.dashboard__header-left {
  flex: 1;
}

.dashboard__header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dashboard__user-email {
  color: #9CA3AF;
  font-size: 14px;
}

.dashboard__signout-btn {
  background: transparent;
  border: 1px solid #EF4444;
  color: #EF4444;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.dashboard__signout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

.dashboard__signout-btn svg {
  stroke: #EF4444;
}

.dashboard__title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #6cff8f 0%, #00d4ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dashboard__subtitle {
  color: #9CA3AF;
  font-size: 16px;
}

/* ========== Auth Required State ========== */
.dashboard__auth-required,
.auth-required {
  text-align: center;
  padding: 80px 24px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 16px;
}

.dashboard__auth-required h2,
.auth-required h2,
.auth-required h3 {
  font-size: 24px;
  margin-bottom: 16px;
  color: #fff;
}

.dashboard__auth-required p,
.auth-required p {
  color: #9CA3AF;
  margin-bottom: 24px;
}

.dashboard__auth-btn,
.auth-required .btn-primary {
  background: linear-gradient(90deg, #6cff8f 0%, #00d4ff 100%);
  color: #0A0A0A;
  border: none;
  padding: 14px 32px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-block;
  text-decoration: none;
}

.dashboard__auth-btn:hover,
.auth-required .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(108, 255, 143, 0.3);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 40px 24px;
}

.empty-state .empty-icon {
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.3);
}

.empty-state .empty-icon svg {
  width: 64px;
  height: 64px;
}

/* ========== Dashboard Content ========== */
.dashboard__content,
.dashboard-content {
  display: none;
}

.dashboard__content.visible,
.dashboard-content.visible {
  display: block;
}

/* ========== Section Cards ========== */
.section-card {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.section-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-card__title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-card__title svg {
  color: #6cff8f;
}

/* ========== Form Styles ========== */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  color: #9CA3AF;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: #0A0A0A;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  font-size: 15px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #6cff8f;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #666;
}

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

.form-group__hint {
  color: #666;
  font-size: 12px;
  margin-top: 6px;
}

.form-section {
  margin-bottom: 32px;
}

.form-section__title {
  font-size: 14px;
  font-weight: 600;
  color: #9CA3AF;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ========== Buttons ========== */
.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn--primary {
  background: linear-gradient(90deg, #6cff8f 0%, #00d4ff 100%);
  color: #0A0A0A;
  border: none;
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(108, 255, 143, 0.3);
}

.btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--secondary {
  background: transparent;
  border: 1px solid #444;
  color: #9CA3AF;
}

.btn--secondary:hover {
  border-color: #666;
  color: #fff;
}

.btn--danger {
  background: transparent;
  border: 1px solid #EF4444;
  color: #EF4444;
}

.btn--danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* ========== Modal Styles ========== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #333;
}

.modal__title {
  font-size: 20px;
  font-weight: 600;
}

.modal__close {
  background: none;
  border: none;
  color: #9CA3AF;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

.modal__close:hover {
  color: #fff;
}

.modal__body {
  padding: 24px;
}

.modal__footer {
  padding: 20px 24px;
  border-top: 1px solid #333;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ========== Grid Layouts ========== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ========== Empty States ========== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
}

.empty-state__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #fff;
}

.empty-state p {
  color: #9CA3AF;
  margin-bottom: 24px;
}

/* ========== Spinner ========== */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #0A0A0A;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* ========== Toast Notifications ========== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10001;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

.toast--success {
  border-color: #6cff8f;
}

.toast--error {
  border-color: #EF4444;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .dashboard {
    padding: 24px 16px;
  }

  .dashboard__title {
    font-size: 24px;
  }

  .dashboard__header {
    flex-direction: column;
    gap: 16px;
  }

  .dashboard__header-right {
    width: 100%;
    justify-content: space-between;
  }
}
