/**
 * Friday Design System
 * Bootstrap 5.3 Light/Dark Mode
 */

/* ============================================
   Typography
   ============================================ */

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
}

.dm-mono {
    font-family: 'DM Mono', 'Courier New', monospace;
}

/* ============================================
   Color Tokens - Light Mode
   ============================================ */

:root,
[data-bs-theme="light"] {
    --friday-bg: #f5f4f0;
    --friday-surface: #ffffff;
    --friday-surface-alt: #f0efe9;
    --friday-border: #e2e0d8;
    --friday-text: #1a1917;
    --friday-text-muted: #6b6960;
    --friday-accent: #2d6a4f;
    --friday-accent-light: #d8f3dc;
    --sidebar-bg: #1a1917;
}

/* ============================================
   Color Tokens - Dark Mode
   ============================================ */

[data-bs-theme="dark"] {
    --friday-bg: #141412;
    --friday-surface: #1e1d1a;
    --friday-surface-alt: #252420;
    --friday-border: #2e2d28;
    --friday-text: #eae8e0;
    --friday-text-muted: #7a7870;
    --friday-accent: #40916c;
    --friday-accent-light: #1b3a2d;
    --sidebar-bg: #0f0f0d;
}

/* ============================================
   Base Styles
   ============================================ */

body {
    background-color: var(--friday-bg);
    color: var(--friday-text);
    margin: 0;
    padding: 0;
}

/* ============================================
   Layout Structure
   ============================================ */

:root {
  --sidebar-width-expanded:  240px;
  --sidebar-width-collapsed: 64px;
  --sidebar-transition:      width 0.22s ease, transform 0.22s ease;
  --sidebar-text: #d0cfc8;
  --sidebar-text-active: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.friday-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── Sidebar Collapsible ─────────────────────────────────────── */

/* ── Desktop: expanded (default) ── */
.friday-sidebar {
  width: var(--sidebar-width-expanded);
  min-width: var(--sidebar-width-expanded);
  transition: var(--sidebar-transition);
  position: relative;
  flex-shrink: 0;
  background-color: var(--sidebar-bg);
  color: #eae8e0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: 100vh;
  z-index: 100;
}

/* Desktop: collapsed state */
.friday-sidebar.collapsed {
  width: var(--sidebar-width-collapsed);
  min-width: var(--sidebar-width-collapsed);
}

/* Logo / Header */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--friday-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-logo-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-logo-text {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.sidebar-logo-tagline {
  font-size: 0.625rem;
  color: var(--friday-text-muted);
  line-height: 1;
  margin-top: 2px;
}

/* Logo text — ausblenden wenn collapsed */
.friday-sidebar.collapsed .sidebar-logo-text-wrap,
.friday-sidebar.collapsed .sidebar-link-text,
.friday-sidebar.collapsed .sidebar-section-label,
.friday-sidebar.collapsed .sidebar-user-info,
.friday-sidebar.collapsed .sidebar-badge {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.15s ease, width 0.22s ease;
}

.friday-sidebar:not(.collapsed) .sidebar-logo-text-wrap,
.friday-sidebar:not(.collapsed) .sidebar-link-text,
.friday-sidebar:not(.collapsed) .sidebar-section-label,
.friday-sidebar:not(.collapsed) .sidebar-user-info,
.friday-sidebar:not(.collapsed) .sidebar-badge {
  opacity: 1;
  width: auto;
  transition: opacity 0.2s ease 0.05s, width 0.22s ease;
}

/* Icons zentrieren wenn collapsed */
.friday-sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 8px;
}

.friday-sidebar.collapsed .sidebar-link .bi {
  margin: 0;
  font-size: 18px;  /* etwas größer im collapsed State */
}

.friday-sidebar.collapsed .sidebar-logo {
  justify-content: center;
  padding: 16px 8px;
}

.friday-sidebar.collapsed .sidebar-logo-mark {
  margin: 0;
}

.friday-sidebar.collapsed .sidebar-footer {
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  gap: 8px;
}

.friday-sidebar.collapsed .sidebar-user {
  justify-content: center;
}

.friday-sidebar.collapsed .sidebar-user-avatar {
  margin: 0;
}

/* Toggle Button (integrated in nav) */
.sidebar-toggle-btn {
  /* Remove absolute positioning - it's now a nav item */
  background: none;
  border: none;
  width: auto;
  height: auto;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.sidebar-toggle-btn:hover {
  background-color: var(--sidebar-hover);
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
}

.sidebar-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--friday-text-muted);
  padding: 12px 12px 6px;
  font-weight: 600;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 4px;
  position: relative;
}

.sidebar-link:hover {
  background-color: var(--sidebar-hover);
  color: var(--sidebar-text-active);
}

.sidebar-link.active {
  background-color: var(--friday-accent);
  color: var(--sidebar-text-active);
}

.sidebar-link i {
  font-size: 1.125rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-link-text {
  flex: 1;
  white-space: nowrap;
}

.sidebar-badge {
  display: inline-block;
  background: #dc3545;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: 6px;
}

/* Tooltip removed - using Bootstrap tooltips instead */

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.sidebar-user-avatar {
  flex-shrink: 0;
}

.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--sidebar-text-active);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-links {
  font-size: 11px;
  color: var(--sidebar-text);
  display: flex;
  gap: 8px;
}

.sidebar-user-links a,
.btn-link-inline {
  color: var(--sidebar-text);
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 11px;
}

.sidebar-user-links a:hover,
.btn-link-inline:hover {
  color: var(--sidebar-text-active);
}

.sidebar-theme-btn {
  background: none;
  border: none;
  color: var(--sidebar-text);
  font-size: 15px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}

.sidebar-theme-btn:hover {
  color: var(--sidebar-text-active);
  background: var(--sidebar-hover);
}

/* ── Tablet (768–992px) ── */
@media (max-width: 992px) {
  .friday-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 200;
    width: var(--sidebar-width-collapsed) !important;
    min-width: var(--sidebar-width-collapsed) !important;
  }

  .friday-sidebar.mobile-open {
    width: var(--sidebar-width-expanded) !important;
    min-width: var(--sidebar-width-expanded) !important;
    box-shadow: var(--shadow-lg);
  }

  .friday-main {
    margin-left: var(--sidebar-width-collapsed);
    flex: 1;
  }

  .sidebar-toggle-btn {
    display: none;
  }
}

/* ── Mobile (< 768px) ── */
@media (max-width: 768px) {
  .friday-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 200;
    width: var(--sidebar-width-expanded) !important;
    min-width: var(--sidebar-width-expanded) !important;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
  }

  .friday-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .friday-main {
    margin-left: 0;
    flex: 1;
  }

  .hamburger-btn {
    display: flex !important;
  }
}

/* ── Backdrop (Mobile + Tablet Overlay) ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 199;
  backdrop-filter: blur(2px);
}

.sidebar-backdrop.active {
  display: block;
}

/* ── Hamburger Button ── */
.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--friday-border);
  color: var(--friday-text);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.15s;
  margin-right: 12px;
}

.hamburger-btn:hover {
  background: var(--friday-surface-alt);
}

/* Main Content Area */
.friday-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: none;  /* Sidebar handles transition */
}

/* Topbar - 56px height, sticky */
.friday-topbar {
    height: 56px;
    background-color: var(--friday-surface);
    border-bottom: 1px solid var(--friday-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--friday-text);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Content Area */
.friday-content {
    flex: 1;
    padding: 24px;
}

/* ============================================
   Messages
   ============================================ */

.friday-messages {
    margin: 16px 24px 0;
}

.friday-messages .alert {
    border-radius: 8px;
}

/* ============================================
   Auth Layout
   ============================================ */

.friday-auth-layout {
    min-height: 100vh;
    background-color: var(--friday-bg);
}

.friday-auth-layout .card {
    border: 1px solid var(--friday-border);
    background-color: var(--friday-surface);
}

/* ============================================
   Theme Toggle
   ============================================ */

.theme-toggle-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

#theme-toggle {
    border-color: var(--friday-border);
    color: var(--friday-text);
}

#theme-toggle:hover {
    background-color: var(--friday-surface-alt);
}

/* ============================================
   Error Pages
   ============================================ */

.error-page {
    max-width: 600px;
    margin: 0 auto;
}

.error-code {
    font-size: 6rem;
    line-height: 1;
}

/* ============================================
   Bootstrap Overrides
   ============================================ */

.card {
    background-color: var(--friday-surface);
    border-color: var(--friday-border);
}

.btn-primary {
    background-color: var(--friday-accent);
    border-color: var(--friday-accent);
}

.btn-primary:hover {
    background-color: var(--friday-accent);
    border-color: var(--friday-accent);
    opacity: 0.9;
}

.form-control,
.form-select {
    background-color: var(--friday-surface);
    border-color: var(--friday-border);
    color: var(--friday-text);
}

.form-control:focus,
.form-select:focus {
    background-color: var(--friday-surface);
    border-color: var(--friday-accent);
    color: var(--friday-text);
}

/* Dark mode specific overrides */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: var(--friday-surface-alt);
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background-color: var(--friday-surface-alt);
}

/* ============================================
   Avatar Circle
   ============================================ */

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* ============================================
   Kanban Board
   ============================================ */

.kanban-board {
    align-items: flex-start;
    min-height: calc(100vh - 240px);
}

.kanban-column {
    background: var(--friday-surface-alt);
    border-radius: 10px;
    padding: 12px;
}

.kanban-column-header {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--friday-text-muted);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--friday-border);
    font-weight: 600;
}

.kanban-cards {
    min-height: 100px;
}

.task-card {
    background: var(--friday-surface);
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.15s, transform 0.1s;
}

.task-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.kanban-card-ghost {
    opacity: 0.4;
    background: var(--friday-accent-light);
}

.kanban-quick-add button {
    border-style: dashed;
}

/* Waiting status styling - amber/orange to indicate external dependency */
[data-status="waiting"] .kanban-column-header {
    color: #f59e0b;
}

[data-status="waiting"] .task-card {
    border-left: 3px solid #f59e0b !important;
    opacity: 0.85;
}

/* Slide-over styles */
.slide-over-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
}

.slide-over-backdrop.active {
    display: block;
}

.slide-over {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 600px;
    max-width: 100%;
    background: var(--friday-surface);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

.slide-over.active {
    transform: translateX(0);
}

/* ============================================
   Dashboard Widgets - KPI Cards
   ============================================ */

.kpi-card {
    background: var(--friday-surface);
    border-radius: 10px;
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--friday-border);
    transition: all 0.2s ease;
}

.kpi-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.kpi-card-danger {
    border-color: #dc3545;
    background: linear-gradient(135deg, var(--friday-surface) 0%, rgba(220, 53, 69, 0.05) 100%);
}

.kpi-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--friday-text-muted);
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 36px;
    font-weight: 600;
    font-family: 'DM Mono', monospace;
    color: var(--friday-text);
    line-height: 1;
    margin-bottom: 8px;
}

.kpi-link {
    font-size: 12px;
    color: var(--friday-accent);
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

.kpi-link:hover {
    color: var(--friday-accent);
    text-decoration: underline;
}

.kpi-skeleton,
.widget-skeleton {
    height: 80px;
    background: linear-gradient(90deg,
        var(--friday-surface-alt) 25%,
        var(--friday-border) 50%,
        var(--friday-surface-alt) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Dashboard Widgets - Content Widgets
   ============================================ */

.dashboard-widget {
    background: var(--friday-surface);
    border-radius: 10px;
    border: 1px solid var(--friday-border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.widget-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--friday-border);
    background: var(--friday-surface-alt);
}

.widget-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--friday-text);
    margin: 0;
}

.widget-body {
    padding: 20px;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
}

/* Team Load specific styles */
.team-load-row {
    position: relative;
}

.team-name {
    font-weight: 500;
    color: var(--friday-text);
}

.team-count {
    font-size: 11px;
}

.team-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Due Soon specific styles */
.task-title-col {
    width: 60%;
}

.assignee-col {
    width: 20%;
}

.due-date-col {
    width: 20%;
}

.project-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-link {
    color: var(--friday-text);
    text-decoration: none;
    font-weight: 500;
}

.task-link:hover {
    color: var(--friday-accent);
    text-decoration: underline;
}

/* Project Status specific styles */
.project-item {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--friday-border);
}

.project-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.project-name {
    color: var(--friday-text);
    text-decoration: none;
    font-weight: 500;
}

.project-name:hover {
    color: var(--friday-accent);
}

/* Activity Feed specific styles */
.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px;
    border-bottom: 1px solid var(--friday-border);
    transition: background-color 0.2s ease;
}

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

.notification-item:hover {
    background-color: var(--friday-surface-alt);
}

.notification-unread {
    border-left: 3px solid var(--friday-accent);
    background-color: var(--friday-accent-light);
}

.notification-content {
    font-size: 14px;
}

.notification-text {
    margin-bottom: 4px;
}

/* Avatar styles */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--friday-accent);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 12px;
}

/* Shadow utility */
:root {
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --font-mono: 'DM Mono', 'Courier New', monospace;
}

/* ── Project List ── */
.project-row {
  background: var(--friday-surface);
  border-radius: 8px;
  border: 1px solid var(--friday-border);
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.1s, border-color 0.15s;
  color: var(--friday-text);
}

.project-row:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--friday-accent);
  color: var(--friday-text);
}

.project-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--friday-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress bar in dark mode needs explicit track color */
.progress {
  background-color: var(--friday-border) !important;
}

/* User avatar — small variant */
.user-avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 10px;
  font-weight: 600;
}

/* ============================================
   EasyMDE Dark Mode
   ============================================ */

[data-bs-theme="dark"] .EasyMDEContainer .CodeMirror {
  background: var(--friday-surface);
  color: var(--friday-text);
  border-color: var(--friday-border);
}

[data-bs-theme="dark"] .EasyMDEContainer .editor-toolbar {
  background: var(--friday-surface-alt);
  border-color: var(--friday-border);
}

[data-bs-theme="dark"] .EasyMDEContainer .editor-toolbar button {
  color: var(--friday-text-muted);
}

[data-bs-theme="dark"] .EasyMDEContainer .editor-toolbar button:hover,
[data-bs-theme="dark"] .EasyMDEContainer .editor-toolbar button.active {
  background: var(--friday-surface);
  color: var(--friday-text);
}

[data-bs-theme="dark"] .EasyMDEContainer .editor-preview {
  background: var(--friday-surface-alt);
  color: var(--friday-text);
}

[data-bs-theme="dark"] .EasyMDEContainer .CodeMirror-cursor {
  border-left-color: var(--friday-text);
}

/* ============================================
   Markdown Rendered Output
   ============================================ */

.md-render h1, .md-render h2, .md-render h3,
.md-content h1, .md-content h2, .md-content h3 {
  font-weight: 600;
  margin-top: 1em;
  margin-bottom: 0.5em;
  color: var(--friday-text);
}
.md-render h2, .md-content h2 {
  font-size: 16px;
  border-bottom: 1px solid var(--friday-border);
  padding-bottom: 4px;
}
.md-render h3, .md-content h3 { font-size: 14px; }
.md-render p, .md-content p { margin-bottom: 0.75em; line-height: 1.6; }
.md-render ul, .md-render ol,
.md-content ul, .md-content ol {
  padding-left: 1.5em;
  margin-bottom: 0.75em;
}
.md-render li, .md-content li { margin-bottom: 0.25em; }
.md-render code, .md-content code {
  background: var(--friday-surface-alt);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.md-render pre, .md-content pre {
  background: var(--friday-surface-alt);
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
}
.md-render pre code, .md-content pre code {
  background: none;
  padding: 0;
}
.md-render blockquote, .md-content blockquote {
  border-left: 3px solid var(--friday-accent);
  padding-left: 12px;
  color: var(--friday-text-muted);
  margin: 0.75em 0;
}
.md-render hr, .md-content hr {
  border: none;
  border-top: 1px solid var(--friday-border);
  margin: 1em 0;
}
.md-render strong, .md-content strong { font-weight: 600; }
.md-render a, .md-content a {
  color: var(--friday-accent);
  text-decoration: none;
}
.md-render a:hover, .md-content a:hover { text-decoration: underline; }
.md-render table, .md-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 0.75em;
}
.md-render th, .md-render td,
.md-content th, .md-content td {
  border: 1px solid var(--friday-border);
  padding: 6px 10px;
}
.md-render th, .md-content th {
  background: var(--friday-surface-alt);
  font-weight: 600;
}


/* ============================================
   Portal Template Cards
   ============================================ */

.portal-template-card {
  background: var(--friday-surface);
  border: 1px solid var(--friday-border);
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  transition: box-shadow 0.15s, transform 0.1s, border-color 0.15s;
  height: 100%;
  cursor: pointer;
}
.portal-template-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--friday-accent);
}
.portal-template-icon {
  font-size: 32px;
  color: var(--friday-accent);
  margin-bottom: 12px;
  opacity: .8;
}
.portal-template-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--friday-text);
  margin-bottom: 8px;
}
.portal-template-desc {
  font-size: 12px;
  color: var(--friday-text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.portal-template-fields {
  font-size: 11px;
  color: var(--friday-accent);
  font-weight: 500;
}

/* Portal layout */
.portal-layout {
  background: var(--friday-bg);
  min-height: 100vh;
}

/* Avatar circle for comments */
.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--friday-accent-light);
  color: var(--friday-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

/* ── @Mentions Styling ────────────────────────────────────── */

/* Mention highlighting in comment text */
.mention {
  color: var(--friday-accent);
  font-weight: 600;
  background: var(--friday-accent-light);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.95em;
}

/* Tribute.js Dropdown Styling */
.tribute-container {
  background: var(--friday-surface);
  border: 1px solid var(--friday-border);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 9999;
}

.tribute-container ul {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}

.tribute-container li {
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.1s;
}

.tribute-container li.highlight,
.tribute-container li:hover {
  background: var(--friday-surface-alt);
}
