/* BussinesHub App — corporate dashboard layout */

.app-body { background: var(--ivory); min-height: 100vh; }

/* ─── Auth screen ─── */
.auth-screen {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at top left, rgba(37, 99, 235, .12), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(56, 189, 248, .08), transparent 50%),
    var(--ivory);
  padding: 24px;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.auth-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 22px;
  margin-bottom: 28px;
}
.auth-brand .brand-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 800;
}
.auth-tabs {
  display: flex; gap: 4px;
  background: var(--border-soft);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  color: var(--slate);
  cursor: pointer;
  transition: all .15s ease;
}
.auth-tab.active { background: var(--white); color: var(--navy); box-shadow: var(--shadow-sm); }
.auth-error {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--red-soft);
  border-radius: var(--radius);
  color: var(--red);
  font-size: 13px;
  display: none;
}
.auth-error.visible { display: block; }
.auth-disclaimer {
  margin-top: 16px;
  font-size: 12px;
  color: var(--slate-light);
  text-align: center;
}

/* ─── App shell layout ─── */
.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

/* ─── Sidebar ─── */
.sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  display: flex; flex-direction: column;
  position: sticky; top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 18px;
  padding: 0 8px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.sidebar-brand .brand-mark {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
  border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--white); font-weight: 800; font-size: 13px;
}
.workspace-info {
  padding: 0 8px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.ws-name { font-weight: 700; font-size: 14px; color: var(--navy); }
.ws-meta { font-size: 12px; color: var(--slate-light); margin-top: 4px; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--slate);
  font-size: 14px; font-weight: 500;
  transition: all .12s ease;
}
.nav-item i { width: 18px; text-align: center; }
.nav-item:hover { background: var(--border-soft); color: var(--navy); }
.nav-item.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.sidebar-footer { padding-top: 16px; border-top: 1px solid var(--border); }

/* ─── Main area ─── */
.main { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
  display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 20;
}
.topbar-title { margin: 0; font-size: 20px; font-weight: 700; flex: 1; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.user-chip {
  background: var(--border-soft);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}
.mobile-menu-btn {
  display: none;
  background: transparent; border: none;
  font-size: 22px; color: var(--navy);
  cursor: pointer;
}

.content { padding: 32px; flex: 1; }

/* ─── Dashboard ─── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.stat-label { font-size: 12px; color: var(--slate-light); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 32px; font-weight: 800; color: var(--navy); margin: 6px 0 0; letter-spacing: -.5px; }
.stat-trend { font-size: 13px; color: var(--slate); margin-top: 4px; }
.stat-trend.up { color: var(--emerald); }

/* ─── Table-ish lists ─── */
.list-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius-lg); overflow: hidden; }
.list-table th {
  background: var(--ivory);
  padding: 12px 16px;
  text-align: left;
  font-size: 12px; font-weight: 700;
  color: var(--slate);
  text-transform: uppercase; letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
}
.list-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
  color: var(--navy);
  vertical-align: middle;
}
.list-table tr:last-child td { border-bottom: none; }
.list-table tr:hover td { background: var(--ivory); }

.section-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.section-card .section-card-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.section-card-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.section-card .section-card-body { padding: 24px; }

/* ─── Task cards ─── */
.task-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.task-col { background: var(--ivory); border-radius: var(--radius-lg); padding: 16px; min-height: 200px; }
.task-col h4 {
  margin: 0 0 12px;
  font-size: 13px; font-weight: 700;
  color: var(--slate);
  text-transform: uppercase; letter-spacing: .5px;
  display: flex; align-items: center; justify-content: space-between;
}
.task-col h4 .count { background: var(--white); padding: 2px 8px; border-radius: 999px; font-size: 12px; }
.task-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all .12s ease;
}
.task-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--blue-soft); }
.task-card-title { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.task-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--slate-light); }
.task-card .priority-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 6px;
}
.priority-dot.low { background: var(--slate-light); }
.priority-dot.normal { background: var(--blue); }
.priority-dot.high { background: var(--amber); }
.priority-dot.urgent { background: var(--red); }

/* ─── Week plan grid ─── */
.weekplan-grid {
  display: grid;
  grid-template-columns: 180px repeat(7, 1fr);
  gap: 4px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.weekplan-cell {
  padding: 10px 12px;
  background: var(--white);
  font-size: 13px;
  min-height: 60px;
}
.weekplan-cell.day-header, .weekplan-cell.emp-header {
  background: var(--ivory);
  font-weight: 700;
  color: var(--slate);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.weekplan-cell.editable { cursor: text; }
.weekplan-cell.editable:hover { background: var(--blue-soft); }

/* ─── Modals ─── */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .6); backdrop-filter: blur(4px); }
.modal-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 480px;
  margin: 16px;
  max-height: 90vh; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { margin: 0; font-size: 17px; font-weight: 700; }
.modal-body { padding: 24px; overflow-y: auto; }

/* ─── Toast ─── */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--navy);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  transform: translateY(10px);
  transition: all .2s ease;
  pointer-events: none;
}
.toast.visible { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--red); }
.toast.success { background: var(--emerald); }

/* ─── Empty states ─── */
.empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--slate-light);
}
.empty i { font-size: 36px; color: var(--border); margin-bottom: 12px; }
.empty h4 { margin: 0 0 6px; color: var(--slate); }

/* ─── Action row ─── */
.action-row {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap;
}
.action-row h2 { margin: 0; font-size: 22px; font-weight: 700; }

/* ─── Responsive ─── */
@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0;
    width: 240px;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu-btn { display: block; }
  .content { padding: 20px; }
  .task-grid { grid-template-columns: 1fr; }
  .weekplan-grid { grid-template-columns: 100px repeat(7, 1fr); font-size: 11px; }
  .weekplan-cell { padding: 6px; min-height: 40px; }
}

/* ─── Settings tabs ─── */
.settings-tabs {
  display: flex; gap: 6px; padding: 4px;
  background: var(--border-soft); border-radius: 10px;
  margin-bottom: 18px; flex-wrap: wrap;
}
.settings-tab {
  flex: 1; min-width: 140px;
  background: transparent; border: 0;
  padding: 10px 14px; border-radius: 8px;
  font: 600 13px var(--font);
  color: var(--slate); cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.settings-tab i { margin-right: 6px; }
.settings-tab.active { background: var(--white); color: var(--navy); box-shadow: var(--shadow-sm); }
.settings-pane { animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity:0; transform: translateY(4px);} to { opacity:1; transform:none; } }

/* ─── Plan cards ─── */
.plans-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.plan-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 24px 22px; position: relative;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.plan-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.plan-card.featured { border-color: var(--blue); box-shadow: 0 8px 22px rgba(37,99,235,.18); }
.plan-card.current { border-color: var(--emerald); }
.plan-card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; color: var(--navy); }
.plan-card .plan-price { font-size: 32px; font-weight: 800; color: var(--navy); margin: 0 0 14px; }
.plan-card .plan-price span { font-size: 14px; color: var(--slate-light); font-weight: 500; }
.plan-card .plan-feats { list-style: none; padding: 0; margin: 0 0 20px; }
.plan-card .plan-feats li {
  padding: 6px 0 6px 22px; position: relative;
  font-size: 13px; color: var(--slate);
}
.plan-card .plan-feats li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--blue) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'><path d='M6.3 11l-3.3-3.3 1.4-1.4 1.9 1.9 5.3-5.3 1.4 1.4z'/></svg>") center/10px no-repeat;
}
.plan-card .plan-flag {
  position: absolute; top: -12px; right: 18px;
  background: var(--blue); color: var(--white);
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  padding: 4px 10px; border-radius: 999px;
  text-transform: uppercase;
}

/* ─── Invite box ─── */
.invite-box {
  display: flex; gap: 16px; align-items: center;
  background: var(--ivory); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; flex-wrap: wrap;
}
.invite-code-display {
  font-size: 22px; font-weight: 800;
  letter-spacing: .14em; color: var(--blue);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.invite-link-display {
  font-size: 13px; color: var(--slate);
  word-break: break-all;
  background: var(--white); border: 1px solid var(--border-soft);
  padding: 6px 10px; border-radius: 8px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* ─── Invite preview (auth-screen join tab) ─── */
.invite-preview-card {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px; padding: 14px 16px;
  margin: 0 0 14px;
}
