/* BoardSphere — Full Light Theme */
:root {
  --orange: #F48120;
  --orange-deep: #E85D04;
  --orange-light: #FFF4EC;
  --dark: #111827;
  --slate: #1F2937;
  --gray: #6B7280;
  --gray-light: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --light: #F9FAFB;
  --white: #FFFFFF;
  --blue: #2563EB;
  --green: #10B981;
  --red: #EF4444;
  --sidebar-width: 248px;

  /* Sidebar — light */
  --sb-bg: #FFFFFF;
  --sb-border: #E5E7EB;
  --sb-text: #6B7280;
  --sb-text-active: #111827;
  --sb-hover-bg: #F9FAFB;
  --sb-active-bg: #FFF4EC;
  --sb-active-border: #F48120;
  --sb-section-label: #9CA3AF;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--light);
  color: var(--dark);
  font-size: 14px;
  line-height: 1.6;
}

/* ── Layout ── */
.app-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sb-bg);
  border-right: 1px solid var(--sb-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-logo {
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--sb-border);
  display: flex; align-items: center; gap: 10px;
}

.sidebar-logo span {
  font-size: 17px; font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.4px;
}

.sidebar-logo .dot { color: var(--orange); }

.sidebar-nav { flex: 1; padding: 10px 0; overflow-y: auto; }

.nav-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.8px;
  color: var(--sb-section-label); text-transform: uppercase;
  padding: 14px 20px 4px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  margin: 1px 8px;
  color: var(--sb-text);
  text-decoration: none;
  font-size: 13.5px; font-weight: 500;
  border-radius: 8px;
  transition: background 0.12s, color 0.12s;
  cursor: pointer;
}

.nav-item:hover { background: var(--sb-hover-bg); color: var(--sb-text-active); }
.nav-item.active {
  background: var(--sb-active-bg);
  color: var(--orange);
  font-weight: 600;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.8; }
.nav-item i { font-size: 15px; flex-shrink: 0; opacity: 0.8; width: 16px; text-align: center; }
.nav-item.active svg, .nav-item.active i { opacity: 1; }

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--sb-border);
}

/* Org switcher in sidebar */
.org-switcher {
  padding: 10px 12px;
  margin: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--light);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.org-switcher:hover { border-color: var(--orange); background: var(--orange-light); }
.org-switcher-name { font-size: 13px; font-weight: 600; color: var(--dark); }
.org-switcher-role { font-size: 11px; color: var(--gray); }

.org-dropdown {
  margin: 4px 8px 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.org-dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  font-size: 13px; color: var(--dark);
  text-decoration: none;
  transition: background 0.1s;
}
.org-dropdown-item:hover { background: var(--light); }
.org-dropdown-item.active { color: var(--orange); font-weight: 600; }
.org-dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ── Main wrapper ── */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ── */
.topbar {
  height: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky; top: 0; z-index: 50;
}

.topbar-title { font-size: 15px; font-weight: 600; color: var(--dark); white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--orange);
  color: white; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}

/* ── Main Content ── */
#main-content { flex: 1; padding: 28px; }

/* ── Cards ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}

.card-title { font-size: 15px; font-weight: 600; color: var(--dark); }
.card-subtitle { font-size: 13px; color: var(--gray); margin-top: 2px; }

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex; flex-direction: column; gap: 6px;
}
.stat-card .stat-value { font-size: 28px; font-weight: 700; color: var(--dark); }
.stat-card .stat-label { font-size: 11.5px; color: var(--gray); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-change.up { color: var(--green); font-size: 12px; }
.stat-change.down { color: var(--red); font-size: 12px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  border: none; cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary { background: var(--orange); color: white; }
.btn-primary:hover { background: var(--orange-deep); color: white; }

.btn-secondary { background: var(--white); color: var(--dark); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--light); }

.btn-danger { background: var(--red); color: white; }
.btn-danger:hover { opacity: 0.88; }

.btn-ghost { background: transparent; color: var(--gray); border: none; }
.btn-ghost:hover { background: var(--light); color: var(--dark); }

.btn-sm { padding: 5px 12px; font-size: 12.5px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 5px; color: var(--slate); }
.form-control {
  width: 100%; padding: 9px 12px;
  border: 1px solid #D1D5DB; border-radius: 8px;
  font-size: 14px; background: white; color: var(--dark);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-control:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(244,129,32,0.1); }
.form-error { font-size: 12px; color: var(--red); margin-top: 4px; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 20px;
  font-size: 11.5px; font-weight: 600;
}
.badge-orange { background: #FEF3C7; color: #B45309; }
.badge-green  { background: #D1FAE5; color: #065F46; }
.badge-red    { background: #FEE2E2; color: #991B1B; }
.badge-blue   { background: #DBEAFE; color: #1E40AF; }
.badge-gray   { background: #F3F4F6; color: #374151; }

/* ── Tables ── */
.table-clean { width: 100%; border-collapse: collapse; }
.table-clean th {
  text-align: left; font-size: 11.5px; font-weight: 600;
  color: var(--gray); text-transform: uppercase; letter-spacing: 0.5px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: var(--light);
}
.table-clean td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); font-size: 13.5px; }
.table-clean tr:last-child td { border-bottom: none; }
.table-clean tr:hover td { background: #FAFAFA; }

/* ── Alerts ── */
.alert {
  padding: 11px 16px; border-radius: 8px;
  font-size: 13.5px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-info    { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }
.alert-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }

/* ── Empty State ── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--gray); }
.empty-state svg { width: 44px; height: 44px; margin: 0 auto 12px; opacity: 0.35; display: block; }
.empty-state h3 { font-size: 15px; font-weight: 600; color: var(--slate); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.modal {
  background: white; border-radius: 14px;
  padding: 28px; width: 100%; max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
  border: 1px solid var(--border);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.modal-title { font-size: 16px; font-weight: 700; }

/* ── Loading ── */
.btn-loading { pointer-events: none; opacity: 0.7; }
.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 999; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--dark); color: white;
  padding: 12px 18px; border-radius: 10px;
  font-size: 13.5px; min-width: 240px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  animation: slideUp 0.2s ease;
  display: flex; align-items: center; gap: 8px;
}
.toast.success { border-left: 4px solid var(--green); }
.toast.error   { border-left: 4px solid var(--red); }
.toast.info    { border-left: 4px solid var(--blue); }
@keyframes slideUp { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* ── Grid helpers ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ── Auth pages ── */
.auth-page {
  min-height: 100vh;
  background: var(--light);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.auth-card {
  background: white; border-radius: 16px;
  padding: 40px; width: 100%; max-width: 420px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  border: 1px solid var(--border);
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo h1 { font-size: 22px; font-weight: 800; color: var(--dark); }
.auth-logo h1 span { color: var(--orange); }
.auth-logo p { font-size: 13px; color: var(--gray); margin-top: 4px; }

/* ── Onboarding ── */
.onboarding-page {
  min-height: 100vh;
  background: var(--light);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 24px;
}
.onboarding-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 48px;
}
.onboarding-logo span { font-size: 20px; font-weight: 800; color: var(--dark); letter-spacing: -0.4px; }
.onboarding-logo span em { color: var(--orange); font-style: normal; }

.onboarding-hero { text-align: center; margin-bottom: 44px; }
.onboarding-hero h1 {
  font-size: 34px; font-weight: 800; color: var(--dark);
  line-height: 1.2; letter-spacing: -0.8px; margin-bottom: 12px;
}
.onboarding-hero h1 span { color: var(--orange); }
.onboarding-hero p { font-size: 15px; color: var(--gray); max-width: 460px; margin: 0 auto; line-height: 1.7; }

.onboarding-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; width: 100%; max-width: 860px; margin-bottom: 36px;
}
.ob-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 24px 22px;
  cursor: pointer; text-decoration: none;
  transition: border-color 0.18s, box-shadow 0.18s, transform 0.15s;
  display: flex; flex-direction: column; gap: 12px;
}
.ob-card:hover {
  border-color: var(--orange);
  box-shadow: 0 8px 32px rgba(244,129,32,0.1);
  transform: translateY(-2px);
}
.ob-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.ob-card h3 { font-size: 14.5px; font-weight: 700; color: var(--dark); margin: 0; }
.ob-card p  { font-size: 13px; color: var(--gray); line-height: 1.6; margin: 0; }
.ob-arrow   { margin-top: auto; font-size: 12px; color: var(--orange); font-weight: 600; }

.ob-form-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px; padding: 32px;
  width: 100%; max-width: 480px; margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.ob-form-panel h2 { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.ob-form-panel p  { font-size: 13px; color: var(--gray); margin-bottom: 22px; }

.onboarding-footer { font-size: 13px; color: var(--gray-light); }
.onboarding-footer a { color: var(--orange); text-decoration: none; }

@media (max-width: 700px) {
  .onboarding-cards { grid-template-columns: 1fr; }
  .onboarding-hero h1 { font-size: 24px; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  #main-content { padding: 16px; }
}

/* ── Notifications ── */
.notification-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-list {
  display: flex;
  flex-direction: column;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.12s;
}

.notification-item:hover {
  background: var(--light);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item.unread {
  background: #FFFBF5;
}

.notification-item.unread:hover {
  background: #FFF4EC;
}

.notification-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gray);
  font-size: 16px;
}

.notification-item.unread .notification-icon {
  background: var(--orange-light);
  color: var(--orange);
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 2px;
}

.notification-message {
  font-size: 12.5px;
  color: var(--gray);
  margin-bottom: 4px;
}

.notification-time {
  font-size: 11.5px;
  color: var(--gray-light);
}

.notification-actions {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.form-check {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.form-check:last-child {
  border-bottom: none;
}

.form-check-input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.form-check-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
  flex: 1;
}

.form-check-label strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--dark);
}

.form-check-label .text-muted {
  font-size: 12px;
  color: var(--gray);
  display: block;
}

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

.form-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}

.page-header .text-muted {
  font-size: 13px;
  color: var(--gray);
}
