/* @bluebell/dashboard-core — Shared design tokens and layout classes */

/* Design tokens */
:root {
  --bb-primary: #2563eb;
  --bb-primary-hover: #1d4ed8;
  --bb-bg: #f8fafc;
  --bb-sidebar-bg: #1e293b;
  --bb-sidebar-text: #e2e8f0;
  --bb-text: #1e293b;
  --bb-text-muted: #64748b;
  --bb-border: #e2e8f0;
  --bb-radius: 6px;
  --bb-success: #16a34a;
  --bb-danger: #dc2626;
  --bb-warning: #d97706;
}

/* Base reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--bb-text);
  background: var(--bb-bg);
}

/* Layout */
.bb-layout {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

.bb-sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--bb-sidebar-bg);
  color: var(--bb-sidebar-text);
  display: flex;
  flex-direction: column;
}

.bb-sidebar-brand {
  padding: 20px 16px;
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.bb-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--bb-border);
  background: #fff;
}

.bb-header-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.bb-content {
  flex: 1;
  padding: 24px;
  overflow: auto;
}

/* Navigation */
.bb-nav {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.bb-nav-item {
  display: block;
  padding: 10px 16px;
  color: var(--bb-sidebar-text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.15s, border-color 0.15s;
}

.bb-nav-item:hover {
  background: rgba(255,255,255,0.08);
}

.bb-nav-item.bb-nav-active {
  background: rgba(255,255,255,0.12);
  border-left-color: var(--bb-primary);
  font-weight: 600;
}

/* Card */
.bb-card {
  background: #fff;
  border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius);
  padding: 20px;
  margin-bottom: 16px;
}

.bb-card h2,
.bb-card h3 {
  margin-top: 0;
}

/* Buttons */
.bb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  border-radius: var(--bb-radius);
  cursor: pointer;
  background: var(--bb-primary);
  color: #fff;
  transition: background 0.15s;
}

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

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

.bb-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--bb-border);
  border-radius: var(--bb-radius);
  cursor: pointer;
  background: #fff;
  color: var(--bb-text);
  transition: background 0.15s, border-color 0.15s;
}

.bb-btn-secondary:hover {
  background: var(--bb-bg);
  border-color: var(--bb-text-muted);
}

/* Table */
.bb-table {
  width: 100%;
  border-collapse: collapse;
}

.bb-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bb-bg);
  border-bottom: 2px solid var(--bb-border);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--bb-text-muted);
}

.bb-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--bb-border);
}

.bb-table tr:hover td {
  background: rgba(37, 99, 235, 0.02);
}

/* Utility */
.bb-text-muted {
  color: var(--bb-text-muted);
}

.bb-text-success {
  color: var(--bb-success);
}

.bb-text-danger {
  color: var(--bb-danger);
}

.bb-text-warning {
  color: var(--bb-warning);
}

.bb-mt-1 { margin-top: 8px; }
.bb-mt-2 { margin-top: 16px; }
.bb-mt-3 { margin-top: 24px; }
.bb-mb-1 { margin-bottom: 8px; }
.bb-mb-2 { margin-bottom: 16px; }
.bb-mb-3 { margin-bottom: 24px; }
