/* ============================================
   Bob Tools — Design tokens
   ============================================ */
:root {
  --color-bg: #f0f2f5;
  --color-surface: #ffffff;
  --color-primary: #2563eb;
  --color-primary-light: #eff6ff;
  --color-primary-hover: #1d4ed8;
  --color-text: #111827;
  --color-text-secondary: #6b7280;
  --color-text-muted: #9ca3af;
  --color-border: #e5e7eb;
  --color-sidebar: #111827;
  --color-sidebar-hover: #1f2937;
  --color-sidebar-text: #d1d5db;
  --color-sidebar-active: #ffffff;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --sidebar-width: 260px;
}

/* ============================================
   Reset
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button { font-family: var(--font); }

/* ============================================
   Login screen
   ============================================ */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

.login-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 3rem 2.5rem;
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.login-logo__icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.75rem;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.login-card__title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  letter-spacing: -0.025em;
}

.login-card__subtitle {
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
  font-size: 0.925rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn--microsoft {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  width: 100%;
  box-shadow: var(--shadow-sm);
}
.btn--microsoft:hover { background: #f9fafb; box-shadow: var(--shadow); }

.btn--ghost {
  background: transparent;
  color: var(--color-sidebar-text);
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
}
.btn--ghost:hover { background: var(--color-sidebar-hover); color: white; }

.btn--sm { padding: 0.375rem 0.75rem; font-size: 0.8rem; }

/* ============================================
   Main screen layout
   ============================================ */
.main-screen {
  display: flex;
  min-height: 100vh;
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-sidebar);
  color: var(--color-sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 10;
}

.sidebar__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar__logo {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.sidebar__brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  letter-spacing: -0.02em;
}

.sidebar__nav {
  flex: 1;
  padding: 0.75rem;
  overflow-y: auto;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-sidebar-text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}
.sidebar__link:hover {
  background: var(--color-sidebar-hover);
  color: white;
}

.sidebar__link-icon {
  width: 28px;
  height: 28px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.7rem;
  flex-shrink: 0;
  color: white;
}

.sidebar__footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

.sidebar__avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.sidebar__user-info {
  min-width: 0;
}

.sidebar__user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar__user-role {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ============================================
   Content area
   ============================================ */
.content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem 2.5rem;
  max-width: 1100px;
}

.content__header {
  margin-bottom: 2rem;
}

.content__title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.25rem;
}

.content__subtitle {
  color: var(--color-text-secondary);
  font-size: 0.925rem;
}

/* ============================================
   Tools grid
   ============================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

/* ============================================
   Tool card
   ============================================ */
.tool-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  color: inherit;
  font-family: var(--font);
}

.tool-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.tool-card__icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: white;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.tool-card__body {
  flex: 1;
  min-width: 0;
}

.tool-card__name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
}

.tool-card__desc {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.tool-card__arrow {
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.tool-card:hover .tool-card__arrow {
  color: var(--color-primary);
  transform: translateX(2px);
}

/* ============================================
   Empty state
   ============================================ */
.tools-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-text-secondary);
}

.tools-empty__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  background: var(--color-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text-muted);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    position: relative;
    flex-direction: row;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }
  .sidebar__nav,
  .sidebar__footer { display: none; }
  .sidebar__header { border-bottom: none; padding: 0; }

  .main-screen { flex-direction: column; }

  .content {
    margin-left: 0;
    padding: 1.25rem;
  }

  .content__title { font-size: 1.35rem; }

  .tools-grid {
    grid-template-columns: 1fr;
  }
}
