/* SattvaOS Multi-Guide Organisation Space — Yuj Foundation Theme */

:root {
  --yuj-primary: #d97706;
  --yuj-primary-hover: #b45309;
  --yuj-accent: #78350f;
  --yuj-bg: #fbfbf9;
  --yuj-surface: #ffffff;
  --yuj-surface-muted: #f4f4f0;
  --yuj-border: #e5e7eb;
  --yuj-border-focus: #d97706;
  --yuj-text: #1f2937;
  --yuj-text-muted: #6b7280;
  --yuj-text-light: #9ca3af;
  
  /* Status Colors */
  --status-grey-bg: #f3f4f6;
  --status-grey-text: #4b5563;
  --status-yellow-bg: #fef3c7;
  --status-yellow-text: #92400e;
  --status-orange-bg: #ffedd5;
  --status-orange-text: #9a3412;
  --status-green-bg: #dcfce7;
  --status-green-text: #166534;
  --status-bluegreen-bg: #ccfbf1;
  --status-bluegreen-text: #115e59;
  --status-red-bg: #fee2e2;
  --status-red-text: #991b1b;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--yuj-bg);
  color: var(--yuj-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
  background: var(--yuj-surface);
  border-bottom: 1px solid var(--yuj-border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.brand-symbol {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--yuj-primary), var(--yuj-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.brand-meta h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--yuj-accent);
  letter-spacing: -0.01em;
}

.brand-meta p {
  font-size: 0.8rem;
  color: var(--yuj-text-muted);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-tab {
  background: none;
  border: none;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--yuj-text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-tab:hover {
  background: var(--yuj-surface-muted);
  color: var(--yuj-text);
}

.nav-tab.active {
  background: var(--yuj-surface-muted);
  color: var(--yuj-primary);
  font-weight: 600;
}

/* Layout */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Hero */
.hero {
  background: linear-gradient(180deg, #fffbeb 0%, var(--yuj-surface) 100%);
  border: 1px solid #fef3c7;
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.hero h2 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  color: var(--yuj-accent);
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1rem;
  color: var(--yuj-text-muted);
  max-width: 760px;
  line-height: 1.6;
}

.language-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ecfdf5;
  color: #065f46;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 1rem;
  border: 1px solid #a7f3d0;
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--yuj-surface);
  border: 1px solid var(--yuj-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-card .label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--yuj-text-muted);
}

.stat-card .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--yuj-text);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-grey { background: var(--status-grey-bg); color: var(--status-grey-text); }
.badge-yellow { background: var(--status-yellow-bg); color: var(--status-yellow-text); }
.badge-orange { background: var(--status-orange-bg); color: var(--status-orange-text); }
.badge-green { background: var(--status-green-bg); color: var(--status-green-text); }
.badge-bluegreen { background: var(--status-bluegreen-bg); color: var(--status-bluegreen-text); }
.badge-red { background: var(--status-red-bg); color: var(--status-red-text); }

/* Table */
.table-card {
  background: var(--yuj-surface);
  border: 1px solid var(--yuj-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--yuj-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.table-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

th {
  background: var(--yuj-surface-muted);
  color: var(--yuj-text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--yuj-border);
}

td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--yuj-border);
  color: var(--yuj-text);
  vertical-align: middle;
}

tr:hover td {
  background-color: #fafafa;
}

.indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
}

.indicator-done {
  background: var(--status-green-bg);
  color: var(--status-green-text);
}

.indicator-pending {
  background: var(--status-grey-bg);
  color: var(--status-grey-text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--yuj-primary);
  color: #fff;
}

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

.btn-secondary {
  background: var(--yuj-surface);
  border-color: var(--yuj-border);
  color: var(--yuj-text);
}

.btn-secondary:hover {
  background: var(--yuj-surface-muted);
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}

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

.form-label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--yuj-text);
  margin-bottom: 0.35rem;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--yuj-text-muted);
  margin-top: 0.25rem;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--yuj-border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--yuj-surface);
  color: var(--yuj-text);
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--yuj-border-focus);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12);
}

/* Step Wizard */
.wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.wizard-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 80px;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--yuj-surface-muted);
  border: 2px solid var(--yuj-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--yuj-text-muted);
  transition: all 0.2s ease;
}

.wizard-step-item.active .step-circle {
  background: var(--yuj-primary);
  border-color: var(--yuj-primary);
  color: #fff;
}

.wizard-step-item.completed .step-circle {
  background: var(--status-green-bg);
  border-color: var(--status-green-text);
  color: var(--status-green-text);
}

.step-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--yuj-text-muted);
  text-align: center;
}

.wizard-step-item.active .step-name {
  color: var(--yuj-primary);
}

/* Card Section */
.card-section {
  background: var(--yuj-surface);
  border: 1px solid var(--yuj-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.card-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--yuj-accent);
  margin-bottom: 0.35rem;
}

.card-section .desc {
  font-size: 0.875rem;
  color: var(--yuj-text-muted);
  margin-bottom: 1.5rem;
}

/* Attestation Box */
.attestation-box {
  background: #fdfaf3;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  margin-top: 0.25rem;
  accent-color: var(--yuj-primary);
  width: 17px;
  height: 17px;
}

.checkbox-label {
  font-size: 0.875rem;
  color: var(--yuj-text);
  line-height: 1.4;
}

.evidence-box {
  background: #1e293b;
  color: #f8fafc;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-x: auto;
  white-space: pre-wrap;
  margin-top: 1rem;
}

/* Guide Directory Grid */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.guide-card {
  background: var(--yuj-surface);
  border: 1px solid var(--yuj-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
}

.guide-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.guide-card-cover {
  height: 130px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  position: relative;
}

.guide-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #fff;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--yuj-accent);
  overflow: hidden;
}

.guide-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.guide-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.guide-card-body h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--yuj-text);
  margin-bottom: 0.2rem;
}

.guide-card-body .title {
  font-size: 0.8rem;
  color: var(--yuj-primary);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.guide-card-body .bio {
  font-size: 0.85rem;
  color: var(--yuj-text-muted);
  line-height: 1.4;
  margin-bottom: 1rem;
  flex: 1;
}

.theme-tag {
  display: inline-block;
  background: var(--yuj-surface-muted);
  color: var(--yuj-text);
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

/* Chat & Profile */
.chat-window {
  display: flex;
  flex-direction: column;
  height: 480px;
  border: 1px solid var(--yuj-border);
  border-radius: var(--radius-md);
  background: var(--yuj-surface);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  line-height: 1.45;
}

.message-user {
  align-self: flex-end;
  background: var(--yuj-primary);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.message-guide {
  align-self: flex-start;
  background: var(--yuj-surface-muted);
  color: var(--yuj-text);
  border-bottom-left-radius: 2px;
}

.chat-input-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--yuj-border);
  background: var(--yuj-surface);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}

.modal {
  background: var(--yuj-surface);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 1.75rem;
}

.modal h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--yuj-accent);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Footer */
.footer {
  margin-top: 4rem;
  border-top: 1px solid var(--yuj-border);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--yuj-text-light);
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
