:root {
  /* White Canvas Visual Brand System - Baron Bacot Design System */
  --bb-white: #FFFFFF;
  --bb-canvas: #F5F2EC;       /* Warm editorial off-white for surfaces/cards/sidebar */
  --bb-graphite: #0A0A0A;     /* Obsidian/Graphite text */
  --bb-divider: #E8E8E8;      /* Ultra-fine light gray rules */
  --bb-grey-muted: #8E8E8E;
  --bb-grey-light: #F0F0F0;
  
  /* Brand Accent - Used with extreme restraint */
  --bb-red: #8C1C13;          /* Baron Bacot brand Red */
  --bb-red-hover: #A5231B;
  --bb-success: #4A7A56;
  
  /* Typography */
  --bb-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bb-font-serif: 'Cormorant Garamond', Georgia, serif;

  /* Layout Boundaries */
  --bb-radius: 2px; /* Super sharp, premium luxury corners */
  --bb-shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.05);
  --bb-shadow-md: 0 10px 40px rgba(0, 0, 0, 0.08);
  --bb-transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bb-white);
  color: var(--bb-graphite);
  font-family: var(--bb-font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
}

/* Structural Layout: Two-Pane Multi-Board Cabinet */
.cabinet-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* Sidebar Styling: Warm editorial off-white backdrop */
.cabinet-sidebar {
  width: 280px;
  background-color: var(--bb-canvas);
  border-right: 1px solid var(--bb-divider);
  padding: 2.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100%;
}

.sidebar-brand {
  margin-bottom: 3.5rem;
}

.brand-sub {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--bb-red);
  letter-spacing: 0.25em;
  display: block;
  margin-bottom: 0.35rem;
}

.brand-main {
  font-family: var(--bb-font-serif);
  font-size: 2rem;
  font-weight: 300;
  line-height: 1.1;
  color: var(--bb-graphite);
}

/* Navigation lists */
.board-nav {
  margin-bottom: 2.5rem;
}

.nav-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--bb-grey-muted);
  margin-bottom: 1rem;
  font-weight: 600;
}

#board-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.board-item-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  font-family: var(--bb-font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--bb-grey-muted);
  cursor: pointer;
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: all var(--bb-transition);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.board-item-btn:hover {
  color: var(--bb-graphite);
}

.board-item-btn.active {
  color: var(--bb-graphite);
  font-weight: 500;
  border-bottom: 1px solid var(--bb-red);
}

/* Collaborators list in sidebar */
.sidebar-collaborators {
  margin-top: 1.5rem;
  flex: 1;
}

.collab-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.collab-item {
  font-size: 0.8rem;
  color: var(--bb-graphite);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.collab-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--bb-divider);
  color: var(--bb-graphite);
  font-size: 0.65rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(10, 10, 10, 0.05);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bb-divider);
}

/* Main Dashboard Panel */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--bb-white);
  padding: 2.5rem 3rem;
  overflow: hidden;
}

/* Main Top Header */
.board-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--bb-divider);
  padding-bottom: 1.75rem;
  margin-bottom: 2rem;
  flex-shrink: 0;
}

.board-meta {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--bb-red);
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

.active-board-title {
  font-family: var(--bb-font-serif);
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1.1;
  color: var(--bb-graphite);
}

.board-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Custom Search Box */
.search-box {
  position: relative;
}

.search-box input {
  width: 200px;
  padding: 0.5rem 0.75rem 0.5rem 2rem;
  background-color: var(--bb-canvas);
  border: 1px solid var(--bb-divider);
  border-radius: var(--bb-radius);
  color: var(--bb-graphite);
  font-family: var(--bb-font-sans);
  font-size: 0.82rem;
  transition: all var(--bb-transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--bb-red);
  background-color: var(--bb-white);
  width: 240px;
}

.search-box .search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bb-grey-muted);
  display: flex;
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--bb-graphite);
  border: 1px solid var(--bb-graphite);
  padding: 0.5rem 1.25rem;
  font-family: var(--bb-font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  border-radius: var(--bb-radius);
  transition: all var(--bb-transition);
}

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

.btn-primary {
  background-color: var(--bb-graphite);
  color: var(--bb-white);
  border-color: var(--bb-graphite);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--bb-graphite);
  border-color: var(--bb-graphite);
}

.btn-secondary {
  border-color: var(--bb-divider);
  color: var(--bb-grey-muted);
}

.btn-secondary:hover {
  color: var(--bb-graphite);
  border-color: var(--bb-graphite);
}

.btn-danger {
  color: var(--bb-red);
  border-color: var(--bb-red);
}

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

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.7rem;
}

.btn-close {
  background: none;
  border: none;
  color: var(--bb-grey-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--bb-transition);
}

.btn-close:hover {
  color: var(--bb-graphite);
}

.w-full {
  width: 100%;
}

/* Custom Dropdown select */
.custom-select {
  background-color: var(--bb-canvas);
  color: var(--bb-graphite);
  border: 1px solid var(--bb-divider);
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border-radius: var(--bb-radius);
  font-family: var(--bb-font-sans);
  font-size: 0.82rem;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238E8E8E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  transition: border-color var(--bb-transition);
}

.custom-select:focus {
  border-color: var(--bb-red);
}

/* Board columns grid */
.board-grid {
  display: flex;
  flex-flow: row nowrap;
  gap: 1.75rem;
  flex: 1;
  overflow: hidden;
  width: 100%;
}

/* Individual Columns resting on clean canvas surfaces */
.board-column {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1 1 0%;
  min-width: 0;
  border-right: 1px solid var(--bb-divider);
  padding-right: 0.85rem;
  overflow: hidden;
}

.board-column:last-child {
  border-right: none;
  padding-right: 0;
}

.board-column.drag-over {
  background-color: var(--bb-canvas);
  border-right: 1px dashed var(--bb-red);
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bb-divider);
  margin-bottom: 1.25rem;
  flex-shrink: 0;
}

.column-title {
  font-family: var(--bb-font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--bb-graphite);
}

.task-count {
  font-size: 0.72rem;
  font-weight: 600;
  background-color: var(--bb-canvas);
  color: var(--bb-grey-muted);
  padding: 0.1rem 0.5rem;
  border-radius: 20px;
}

/* Container inside column holds draggable items */
.cards-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 2rem;
  scrollbar-width: none;
}

.cards-container::-webkit-scrollbar {
  display: none;
}

/* Card Design: editorial, minimal, graphite typography */
.task-card {
  background-color: var(--bb-canvas);
  border: 1px solid var(--bb-divider);
  border-radius: var(--bb-radius);
  padding: 1.25rem;
  cursor: grab;
  position: relative;
  transition: transform var(--bb-transition), box-shadow var(--bb-transition), border-color var(--bb-transition);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.task-card:hover {
  transform: translateY(-1px);
  border-color: var(--bb-grey-muted);
  box-shadow: var(--bb-shadow-sm);
}

.task-card:active {
  cursor: grabbing;
}

.task-card.dragging {
  opacity: 0.45;
  transform: scale(0.97);
}

/* Priority dots in white canvas context */
.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.task-domain-tag {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bb-red); /* High constraint accent color */
}

/* Active Priority Dots - Sparing red only for high constraint */
.priority-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background-color: var(--bb-divider);
}

.priority-high .priority-dot {
  background-color: var(--bb-red);
}

.priority-normal .priority-dot {
  background-color: var(--bb-graphite);
}

.priority-low .priority-dot {
  background-color: var(--bb-grey-muted);
}

.task-title-text {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--bb-graphite);
}

.task-description-text {
  font-size: 0.78rem;
  color: var(--bb-grey-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(10, 10, 10, 0.04);
  padding-top: 0.5rem;
  margin-top: 0.25rem;
  font-size: 0.72rem;
  color: var(--bb-grey-muted);
}

.task-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Detailed Modal Styles: White Glassmorphism backdrop */
dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 650px;
  width: 90%;
  margin: auto;
  border-radius: var(--bb-radius);
  box-shadow: var(--bb-shadow-md);
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 250ms cubic-bezier(0.16, 1, 0.3, 1), transform 250ms cubic-bezier(0.16, 1, 0.3, 1), display 250ms cubic-bezier(0.16, 1, 0.3, 1) allow-discrete;
}

dialog[open] {
  opacity: 1;
  transform: translateY(0);
}

@starting-style {
  dialog[open] {
    opacity: 0;
    transform: translateY(15px);
  }
}

dialog::backdrop {
  background-color: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 250ms cubic-bezier(0.16, 1, 0.3, 1), display 250ms cubic-bezier(0.16, 1, 0.3, 1) allow-discrete;
}

dialog[open]::backdrop {
  opacity: 1;
}

@starting-style {
  dialog[open]::backdrop {
    opacity: 0;
  }
}

.modal-wrapper {
  background-color: var(--bb-white);
  border: 1px solid var(--bb-divider);
  border-radius: var(--bb-radius);
  padding: 2.5rem;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--bb-red);
  letter-spacing: 0.15em;
}

/* Borderless luxurious inputs */
.borderless-input, .borderless-textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--bb-graphite);
  font-family: var(--bb-font-sans);
  transition: border-color var(--bb-transition);
}

.borderless-input:focus, .borderless-textarea:focus {
  outline: none;
  border-bottom-color: var(--bb-divider);
}

.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.title-input {
  font-family: var(--bb-font-serif);
  font-size: 2rem;
  font-weight: 300;
  padding: 0.4rem 0;
}

.desc-input {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--bb-graphite);
  resize: vertical;
  padding: 0.4rem 0;
}

.modal-divider {
  border: 0;
  height: 1px;
  background-color: var(--bb-divider);
  margin: 1.5rem 0;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bb-grey-muted);
  font-weight: 600;
}

.field-input {
  border-bottom: 1px solid var(--bb-divider) !important;
  padding: 0.4rem 0;
  font-size: 0.9rem;
}

.field-input:focus {
  border-bottom-color: var(--bb-red) !important;
}

select.field-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%238E8E8E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.2rem center;
  padding-right: 1.5rem;
}

/* Collaborative Timeline and Comments Area */
.collab-workspace {
  margin-top: 1.5rem;
  border: 1px solid var(--bb-divider);
  border-radius: var(--bb-radius);
  background-color: var(--bb-canvas);
}

.collab-tabs {
  border-bottom: 1px solid var(--bb-divider);
  padding: 0.75rem 1.25rem;
}

.collab-tab-header {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--bb-graphite);
  letter-spacing: 0.08em;
}

.collab-logs-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 1.25rem;
  max-height: 250px;
  overflow-y: auto;
}

.log-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.log-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bb-grey-muted);
  border-bottom: 1px solid var(--bb-divider);
  padding-bottom: 0.25rem;
}

/* Timeline Log list */
.timeline-log-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--bb-graphite);
}

.timeline-item {
  line-height: 1.4;
  padding-left: 0.75rem;
  border-left: 1px solid var(--bb-red);
}

.timeline-time {
  color: var(--bb-grey-muted);
  font-size: 0.68rem;
  display: block;
}

/* Comments section */
.comment-composer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.comment-textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.5rem;
  border: 1px solid var(--bb-divider);
  background-color: var(--bb-white);
  font-family: var(--bb-font-sans);
  font-size: 0.8rem;
  resize: none;
  outline: none;
}

.comment-textarea:focus {
  border-color: var(--bb-red);
}

.comments-log-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.50rem;
  font-size: 0.78rem;
  overflow-y: auto;
}

.comment-item {
  background-color: var(--bb-white);
  padding: 0.6rem;
  border: 1px solid var(--bb-divider);
  border-radius: var(--bb-radius);
  line-height: 1.4;
}

.comment-meta {
  font-size: 0.68rem;
  color: var(--bb-grey-muted);
  margin-bottom: 0.2rem;
  display: block;
  font-weight: 500;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
}

.right-actions {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}

/* Share Board Modal content */
.share-content {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.share-title {
  font-family: var(--bb-font-serif);
  font-size: 1.75rem;
  font-weight: 400;
}

.share-description {
  font-size: 0.85rem;
  color: var(--bb-grey-muted);
}

.add-collab-form {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
}

.flex-1 {
  flex: 1;
}

.align-end {
  margin-bottom: 0.25rem;
}

.collab-modal-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.collab-modal-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  background-color: var(--bb-canvas);
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--bb-divider);
}

.btn-remove-collab {
  background: none;
  border: none;
  color: var(--bb-red);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.share-link-box {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.share-link-readonly {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid var(--bb-divider);
  background-color: var(--bb-canvas);
  color: var(--bb-grey-muted);
  font-family: var(--bb-font-sans);
  font-size: 0.8rem;
  outline: none;
}

/* User Profile Session Selector */
.sidebar-profile {
  margin-bottom: 2rem;
  position: relative;
}

.profile-dropdown-container {
  position: relative;
  margin-top: 0.4rem;
}

.profile-dropdown-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bb-white);
  border: 1px solid var(--bb-divider);
  padding: 0.6rem 0.85rem;
  border-radius: var(--bb-radius);
  font-family: var(--bb-font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--bb-graphite);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--bb-transition);
}

.profile-dropdown-btn:hover {
  border-color: var(--bb-grey-muted);
}

.profile-dot-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4A7A56; /* Success green */
  display: inline-block;
  flex-shrink: 0;
}

.dropdown-arrow {
  margin-left: auto;
  font-size: 0.6rem;
  color: var(--bb-grey-muted);
}

.profile-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--bb-white);
  border: 1px solid var(--bb-divider);
  border-radius: var(--bb-radius);
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
  z-index: 100;
  box-shadow: var(--bb-shadow-md);
  display: none; /* Toggled in JS */
}

.profile-dropdown-list.show {
  display: block;
}

.profile-dropdown-list li {
  padding: 0.5rem 0.85rem;
  font-size: 0.78rem;
  color: var(--bb-grey-muted);
  cursor: pointer;
  transition: all var(--bb-transition);
}

.profile-dropdown-list li:hover {
  background-color: var(--bb-canvas);
  color: var(--bb-graphite);
}

.profile-dropdown-list li.active {
  color: var(--bb-graphite);
  font-weight: 600;
  background-color: rgba(10, 10, 10, 0.03);
}

/* Access Control Matrix Modal & Table Elements */
.max-w-lg {
  max-width: 850px !important; /* Wide table workspace */
}

.table-container {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--bb-divider);
  border-radius: var(--bb-radius);
  background-color: var(--bb-canvas);
  margin-top: 0.5rem;
  scrollbar-width: none;
}

.table-container::-webkit-scrollbar {
  display: none;
}

.access-matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-family: var(--bb-font-sans);
  font-size: 0.82rem;
}

.access-matrix-table th {
  background-color: var(--bb-white);
  color: var(--bb-grey-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bb-divider);
  white-space: nowrap;
}

.access-matrix-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--bb-divider);
  color: var(--bb-graphite);
  vertical-align: middle;
}

.access-matrix-table tr:last-child td {
  border-bottom: none;
}

.access-matrix-table tr:hover td {
  background-color: rgba(10, 10, 10, 0.01);
}

.access-matrix-table input[type="checkbox"] {
  accent-color: var(--bb-red);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.matrix-form {
  flex-flow: row wrap !important;
  align-items: flex-end;
  gap: 1rem;
}

.matrix-form .form-group {
  flex: 1 1 200px;
  margin-bottom: 0;
}

/* Zero-Spill Layout Guard */
.task-title-text,
.task-description-text,
.comment-item p,
.comment-item,
.timeline-item,
.share-description {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .cabinet-sidebar {
    width: 240px;
  }
  .board-grid {
    grid-template-columns: repeat(2, 1fr);
    overflow-y: auto;
  }
  .board-column {
    height: 500px;
    border-right: none;
    border-bottom: 1px solid var(--bb-divider);
    padding-bottom: 1.5rem;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .cabinet-layout {
    flex-direction: column;
  }
  .cabinet-sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--bb-divider);
  }
  .main-content {
    padding: 1.5rem;
  }
  .board-grid {
    grid-template-columns: 1fr;
  }
  .meta-grid {
    grid-template-columns: 1fr;
  }
  .collab-logs-container {
    grid-template-columns: 1fr;
    max-height: 400px;
  }
  .add-collab-form {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ==========================================================================
   Gatekeeper Lock Screen & Inscription System Styles
   ========================================================================== */

.gatekeeper-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #FFFFFF;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.gatekeeper-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.gatekeeper-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  max-width: 440px;
  width: 90%;
  text-align: center;
  padding: 3rem;
  background-color: #FFFFFF;
  border-radius: var(--bb-radius);
  animation: gatekeeper-fade-in 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gatekeeper-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gatekeeper-brand .brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--bb-red);
  letter-spacing: 0.25em;
  display: block;
  margin-bottom: 0.5rem;
}

.gatekeeper-brand .gatekeeper-title {
  font-family: var(--bb-font-serif);
  font-size: 2.25rem;
  font-weight: 300;
  color: var(--bb-graphite);
  line-height: 1.2;
}

.gatekeeper-brand .gatekeeper-title.text-danger {
  color: var(--bb-red);
}

/* Biometric Ring Architecture */
.biometric-container {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.5rem 0;
}

.biometric-ring {
  position: absolute;
  border: 1px solid rgba(10, 10, 10, 0.06);
  border-radius: 50%;
  transition: border-color var(--bb-transition);
}

.ring-1 {
  width: 100%;
  height: 100%;
  animation: pulse-ring-slow 12s linear infinite;
}

.ring-2 {
  width: 80%;
  height: 80%;
  animation: pulse-ring-medium 9s linear infinite reverse;
}

.ring-3 {
  width: 60%;
  height: 60%;
  animation: pulse-ring-fast 6s linear infinite;
}

.biometric-icon {
  width: 40px;
  height: 40px;
  color: var(--bb-graphite);
  z-index: 2;
  transition: color 400ms ease, transform 400ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.biometric-icon svg {
  width: 100%;
  height: 100%;
}

/* Animating biometric pulses on Authenticating */
.biometric-container.pulse-anim .biometric-ring {
  border-color: var(--bb-red);
  animation-duration: 0.4s !important;
}

.biometric-container.pulse-anim .biometric-icon {
  color: var(--bb-red);
  transform: scale(1.15);
  animation: pulse-biometric-icon 1.2s ease-in-out infinite;
}

.gatekeeper-status {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--bb-grey-muted);
  font-weight: 600;
}

/* Invitation Screen Details Box */
.invite-details-box {
  background-color: var(--bb-canvas);
  border: 1px solid var(--bb-divider);
  padding: 1.25rem 1.5rem;
  border-radius: var(--bb-radius);
  text-align: left;
  width: 100%;
}

.invite-msg {
  font-size: 0.82rem;
  color: var(--bb-graphite);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.authorized-boards-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-left: 0.5rem;
}

.authorized-boards-list li {
  font-family: var(--bb-font-serif);
  font-size: 1.15rem;
  color: var(--bb-graphite);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.authorized-boards-list li::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  background-color: var(--bb-red);
  border-radius: 50%;
}

/* Error View Styles */
.error-details-box {
  border-top: 1px solid var(--bb-divider);
  border-bottom: 1px solid var(--bb-divider);
  padding: 1.5rem 0;
  width: 100%;
}

.error-msg {
  font-family: var(--bb-font-serif);
  font-size: 1.35rem;
  color: var(--bb-graphite);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.error-subtext {
  font-size: 0.8rem;
  color: var(--bb-grey-muted);
  line-height: 1.6;
}

.error-icon-box {
  width: 60px;
  height: 60px;
  margin: 0.5rem 0;
}

.error-cross-svg {
  width: 100%;
  height: 100%;
}

/* Biometric Keyframe Animations */
@keyframes pulse-ring-slow {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.02); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes pulse-ring-medium {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(-180deg) scale(0.98); }
  100% { transform: rotate(-360deg) scale(1); }
}

@keyframes pulse-ring-fast {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.03); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes pulse-biometric-icon {
  0%, 100% { transform: scale(1.15); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.6; }
}

/* ==========================================================================
   Weekly Calendar & Workspace Switcher Styles
   ========================================================================== */

.calendar-view-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
  overflow: hidden;
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.calendar-week-label {
  font-family: var(--bb-font-serif);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--bb-graphite);
  margin-left: 1rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
  flex: 1;
  overflow: hidden;
  height: 100%;
}

.calendar-day-column {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-right: 1px solid var(--bb-divider);
  padding-right: 0.5rem;
  overflow: hidden;
}

.calendar-day-column:last-child {
  border-right: none;
  padding-right: 0;
}

.calendar-day-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--bb-divider);
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.calendar-day-header .day-name {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--bb-grey-muted);
  letter-spacing: 0.1em;
  font-weight: 600;
}

.calendar-day-header .day-number {
  font-family: var(--bb-font-serif);
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--bb-graphite);
}

.calendar-day-cell {
  flex: 1;
  overflow-y: auto;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 1rem;
}

.calendar-day-cell.drag-over {
  background-color: var(--bb-canvas);
  border: 1px dashed var(--bb-red) !important;
}

/* View toggle button styles */
.view-toggle-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.view-toggle-btn {
  background: none;
  border: none;
  font-family: var(--bb-font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bb-grey-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color var(--bb-transition);
}

.view-toggle-btn:hover {
  color: var(--bb-graphite);
}

.view-toggle-btn.active {
  color: var(--bb-red);
  font-weight: 600;
}

.view-toggle-divider {
  color: var(--bb-divider);
  font-size: 0.8rem;
}

/* Workspace badge for Master Calendar view */
.task-workspace-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bb-grey-muted);
  margin-top: 0.1rem;
  display: block;
}

