/* ==========================================================================
   KISTER TEAMS - MICROSOFT TEAMS DESIGN SYSTEM & STYLESHEET
   Features: Planner, Calendar, Shift Clock-In, Notes, and Single-Profile System
   ========================================================================== */

:root {
  /* Microsoft Teams Core Color Palette */
  --teams-purple: #5B5FC7;
  --teams-purple-hover: #7075e8;
  --teams-purple-active: #4F52B2;
  --teams-purple-subtle: rgba(91, 95, 199, 0.16);
  --teams-purple-glow: rgba(91, 95, 199, 0.35);

  --kister-blue: #2340FF;
  --kister-cyan: #00B8D4;

  /* Teams Dark Theme Canvas Tokens */
  --bg-shell: #141414;
  --bg-rail: #121212;
  --bg-header: #1F1F1F;
  --bg-canvas: #1F1F1F;
  --bg-surface: #292929;
  --bg-card: #2D2D2D;
  --bg-card-hover: #333333;
  --bg-input: #181818;
  --bg-modal: #242424;

  /* Typography Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #D1D1D1;
  --text-muted: #9E9E9E;
  --text-disabled: #666666;

  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-focus: #5B5FC7;

  /* Status Colors */
  --status-available: #107C41;
  --status-busy: #C4314B;
  --status-away: #F7630C;
  --status-offline: #8A8886;

  /* Accents */
  --accent-todo: #0F6CBD;
  --accent-inprogress: #D83B01;
  --accent-review: #8E44AD;
  --accent-done: #107C41;

  /* Dimensions & Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(91, 95, 199, 0.3);

  --font-main: "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;
}

/* Light Theme Variables */
body.theme-light {
  --bg-shell: #EBEBEB;
  --bg-rail: #E1E1E1;
  --bg-header: #FFFFFF;
  --bg-canvas: #F5F5F5;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8F9FA;
  --bg-input: #FFFFFF;
  --bg-modal: #FFFFFF;

  --text-primary: #242424;
  --text-secondary: #424242;
  --text-muted: #616161;
  --text-disabled: #A19F9D;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.16);

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-main);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* App Shell Layout */
.teams-shell {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ==========================================================================
   TOPBAR HEADER (MICROSOFT TEAMS STYLE)
   ========================================================================== */
.teams-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 16px;
  user-select: none;
  z-index: 100;
}

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

.brand-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.brand-mark-img {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-xs);
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.brand-name {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.8px;
  color: var(--text-primary);
}

.brand-product {
  font-weight: 500;
  font-size: 11px;
  color: var(--teams-purple-hover);
  letter-spacing: 1px;
}

.topbar-nav-arrows {
  display: flex;
  gap: 4px;
}

.icon-btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.icon-btn-ghost:hover {
  background: var(--border-subtle);
  color: var(--text-primary);
}

/* Global Search Bar */
.topbar-center {
  flex: 1;
  max-width: 520px;
  margin: 0 20px;
}

.teams-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 32px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.teams-search-bar:focus-within {
  border-color: var(--teams-purple);
  box-shadow: 0 0 0 1px var(--teams-purple);
}

.teams-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
}

.teams-search-bar input::placeholder {
  color: var(--text-muted);
}

.search-icon {
  color: var(--text-muted);
}

.search-shortcut {
  font-size: 10px;
  background: var(--border-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Topbar Right Controls */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-clock-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 12px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.pulse-dot.on {
  background: var(--status-available);
  box-shadow: 0 0 8px var(--status-available);
  animation: pulse 2s infinite;
}

.pulse-dot.break {
  background: var(--status-away);
  box-shadow: 0 0 8px var(--status-away);
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.shift-state-text {
  font-weight: 500;
  color: var(--text-secondary);
}

.shift-timer-small {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

.host-sync-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 4px 8px;
  background: rgba(16, 124, 65, 0.15);
  border: 1px solid rgba(16, 124, 65, 0.3);
  border-radius: var(--radius-sm);
  color: #4ade80;
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 8px 2px 2px;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.profile-pill:hover {
  background: var(--border-subtle);
  border-color: var(--border-medium);
}

.user-avatar-badge {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.status-indicator-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--bg-header);
}

.status-indicator-dot.available { background-color: var(--status-available); }
.status-indicator-dot.busy { background-color: var(--status-busy); }
.status-indicator-dot.away { background-color: var(--status-away); }
.status-indicator-dot.offline { background-color: var(--status-offline); }

.profile-pill-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.profile-name {
  font-size: 12px;
  font-weight: 600;
}

.profile-role {
  font-size: 10px;
  color: var(--text-muted);
}

/* ==========================================================================
   APP RAIL (LEFT NAVIGATION BAR)
   ========================================================================== */
.teams-body {
  display: flex;
  flex: 1;
  height: calc(100vh - 48px);
  overflow: hidden;
}

.teams-app-rail {
  width: 68px;
  background-color: var(--bg-rail);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  z-index: 50;
  flex-shrink: 0;
}

.rail-top, .rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 4px;
}

.rail-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s ease;
  padding: 4px 0;
}

.rail-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background-color: var(--teams-purple);
  opacity: 0;
  transform: scaleY(0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.rail-item:hover {
  color: var(--text-primary);
  background: var(--border-subtle);
}

.rail-item.active {
  color: var(--teams-purple-hover);
  background: var(--teams-purple-subtle);
}

.rail-item.active::before {
  opacity: 1;
  transform: scaleY(1);
}

.rail-icon-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 26px;
}

.rail-badge-dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #107C41;
  box-shadow: 0 0 6px #107C41;
}

.rail-label {
  font-size: 10px;
  font-weight: 500;
  margin-top: 3px;
  letter-spacing: -0.1px;
}

.rail-item-compact {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.rail-item-compact:hover {
  background: var(--border-subtle);
  color: var(--text-primary);
}

/* ==========================================================================
   MAIN CONTENT VIEW PANELS
   ========================================================================== */
.teams-content {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  background-color: var(--bg-canvas);
  position: relative;
}

.view-panel {
  display: none;
  flex-direction: column;
  height: 100%;
  padding: 24px 32px;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.view-panel.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Common View Header */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.title-with-icon {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.header-icon-badge.purple { background: rgba(91, 95, 199, 0.18); color: var(--teams-purple-hover); }
.header-icon-badge.blue { background: rgba(35, 64, 255, 0.18); color: #60a5fa; }
.header-icon-badge.green { background: rgba(16, 124, 65, 0.18); color: #4ade80; }
.header-icon-badge.amber { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }

.view-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.view-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.view-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.btn-primary {
  background-color: var(--teams-purple);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--teams-purple-hover);
  box-shadow: 0 4px 12px var(--teams-purple-glow);
}

.btn-secondary {
  background-color: var(--bg-surface);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

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

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* Filter Chips */
.filter-pill-group {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.filter-chip {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip.active {
  background: var(--teams-purple);
  color: #FFFFFF;
}

/* ==========================================================================
   VIEW 1: PLANNER (MICROSOFT TEAMS STYLE BOARDS)
   ========================================================================== */
.planner-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(280px, 1fr));
  gap: 16px;
  flex: 1;
  overflow-x: auto;
  padding-bottom: 16px;
}

.planner-column {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 160px);
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.column-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.column-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-todo { background: var(--accent-todo); }
.dot-inprogress { background: var(--accent-inprogress); }
.dot-review { background: var(--accent-review); }
.dot-done { background: var(--accent-done); }

.column-title {
  font-size: 14px;
  font-weight: 600;
}

.task-count-badge {
  font-size: 11px;
  background: var(--border-subtle);
  padding: 2px 6px;
  border-radius: 10px;
  color: var(--text-muted);
}

.add-task-mini-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}

.add-task-mini-btn:hover {
  background: var(--border-subtle);
  color: var(--text-primary);
}

.column-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  overflow-y: auto;
  flex: 1;
}

/* Task Card */
.task-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

.task-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.priority-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
}

.priority-pill.urgent { background: rgba(196, 49, 75, 0.2); color: #f87171; border: 1px solid rgba(196, 49, 75, 0.4); }
.priority-pill.important { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.priority-pill.medium { background: rgba(91, 95, 199, 0.2); color: #818cf8; border: 1px solid rgba(91, 95, 199, 0.4); }
.priority-pill.low { background: rgba(100, 116, 139, 0.2); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.4); }

.task-menu-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
}

.task-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.task-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.task-tag {
  font-size: 10px;
  background: var(--border-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
}

.task-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-muted);
}

.due-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.task-move-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 4px;
  outline: none;
}

/* ==========================================================================
   VIEW 2: CALENDAR (INTERACTIVE SCHEDULING & SHIFTS)
   ========================================================================== */
.calendar-workspace {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
  flex: 1;
}

.calendar-grid-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.calendar-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(84px, 1fr);
  gap: 6px;
  padding-top: 10px;
  flex: 1;
}

.cal-day-cell {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 6px;
  display: flex;
  flex-direction: column;
  transition: all 0.15s ease;
  cursor: pointer;
  overflow: hidden;
}

.cal-day-cell:hover {
  border-color: var(--teams-purple);
  background: var(--bg-card-hover);
}

.cal-day-cell.other-month {
  opacity: 0.35;
}

.cal-day-cell.today {
  border-color: var(--teams-purple);
  box-shadow: 0 0 0 1px var(--teams-purple);
}

.cal-day-number {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.cal-day-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}

.cal-event-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-event-pill.meeting { background: rgba(91, 95, 199, 0.25); color: #c7d2fe; border-left: 2px solid var(--teams-purple); }
.cal-event-pill.shift { background: rgba(16, 124, 65, 0.25); color: #bbf7d0; border-left: 2px solid #107c41; }
.cal-event-pill.review { background: rgba(142, 68, 173, 0.25); color: #e9d5ff; border-left: 2px solid #a855f7; }
.cal-event-pill.deadline { background: rgba(220, 38, 38, 0.25); color: #fecaca; border-left: 2px solid #ef4444; }

/* Side Agenda Panel */
.calendar-side-agenda {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.side-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.side-card-header h3 {
  font-size: 15px;
  font-weight: 600;
}

.date-badge {
  font-size: 11px;
  background: var(--teams-purple-subtle);
  color: var(--teams-purple-hover);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.agenda-events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.agenda-event-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.agenda-event-time {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.agenda-event-title {
  font-size: 13px;
  font-weight: 600;
}

.agenda-event-meta {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ==========================================================================
   VIEW 3: CLOCK IN (ATTENDANCE & TIME TRACKING SYSTEM)
   ========================================================================== */
.clockin-dashboard-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
}

.shift-summary-pills {
  display: flex;
  gap: 12px;
}

.summary-pill {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  text-align: right;
}

.summary-pill .pill-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.summary-pill .pill-val {
  font-size: 15px;
  font-weight: 700;
}

.summary-pill .pill-val.highlight {
  color: #4ade80;
}

.clockin-terminal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-status-banner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator-ring {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--text-muted);
}

.status-indicator-ring.on {
  border-color: var(--status-available);
  background: var(--status-available);
  box-shadow: 0 0 10px var(--status-available);
}

.status-indicator-ring.break {
  border-color: var(--status-away);
  background: var(--status-away);
  box-shadow: 0 0 10px var(--status-away);
}

.status-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.current-time-clock {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
}

/* Big Live Stopwatch */
.stopwatch-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 30px 10px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
}

.stopwatch-digits {
  font-family: var(--font-mono);
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text-primary);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.stopwatch-caption {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Terminal Actions */
.terminal-actions {
  display: flex;
  gap: 12px;
}

.btn-punch-in {
  flex: 1;
  background: #107C41;
  color: #FFFFFF;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
}

.btn-punch-in:hover {
  background: #15803d;
  box-shadow: 0 4px 14px rgba(16, 124, 65, 0.4);
}

.btn-break {
  flex: 1;
  background: #BC4B09;
  color: #FFFFFF;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
}

.btn-break:hover {
  background: #9a3412;
}

.btn-punch-out {
  flex: 1;
  background: #C4314B;
  color: #FFFFFF;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
}

.btn-punch-out:hover {
  background: #b91c1c;
  box-shadow: 0 4px 14px rgba(196, 49, 75, 0.4);
}

.active-shift-details {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.meta-label {
  color: var(--text-muted);
}

.meta-value {
  font-weight: 600;
}

/* History Card */
.clockin-history-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.history-table-container {
  overflow-x: auto;
  flex: 1;
}

.teams-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.teams-table th {
  background: var(--bg-card);
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.teams-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.teams-table tr:hover td {
  background: var(--bg-card-hover);
}

.badge-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.badge-status.completed {
  background: rgba(16, 124, 65, 0.2);
  color: #4ade80;
}

/* ==========================================================================
   VIEW 4: NOTES WORKSPACE
   ========================================================================== */
.notes-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  height: 34px;
}

.notes-search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
}

.notes-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  align-content: start;
}

.note-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.note-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-medium);
}

.note-card.pinned {
  border-top: 3px solid var(--teams-purple);
}

.note-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.note-category-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--border-subtle);
  color: var(--text-secondary);
}

.note-actions-btn-group {
  display: flex;
  gap: 4px;
}

.note-action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}

.note-action-btn:hover {
  color: var(--text-primary);
  background: var(--border-subtle);
}

.note-card-title {
  font-size: 15px;
  font-weight: 700;
}

.note-card-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 180px;
  overflow-y: auto;
}

.note-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   VIEW 5: PROFILE & SETTINGS (SINGLE PROFILE OVERWRITE GUARANTEED)
   ========================================================================== */
.profile-layout-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.profile-preview-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.avatar-large-wrapper {
  position: relative;
  margin-bottom: 16px;
}

.avatar-large {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: #FFFFFF;
  box-shadow: var(--shadow-md);
  transition: background-color 0.2s ease;
}

.status-indicator-dot-large {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 4px solid var(--bg-surface);
}

.status-indicator-dot-large.available { background-color: var(--status-available); }
.status-indicator-dot-large.busy { background-color: var(--status-busy); }
.status-indicator-dot-large.away { background-color: var(--status-away); }
.status-indicator-dot-large.offline { background-color: var(--status-offline); }

.profile-preview-name {
  font-size: 18px;
  font-weight: 700;
}

.profile-preview-role {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.profile-preview-dept {
  font-size: 11px;
  background: var(--border-subtle);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-muted);
  margin-top: 6px;
}

.profile-status-quote-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 16px 0;
  width: 100%;
  position: relative;
  font-size: 12px;
  font-style: italic;
  color: var(--text-secondary);
}

.quote-icon {
  font-size: 20px;
  color: var(--teams-purple-hover);
  line-height: 0;
  position: absolute;
  top: 10px;
  left: 8px;
}

.avatar-color-selector {
  width: 100%;
  margin-top: 8px;
  text-align: left;
}

.avatar-color-selector label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.color-swatches {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.swatch:hover {
  transform: scale(1.15);
}

.swatch.active {
  border-color: #FFFFFF;
  box-shadow: 0 0 0 2px var(--teams-purple);
}

.profile-sync-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(91, 95, 199, 0.1);
  border: 1px solid rgba(91, 95, 199, 0.25);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-top: 18px;
  text-align: left;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-secondary);
}

/* Profile Form Card */
.profile-form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.form-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid-3col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--teams-purple);
  box-shadow: 0 0 0 1px var(--teams-purple);
}

.form-actions-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.save-status-msg {
  font-size: 12px;
  font-weight: 600;
  color: #4ade80;
}

/* ==========================================================================
   MODAL DIALOGS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  background: var(--bg-modal);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

form {
  padding: 20px 24px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

/* Custom Checkbox */
.checkbox-group {
  margin: 10px 0;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
}

.custom-checkbox input {
  accent-color: var(--teams-purple);
  width: 16px;
  height: 16px;
}

/* Toast System */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-left: 4px solid var(--teams-purple);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: slideToast 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes slideToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   ROLE BADGES & MULTI-USER STYLES
   ========================================================================== */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.role-badge.admin {
  background: rgba(35, 64, 255, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(35, 64, 255, 0.4);
}

.role-badge.manager {
  background: rgba(91, 95, 199, 0.2);
  color: #c7d2fe;
  border: 1px solid rgba(91, 95, 199, 0.4);
}

.role-badge.member {
  background: rgba(16, 124, 65, 0.2);
  color: #86efac;
  border: 1px solid rgba(16, 124, 65, 0.4);
}

.profile-role-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.profile-email-sub {
  font-size: 10px;
  color: var(--text-muted);
}

.switch-user-btn {
  gap: 6px;
  padding: 4px 10px;
  font-size: 11px;
}

.rail-admin-indicator {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--teams-purple);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* ==========================================================================
   VIEW 5: TEAM & USER ADMINISTRATION
   ========================================================================== */
.current-privilege-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
}

.privilege-text {
  color: var(--text-secondary);
  font-weight: 500;
}

.team-management-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.team-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.team-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.stat-number.admin-text { color: #60a5fa; }
.stat-number.manager-text { color: #c7d2fe; }
.stat-number.member-text { color: #86efac; }

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.team-table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.table-heading {
  font-size: 16px;
  font-weight: 600;
}

.privilege-notice {
  font-size: 12px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.team-table-wrapper {
  overflow-x: auto;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
}

.user-name-title {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-cell-name {
  font-weight: 600;
  color: var(--text-primary);
}

.user-cell-title {
  font-size: 11px;
  color: var(--text-muted);
}

.role-select-compact {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  outline: none;
}

.role-select-compact:focus {
  border-color: var(--teams-purple);
}

.modal-title-with-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.input-helper {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.highlight-input input {
  border-color: var(--teams-purple) !important;
  background: rgba(91, 95, 199, 0.08) !important;
}

/* User Switcher Modal */
.user-switcher-modal {
  max-width: 580px;
}

.user-switcher-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.switcher-lead {
  font-size: 13px;
  color: var(--text-secondary);
}

.quick-accounts-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
  padding: 2px;
}

.account-card-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  color: inherit;
  font-family: inherit;
}

.account-card-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--teams-purple);
  transform: translateY(-1px);
}

.account-card-btn.active {
  border-color: var(--teams-purple);
  box-shadow: 0 0 0 1px var(--teams-purple);
  background: var(--teams-purple-subtle);
}

.account-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.account-meta-name {
  font-size: 13px;
  font-weight: 600;
}

.account-meta-email {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 4px 0;
}

.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.or-divider span {
  padding: 0 10px;
}

.login-subform {
  padding: 0;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .calendar-workspace,
  .clockin-dashboard-grid,
  .profile-layout-grid {
    grid-template-columns: 1fr;
  }
  .form-grid-2col {
    grid-template-columns: 1fr;
  }
  .planner-board {
    grid-template-columns: repeat(4, 260px);
  }
}

/* ==========================================================================
   PROJECT & ASSIGNEE SUBSYSTEM STYLES
   ========================================================================== */

/* Task Card Header Left (Priority + Project Pill) */
.task-card-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Project Badge Pill on Task Card */
.task-project-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(91, 95, 199, 0.14);
  color: #a5b4fc;
  border: 1px solid rgba(91, 95, 199, 0.28);
  white-space: nowrap;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.1px;
}

.project-pill-icon {
  font-size: 10px;
}

/* Task Card Footer Left (Due Date + Assignee Stack) */
.task-card-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Assignee Avatar Stack */
.card-assignees-stack {
  display: flex;
  align-items: center;
  margin-left: 2px;
}

.card-assignee-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
  margin-left: -6px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, z-index 0.2s ease;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.card-assignees-stack .card-assignee-avatar:first-child {
  margin-left: 0;
}

.card-assignee-avatar:hover {
  transform: scale(1.3) translateY(-2px);
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
}

.card-assignee-more {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
  margin-left: -6px;
  cursor: default;
}

/* Unassigned Quick Button */
.card-unassigned-btn {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px dashed var(--border-medium);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-unassigned-btn:hover {
  border-color: var(--teams-purple-hover);
  color: #FFFFFF;
  background: var(--teams-purple-subtle);
  transform: translateY(-1px);
}

/* Planner Header Filter Selects */
.planner-filter-select-wrap {
  display: flex;
  align-items: center;
}

.planner-select-filter {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.planner-select-filter:hover {
  border-color: var(--teams-purple);
  color: #FFFFFF;
  background: var(--bg-card-hover);
}

.planner-select-filter:focus {
  border-color: var(--teams-purple-hover);
  box-shadow: 0 0 0 2px rgba(91, 95, 199, 0.3);
}

/* Quick Action Text Buttons */
.assign-quick-actions {
  display: flex;
  gap: 6px;
}

.btn-text-action {
  background: transparent;
  border: none;
  font-size: 11px;
  color: var(--teams-purple-hover);
  font-weight: 600;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.btn-text-action:hover {
  background: var(--teams-purple-subtle);
  color: #FFFFFF;
}

/* Assignee Selector Grid in Task Modal */
.assignee-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 190px;
  overflow-y: auto;
  padding: 2px;
  margin-top: 4px;
}

.assignee-select-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.assignee-select-chip:hover {
  background: var(--bg-card-hover);
  border-color: rgba(91, 95, 199, 0.4);
  transform: translateY(-1px);
}

.assignee-select-chip.selected {
  background: rgba(91, 95, 199, 0.18);
  border-color: var(--teams-purple);
  box-shadow: 0 0 10px rgba(91, 95, 199, 0.25);
}

.assignee-chip-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.assignee-chip-meta {
  flex: 1;
  min-width: 0;
}

.assignee-chip-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assignee-chip-role {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
}

.assignee-chip-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.assignee-select-chip.selected .assignee-chip-check {
  background: #107C41;
  color: #FFFFFF;
}

.assignee-select-chip:not(.selected) .assignee-chip-check {
  color: var(--text-muted);
  border: 1px dashed var(--border-medium);
}

/* Team Directory Assigned Projects Cell */
.team-assigned-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-assigned-projects {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.project-mini-tag {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  background: rgba(91, 95, 199, 0.14);
  color: #a5b4fc;
  border: 1px solid rgba(91, 95, 199, 0.28);
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}

.team-assigned-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.team-assigned-count.active {
  color: #4ade80;
  font-weight: 600;
}

/* ==========================================================================
   DYNAMIC UI ANIMATIONS & MICRO-INTERACTIONS
   ========================================================================== */

/* Urgent Task Glowing Pulse */
.priority-urgent-card {
  border-left: 3px solid #C4314B !important;
  animation: urgentCardGlow 3s ease-in-out infinite;
}

@keyframes urgentCardGlow {
  0%, 100% {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  }
  50% {
    box-shadow: 0 4px 18px rgba(196, 49, 75, 0.35);
    border-color: rgba(196, 49, 75, 0.6);
  }
}

/* Task Card Hover & Entrance Animation */
.task-card {
  animation: cardSpringIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.task-card:hover {
  transform: translateY(-4px) scale(1.008);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 16px rgba(91, 95, 199, 0.25);
  border-color: rgba(91, 95, 199, 0.5);
}

@keyframes cardSpringIn {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Stagger animation for notes */
.note-card {
  animation: cardSpringIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.note-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Tactile Button Feedback */
.btn:active, .rail-item:active, .account-card-btn:active, .filter-chip:active {
  transform: scale(0.96) !important;
}

/* Rail Item Micro-animations */
.rail-item {
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.rail-item:hover {
  transform: translateX(2px);
}

.rail-item:hover .rail-icon-box {
  transform: scale(1.08);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modal Spring Overshoot & Backdrop Blur */
.modal-backdrop {
  backdrop-filter: blur(10px) !important;
  animation: backdropFadeIn 0.2s ease forwards;
}

.modal-card {
  animation: modalSpring 0.35s cubic-bezier(0.34, 1.45, 0.64, 1) forwards;
}

@keyframes backdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalSpring {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* View Panel Transition */
.view-panel.active {
  animation: viewTransitionSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes viewTransitionSlide {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Live Active Clock-In Pulse Waves */
.pulse-dot.on {
  box-shadow: 0 0 0 0 rgba(16, 124, 65, 0.8);
  animation: liveWavePulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes liveWavePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 124, 65, 0.8);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(16, 124, 65, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 124, 65, 0);
  }
}

/* Toast Spring Slide-In */
.toast {
  animation: toastSpring 0.35s cubic-bezier(0.34, 1.45, 0.64, 1) forwards;
}

@keyframes toastSpring {
  from {
    opacity: 0;
    transform: translateX(80px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* ==========================================================================
   ANALYTICS SUBSYSTEM: PROJECT COMPLETION & DELIVERY METRICS
   ========================================================================== */

/* Top Summary KPI Metrics Grid */
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.kpi-metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.kpi-metric-card.highlight-card {
  background: linear-gradient(145deg, rgba(31, 31, 36, 0.95), rgba(40, 36, 60, 0.7));
  border-color: rgba(91, 95, 199, 0.4);
  box-shadow: 0 4px 20px rgba(91, 95, 199, 0.15);
}

.kpi-metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.kpi-metric-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-metric-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.kpi-metric-badge.green {
  background: rgba(16, 124, 65, 0.2);
  color: #4ade80;
  border: 1px solid rgba(16, 124, 65, 0.4);
}

.kpi-metric-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-metric-icon-wrap.purple {
  background: rgba(91, 95, 199, 0.18);
  color: #a5b4fc;
}

.kpi-metric-icon-wrap.blue {
  background: rgba(35, 64, 255, 0.18);
  color: #60a5fa;
}

.kpi-metric-icon-wrap.green {
  background: rgba(16, 124, 65, 0.18);
  color: #4ade80;
}

.kpi-metric-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 12px 0 8px 0;
}

.kpi-metric-number {
  font-size: 32px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.5px;
  line-height: 1;
}

.kpi-metric-total,
.kpi-metric-unit {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.kpi-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
  margin: 6px 0 10px 0;
}

.kpi-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #107C41, #22c55e);
  border-radius: 3px;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.kpi-progress-bar-fill.purple {
  background: linear-gradient(90deg, var(--teams-purple), #818cf8);
}

.kpi-metric-subtext {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Charts & Breakdown Section */
.analytics-charts-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.analytics-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.chart-card-header {
  margin-bottom: 18px;
}

.chart-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.chart-card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* Donut Chart Container */
.donut-chart-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 24px;
  padding: 8px 0;
}

.donut-svg-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-ring-bg {
  stroke: rgba(255, 255, 255, 0.08);
}

.donut-ring-completed {
  stroke: #107C41;
  transition: stroke-dasharray 0.8s ease, stroke-dashoffset 0.8s ease;
  stroke-linecap: round;
}

.donut-ring-active {
  stroke: var(--teams-purple);
  transition: stroke-dasharray 0.8s ease, stroke-dashoffset 0.8s ease;
  stroke-linecap: round;
}

.donut-center-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.donut-center-number {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
}

.donut-center-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.completed {
  background: #107C41;
  box-shadow: 0 0 8px rgba(16, 124, 65, 0.6);
}

.legend-dot.in-progress {
  background: var(--teams-purple);
  box-shadow: 0 0 8px rgba(91, 95, 199, 0.6);
}

.legend-dot.todo {
  background: rgba(255, 255, 255, 0.3);
}

.legend-text {
  color: var(--text-secondary);
  flex: 1;
}

.legend-val {
  font-weight: 700;
  color: #FFFFFF;
  min-width: 24px;
  text-align: right;
}

/* Team Deliverables List */
.team-contributions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 240px;
  overflow-y: auto;
}

.team-deliverable-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.deliverable-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 140px;
  flex-shrink: 0;
}

.deliverable-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
  flex-shrink: 0;
}

.deliverable-name-wrap {
  overflow: hidden;
}

.deliverable-name {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.deliverable-dept {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.deliverable-bar-wrap {
  flex: 1;
  margin: 0 8px;
}

.deliverable-bar-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.deliverable-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--teams-purple), #818cf8);
  transition: width 0.6s ease;
}

.deliverable-stat {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  width: 48px;
  justify-content: flex-end;
}

.deliverable-label {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
}

/* Detailed Project Cards Section */
.analytics-projects-section {
  margin-top: 10px;
}

.projects-section-header {
  margin-bottom: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.section-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.project-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
}

.analytics-project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.analytics-project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.analytics-project-card.completed {
  border-color: rgba(16, 124, 65, 0.45);
}

.analytics-project-card.in-progress {
  border-color: rgba(91, 95, 199, 0.35);
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.project-title-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.project-emoji {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
}

.project-name-group {
  overflow: hidden;
}

.project-title {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.project-tasks-summary {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
}

.project-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.project-status-badge.status-completed {
  background: rgba(16, 124, 65, 0.2);
  color: #4ade80;
  border: 1px solid rgba(16, 124, 65, 0.4);
}

.project-status-badge.status-in-progress {
  background: rgba(91, 95, 199, 0.18);
  color: #a5b4fc;
  border: 1px solid rgba(91, 95, 199, 0.4);
}

.project-status-badge.status-planning {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.status-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a5b4fc;
  box-shadow: 0 0 8px #a5b4fc;
}

.project-progress-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.progress-pct-label {
  font-weight: 700;
  color: #FFFFFF;
}

.progress-breakdown-mini {
  color: var(--text-muted);
}

.project-progress-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.project-progress-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--teams-purple), #818cf8);
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-progress-bar.completed {
  background: linear-gradient(90deg, #107C41, #22c55e);
}

.project-card-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.project-stat-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 4px;
  text-align: center;
}

.project-stat-pill.done {
  background: rgba(16, 124, 65, 0.12);
  border-color: rgba(16, 124, 65, 0.25);
}

.stat-pill-label {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 2px;
}

.stat-pill-val {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
}

.project-stat-pill.done .stat-pill-val {
  color: #4ade80;
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.project-assignees-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-label {
  font-size: 11px;
  color: var(--text-muted);
}

.unassigned-text {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

.btn-open-in-planner {
  font-size: 12px;
  padding: 5px 10px;
}

.analytics-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Mobile Tabs in Planner View (Desktop Default Hidden) */
.planner-mobile-column-tabs {
  display: none;
}

/* ==========================================================================
   MOBILE & PHONE OPTIMIZATION MEDIA QUERIES (< 768px & < 480px)
   ========================================================================== */

@media (max-width: 768px) {
  /* Layout Flow */
  .teams-shell {
    overflow-x: hidden;
  }

  .teams-body {
    flex-direction: column;
  }

  /* Fixed Native Bottom App Navigation Bar */
  .teams-app-rail {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    height: 62px;
    z-index: 1000;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    background: rgba(24, 24, 28, 0.97) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-right: none !important;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
  }

  .rail-top {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: space-around;
    align-items: center;
    gap: 2px;
  }

  .rail-item {
    flex: 1;
    height: 52px;
    padding: 4px 2px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    border-left: none !important;
    border-bottom: 2px solid transparent;
    min-width: 0;
  }

  .rail-item.active {
    border-bottom: 2px solid var(--teams-purple) !important;
    background: rgba(91, 95, 199, 0.15);
    color: #FFFFFF;
  }

  .rail-icon-box {
    margin-bottom: 2px;
    transform: none !important;
  }

  .rail-icon-box svg {
    width: 20px;
    height: 20px;
  }

  .rail-label {
    font-size: 10px;
    font-weight: 500;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.1;
  }

  .rail-bottom {
    display: none !important;
  }

  .rail-admin-indicator {
    display: none !important;
  }

  /* Main Viewport Content */
  .teams-content {
    padding: 12px 12px 86px 12px !important;
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden;
  }

  /* Compact Mobile Header */
  .teams-topbar {
    padding: 0 10px;
    height: 54px;
  }

  .brand-title {
    font-size: 13px;
    letter-spacing: 0.5px;
  }

  .brand-mark {
    width: 24px;
    height: 24px;
  }

  .topbar-center {
    display: none;
  }

  .topbar-right {
    gap: 6px;
  }

  .host-sync-badge .sync-text {
    display: none;
  }

  .host-sync-badge {
    padding: 6px;
    min-width: unset;
  }

  .header-clock-widget {
    padding: 4px 8px;
    font-size: 11px;
  }

  .shift-timer-small {
    display: none;
  }

  .topbar-btn-responsive .btn-label-text {
    display: none;
  }

  .topbar-btn-responsive {
    padding: 8px;
    min-width: 36px;
    min-height: 36px;
    justify-content: center;
  }

  .profile-pill {
    padding: 3px 6px;
  }

  .profile-email-sub {
    display: none;
  }

  .profile-name {
    font-size: 12px;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* View Headers */
  .view-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 14px;
  }

  .view-title {
    font-size: 20px;
  }

  .view-subtitle {
    font-size: 12px;
  }

  .view-actions {
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    justify-content: flex-start;
  }

  .filter-pill-group {
    overflow-x: auto;
    width: 100%;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .planner-filter-select-wrap {
    flex: 1 1 140px;
  }

  .planner-select-filter {
    width: 100%;
  }

  /* Mobile Column Jump Tabs */
  .planner-mobile-column-tabs {
    display: flex !important;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0 10px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .planner-mobile-column-tabs::-webkit-scrollbar {
    display: none;
  }

  .mobile-col-tab {
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
  }

  .mobile-col-tab.active {
    background: var(--teams-purple);
    color: #FFFFFF;
    border-color: var(--teams-purple-hover);
    box-shadow: 0 2px 10px rgba(91, 95, 199, 0.45);
  }

  /* Swipeable Kanban Board */
  .planner-board {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 12px;
    padding-bottom: 16px;
    scrollbar-width: thin;
  }

  .planner-column {
    flex: 0 0 85vw !important;
    max-width: 340px;
    scroll-snap-align: center;
    border-radius: 12px;
    min-height: 480px;
  }

  /* Calendar View on Phone */
  .calendar-workspace {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .calendar-main-card {
    overflow-x: auto;
  }

  .calendar-grid {
    min-width: 100%;
  }

  .calendar-cell {
    min-height: 60px;
    padding: 4px;
  }

  .calendar-sidebar {
    width: 100%;
  }

  /* Clock In View on Phone */
  .clockin-dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .clockin-timer-display {
    font-size: 38px;
    text-align: center;
  }

  .btn-punch-main {
    width: 100%;
    height: 52px;
    font-size: 15px;
    font-weight: 700;
  }

  .clockin-break-controls {
    width: 100%;
    justify-content: center;
  }

  /* Notes Grid on Phone */
  .notes-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  /* Team Directory on Phone */
  .team-members-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .team-admin-toolbar {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  /* Profile Grid on Phone */
  .profile-layout-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Analytics View on Phone */
  .analytics-kpi-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .analytics-charts-layout {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .donut-chart-container {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .project-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .project-card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .btn-open-in-planner {
    width: 100%;
    justify-content: center;
  }

  /* Mobile Sheet Modals */
  .modal-backdrop {
    padding: 0 !important;
    align-items: flex-end !important;
  }

  .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
    max-height: 88vh;
    overflow-y: auto;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 12px)) !important;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 20px 14px;
  }

  .kpi-metric-number {
    font-size: 28px;
  }

  .stopwatch-digits {
    font-size: 32px !important;
    letter-spacing: 1px !important;
  }

  .stopwatch-display {
    padding: 18px 8px !important;
  }

  .terminal-card {
    padding: 16px 12px !important;
  }

  /* Cleaner scrollbars on mobile */
  ::-webkit-scrollbar {
    width: 4px;
    height: 4px;
  }
  ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
  }
  ::-webkit-scrollbar-track {
    background: transparent;
  }
}

/* ==========================================================================
   PUSH NOTIFICATIONS, AUDIO CHIMES & PWA SUBSYSTEM
   ========================================================================== */

/* Topbar Notification Indicator Dot */
.notification-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-left: 2px;
  transition: all 0.2s ease;
}

.notification-indicator-dot.on {
  background: #107C41;
  box-shadow: 0 0 6px #107C41;
}

.notification-indicator-dot.off {
  background: var(--text-muted);
}

/* Notification & Audio Settings Grid in Profile */
.notification-settings-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.setting-toggle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.setting-toggle-item:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.setting-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.setting-title {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

.setting-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.setting-actions-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Modern iOS / Teams Switch Toggle */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider.round {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.16);
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
}

.slider.round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

input:checked + .slider.round {
  background-color: var(--teams-purple);
}

input:checked + .slider.round:before {
  transform: translateX(20px);
}

.btn-success-subtle {
  background: rgba(16, 124, 65, 0.15) !important;
  color: #4ade80 !important;
  border-color: rgba(16, 124, 65, 0.35) !important;
}


