/* ============================================
   Task Manager - Glassmorphism Dark Theme
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Glassmorphism Colors */
  --bg-app: linear-gradient(135deg, #0c0c1e 0%, #1a1a2e 50%, #16213e 100%);
  --bg-surface: rgba(255, 255, 255, 0.03);
  --bg-elevated: rgba(255, 255, 255, 0.05);
  --bg-hover: rgba(255, 255, 255, 0.08);
  --bg-active: rgba(255, 255, 255, 0.12);

  /* Glass effect */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --glass-blur: blur(20px);

  --border: rgba(255, 255, 255, 0.1);
  --border-hover: rgba(255, 255, 255, 0.2);

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.4);

  --accent: #818cf8;
  --accent-hover: #a5b4fc;
  --accent-soft: rgba(129, 140, 248, 0.2);

  --success: #34d399;
  --success-soft: rgba(52, 211, 153, 0.2);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.2);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.2);
  --info: #60a5fa;
  --info-soft: rgba(96, 165, 250, 0.2);

  /* Layout */
  --sidebar-width: 240px;
  --panel-width: 420px;
  --header-height: 56px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Transitions */
  --transition: 0.2s ease;
}

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

html, body, #app {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  background: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: white;
}

/* Global SVG sizing - prevent icons from expanding */
svg {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  vertical-align: middle;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-active);
  border-radius: 3px;
}

/* ============================================
   Layout - Three Panel Design
   ============================================ */

.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Main Content Area */
.main-content {
  flex: 1 1 0%;
  min-height: 0;
  max-height: 100vh;
  overflow: hidden;
  background: var(--bg-app);
  position: relative;
}

#page-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  padding-bottom: 100px;
  overflow-y: scroll !important;
  -webkit-overflow-scrolling: touch;
}

/* Sidebar Navigation */
.sidebar {
  width: var(--sidebar-width);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 16px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-logo svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 20px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 10px;
  margin-bottom: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.nav-item.active svg {
  opacity: 1;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--bg-active);
  color: var(--text-secondary);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition);
}

.user-info:hover {
  background: var(--bg-hover);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

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

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

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

/* Main Content Area - Extended - REMOVED DUPLICATE */

/* Header */
.header {
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  flex-shrink: 0;
}

.header-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.header-tabs {
  display: flex;
  gap: 4px;
  margin-left: 24px;
}

.header-tab {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  background: none;
  border: none;
}

.header-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.header-tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.header-spacer {
  flex: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Page Content - scroll rules defined in main layout section (lines 125-135) */

.page-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

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

.kanban-board {
  display: flex;
  gap: 12px;
  padding: 20px;
  overflow-x: auto;
  height: 100%;
}

.kanban-column {
  width: 280px;
  min-width: 280px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: 100%;
  box-shadow: var(--glass-shadow);
}

.kanban-column-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.kanban-column-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.kanban-column-count {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-active);
  padding: 2px 8px;
  border-radius: 10px;
}

.kanban-column-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.kanban-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.kanban-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.kanban-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kanban-card-project {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.kanban-card-project svg {
  width: 12px;
  height: 12px;
}

/* Add Task Inline */
.add-task-inline {
  padding: 8px;
}

.add-task-btn {
  width: 100%;
  padding: 8px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
}

.add-task-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.add-task-btn svg {
  width: 14px;
  height: 14px;
}

.quick-add-form {
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 10px;
}

.quick-add-input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  margin-bottom: 8px;
}

.quick-add-input::placeholder {
  color: var(--text-muted);
}

.quick-add-actions {
  display: flex;
  gap: 6px;
}

/* ============================================
   Task List View
   ============================================ */

.task-list-container {
  padding: 20px;
}

.task-list {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.task-list-header {
  display: grid;
  grid-template-columns: 1fr 120px 100px 100px 80px;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.task-row {
  display: grid;
  grid-template-columns: 1fr 120px 100px 100px 80px;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  cursor: pointer;
  transition: background var(--transition);
}

.task-row:hover {
  background: var(--bg-hover);
}

.task-row:last-child {
  border-bottom: none;
}

.task-row-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-checkbox {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-hover);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}

.task-checkbox:hover {
  border-color: var(--accent);
}

.task-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
}

.task-checkbox.checked svg {
  color: white;
  width: 10px;
  height: 10px;
}

/* ============================================
   Side Panel (Task Details)
   ============================================ */

.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: var(--panel-width);
  background: rgba(20, 20, 40, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 1000;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
}

.side-panel.open {
  transform: translateX(0);
}

.panel-header {
  min-height: var(--header-height);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
}

.panel-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
}

.panel-badge.recurring {
  background: var(--accent-soft);
  color: var(--accent);
}

.panel-badge svg {
  width: 10px;
  height: 10px;
}

.panel-action-bar {
  margin-bottom: 16px;
  padding: 12px;
  background: var(--success-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--success);
}

.panel-action-bar .btn {
  width: 100%;
}

.panel-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.role-tag {
  padding: 3px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 10px;
  color: var(--text-secondary);
}

.panel-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.panel-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.panel-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.panel-close svg {
  width: 16px;
  height: 16px;
}

.panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.panel-section {
  margin-bottom: 24px;
}

.panel-section-title {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.panel-field {
  margin-bottom: 16px;
}

.panel-field-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.panel-field-value {
  font-size: 13px;
  color: var(--text-primary);
}

.panel-task-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.4;
}

.panel-task-title-input {
  width: 100%;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  margin-bottom: 16px;
}

.panel-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}

.panel-description-input {
  width: 100%;
  min-height: 80px;
  font-size: 13px;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  outline: none;
  resize: vertical;
  font-family: inherit;
}

.panel-description-input:focus {
  border-color: var(--accent);
}

.panel-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.panel-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

/* Fix link contrast in side panel */
.side-panel a,
.side-panel .panel-field-value a {
  color: var(--accent-hover);
  text-decoration: none;
  font-weight: 500;
}

.side-panel a:hover,
.side-panel .panel-field-value a:hover {
  color: #c7d2fe;
  text-decoration: underline;
}

/* ---- Task Edit Modal (centered popup) ---- */
.task-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.task-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.task-modal {
  background: rgba(22, 22, 45, 0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.task-modal-overlay.active .task-modal {
  transform: scale(1) translateY(0);
}

.task-modal .panel-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.task-modal .panel-title {
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: 0;
  text-transform: none;
}

.task-modal .panel-content {
  padding: 24px;
  overflow-y: auto;
}

.task-modal .form-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.task-modal .form-input,
.task-modal .form-select,
.task-modal .form-textarea {
  font-size: 14px;
  padding: 10px 12px;
}

.task-modal .form-section-title {
  font-size: 13px;
}

.task-modal .panel-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.15);
}

.task-modal .panel-footer .btn {
  padding: 8px 20px;
  font-size: 13px;
}

@media (max-width: 600px) {
  .task-modal {
    max-width: calc(100% - 32px);
    max-height: 90vh;
  }
}

/* Subtask status toggle */
.subtask-status-toggle {
  display: flex;
  gap: 8px;
}

.subtask-status-toggle .btn {
  flex: 1;
}

/* ============================================
   Projects Grid
   ============================================ */

.projects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

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

.project-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--glass-shadow);
}

.project-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.project-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.project-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-progress {
  height: 4px;
  background: var(--bg-active);
  border-radius: 2px;
  margin-bottom: 12px;
  overflow: hidden;
}

.project-card-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.project-card-stats {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-muted);
}

.project-card-stat {
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-card-stat svg {
  width: 12px;
  height: 12px;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

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

.btn svg {
  width: 14px;
  height: 14px;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 11px;
}

.btn-sm svg {
  width: 12px;
  height: 12px;
}

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

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

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

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

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: transparent;
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-soft);
}

.btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
}

/* ============================================
   Forms
   ============================================ */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  transition: all var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235c5c5c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

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

.form-checkbox input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.form-inline {
  display: flex;
  gap: 8px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Inline Select (Dropdown look) */
.inline-select {
  position: relative;
  display: inline-block;
}

.inline-select-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
}

.inline-select-trigger:hover {
  background: var(--bg-hover);
}

.inline-select-trigger svg {
  width: 12px;
  height: 12px;
  opacity: 0.5;
}

/* ============================================
   Badges
   ============================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.priority-urgent {
  background: var(--danger-soft);
  color: var(--danger);
}

.priority-high {
  background: var(--warning-soft);
  color: var(--warning);
}

.priority-medium {
  background: var(--info-soft);
  color: var(--info);
}

.priority-low {
  background: var(--bg-active);
  color: var(--text-muted);
}

.status-todo {
  background: var(--bg-active);
  color: var(--text-muted);
}

.status-in_progress {
  background: var(--info-soft);
  color: var(--info);
}

.status-done_pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-validated {
  background: var(--success-soft);
  color: var(--success);
}

/* ============================================
   Modal (for complex actions only)
   ============================================ */

.modal-overlay {
  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;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

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

.modal-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

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

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg-elevated);
}

/* ============================================
   Empty States
   ============================================ */

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

.empty-state svg {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Loading */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  height: 100%;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   Toast Notifications
   ============================================ */

.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--danger);
}

.toast.warning {
  border-left: 3px solid var(--warning);
}

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

/* ============================================
   Login Page
   ============================================ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-app);
}

.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 40px;
  border-radius: var(--radius-lg);
  text-align: center;
  width: 100%;
  max-width: 360px;
}

.login-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.btn-discord {
  background: #5865F2;
  color: white;
  width: 100%;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
}

.btn-discord:hover {
  background: #4752C4;
}

.btn-discord svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   Comments
   ============================================ */

.comments-section {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 20px;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.comment {
  display: flex;
  gap: 10px;
}

.comment-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-author {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.comment-date {
  font-size: 10px;
  color: var(--text-muted);
  flex: 1;
}

.comment-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition);
}

.comment:hover .comment-actions {
  opacity: 1;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

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

.btn-icon.danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-icon svg {
  width: 14px;
  height: 14px;
}

.comment-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.comment-edit-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-edit-form .form-input {
  font-size: 12px;
  padding: 6px 10px;
}

.comment-edit-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.comment-form {
  display: flex;
  gap: 8px;
}

.comment-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-primary);
  outline: none;
}

.comment-input:focus {
  border-color: var(--accent);
}

/* ============================================
   Availability Calendar
   ============================================ */

.availability-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.availability-day {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.availability-day-header {
  padding: 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.availability-slots {
  padding: 8px;
  min-height: 60px;
}

.availability-slot {
  padding: 4px 8px;
  font-size: 10px;
  background: var(--success-soft);
  color: var(--success);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  text-align: center;
}

.availability-slot.unavailable {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ============================================
   Tasks Page - View by Project
   ============================================ */

.tasks-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.tasks-header-left {
  flex: 1;
}

.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.tasks-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.stat-chip:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.stat-chip.warning {
  border-color: var(--warning);
  background: var(--warning-soft);
}

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

.stat-dot.todo { background: var(--text-muted); }
.stat-dot.in_progress { background: var(--info); }
.stat-dot.done_pending { background: var(--warning); }
.stat-dot.validated { background: var(--success); }

.tasks-by-project {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-tasks-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.project-tasks-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: background var(--transition);
}

.project-tasks-header:hover {
  background: var(--bg-hover);
}

.project-tasks-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.project-tasks-title svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
}

.project-tasks-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 8px;
}

.project-tasks-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-badge.todo { background: var(--bg-active); color: var(--text-muted); }
.mini-badge.in_progress { background: var(--info-soft); color: var(--info); }
.mini-badge.done_pending { background: var(--warning-soft); color: var(--warning); }
.mini-badge.validated { background: var(--success-soft); color: var(--success); }

.chevron {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.chevron.rotated {
  transform: rotate(-180deg);
}

.project-tasks-body {
  padding: 0;
  max-height: 1000px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  overflow: hidden;
}

.project-tasks-body.collapsed {
  max-height: 0;
  padding: 0;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

.task-item:hover {
  background: var(--bg-hover);
}

.task-item.completed {
  opacity: 0.6;
}

.task-item-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.task-status-indicator {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-hover);
  border-radius: 50%;
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.task-status-indicator:hover {
  border-color: var(--accent);
  transform: scale(1.1);
}

.task-status-indicator.todo { border-color: var(--text-muted); }
.task-status-indicator.in_progress {
  border-color: var(--info);
  background: var(--info-soft);
}
.task-status-indicator.in_progress::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: var(--info);
  border-radius: 50%;
}
.task-status-indicator.done_pending {
  border-color: var(--warning);
  background: var(--warning);
}
.task-status-indicator.done_pending::after {
  content: '!';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--bg-app);
}
.task-status-indicator.validated {
  border-color: var(--success);
  background: var(--success);
}
.task-status-indicator.validated::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 10px;
  color: white;
}

.task-item-content {
  flex: 1;
  min-width: 0;
}

.task-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.task-item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.task-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.task-meta-item svg {
  width: 12px;
  height: 12px;
}

.task-meta-item.overdue {
  color: var(--danger);
}

.task-meta-item.soon {
  color: var(--warning);
}

.task-meta-item.recurring {
  color: var(--accent);
}

.task-item-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ============================================
   Task Form Advanced
   ============================================ */

.task-form-advanced .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.form-section-title svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.roles-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.role-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.role-checkbox input {
  display: none;
}

.role-badge {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 11px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.role-checkbox input:checked + .role-badge {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.role-checkbox:hover .role-badge {
  border-color: var(--border-hover);
}

/* Auto-assign info */
.auto-assign-info {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--info-soft);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
}

.auto-assign-info .info-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--info);
}

.auto-assign-info svg {
  width: 14px;
  height: 14px;
}

.current-assignee {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

.current-assignee .avatar-mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.current-assignee span {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
}

.recurrence-options {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

.recurrence-preview {
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--accent);
}

.days-checkboxes {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.day-checkbox {
  cursor: pointer;
}

.day-checkbox input {
  display: none;
}

.day-checkbox span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-muted);
  transition: all var(--transition);
}

.day-checkbox input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.day-checkbox:hover span {
  border-color: var(--border-hover);
}

/* Modal larger for task form */
.modal:has(.task-form-advanced) {
  max-width: 540px;
}

/* ============================================
   Utilities
   ============================================ */

.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

/* ============================================
   Template Tasks
   ============================================ */

.template-tasks-section {
  margin-top: 24px;
}

.template-tasks-section h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.template-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.template-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.template-task-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.template-task-info {
  flex: 1;
  min-width: 0;
}

.template-task-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.template-task-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

.template-task-meta .badge {
  font-size: 9px;
  padding: 2px 6px;
}

.template-task-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition);
}

.template-task-item:hover .template-task-actions {
  opacity: 1;
}

.template-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}

/* ============================================
   Project Sections (Integrated View)
   ============================================ */

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.project-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-elevated);
  cursor: pointer;
  transition: background var(--transition);
}

.project-section-header:hover {
  background: var(--bg-hover);
}

.project-section-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.project-section-info {
  flex: 1;
  min-width: 0;
}

.project-section-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.project-section-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.project-section-meta .overdue {
  color: var(--danger);
}

.project-section-meta svg {
  width: 12px;
  height: 12px;
  vertical-align: -2px;
  margin-right: 3px;
}

.project-section-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.project-badges {
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-progress-mini {
  width: 60px;
  height: 4px;
  background: var(--bg-active);
  border-radius: 2px;
  overflow: hidden;
}

.project-progress-mini .project-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.project-section-body {
  padding: 0;
  max-height: 2000px;
  transition: max-height 0.3s ease;
  overflow: hidden;
}

.project-section-body.collapsed {
  max-height: 0;
}

.project-section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-app);
}

/* ============================================
   Task Groups & Subtasks
   ============================================ */

.task-group {
  border-bottom: 1px solid var(--border);
}

.task-group:last-child {
  border-bottom: none;
}

.tasks-list {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
}

.subtasks {
  margin-left: 32px;
  border-left: 2px solid var(--border);
}

.subtask {
  padding-left: 16px !important;
}

.subtask .task-item-title {
  font-size: 12px;
}

.subtasks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.subtask-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.subtask-item:hover {
  background: var(--bg-hover);
}

.subtask-item .task-status-indicator {
  width: 14px;
  height: 14px;
}

.subtask-item span {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ============================================
   Task Item Description
   ============================================ */

.task-item-description {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 4px 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 500px;
}

.subtask .task-item-description {
  -webkit-line-clamp: 1;
  max-width: 400px;
}

/* ============================================
   Subtasks Panel Display (Enhanced)
   ============================================ */

.subtasks-panel-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.subtask-panel-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.subtask-panel-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
  transform: translateX(4px);
}

.subtask-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.subtask-panel-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.subtask-panel-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subtask-panel-right {
  flex-shrink: 0;
}

.subtask-panel-right .badge {
  font-size: 9px;
  padding: 2px 6px;
}

.subtask-panel-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 8px 28px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.subtask-panel-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: 28px;
}

.subtask-panel-meta .meta-item {
  font-size: 10px;
}

.subtask-panel-meta .assignee-avatar {
  width: 14px;
  height: 14px;
}

/* ============================================
   Subtasks - New Checklist UX
   ============================================ */

.panel-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.subtasks-progress {
  flex: 1;
  max-width: 100px;
  height: 4px;
  background: var(--bg-active);
  border-radius: 2px;
  overflow: hidden;
}

.subtasks-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--success));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.subtasks-checklist {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.subtask-check-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: all var(--transition);
}

.subtask-check-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-hover);
}

.subtask-check-item.completed {
  opacity: 0.6;
}

.subtask-check-item.completed .subtask-check-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.subtask-check-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.subtask-checkbox {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--border-hover);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  padding: 0;
  margin-top: 1px;
}

.subtask-checkbox:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.subtask-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
}

.subtask-checkbox.checked svg {
  width: 12px;
  height: 12px;
  color: white;
}

.subtask-check-content {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.subtask-check-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  display: block;
  line-height: 1.4;
}

.subtask-check-desc {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.subtask-check-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.subtask-check-actions .btn-icon-mini {
  opacity: 0;
  transition: opacity var(--transition);
}

.subtask-check-item:hover .btn-icon-mini {
  opacity: 1;
}

.btn-icon-mini {
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.btn-icon-mini:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-icon-mini svg {
  width: 12px;
  height: 12px;
}

.badge-mini {
  font-size: 9px;
  padding: 2px 5px;
  min-width: 16px;
  text-align: center;
}

.subtask-check-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  margin-left: 30px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--bg-active);
  border-radius: 10px;
  font-size: 10px;
  color: var(--text-muted);
}

.meta-chip.overdue {
  background: var(--danger-soft);
  color: var(--danger);
}

.meta-chip svg {
  width: 10px;
  height: 10px;
}

.avatar-tiny {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
}

/* Subtask Add Section */
.subtask-add-section {
  margin-top: 10px;
}

.subtask-add-trigger {
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
}

.subtask-add-trigger:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.subtask-add-trigger svg {
  width: 14px;
  height: 14px;
}

/* Subtask Inline Form */
.subtask-inline-form {
  background: var(--bg-elevated);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 12px;
}

.subtask-inline-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  margin-bottom: 10px;
}

.subtask-inline-input:focus {
  border-color: var(--accent);
}

.subtask-inline-input::placeholder {
  color: var(--text-muted);
}

.subtask-inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.subtask-priority-select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  outline: none;
}

.subtask-priority-select:focus {
  border-color: var(--accent);
}

/* Subtask animations */
.subtask-check-item.adding {
  animation: subtaskSlideIn 0.2s ease;
}

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

.subtask-checkbox {
  transition: all 0.15s ease;
}

.subtask-checkbox.checked {
  animation: checkPop 0.2s ease;
}

@keyframes checkPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.subtask-check-item.completed .subtask-check-title {
  transition: all 0.2s ease;
}

/* ============================================
   Page Layout Improvements
   ============================================ */

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-header-left {
  flex: 1;
  min-width: 0;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.page-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.page-description {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color var(--transition);
}

.back-link:hover {
  color: var(--accent);
}

/* ============================================
   Sections
   ============================================ */

.section {
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Stats Grid
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

/* ============================================
   Users Grid
   ============================================ */

.users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}

.user-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.user-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

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

.user-card-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.user-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

/* ============================================
   Managers Management
   ============================================ */

.managers-management {
  padding: 8px 0;
}

.managers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.manager-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-secondary);
}

.manager-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

.avatar-mini {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

.assignee-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 4px;
}

.project-managers-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.project-managers-bar .label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.project-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.project-actions-bar {
  display: flex;
  gap: 8px;
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid var(--border);
}

/* ============================================
   Availability Calendar (Enhanced)
   ============================================ */

.availability-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.availability-day {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 120px;
}

.availability-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.availability-day-header .btn {
  padding: 2px 6px;
  font-size: 10px;
}

.availability-slots {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.availability-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--success-soft);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--success);
  cursor: pointer;
  transition: all var(--transition);
}

.availability-slot:hover {
  background: var(--success);
  color: white;
}

.availability-slot.unavailable {
  background: var(--danger-soft);
  color: var(--danger);
}

.availability-slot.unavailable:hover {
  background: var(--danger);
  color: white;
}

.slot-delete {
  opacity: 0;
  font-weight: 600;
  transition: opacity var(--transition);
}

.availability-slot:hover .slot-delete {
  opacity: 1;
}

.availability-empty {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 12px 8px;
}

/* Exceptions list */
.exceptions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.exception-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
}

.exception-item.unavailable {
  border-left: 3px solid var(--danger);
}

.exception-item.available {
  border-left: 3px solid var(--success);
}

/* ============================================
   Empty Inline State
   ============================================ */

.empty-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ============================================
   Task Meta Items
   ============================================ */

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.meta-item svg {
  width: 12px;
  height: 12px;
}

.meta-item.overdue {
  color: var(--danger);
}

.meta-item.soon {
  color: var(--warning);
}

.meta-item.recurring {
  color: var(--accent);
}

/* ============================================
   Form Select Small
   ============================================ */

.form-select-sm {
  padding: 4px 24px 4px 8px;
  font-size: 12px;
}

/* ============================================
   Comments List in Panel
   ============================================ */

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  max-height: 300px;
  overflow-y: auto;
}

/* ============================================
   Text Accent Color
   ============================================ */

.text-accent {
  color: var(--accent);
}

/* ============================================
   Project Card Archived
   ============================================ */

.project-card.archived {
  opacity: 0.6;
}

.project-card.archived .project-card-name::after {
  content: ' (archivé)';
  font-size: 10px;
  color: var(--text-muted);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -100%;
    z-index: 200;
    transition: left 0.3s ease;
  }

  .sidebar.open {
    left: 0;
  }

  .main-content {
    width: 100%;
  }

  .side-panel {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 150;
    width: 100%;
    max-width: var(--panel-width);
  }

  .kanban-board {
    padding: 12px;
  }

  .kanban-column {
    width: 260px;
    min-width: 260px;
  }

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

  /* Availability calendar responsive */
  .availability-week {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Page header stack */
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header-actions {
    margin-top: 12px;
  }

  /* Stats grid responsive */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Users grid responsive */
  .users-grid {
    grid-template-columns: 1fr;
  }

  /* Project section responsive */
  .project-section-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }

  .project-progress-mini {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .availability-week {
    grid-template-columns: 1fr;
  }

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

  .project-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .project-section-actions {
    flex-wrap: wrap;
  }

  .form-row {
    flex-direction: column;
  }
}

/* ============================================
   Subtasks - Checklist Style UX
   ============================================ */

/* Section header avec progression */
.panel-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.subtasks-progress {
  flex: 1;
  height: 4px;
  background: var(--bg-active);
  border-radius: 2px;
  overflow: hidden;
}

.subtasks-progress-bar {
  height: 100%;
  background: var(--success);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Checklist container */
.subtasks-checklist {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Single subtask item */
.subtask-check-item {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: all 0.2s ease;
  animation: subtaskSlideIn 0.25s ease;
}

.subtask-check-item:hover {
  background: var(--bg-hover);
}

.subtask-check-item.completed {
  opacity: 0.6;
}

.subtask-check-item.completed .subtask-check-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.subtask-check-item.adding {
  opacity: 0.7;
  background: var(--accent-soft);
}

/* Main row */
.subtask-check-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* Checkbox button */
.subtask-checkbox {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--border-hover);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  color: white;
  padding: 0;
  margin-top: 1px;
}

.subtask-checkbox:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.subtask-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
  animation: checkPop 0.3s ease;
}

.subtask-checkbox.checked svg {
  width: 12px;
  height: 12px;
}

/* Content area */
.subtask-check-content {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.subtask-check-title {
  font-size: 13px;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.subtask-check-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Actions */
.subtask-check-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.subtask-check-item:hover .subtask-check-actions {
  opacity: 1;
}

/* Meta row */
.subtask-check-meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  margin-left: 30px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 6px;
  background: var(--bg-active);
  border-radius: 4px;
}

.meta-chip.overdue {
  color: var(--danger);
  background: var(--danger-soft);
}

.meta-chip svg {
  width: 10px;
  height: 10px;
}

/* Mini elements */
.avatar-tiny {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.badge-mini {
  padding: 2px 5px !important;
  font-size: 10px !important;
  min-width: 16px;
  text-align: center;
}

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

.btn-icon-mini:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-icon-mini svg {
  width: 12px;
  height: 12px;
}

/* Add subtask section */
.subtask-add-section {
  margin-top: 8px;
}

.subtask-add-trigger {
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  transition: all 0.2s ease;
}

.subtask-add-trigger:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
  color: var(--accent);
}

.subtask-add-trigger svg {
  width: 14px;
  height: 14px;
}

/* Inline form */
.subtask-inline-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-elevated);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  animation: subtaskSlideIn 0.2s ease;
}

.subtask-inline-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
}

.subtask-inline-input:focus {
  border-color: var(--accent);
}

.subtask-inline-input::placeholder {
  color: var(--text-muted);
}

.subtask-inline-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.subtask-priority-select {
  padding: 6px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

/* Animations */
@keyframes subtaskSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes checkPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Smooth transitions for dynamic updates */
.tasks-list {
  transition: opacity 0.2s ease;
}

.project-badges {
  transition: all 0.2s ease;
}

.project-progress-bar {
  transition: width 0.3s ease;
}

.stat-chip {
  transition: all 0.2s ease;
}

/* ============================================
   Task Status Chips - Clear Labels
   ============================================ */

.task-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-width: fit-content;
}

.task-status-chip:hover {
  transform: scale(1.05);
}

.task-status-chip .status-icon {
  font-size: 12px;
  line-height: 1;
}

.task-status-chip .status-text {
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Status: À faire */
.task-status-chip.status-todo {
  background: var(--bg-active);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.task-status-chip.status-todo:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

/* Status: En cours */
.task-status-chip.status-in-progress {
  background: var(--info-soft);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.task-status-chip.status-in-progress:hover {
  background: rgba(59, 130, 246, 0.25);
}

/* Status: À valider */
.task-status-chip.status-pending {
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.task-status-chip.status-pending:hover {
  background: rgba(234, 179, 8, 0.25);
}

/* Status: Validée */
.task-status-chip.status-validated {
  background: var(--success-soft);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.task-status-chip.status-validated:hover {
  background: rgba(34, 197, 94, 0.25);
}

/* Subtask checkbox in main list (simple toggle) */
.subtask-checkbox-list {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--border-hover);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  color: white;
  padding: 0;
  margin-top: 2px;
}

.subtask-checkbox-list:hover {
  border-color: var(--success);
  background: var(--success-soft);
}

.subtask-checkbox-list.checked {
  background: var(--success);
  border-color: var(--success);
}

.subtask-checkbox-list.checked.pending {
  background: var(--warning);
  border-color: var(--warning);
}

.subtask-checkbox-list svg {
  width: 12px;
  height: 12px;
}

/* Subtask pending state (worker marked as done, waiting for manager validation) */
.task-item.subtask.pending .task-item-title {
  color: var(--warning);
}

.subtask-check-item.pending .subtask-check-title {
  color: var(--warning);
}

.subtask-checkbox.checked.pending {
  background: var(--warning);
  border-color: var(--warning);
}

/* Subtask styling in list */
.task-item.subtask {
  padding-left: 32px;
  border-left: 2px solid var(--border);
  margin-left: 16px;
}

.task-item.subtask .task-item-title {
  font-size: 12px;
}

.task-item.subtask.completed .task-item-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* ============================================
   Calendar / Availabilities
   ============================================ */

.calendar-container {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.calendar-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.calendar-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-hover);
  border: 1px solid var(--border);
}

.legend-dot.available {
  background: var(--success);
  border-color: var(--success);
}

.legend-dot.unavailable {
  background: var(--danger);
  border-color: var(--danger);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 8px 0;
}

.calendar-grid {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 4px;
  flex: 1;
  min-height: 0;
}

.calendar-day {
  min-height: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow: hidden;
}

.calendar-day:hover:not(.empty):not(.past) {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.calendar-day.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.calendar-day.past {
  opacity: 0.4;
  cursor: not-allowed;
}

.calendar-day.today {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.calendar-day.available {
  background: var(--success-soft);
  border-color: var(--success);
}

.calendar-day.unavailable {
  background: var(--danger-soft);
  border-color: var(--danger);
}

.day-number {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.day-status {
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  margin-top: 4px;
}

.day-status.available {
  color: var(--success);
}

.day-status.unavailable {
  color: var(--danger);
}

.day-note {
  font-size: 11px;
  color: var(--text-primary);
  background: var(--bg-active);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  margin-top: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.availability-help {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.availability-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.availability-options .btn {
  justify-content: center;
}

.note-save-status {
  font-size: 11px;
  font-weight: 400;
  margin-left: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.note-save-status.saving {
  opacity: 1;
  color: var(--text-muted);
  animation: pulse 1s ease-in-out infinite;
}

.note-save-status.saved {
  opacity: 1;
  color: var(--success);
  animation: fadeInOut 2s ease forwards;
}

.note-save-status.error {
  opacity: 1;
  color: var(--danger);
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes fadeInOut {
  0% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

/* Mini Calendar (for user detail page) */
.calendar-mini {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--border);
}

.calendar-weekdays-mini {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.weekday-mini {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 8px 4px;
}

.calendar-days-mini {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day-mini {
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  min-height: 44px;
}

.calendar-day-mini.empty {
  background: transparent;
  border-color: transparent;
}

.calendar-day-mini.past {
  opacity: 0.4;
}

.calendar-day-mini.today {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.calendar-day-mini.available {
  background: var(--success-soft);
  border-color: var(--success);
}

.calendar-day-mini.unavailable {
  background: var(--danger-soft);
  border-color: var(--danger);
}

.day-number-mini {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Full screen page layout (for calendar) */
.page-fullscreen {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  padding: 12px;
  box-sizing: border-box;
}

.page-fullscreen .calendar-container {
  height: 100% !important;
  max-width: none;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.page-fullscreen .calendar-header {
  flex-shrink: 0;
}

.page-fullscreen .calendar-legend {
  flex-shrink: 0;
}

.page-fullscreen .calendar-grid {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page-fullscreen .calendar-weekdays {
  flex-shrink: 0;
}

.page-fullscreen .calendar-days {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 4px;
}

.page-fullscreen .calendar-day {
  min-height: 0;
  overflow: hidden;
}

/* Calendar header layout */
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-tabs {
  display: flex;
  gap: 4px;
}

.calendar-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-active);
}

.legend-dot.available {
  background: var(--success);
}

.legend-dot.unavailable {
  background: var(--danger);
}

.legend-dot.undefined {
  background: var(--text-muted);
  opacity: 0.5;
}

.calendar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.calendar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.calendar-month-nav {
  display: flex;
  gap: 4px;
}

/* Team view calendar day */
.calendar-day.team-view {
  cursor: pointer;
}

.calendar-day.readonly {
  cursor: default;
}

.day-users {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 4px;
}

.day-user-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition);
}

.day-user-avatar:hover {
  transform: scale(1.2);
  z-index: 1;
}

.day-user-avatar.available {
  border-color: var(--success);
}

.day-user-avatar.unavailable {
  border-color: var(--danger);
  opacity: 0.7;
}

.day-user-more {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-user-more.available {
  background: var(--success-soft);
  color: var(--success);
}

.day-user-more.unavailable {
  background: var(--danger-soft);
  color: var(--danger);
}

.day-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  font-size: 9px;
}

.day-stats .stat {
  padding: 1px 4px;
  border-radius: 3px;
  text-align: center;
}

.day-stats .stat.available {
  background: var(--success-soft);
  color: var(--success);
}

.day-stats .stat.unavailable {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Day users list with names */
.day-users-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
  flex: 1;
  overflow: hidden;
}

.day-users-group {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.day-users-group.available .day-user-name {
  color: var(--success);
}

.day-users-group.unavailable .day-user-name {
  color: var(--danger);
  text-decoration: line-through;
  opacity: 0.8;
}

.day-users-group.undefined .day-user-name {
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.6;
}

.day-user-name {
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  padding: 1px 4px;
  border-radius: 3px;
  transition: var(--transition);
}

.day-user-name:hover {
  background: var(--bg-hover);
}

/* User item with avatar + name */
.day-user-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 500;
  cursor: pointer;
  padding: 1px 4px 1px 1px;
  border-radius: 10px;
  transition: var(--transition);
  background: var(--bg-active);
}

.day-user-item:hover {
  background: var(--bg-hover);
}

.day-user-mini-avatar {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.day-users-group.available .day-user-item {
  color: var(--success);
  background: var(--success-soft);
}

.day-users-group.unavailable .day-user-item {
  color: var(--danger);
  background: var(--danger-soft);
  text-decoration: line-through;
  opacity: 0.8;
}

.day-users-group.unavailable .day-user-mini-avatar {
  opacity: 0.6;
}

.day-users-group.undefined .day-user-item {
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.6;
  background: var(--bg-elevated);
}

/* Week availability widget (dashboard) */
.avail-week-widget {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.avail-week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  transition: var(--transition);
}

.avail-week-day.today {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
}

.avail-week-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8px;
}

.avail-week-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.avail-week-date {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.avail-week-day.today .avail-week-date {
  color: var(--accent);
}

.avail-week-names {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
  flex: 1;
  overflow: hidden;
  width: 100%;
}

.avail-week-group {
  display: contents;
}

.avail-week-group.available .avail-week-name-item {
  color: var(--success);
}

.avail-week-group.unavailable .avail-week-name-item {
  color: var(--danger);
  text-decoration: line-through;
  opacity: 0.7;
}

.avail-week-group.undefined .avail-week-name-item {
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.5;
}

.avail-week-name-item {
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* User item with avatar for widget */
.avail-week-user-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 6px 2px 2px;
  border-radius: 12px;
  background: var(--bg-active);
  white-space: nowrap;
}

.avail-week-mini-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.avail-week-group.available .avail-week-user-item {
  color: var(--success);
  background: var(--success-soft);
}

.avail-week-group.unavailable .avail-week-user-item {
  color: var(--danger);
  background: var(--danger-soft);
  text-decoration: line-through;
  opacity: 0.7;
}

.avail-week-group.unavailable .avail-week-mini-avatar {
  opacity: 0.6;
}

.avail-week-group.undefined .avail-week-user-item {
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.5;
  background: var(--bg-elevated);
}

/* Responsive pour le widget */
@media (max-width: 768px) {
  .avail-week-widget {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   Subtasks - Checklist Style
   ============================================ */

.subtasks-checklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.subtask-check-item {
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.subtask-check-item:hover {
  background: var(--bg-hover);
}

.subtask-check-item.completed .subtask-check-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.subtask-check-item.adding {
  opacity: 0.6;
}

.subtask-check-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
}

.subtask-checkbox {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 2px;
}

.subtask-checkbox:hover {
  border-color: var(--accent);
}

.subtask-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
}

.subtask-checkbox.checked svg {
  width: 10px;
  height: 10px;
  color: white;
}

.subtask-check-content {
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.subtask-check-title {
  font-size: 13px;
  color: var(--text-primary);
  display: block;
}

.subtask-check-desc {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
  line-height: 1.4;
}

.subtask-check-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.subtask-check-item:hover .subtask-check-actions {
  opacity: 1;
}

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

.btn-icon-mini:hover {
  background: var(--bg-active);
  color: var(--text-primary);
}

.btn-icon-mini svg {
  width: 12px;
  height: 12px;
}

/* Subtask add section */
.subtask-add-section {
  margin-top: 8px;
}

.subtask-add-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  width: 100%;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.subtask-add-trigger:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.subtask-add-trigger svg {
  width: 14px;
  height: 14px;
}

/* Subtask inline form */
.subtask-inline-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.subtask-inline-input {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
}

.subtask-inline-input:focus {
  border-color: var(--accent);
}

.subtask-inline-desc {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
  resize: vertical;
  font-family: inherit;
  min-height: 50px;
  transition: border-color 0.15s ease;
}

.subtask-inline-desc:focus {
  border-color: var(--accent);
}

.subtask-inline-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Subtasks progress */
.panel-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.subtasks-progress {
  flex: 1;
  max-width: 100px;
  height: 4px;
  background: var(--bg-active);
  border-radius: 2px;
  overflow: hidden;
}

.subtasks-progress-bar {
  height: 100%;
  background: var(--success);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ============================================
   Task Item with Expandable Subtasks
   ============================================ */

.task-item-wrapper {
  margin-bottom: 4px;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.2s ease;
}

.task-item-wrapper.expanded {
  background: var(--bg-surface);
  border: 1px solid var(--border);
}

.task-item-wrapper.expanded .task-item {
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.task-item-expand-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  margin-right: 10px;
  flex-shrink: 0;
}

.task-item-expand-btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.task-item-expand-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}

.task-item-wrapper.expanded .task-item-expand-btn {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.task-item-wrapper.expanded .task-item-expand-btn svg {
  transform: rotate(90deg);
}

.task-item-expand-btn.no-subtasks {
  visibility: hidden;
  width: 28px;
  margin-right: 10px;
}

/* Inline subtasks under task */
.task-subtasks-inline {
  display: none;
  padding: 0;
  background: var(--bg-surface);
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.task-item-wrapper.expanded .task-subtasks-inline {
  display: block;
}

.task-subtasks-inline .subtask-inline-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px 12px 60px;
  transition: background 0.15s ease;
  cursor: pointer;
}

.task-subtasks-inline .subtask-inline-item:hover {
  background: var(--bg-hover);
}

.task-subtasks-inline .subtask-inline-item + .subtask-inline-item {
  border-top: 1px solid var(--border);
}

.task-subtasks-inline .subtask-mini-checkbox {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 4px;
  border: 2px solid var(--border);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1px;
}

.task-subtasks-inline .subtask-mini-checkbox:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.task-subtasks-inline .subtask-mini-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
}

.task-subtasks-inline .subtask-mini-checkbox.checked svg {
  width: 10px;
  height: 10px;
  color: white;
}

.task-subtasks-inline .subtask-inline-content {
  flex: 1;
  min-width: 0;
}

.task-subtasks-inline .subtask-inline-title {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.15s ease;
}

.task-subtasks-inline .subtask-inline-title.completed {
  text-decoration: line-through;
  color: var(--text-muted);
  font-weight: 400;
}

.task-subtasks-inline .subtask-inline-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.5;
}

/* Empty state for subtasks */
.task-subtasks-inline .subtasks-empty {
  padding: 16px 16px 16px 60px;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

/* Subtask count badge on task item */
.subtask-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 10px;
  transition: all 0.15s ease;
}

.subtask-count-badge svg {
  width: 12px;
  height: 12px;
}

.subtask-count-badge.has-completed {
  color: var(--success);
  background: var(--success-soft);
  border-color: var(--success);
}

.subtask-count-badge.all-completed {
  color: var(--success);
  background: var(--success);
  border-color: var(--success);
  color: white;
}

/* Progress bar for subtasks in badge */
.subtask-progress-mini {
  width: 40px;
  height: 4px;
  background: var(--bg-active);
  border-radius: 2px;
  overflow: hidden;
  margin-left: 4px;
}

.subtask-progress-mini-bar {
  height: 100%;
  background: var(--success);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ============================================
   Task Item Wrapper - Expandable Subtasks
   ============================================ */

.task-item-wrapper {
  border-top: 1px solid var(--border);
}

.task-item-wrapper:first-child {
  border-top: none;
}

/* Expand Button */
.task-item-expand-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  padding: 0;
  margin-right: 4px;
}

.task-item-expand-btn:hover {
  background: var(--bg-hover);
  color: var(--accent);
}

.task-item-expand-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.task-item-wrapper.expanded .task-item-expand-btn svg {
  transform: rotate(90deg);
}

.task-item-expand-btn.no-subtasks {
  visibility: hidden;
  cursor: default;
}

/* Inline Subtasks Container */
.task-subtasks-inline {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.2s ease;
  background: var(--bg-elevated);
  margin: 0;
  padding: 0;
}

.task-item-wrapper.expanded .task-subtasks-inline {
  max-height: 800px;
  opacity: 1;
  padding: 8px 16px 12px 52px;
  border-top: 1px solid var(--border);
}

/* Inline Subtask Item */
.subtask-inline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  transition: all 0.15s ease;
  animation: subtaskSlideIn 0.2s ease;
}

.subtask-inline-item:last-child {
  margin-bottom: 0;
}

.subtask-inline-item:hover {
  background: var(--bg-hover);
}

/* Mini Checkbox for Inline Subtasks */
.subtask-mini-checkbox {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 2px solid var(--border-hover);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  color: white;
  padding: 0;
  margin-top: 2px;
}

.subtask-mini-checkbox:hover {
  border-color: var(--success);
  background: var(--success-soft);
}

.subtask-mini-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
  animation: checkPop 0.25s ease;
}

.subtask-mini-checkbox svg {
  width: 11px;
  height: 11px;
}

/* Inline Subtask Content */
.subtask-inline-content {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.subtask-inline-title {
  font-size: 12px;
  color: var(--text-primary);
  display: block;
  line-height: 1.4;
  transition: all 0.15s ease;
}

.subtask-inline-title.completed {
  text-decoration: line-through;
  color: var(--text-muted);
}

.subtask-inline-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Animation for expanding */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.task-item-wrapper.expanded .subtask-inline-item {
  animation: slideDown 0.2s ease forwards;
}

.task-item-wrapper.expanded .subtask-inline-item:nth-child(2) {
  animation-delay: 0.03s;
}

.task-item-wrapper.expanded .subtask-inline-item:nth-child(3) {
  animation-delay: 0.06s;
}

.task-item-wrapper.expanded .subtask-inline-item:nth-child(4) {
  animation-delay: 0.09s;
}

.task-item-wrapper.expanded .subtask-inline-item:nth-child(5) {
  animation-delay: 0.12s;
}

/* Subtask Description Input (in creation form) */
.subtask-desc-input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  resize: vertical;
  min-height: 50px;
  outline: none;
  transition: border-color 0.15s ease;
}

.subtask-desc-input:focus {
  border-color: var(--accent);
}

.subtask-desc-input::placeholder {
  color: var(--text-muted);
}



/* ============================================
   Archived Tasks Section
   ============================================ */

.archived-tasks-section {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

.archived-tasks-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
}

.archived-tasks-section .section-header:hover {
  background: var(--bg-hover);
}

.archived-tasks-section .section-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.archived-tasks-section .section-title svg {
  width: 16px;
  height: 16px;
}

.archived-tasks-section .collapse-icon {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.archived-tasks-section .collapse-icon svg {
  width: 16px;
  height: 16px;
}

.archived-tasks-section .section-content {
  display: none;
  padding: 0;
}

.archived-tasks-section.expanded .section-content {
  display: block;
}

.archived-tasks-section.expanded .collapse-icon {
  transform: rotate(90deg);
}

.archived-tasks-section .tasks-list.archived {
  opacity: 0.7;
}

.archived-tasks-section .tasks-list.archived .task-item {
  background: var(--bg-secondary);
}

/* ============================================
   Applications Portal
   ============================================ */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.app-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
  cursor: pointer;
}

.app-card:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.app-card-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.app-card-icon svg {
  width: 24px;
  height: 24px;
}

.app-card-info {
  flex: 1;
  min-width: 0;
}

.app-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-card-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card-link {
  color: var(--text-muted);
  transition: color var(--transition);
}

.app-card:hover .app-card-link {
  color: var(--accent);
}

.app-card-link svg {
  width: 20px;
  height: 20px;
}

/* Apps Config Page */
.apps-config-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-config-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.app-config-item.inactive {
  opacity: 0.5;
}

.app-config-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.app-config-icon svg {
  width: 20px;
  height: 20px;
}

.app-config-info {
  flex: 1;
  min-width: 0;
}

.app-config-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.app-config-url {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-config-roles {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.app-config-actions {
  display: flex;
  gap: 4px;
}

/* Icon Picker */
.icon-picker {
  position: relative;
}

.icon-picker-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color var(--transition);
}

.icon-picker-trigger:hover {
  border-color: var(--border-hover);
}

.icon-picker-trigger svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.icon-picker-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  z-index: 100;
  max-height: 300px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.icon-search {
  margin: 12px;
  margin-bottom: 8px;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  padding: 8px 12px 12px;
  overflow-y: auto;
  max-height: 220px;
}

.icon-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.icon-option:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.icon-option.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

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

/* Checkbox group */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.checkbox-label span {
  font-size: 14px;
  color: var(--text-primary);
}

/* Badge sm variant */
.badge-sm {
  font-size: 10px;
  padding: 2px 6px;
}

/* ============================================
   Apps Portal - Modern SaaS Design
   ============================================ */

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 180px));
  gap: 20px;
  padding: 24px;
}

.app-card {
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.app-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.app-card:hover::before {
  opacity: 1;
}

.app-card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.app-card-icon svg {
  width: 28px;
  height: 28px;
}

.app-card-info {
  position: relative;
  z-index: 1;
}

.app-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-card-description {
  display: none;
}

.app-card-link {
  position: absolute;
  top: 8px;
  right: 8px;
  color: rgba(255, 255, 255, 0.3);
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 1;
}

.app-card-link svg {
  width: 12px;
  height: 12px;
}

.app-card:hover .app-card-link {
  opacity: 1;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Apps Portal - Config Cards
   ============================================ */

.apps-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
  padding: 4px;
  margin-top: 32px;
}

.app-config-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  max-height: 300px;
}

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

.app-config-card.inactive {
  opacity: 0.6;
}

.app-config-card.inactive::after {
  content: 'Inactive';
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.app-config-card-header {
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
  border-bottom: 1px solid var(--border);
}

.app-config-card-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.app-config-card-icon svg {
  width: 28px;
  height: 28px;
}

.app-config-card-info {
  flex: 1;
  min-width: 0;
}

.app-config-card-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-config-card-url {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-config-card-url a {
  color: var(--accent);
  text-decoration: none;
}

.app-config-card-url a:hover {
  text-decoration: underline;
}

.app-config-card-body {
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-config-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-config-card-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.app-config-card-roles .badge {
  font-size: 11px;
  padding: 3px 8px;
}

.app-config-card-footer {
  padding: 12px 20px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.app-config-card-footer .btn {
  padding: 6px 12px;
  font-size: 13px;
}

/* Form help text */
.form-help {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ============================================
   Dashboard - Idle Users Alert
   ============================================ */

.idle-users-alert {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.idle-users-alert .section-header {
  margin-bottom: 12px;
  padding-bottom: 0;
  border-bottom: none;
}

.idle-users-alert .section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.idle-users-alert .section-title svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.idle-users-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.idle-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  transition: all var(--transition);
}

.idle-user-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.idle-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.idle-user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.idle-user-role {
  font-size: 12px;
  color: var(--text-muted);
}

.idle-user-item .btn {
  flex-shrink: 0;
}

a.idle-user-item {
  text-decoration: none;
  cursor: pointer;
}

.idle-user-arrow {
  color: var(--text-muted);
  opacity: 0.5;
  transition: all var(--transition);
  flex-shrink: 0;
}

.idle-user-item:hover .idle-user-arrow {
  opacity: 1;
  color: var(--accent);
  transform: translateX(2px);
}

/* ============================================
   Text Links (in descriptions)
   ============================================ */

.text-link {
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
}

.text-link:hover {
  text-decoration: underline;
}

/* ============================================
   Timeclock / Pointage
   ============================================ */

/* Timezone indicator */
.timezone-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--surface);
  padding: 6px 12px;
  border-radius: var(--radius);
}

.timezone-indicator svg {
  width: 16px;
  height: 16px;
}

/* Timeclock alert */
.timeclock-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.timeclock-alert.blocked {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.timeclock-alert.warning {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.timeclock-alert svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: var(--danger);
}

.timeclock-alert.warning svg {
  color: var(--warning);
}

.timeclock-alert .alert-content strong {
  display: block;
  margin-bottom: 4px;
}

.timeclock-alert .alert-content p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* Timeclock main section */
.timeclock-main {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  text-align: center;
}

.timeclock-button-container {
  margin-bottom: 32px;
}

/* Timeclock button */
.timeclock-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 48px;
  font-size: 18px;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition);
}

.timeclock-button svg {
  width: 24px;
  height: 24px;
}

.timeclock-button.start {
  background: var(--success);
  color: white;
}

.timeclock-button.start:hover {
  background: #059669;
  transform: scale(1.02);
}

.timeclock-button.active {
  background: var(--danger);
  color: white;
}

.timeclock-button.active:hover {
  background: #dc2626;
  transform: scale(1.02);
}

.timeclock-button.blocked {
  background: var(--warning);
  color: var(--bg);
  cursor: not-allowed;
  opacity: 0.8;
}

/* Session timer */
.session-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.timer-duration {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

/* Stats grid */
.timeclock-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .timeclock-stats-grid {
    grid-template-columns: 1fr;
  }
}

.timeclock-stat-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.timeclock-stat-card .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.timeclock-stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.timeclock-stat-card .stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Manager section */
.timeclock-manager-section {
  margin-bottom: 24px;
}

/* Sessions history */
.timeclock-history {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}

.sessions-day-group {
  margin-bottom: 16px;
}

.sessions-day-header {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.session-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.session-item.active {
  border-left: 3px solid var(--success);
}

.session-item.blocked {
  border-left: 3px solid var(--danger);
  opacity: 0.8;
}

.session-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.session-separator {
  color: var(--text-muted);
}

.session-end {
  color: var(--text-muted);
}

.session-duration {
  font-weight: 600;
  color: var(--accent);
  margin-left: auto;
}

/* Stop session modal */
.stop-session-info {
  padding: 8px 0;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

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

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

.info-row .form-input {
  width: auto;
  padding: 8px 12px;
}

/* Team stats section */
.team-stats-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

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

.team-user-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius);
}

.team-user-stat.is-active {
  border-left: 3px solid var(--success);
}

.team-user-stat.has-blocked {
  border-left: 3px solid var(--danger);
}

.user-avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

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

.user-stat-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-stat-hours {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

/* Blocked sessions section */
.blocked-sessions-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.blocked-session-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border-left: 3px solid var(--danger);
  margin-bottom: 12px;
}

.blocked-session-item:last-child {
  margin-bottom: 0;
}

.session-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
}

.session-user span {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
}

.session-actions {
  display: flex;
  gap: 8px;
}

/* Team sessions list */
.all-sessions-section {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.team-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.team-session-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius);
}

.team-session-item.active {
  border-left: 3px solid var(--success);
}

.session-details {
  flex: 1;
  min-width: 0;
}

.session-user-name {
  font-weight: 500;
  display: block;
}

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

.session-time-info {
  display: flex;
  gap: 4px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Unblock modal */
.unblock-session-info p {
  margin-bottom: 16px;
  color: var(--text-muted);
}

/* Empty state variant */
.empty-state.small {
  padding: 32px;
}

.empty-state.small svg {
  width: 32px;
  height: 32px;
}

/* Timeclock dashboard widget */
.timeclock-widget {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.timeclock-widget.active {
  border-left: 3px solid var(--success);
}

.timeclock-widget.blocked {
  border-left: 3px solid var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.timeclock-widget-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.timeclock-widget-content svg {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.timeclock-widget.active .timeclock-widget-content svg {
  color: var(--success);
}

.timeclock-widget.blocked .timeclock-widget-content svg {
  color: var(--danger);
}

.timeclock-widget-info {
  flex: 1;
  min-width: 0;
}

.timeclock-widget-info strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.timeclock-widget-info span {
  font-size: 13px;
  color: var(--text-muted);
}

.timeclock-widget-stats {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.timeclock-widget-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================
   Timeclock Page - Complete Redesign
   ============================================ */

.timeclock-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.timeclock-team-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Header */
.timeclock-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.timeclock-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeclock-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.timeclock-title svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.timeclock-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

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

.timezone-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 13px;
  color: var(--text-secondary);
}

.timezone-badge svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

/* Alerts */
.tc-alert {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid;
}

.tc-alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.tc-alert-warning {
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.3);
}

.tc-alert-icon {
  flex-shrink: 0;
}

.tc-alert-icon svg {
  width: 24px;
  height: 24px;
}

.tc-alert-danger .tc-alert-icon svg {
  color: var(--danger);
}

.tc-alert-warning .tc-alert-icon svg {
  color: var(--warning);
}

.tc-alert-content strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.tc-alert-danger .tc-alert-content strong {
  color: var(--danger);
}

.tc-alert-warning .tc-alert-content strong {
  color: var(--warning);
}

.tc-alert-content p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Main Grid */
.timeclock-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
}

@media (max-width: 1100px) {
  .timeclock-grid {
    grid-template-columns: 1fr;
  }
}

.timeclock-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.timeclock-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Cards */
.tc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

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

/* Clock Card */
.tc-clock-card {
  text-align: center;
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
}

.tc-clock-card.has-active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.05) 0%, var(--bg-surface) 100%);
  border-color: rgba(34, 197, 94, 0.3);
}

.tc-clock-card.has-blocked {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, var(--bg-surface) 100%);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Clock States */
.tc-clock-idle,
.tc-clock-active,
.tc-clock-blocked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.tc-clock-icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 8px;
}

.tc-clock-icon svg {
  width: 40px;
  height: 40px;
}

.tc-clock-icon.idle {
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.tc-clock-icon.blocked {
  background: var(--danger-soft);
  color: var(--danger);
}

.tc-clock-status {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tc-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.tc-status-dot.active {
  background: var(--success);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
}

@keyframes pulse-dot {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
}

.tc-clock-message {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
  max-width: 280px;
}

.tc-clock-timer {
  font-size: 48px;
  font-weight: 700;
  color: var(--success);
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}

.tc-clock-start {
  color: var(--text-muted);
  font-size: 14px;
}

/* Clock Pulse Animation */
.tc-clock-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--success);
  opacity: 0.1;
  animation: clock-pulse 3s infinite;
  pointer-events: none;
}

@keyframes clock-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0.1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.05;
  }
}

/* Clock Buttons */
.tc-clock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.tc-clock-btn svg {
  width: 22px;
  height: 22px;
}

.tc-clock-btn.start {
  background: var(--success);
  color: white;
}

.tc-clock-btn.start:hover {
  background: #1ea550;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.tc-clock-btn.stop {
  background: var(--danger);
  color: white;
}

.tc-clock-btn.stop:hover {
  background: #dc3030;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Stats Row */
.tc-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 700px) {
  .tc-stats-row {
    grid-template-columns: 1fr;
  }
}

.tc-stat-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

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

.tc-stat-icon svg {
  width: 22px;
  height: 22px;
}

.tc-stat-icon.today {
  background: var(--accent-soft);
  color: var(--accent);
}

.tc-stat-icon.week {
  background: var(--success-soft);
  color: var(--success);
}

.tc-stat-icon.month {
  background: var(--warning-soft);
  color: var(--warning);
}

.tc-stat-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.tc-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.tc-stat-detail {
  font-size: 12px;
  color: var(--text-muted);
}

/* Help Card */
.tc-help-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}

.tc-help-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
}

.tc-help-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tc-help-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tc-help-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.tc-help-icon svg {
  width: 16px;
  height: 16px;
}

.tc-help-icon.start {
  background: var(--success-soft);
  color: var(--success);
}

.tc-help-icon.stop {
  background: var(--danger-soft);
  color: var(--danger);
}

.tc-help-icon.info {
  background: var(--info-soft);
  color: var(--info);
}

.tc-help-icon.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

/* Help Notice (contact manager) */
.tc-help-notice {
  margin-top: 20px;
  padding: 16px;
  background: var(--info-soft);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-md);
}

.tc-help-notice > strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--info);
  margin-bottom: 8px;
}

.tc-help-notice > strong svg {
  width: 18px;
  height: 18px;
}

.tc-help-notice > p {
  margin: 0 0 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.tc-help-notice > ul {
  margin: 0;
  padding-left: 20px;
}

.tc-help-notice > ul li {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

.tc-help-notice > ul li strong {
  color: var(--text-secondary);
}

/* Calendar Card */
.tc-calendar-card {
  padding: 20px;
}

.tc-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.tc-calendar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.tc-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.tc-cal-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 0;
  text-transform: uppercase;
}

.tc-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.tc-cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid transparent;
  min-height: 46px;
}

.tc-cal-day:hover:not(.empty):not(.future) {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.tc-cal-day.empty {
  background: transparent;
  cursor: default;
}

.tc-cal-day.future {
  opacity: 0.4;
  cursor: default;
}

.tc-cal-day.today {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tc-cal-day.has-hours {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, var(--bg-elevated) 100%);
}

.tc-cal-day.active {
  border-color: var(--success);
  background: var(--success-soft);
}

.tc-cal-day.blocked {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.tc-cal-day-num {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

.tc-cal-day.today .tc-cal-day-num {
  color: var(--accent);
  font-weight: 700;
}

.tc-cal-day-bar {
  position: absolute;
  bottom: 4px;
  left: 4px;
  height: 3px;
  background: var(--success);
  border-radius: 2px;
  max-width: calc(100% - 8px);
}

.tc-cal-day-hours {
  font-size: 9px;
  color: var(--success);
  font-weight: 600;
}

.tc-cal-day-status {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.tc-cal-day-status.active {
  background: var(--success);
  animation: pulse-dot 2s infinite;
}

.tc-cal-day-status.blocked {
  background: var(--danger);
  width: auto;
  height: auto;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 700;
  color: var(--danger);
  padding: 0 3px;
}

/* Calendar Legend */
.tc-calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.tc-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

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

.tc-legend-dot.worked {
  background: var(--success);
}

.tc-legend-dot.active {
  background: var(--success);
  animation: pulse-dot 2s infinite;
}

.tc-legend-dot.blocked {
  background: var(--danger);
}

/* Sessions Card */
.tc-sessions-card {
  padding: 20px;
}

.tc-no-sessions {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

.tc-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tc-session-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.tc-session-item.active {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.05);
}

.tc-session-item.blocked {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

.tc-session-times {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.tc-session-arrow {
  color: var(--text-muted);
}

.tc-session-end.in-progress {
  color: var(--success);
  font-style: italic;
}

.tc-session-duration {
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.tc-session-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.tc-session-badge.active {
  background: var(--success-soft);
  color: var(--success);
}

.tc-session-badge.blocked {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Stop Session Modal */
.tc-stop-modal {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tc-stop-summary {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 16px;
}

.tc-stop-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.tc-stop-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.tc-stop-label {
  color: var(--text-secondary);
  font-size: 13px;
}

.tc-stop-value {
  font-weight: 600;
  font-size: 15px;
}

.tc-stop-value.highlight {
  color: var(--accent);
  font-size: 18px;
}

.tc-stop-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tc-stop-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.tc-stop-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--success-soft);
  border-radius: var(--radius-md);
}

.tc-stop-preview-label {
  color: var(--success);
  font-size: 13px;
}

.tc-stop-preview-value {
  color: var(--success);
  font-size: 20px;
  font-weight: 700;
}

/* Modal Day Sessions */
.tc-modal-day-sessions {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tc-modal-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
}

.tc-modal-total-label {
  font-size: 14px;
  color: var(--accent);
}

.tc-modal-total-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}

.tc-modal-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tc-modal-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

.tc-modal-session.blocked {
  background: var(--danger-soft);
}

.tc-modal-session.active {
  background: var(--success-soft);
}

.tc-modal-session-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.tc-modal-session-sep {
  color: var(--text-muted);
}

.tc-modal-session-duration {
  color: var(--text-muted);
  font-size: 13px;
}

.tc-modal-empty {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
}

/* Team Page Sections */
.tc-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.tc-section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tc-section-title svg {
  width: 20px;
  height: 20px;
}

.tc-section-title-danger {
  color: var(--danger);
}

.tc-section-title-danger svg {
  color: var(--danger);
}

.tc-section-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin: -12px 0 16px 0;
}

/* Team Active List */
.tc-team-active-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tc-team-active-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--success-soft);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-md);
}

.tc-team-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.tc-team-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.tc-team-since {
  font-size: 12px;
  color: var(--text-muted);
}

.tc-team-duration {
  font-size: 18px;
  font-weight: 700;
  color: var(--success);
}

/* Team Stats Grid */
.tc-team-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.tc-team-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.tc-team-stat-card.is-active {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.05);
}

.tc-team-stat-card.has-blocked {
  border-color: rgba(239, 68, 68, 0.3);
}

.tc-team-stat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.tc-team-stat-info {
  flex: 1;
  min-width: 0;
}

.tc-team-stat-name {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  margin-bottom: 6px;
}

.tc-team-stat-bar-container {
  height: 6px;
  background: var(--bg-active);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.tc-team-stat-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.tc-team-stat-hours {
  font-size: 13px;
  color: var(--text-muted);
}

.tc-team-stat-badges {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tc-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.tc-badge.active {
  background: var(--success-soft);
  color: var(--success);
}

.tc-badge.blocked {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Blocked Sessions List */
.tc-blocked-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tc-blocked-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--danger-soft);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
}

.tc-blocked-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.tc-blocked-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.tc-blocked-date {
  font-size: 13px;
  color: var(--text-secondary);
}

.tc-blocked-time {
  font-size: 12px;
  color: var(--text-muted);
}

.tc-blocked-actions {
  display: flex;
  gap: 8px;
}

/* History List */
.tc-history-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.tc-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.tc-history-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.tc-history-name {
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-history-times {
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.tc-history-duration {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 60px;
  text-align: right;
}

/* Unblock Modal */
.tc-unblock-modal {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tc-unblock-info p {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.tc-unblock-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   Unified Calendar - Disponibilités & Heures
   ============================================ */

.unified-calendar-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Header */
.unified-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.unified-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.unified-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.unified-title svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.unified-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

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

/* Tabs */
.unified-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
}

.unified-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.unified-tab svg {
  width: 16px;
  height: 16px;
}

.unified-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.unified-tab.active {
  background: var(--accent);
  color: white;
}

/* User Header (for user detail view) */
.unified-user-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.unified-user-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}

/* Stats Row */
.unified-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 700px) {
  .unified-stats-row {
    grid-template-columns: 1fr;
  }
}

.unified-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

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

.unified-stat-icon svg {
  width: 24px;
  height: 24px;
}

.unified-stat-icon.month {
  background: var(--warning-soft);
  color: var(--warning);
}

.unified-stat-icon.week {
  background: var(--success-soft);
  color: var(--success);
}

.unified-stat-icon.today {
  background: var(--accent-soft);
  color: var(--accent);
}

.unified-stat-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.unified-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Calendar Container */
.unified-calendar-container {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.unified-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.unified-month-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 180px;
  text-align: center;
  margin: 0;
}

/* Legend */
.unified-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.unified-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.unified-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
}

.unified-legend-dot.available {
  background: var(--success);
  border-color: var(--success);
}

.unified-legend-dot.unavailable {
  background: var(--danger);
  border-color: var(--danger);
}

.unified-legend-dot.undefined {
  background: var(--text-muted);
  border-color: var(--text-muted);
  opacity: 0.6;
}

.unified-legend-dot.hours {
  background: var(--accent);
  border-color: var(--accent);
}

.unified-legend-dot.active {
  background: var(--success);
  border-color: var(--success);
  animation: pulse-dot 2s infinite;
}

/* Calendar Grid */
.unified-calendar-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.unified-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.unified-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.unified-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

/* Calendar Day */
.unified-cal-day {
  min-height: 100px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.unified-cal-day:hover:not(.empty):not(.future) {
  border-color: var(--accent);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.unified-cal-day.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
  min-height: 0;
}

.unified-cal-day.past {
  opacity: 0.6;
}

.unified-cal-day.today {
  border-color: var(--accent);
  border-width: 2px;
  background: var(--accent-soft);
}

.unified-cal-day.future {
  opacity: 0.8;
}

.unified-cal-day.has-hours {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, var(--bg-elevated) 100%);
}

.unified-cal-day.has-active {
  border-color: var(--success);
}

.unified-cal-day.has-blocked {
  border-color: var(--danger);
}

.unified-cal-day.available {
  border-left: 3px solid var(--success);
}

.unified-cal-day.unavailable {
  border-left: 3px solid var(--danger);
  background: rgba(239, 68, 68, 0.03);
}

/* Day Header */
.unified-day-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.unified-day-num {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.unified-cal-day.today .unified-day-num {
  color: var(--accent);
}

.unified-day-total {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 10px;
}

.unified-note-indicator {
  font-size: 10px;
  cursor: help;
}

/* Day Body */
.unified-day-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

/* Availability Badge */
.unified-avail-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.unified-avail-badge.available {
  background: var(--success-soft);
  color: var(--success);
}

.unified-avail-badge.unavailable {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Hours Badge */
.unified-hours-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 10px;
}

.unified-hours-badge.active {
  color: var(--success);
  background: var(--success-soft);
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Status Indicators */
.unified-blocked-indicator {
  font-size: 12px;
  font-weight: 700;
  color: var(--danger);
  background: var(--danger-soft);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.unified-active-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse-dot 2s infinite;
}

/* Progress Bar */
.unified-progress-bar {
  height: 4px;
  background: var(--bg-active);
  border-radius: 2px;
  overflow: hidden;
  margin-top: auto;
}

.unified-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Team View - Day Content */
.unified-day-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.unified-users-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.unified-user-item {
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.unified-user-item:hover {
  transform: scale(1.1);
  z-index: 1;
}

.unified-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--success);
}

.unified-users-group.unavailable .unified-user-avatar {
  border-color: var(--text-muted);
  opacity: 0.5;
  filter: grayscale(100%);
}

.unified-user-item.absent .unified-user-avatar {
  border-color: var(--danger);
  opacity: 0.6;
  filter: grayscale(50%);
}

.unified-user-hours {
  position: absolute;
  bottom: -4px;
  right: -4px;
  font-size: 8px;
  font-weight: 700;
  color: white;
  background: var(--accent);
  padding: 1px 4px;
  border-radius: 8px;
  line-height: 1;
}

.unified-user-more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-active);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.unified-user-more.absent {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Hours Bar for Team View */
.unified-day-hours-bar {
  height: 4px;
  background: var(--bg-active);
  border-radius: 2px;
  overflow: hidden;
  margin-top: auto;
}

.unified-day-hours-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success) 0%, var(--accent) 100%);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Help Section */
.unified-help-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.unified-help-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
}

.unified-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.unified-help-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

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

.unified-help-icon svg {
  width: 18px;
  height: 18px;
}

.unified-help-icon.available {
  background: var(--success-soft);
  color: var(--success);
}

.unified-help-icon.unavailable {
  background: var(--bg-active);
  color: var(--text-muted);
}

.unified-help-icon.hours {
  background: var(--accent-soft);
  color: var(--accent);
}

.unified-help-icon.total {
  background: var(--warning-soft);
  color: var(--warning);
}

.unified-help-icon.click {
  background: var(--info-soft);
  color: var(--info);
}

.unified-help-icon.progress {
  background: var(--accent-soft);
  color: var(--accent);
}

.unified-help-item strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.unified-help-item p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Modal Styles */
.unified-modal-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.unified-modal-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.unified-modal-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
}

.unified-modal-section-title svg {
  width: 16px;
  height: 16px;
}

.unified-modal-section-title.available {
  color: var(--success);
}

.unified-modal-section-title.unavailable {
  color: var(--text-muted);
}

.unified-modal-section-title.hours {
  color: var(--accent);
}

.unified-modal-users {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.unified-modal-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s ease;
}

.unified-modal-user:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.unified-modal-user.absent {
  opacity: 0.7;
  border-left: 3px solid var(--danger);
}

.unified-modal-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.unified-modal-user-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.unified-modal-user-name {
  font-weight: 500;
  color: var(--text-primary);
}

.unified-modal-user-note {
  font-size: 12px;
  color: var(--text-muted);
}

.unified-modal-user-hours {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.unified-modal-sessions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.unified-modal-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.unified-modal-session.active {
  background: var(--success-soft);
  border-color: rgba(34, 197, 94, 0.3);
}

.unified-modal-session.blocked {
  background: var(--danger-soft);
  border-color: rgba(239, 68, 68, 0.3);
}

.unified-modal-session-time {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.unified-modal-session-duration {
  font-size: 13px;
  color: var(--text-muted);
}

.unified-modal-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
}

.unified-modal-total span:first-child {
  font-size: 14px;
  color: var(--accent);
}

.unified-modal-total-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
}

.unified-modal-empty {
  text-align: center;
  padding: 32px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Availability Buttons in Modal */
.unified-avail-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Responsive */
@media (max-width: 900px) {
  .unified-calendar-header {
    flex-direction: column;
    align-items: stretch;
  }

  .unified-header-right {
    justify-content: flex-start;
  }

  .unified-cal-day {
    min-height: 80px;
    padding: 6px;
  }

  .unified-user-avatar {
    width: 24px;
    height: 24px;
  }

  .unified-day-num {
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  .unified-calendar-page {
    padding: 16px;
  }

  .unified-calendar-container {
    padding: 16px;
  }

  .unified-cal-day {
    min-height: 60px;
  }

  .unified-cal-day.team-view {
    min-height: 70px;
  }

  .unified-help-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Unified Page Design System
   Applied to: Dashboard, Projects, Templates,
   Users, Apps, and all other pages
   ============================================ */

/* Page Container */
.page-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100%;
}

/* Page Header */
.page-layout-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.page-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-layout-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.page-layout-title svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.page-layout-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Back Link */
.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.15s ease;
}

.page-back-link:hover {
  color: var(--accent);
}

.page-back-link svg {
  width: 16px;
  height: 16px;
}

/* Stats Row */
.page-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.page-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s ease;
}

.page-stat-card:hover {
  border-color: var(--border-hover);
}

.page-stat-card.clickable {
  cursor: pointer;
}

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

.page-stat-icon svg {
  width: 24px;
  height: 24px;
}

.page-stat-icon.primary {
  background: var(--accent-soft);
  color: var(--accent);
}

.page-stat-icon.success {
  background: var(--success-soft);
  color: var(--success);
}

.page-stat-icon.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.page-stat-icon.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.page-stat-icon.info {
  background: var(--info-soft);
  color: var(--info);
}

.page-stat-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

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

.page-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-stat-value.small {
  font-size: 16px;
}

/* Section Card */
.page-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.page-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.page-card-title svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.page-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-card-body {
  padding: 20px;
}

.page-card-body.no-padding {
  padding: 0;
}

/* Grid Layouts */
.page-grid {
  display: grid;
  gap: 16px;
}

.page-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.page-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.page-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.page-grid.auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (max-width: 900px) {
  .page-grid.cols-3,
  .page-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .page-grid.cols-2,
  .page-grid.cols-3,
  .page-grid.cols-4 {
    grid-template-columns: 1fr;
  }
}

/* Item Cards (for projects, templates, users, apps) */
.page-item-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.15s ease;
}

.page-item-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-item-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.page-item-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.page-item-icon svg {
  width: 22px;
  height: 22px;
}

.page-item-icon img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.page-item-info {
  flex: 1;
  min-width: 0;
}

.page-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-item-desc {
  font-size: 13px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.page-item-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.page-item-badge svg {
  width: 12px;
  height: 12px;
}

.page-item-badge.success {
  background: var(--success-soft);
  color: var(--success);
}

.page-item-badge.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.page-item-badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

/* User Card (special layout) */
.page-user-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.15s ease;
}

.page-user-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

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

.page-user-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.page-user-username {
  font-size: 13px;
  color: var(--text-muted);
}

.page-user-arrow {
  color: var(--text-muted);
  transition: transform 0.15s ease;
}

.page-user-card:hover .page-user-arrow {
  transform: translateX(4px);
  color: var(--accent);
}

.page-user-arrow svg {
  width: 18px;
  height: 18px;
}

/* List Items */
.page-list {
  display: flex;
  flex-direction: column;
}

.page-list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}

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

.page-list-item:hover {
  background: var(--bg-hover);
}

/* Help/Info Section */
.page-help {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.page-help-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.page-help-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.page-help-title svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.page-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.page-help-item {
  display: flex;
  gap: 12px;
}

.page-help-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.page-help-icon svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.page-help-content h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.page-help-content p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Alert Boxes */
.page-alert {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid;
}

.page-alert.info {
  background: var(--info-soft);
  border-color: rgba(59, 130, 246, 0.3);
}

.page-alert.warning {
  background: var(--warning-soft);
  border-color: rgba(234, 179, 8, 0.3);
}

.page-alert.danger {
  background: var(--danger-soft);
  border-color: rgba(239, 68, 68, 0.3);
}

.page-alert.success {
  background: var(--success-soft);
  border-color: rgba(34, 197, 94, 0.3);
}

.page-alert-icon {
  flex-shrink: 0;
}

.page-alert-icon svg {
  width: 20px;
  height: 20px;
}

.page-alert.info .page-alert-icon {
  color: var(--info);
}

.page-alert.warning .page-alert-icon {
  color: var(--warning);
}

.page-alert.danger .page-alert-icon {
  color: var(--danger);
}

.page-alert.success .page-alert-icon {
  color: var(--success);
}

.page-alert-content h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--text-primary);
}

.page-alert-content p {
  font-size: 13px;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.page-alert-content ul {
  margin: 8px 0 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-secondary);
}

.page-alert-content li {
  margin-bottom: 4px;
}

/* Empty State */
.page-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
}

.page-empty-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.page-empty-icon svg {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
}

.page-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.page-empty-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  max-width: 400px;
}

/* Quick Action Widget */
.page-quick-widget {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  gap: 16px;
}

.page-quick-widget.active {
  border-color: var(--success);
  background: var(--success-soft);
}

.page-quick-widget.blocked {
  border-color: var(--warning);
  background: var(--warning-soft);
}

.page-quick-widget-content {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.page-quick-widget-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.page-quick-widget.active .page-quick-widget-icon {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.page-quick-widget.blocked .page-quick-widget-icon {
  background: rgba(234, 179, 8, 0.2);
  color: var(--warning);
}

.page-quick-widget-icon svg {
  width: 20px;
  height: 20px;
}

.page-quick-widget-info {
  flex: 1;
  min-width: 0;
}

.page-quick-widget-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.page-quick-widget-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.page-quick-widget-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Progress Indicator */
.page-progress {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}

.page-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.page-progress-bar.success {
  background: var(--success);
}

.page-progress-bar.warning {
  background: var(--warning);
}

/* Tabs Component */
.page-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
}

.page-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.page-tab svg {
  width: 16px;
  height: 16px;
}

.page-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.page-tab.active {
  background: var(--accent);
  color: white;
}

/* Status badges in mini format */
.page-mini-badges {
  display: flex;
  gap: 4px;
}

.page-mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
}

.page-mini-badge.todo {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}

.page-mini-badge.in_progress {
  background: var(--accent-soft);
  color: var(--accent);
}

.page-mini-badge.done_pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.page-mini-badge.validated {
  background: var(--success-soft);
  color: var(--success);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .page-layout {
    padding: 20px;
  }

  .page-layout-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header-right {
    justify-content: flex-start;
  }

  .page-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .page-layout {
    padding: 16px;
  }

  .page-layout-title {
    font-size: 20px;
  }

  .page-stats-row {
    grid-template-columns: 1fr;
  }

  .page-stat-card {
    padding: 16px;
  }

  .page-stat-icon {
    width: 40px;
    height: 40px;
  }

  .page-stat-icon svg {
    width: 20px;
    height: 20px;
  }

  .page-stat-value {
    font-size: 18px;
  }

  .page-help-grid {
    grid-template-columns: 1fr;
  }

  .page-quick-widget {
    flex-direction: column;
    align-items: stretch;
  }

  .page-quick-widget-content {
    flex-wrap: wrap;
  }
}

/* ============================================
   Applications Portal - Cards Design
   ============================================ */

.apps-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.app-portal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.app-portal-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.app-portal-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.app-portal-card:hover::before {
  opacity: 1;
}

.app-portal-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
  border-radius: 16px;
  margin-bottom: 16px;
  color: var(--primary);
}

.app-portal-icon svg {
  width: 28px;
  height: 28px;
}

.app-portal-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.app-portal-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-portal-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.2s ease;
  margin-top: auto;
}

.app-portal-link svg {
  width: 14px;
  height: 14px;
}

.app-portal-card:hover .app-portal-link {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .apps-portal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .app-portal-card {
    padding: 20px 16px;
  }

  .app-portal-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
  }

  .app-portal-icon svg {
    width: 24px;
    height: 24px;
  }

  .app-portal-name {
    font-size: 0.9rem;
  }

  .app-portal-desc {
    display: none;
  }

  .app-portal-link {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   User Detail - Unified Calendar with Hours
   ============================================ */

.user-month-hours-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.user-month-hours-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.user-month-hours-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
}

.legend-dot.hours {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
}

.calendar-days-mini.unified {
  gap: 6px;
}

.calendar-day-mini.unified {
  position: relative;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 4px 2px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: all 0.15s ease;
  overflow: hidden;
}

.calendar-day-mini.unified.today {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.calendar-day-mini.unified.available {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.calendar-day-mini.unified.unavailable {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.05);
}

.calendar-day-mini.unified.has-hours {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.08) 100%);
}

.calendar-day-mini.unified.blocked {
  border-color: var(--warning);
}

.calendar-day-mini.unified.active {
  border-color: var(--success);
}

.calendar-day-mini.unified .day-number-mini {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  z-index: 1;
}

.calendar-day-mini.unified.past .day-number-mini {
  color: var(--text-muted);
}

.calendar-day-hours-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  border-radius: 0 0 var(--radius) var(--radius);
  transition: width 0.3s ease;
}

.calendar-day-hours {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: auto;
  padding-bottom: 6px;
  z-index: 1;
}

.calendar-day-status {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 50%;
  z-index: 2;
}

.calendar-day-status.blocked {
  background: var(--warning);
  color: white;
}

.calendar-day-status.active-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.3);
    opacity: 0.7;
  }
}

/* ============================================
   Timeclock Admin Page - Modern Dashboard
   ============================================ */

.tc-admin-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Quick Stats Bar */
.tc-quick-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tc-quick-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-width: 120px;
}

.tc-quick-stat.warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: var(--warning);
}

.tc-quick-stat.active {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--success);
}

.tc-quick-stat.highlight {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border-color: var(--primary);
}

.tc-quick-stat-icon {
  color: var(--text-muted);
  opacity: 0.7;
}

.tc-quick-stat.warning .tc-quick-stat-icon { color: var(--warning); opacity: 1; }
.tc-quick-stat.active .tc-quick-stat-icon { color: var(--success); opacity: 1; }
.tc-quick-stat.highlight .tc-quick-stat-icon { color: var(--primary); opacity: 1; }

.tc-quick-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

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

/* Blocked Alert Banner */
.tc-blocked-alert {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(234, 88, 12, 0.08));
  border: 1px solid var(--warning);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tc-blocked-alert:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(234, 88, 12, 0.12));
  transform: translateY(-1px);
}

.tc-blocked-alert-icon {
  color: var(--warning);
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.tc-blocked-alert-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tc-blocked-alert-content strong {
  color: var(--warning);
  font-size: 0.95rem;
}

.tc-blocked-alert-content span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.tc-blocked-alert-arrow {
  font-size: 1.25rem;
  color: var(--warning);
}

/* Filters Bar */
.tc-filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.tc-period-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-inset);
  padding: 4px;
  border-radius: var(--radius);
}

.tc-period-tab {
  padding: 8px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tc-period-tab:hover {
  color: var(--text);
  background: var(--bg-surface);
}

.tc-period-tab.active {
  background: var(--primary);
  color: white;
}

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

.tc-filter-select {
  min-width: 140px;
  font-size: 0.85rem;
}

.tc-view-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg-inset);
  padding: 3px;
  border-radius: var(--radius);
}

.tc-view-btn {
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tc-view-btn:hover {
  color: var(--text);
  background: var(--bg-surface);
}

.tc-view-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Overview Grid */
.tc-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.tc-user-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tc-user-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.tc-user-card.is-active {
  border-color: var(--success);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.03), transparent);
}

.tc-user-card.has-blocked {
  border-color: var(--warning);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.03), transparent);
}

.tc-user-card.expanded {
  grid-column: span 1;
}

.tc-user-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tc-user-avatar-wrap {
  position: relative;
}

.tc-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.tc-user-online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: var(--success);
  border: 2px solid var(--bg-surface);
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

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

.tc-user-name {
  display: block;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.tc-user-hours-badge {
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  padding: 6px 12px;
  border-radius: 20px;
}

.tc-user-hours-value {
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
}

/* Weekly Bar Chart */
.tc-user-week-bar {
  display: flex;
  gap: 3px;
  margin-top: 12px;
  height: 32px;
  align-items: flex-end;
  background: var(--bg-inset);
  padding: 4px;
  border-radius: var(--radius);
}

.tc-day-bar {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  border-radius: 2px;
  background: var(--bg-surface);
  overflow: hidden;
}

.tc-day-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--primary), #8b5cf6);
  border-radius: 2px;
  transition: height 0.3s ease;
  min-height: 0;
}

.tc-day-bar.has-hours .tc-day-bar-fill {
  min-height: 4px;
}

.tc-day-bar.today {
  background: rgba(99, 102, 241, 0.1);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.tc-day-bar.today .tc-day-bar-fill {
  background: var(--primary);
}

/* User Badges */
.tc-user-badges {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.tc-badge {
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 12px;
}

.tc-badge.active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.tc-badge.blocked {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

/* Expanded Sessions */
.tc-user-sessions {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tc-compact-session {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 16px;
  background: var(--bg-inset);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.tc-compact-session.blocked {
  background: rgba(245, 158, 11, 0.08);
}

.tc-compact-session.active {
  background: rgba(16, 185, 129, 0.08);
}

.tc-compact-date {
  color: var(--text-muted);
  min-width: 50px;
}

.tc-compact-time {
  flex: 1;
  font-family: var(--font-mono);
}

.tc-compact-duration {
  font-weight: 600;
  color: var(--primary);
}

.tc-compact-actions {
  display: flex;
  gap: 4px;
}

/* Enhanced User Card UX */
.tc-user-card {
  padding: 0;
  overflow: hidden;
}

.tc-user-card-clickable {
  padding: 16px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tc-user-card-clickable:hover {
  background: var(--bg-hover);
}

.tc-user-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tc-expand-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.tc-expand-indicator.expanded {
  transform: rotate(180deg);
}

.tc-expand-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 12px;
  background: var(--bg-inset);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--primary);
  transition: all 0.15s ease;
}

.tc-user-card-clickable:hover .tc-expand-hint {
  background: rgba(99, 102, 241, 0.1);
}

.tc-expand-hint-text {
  font-weight: 500;
}

.tc-expand-hint-icon {
  font-size: 0.7rem;
}

/* Sessions Panel */
.tc-user-sessions-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background: var(--bg-inset);
  border-top: 1px solid var(--border);
}

.tc-user-sessions-panel.open {
  max-height: 500px;
}

.tc-sessions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
}

.tc-sessions-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tc-sessions-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 2px 8px;
  border-radius: 10px;
}

.tc-sessions-list {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tc-no-sessions {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
  font-style: italic;
}

.tc-sessions-more {
  padding: 8px 16px 16px;
  display: flex;
  justify-content: center;
}

.tc-sessions-more .btn {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Improved compact session */
.tc-compact-session {
  position: relative;
  transition: all 0.15s ease;
}

.tc-compact-session:hover {
  transform: translateX(4px);
  background: var(--bg-elevated);
}

.tc-compact-session::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--success);
  border-radius: 3px 0 0 3px;
}

.tc-compact-session.blocked::before {
  background: var(--warning);
}

.tc-compact-session.active::before {
  background: var(--success);
  animation: pulse-bar 1.5s infinite;
}

@keyframes pulse-bar {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Timeline View */
.tc-timeline {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tc-timeline-header {
  display: flex;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.tc-timeline-user-col {
  width: 200px;
  padding: 12px 16px;
  flex-shrink: 0;
}

.tc-timeline-day-col {
  flex: 1;
  min-width: 60px;
  text-align: center;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tc-timeline-day-col.today {
  background: rgba(99, 102, 241, 0.08);
}

.tc-timeline-day-name {
  font-size: 0.7rem;
}

.tc-timeline-day-num {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.tc-timeline-day-col.today .tc-timeline-day-num {
  color: var(--primary);
}

.tc-timeline-total-col {
  width: 80px;
  padding: 12px 16px;
  text-align: right;
  flex-shrink: 0;
}

.tc-timeline-body {
  max-height: 500px;
  overflow-y: auto;
}

.tc-timeline-row {
  display: flex;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.tc-timeline-row:last-child {
  border-bottom: none;
}

.tc-timeline-row:hover {
  background: var(--bg-elevated);
}

.tc-timeline-row.is-active {
  background: rgba(16, 185, 129, 0.03);
}

.tc-timeline-row.has-blocked {
  background: rgba(245, 158, 11, 0.03);
}

.tc-timeline-user {
  width: 200px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tc-timeline-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.tc-timeline-name {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-online-indicator {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

.tc-timeline-cell {
  flex: 1;
  min-width: 60px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tc-timeline-cell:hover {
  background: rgba(99, 102, 241, 0.05);
}

.tc-timeline-cell.today {
  background: rgba(99, 102, 241, 0.04);
}

.tc-timeline-cell.blocked::before {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--warning);
  border-radius: 50%;
}

.tc-timeline-cell.active::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

.tc-cell-bar {
  height: 28px;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  border-radius: 4px;
  transition: width 0.3s ease;
  min-width: 4px;
}

.tc-cell-hours {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
}

.tc-cell-alert {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  background: var(--warning);
  color: white;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tc-timeline-total {
  width: 80px;
  padding: 12px 16px;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  color: var(--primary);
}

/* List View */
.tc-list-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tc-date-group {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tc-date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border);
}

.tc-date-title {
  font-weight: 600;
  color: var(--text);
}

.tc-date-total {
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

.tc-sessions-list {
  display: flex;
  flex-direction: column;
}

.tc-list-session {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.tc-list-session:last-child {
  border-bottom: none;
}

.tc-list-session:hover {
  background: var(--bg-elevated);
}

.tc-list-session.blocked {
  background: rgba(245, 158, 11, 0.05);
}

.tc-list-session.active {
  background: rgba(16, 185, 129, 0.05);
}

.tc-list-session-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.tc-list-session-user img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.tc-list-session-user span {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-list-session-time {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
  min-width: 120px;
}

.tc-list-session-time .tc-arrow {
  color: var(--text-muted);
  margin: 0 4px;
}

.tc-list-session-duration {
  font-weight: 600;
  color: var(--primary);
  min-width: 70px;
}

.tc-list-session-actions {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

/* Day Sessions Modal */
.tc-day-sessions-modal {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Forms */
.tc-add-session-form .form-row,
.tc-edit-session-form .form-row,
.tc-date-picker-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tc-edit-session-form .tc-edit-session-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-inset);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.tc-edit-session-form .tc-edit-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.form-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.form-input-sm {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .tc-overview-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .tc-timeline-user-col {
    width: 150px;
  }
}

@media (max-width: 768px) {
  .tc-quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .tc-quick-stat {
    min-width: unset;
  }

  .tc-filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .tc-period-tabs {
    justify-content: center;
  }

  .tc-filters-right {
    flex-wrap: wrap;
    justify-content: center;
  }

  .tc-overview-grid {
    grid-template-columns: 1fr;
  }

  .tc-timeline {
    overflow-x: auto;
  }

  .tc-timeline-header,
  .tc-timeline-row {
    min-width: 600px;
  }

  .tc-list-session {
    flex-wrap: wrap;
    gap: 8px;
  }

  .tc-list-session-user {
    min-width: 100%;
  }

  .tc-add-session-form .form-row,
  .tc-edit-session-form .form-row {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   User Detail Page - Enhanced Hours View
   ============================================ */

.user-detail-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.user-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.user-detail-avatar-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-detail-avatar-wrap {
  position: relative;
}

.user-detail-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}

.user-detail-online-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: var(--success);
  border: 3px solid var(--bg);
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

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

.user-detail-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.user-detail-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

.user-detail-quick-stats {
  display: flex;
  gap: 12px;
}

.user-quick-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-width: 90px;
}

.user-quick-stat.warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: var(--warning);
}

.user-quick-stat.clickable {
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-quick-stat.clickable:hover {
  transform: translateY(-2px);
}

.user-quick-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.user-quick-stat.warning .user-quick-stat-value {
  color: var(--warning);
}

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

/* Week Timeline Card */
.user-week-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), rgba(139, 92, 246, 0.03));
}

.user-week-timeline {
  display: flex;
  gap: 8px;
  padding: 8px 0;
}

.user-week-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

.user-week-day:hover {
  border-color: var(--primary);
  background: var(--bg-elevated);
}

.user-week-day.today {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
}

.user-week-day.has-hours {
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.03), transparent);
}

.user-week-day-bar {
  width: 100%;
  height: 50px;
  background: var(--bg-inset);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.user-week-day-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--primary), #8b5cf6);
  border-radius: var(--radius-sm);
  transition: height 0.3s ease;
  min-height: 2px;
}

.user-week-day-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.user-week-day.today .user-week-day-label {
  color: var(--primary);
}

.user-week-day-hours {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

.user-week-day.has-hours .user-week-day-hours {
  color: var(--primary);
}

/* Tabs */
.user-detail-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-surface);
  padding: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.user-detail-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.user-detail-tab:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.user-detail-tab.active {
  background: var(--primary);
  color: white;
}

.user-detail-tab svg {
  width: 16px;
  height: 16px;
}

/* Month Total Badge */
.user-month-total {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  padding: 6px 12px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
}

/* Sessions List */
.user-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-sessions-day {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.user-sessions-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border);
}

.user-sessions-day-date {
  font-weight: 600;
  color: var(--text);
}

.user-sessions-day-total {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
}

.user-sessions-day-list {
  display: flex;
  flex-direction: column;
}

.user-session-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

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

.user-session-item:hover {
  background: var(--bg-elevated);
}

.user-session-item.blocked {
  background: rgba(245, 158, 11, 0.05);
}

.user-session-item.active {
  background: rgba(16, 185, 129, 0.05);
}

.user-session-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  min-width: 130px;
}

.user-session-arrow {
  color: var(--text-muted);
}

.user-session-duration {
  font-weight: 600;
  color: var(--primary);
  min-width: 70px;
}

.user-session-status {
  flex: 1;
}

.user-session-actions {
  display: flex;
  gap: 6px;
}

/* User Tasks Tab - Enhanced UX */
.user-tasks-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-tasks-group {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.user-tasks-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border);
}

.user-tasks-group-header.status-in-progress {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), transparent);
  border-left: 3px solid var(--primary);
}

.user-tasks-group-header.status-todo {
  background: linear-gradient(90deg, rgba(107, 114, 128, 0.1), transparent);
  border-left: 3px solid var(--text-muted);
}

.user-tasks-group-header.status-pending {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.1), transparent);
  border-left: 3px solid var(--warning);
}

.user-tasks-group-header.status-validated {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.1), transparent);
  border-left: 3px solid var(--success);
}

.user-tasks-group-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.user-tasks-group-label {
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.user-tasks-group-count {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  background: var(--bg);
  border-radius: 12px;
  color: var(--text-muted);
}

.user-tasks-list {
  display: flex;
  flex-direction: column;
}

.user-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.user-task-item:hover {
  background: var(--bg-elevated);
}

.user-task-content {
  flex: 1;
  min-width: 0;
}

.user-task-title {
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-task-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.user-task-project {
  padding: 2px 8px;
  background: var(--bg-inset);
  border-radius: 4px;
}

.user-task-subtasks {
  color: var(--primary);
}

.user-task-priority {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.user-task-priority.priority-high {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.user-task-priority.priority-medium {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.user-task-priority.priority-low {
  background: rgba(107, 114, 128, 0.15);
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .user-detail-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-detail-quick-stats {
    width: 100%;
    justify-content: space-between;
  }

  .user-quick-stat {
    flex: 1;
    min-width: unset;
    padding: 10px 12px;
  }

  .user-week-timeline {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .user-week-day {
    min-width: 70px;
    flex-shrink: 0;
  }

  .user-detail-tabs {
    flex-wrap: wrap;
  }

  .user-detail-tab {
    flex: 1;
    justify-content: center;
  }

  .user-session-item {
    flex-wrap: wrap;
    gap: 8px;
  }

  .user-session-time {
    min-width: 100%;
  }

  .user-task-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .user-task-priority {
    align-self: flex-start;
  }
}

/* ============================================
   Session Modals - Enhanced UX
   ============================================ */

.session-modal {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.session-modal-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.session-modal-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.session-modal-label svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

/* User Selection Grid */
.session-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
}

.session-user-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-inset);
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

.session-user-option:hover {
  background: var(--bg-elevated);
  border-color: var(--border);
}

.session-user-option.selected {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
}

.session-user-option img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.session-user-option span {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Date Selection */
.session-date-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.session-date-btn {
  padding: 10px 16px;
  background: var(--bg-inset);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.session-date-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--border);
}

.session-date-btn.selected {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Time Presets */
.session-time-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.session-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.session-preset-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.session-preset-btn .preset-time {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Time Inputs */
.session-time-inputs {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 16px;
  background: var(--bg-inset);
  border-radius: var(--radius-lg);
}

.session-time-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.session-time-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.session-time-input {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  padding: 12px;
}

.session-time-arrow {
  font-size: 1.5rem;
  color: var(--text-muted);
  padding-bottom: 12px;
}

.session-duration-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: var(--radius);
  min-width: 80px;
}

.session-duration-display .duration-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
}

.session-duration-display .duration-label {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
}

/* Summary */
.session-modal-summary {
  padding: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
}

.summary-placeholder {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 8px;
}

.summary-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.summary-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-user img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.summary-user strong {
  font-size: 1rem;
}

.summary-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.summary-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.summary-time {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  font-family: var(--font-mono);
}

/* Edit Session Modal */
.edit-session-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-inset);
  border-radius: var(--radius-lg);
}

.edit-session-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.edit-session-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.edit-session-user-info strong {
  font-size: 1.1rem;
}

.edit-session-original {
  margin-left: auto;
}

.edit-time-inputs {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 20px;
  background: var(--bg-inset);
  border-radius: var(--radius-lg);
}

.edit-time-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.edit-time-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.edit-time-arrow {
  font-size: 1.5rem;
  color: var(--text-muted);
  padding-bottom: 10px;
}

.edit-duration-display {
  text-align: center;
  padding: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: var(--radius);
  color: var(--primary);
}

.edit-duration-display strong {
  font-size: 1.1rem;
}

/* Quick Adjust Buttons */
.quick-adjust-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.adjust-btn {
  padding: 8px 14px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.adjust-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--primary);
}

/* Unblock Modal */
.session-modal-unblock .unblock-header {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(234, 88, 12, 0.08));
  border: 1px solid var(--warning);
  border-radius: var(--radius-lg);
}

.unblock-icon {
  color: var(--warning);
  animation: pulse-warning 2s infinite;
}

.unblock-icon svg {
  width: 32px;
  height: 32px;
}

.unblock-info h4 {
  margin: 0 0 4px 0;
  color: var(--warning);
  font-size: 1rem;
}

.unblock-info p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.unblock-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-inset);
  border-radius: var(--radius);
}

.unblock-user img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.unblock-user div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.unblock-user span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.unblock-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--bg-inset);
  border-radius: var(--radius-lg);
}

.unblock-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.unblock-detail-row.highlight {
  padding: 12px;
  background: var(--bg-surface);
  border-radius: var(--radius);
}

.unblock-detail-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.unblock-detail-value {
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.form-input-lg {
  font-size: 1.25rem;
  font-weight: 600;
  padding: 12px 16px;
  text-align: center;
  max-width: 140px;
}

.unblock-duration {
  text-align: center;
  padding: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
}

.unblock-duration strong {
  color: var(--primary);
  font-size: 1rem;
}

.unblock-quick-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.unblock-quick-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.unblock-quick-btns {
  display: flex;
  gap: 8px;
}

.quick-time-btn {
  flex: 1;
  padding: 10px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-time-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--primary);
  color: var(--primary);
}

/* Timezone Hint */
.timezone-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.timezone-hint svg {
  flex-shrink: 0;
  color: var(--primary);
}

.timezone-hint strong {
  color: var(--text);
  font-weight: 600;
}

/* Modal Size */
.modal-lg .modal-content {
  max-width: 640px;
}

/* Button variants */
.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-ghost {
  background: transparent;
}

.btn-ghost:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Responsive */
@media (max-width: 640px) {
  .session-user-grid {
    grid-template-columns: 1fr;
  }

  .session-time-presets {
    grid-template-columns: repeat(2, 1fr);
  }

  .session-time-inputs {
    flex-wrap: wrap;
  }

  .session-time-group {
    flex: 1 1 40%;
  }

  .session-time-arrow {
    display: none;
  }

  .session-duration-display {
    width: 100%;
    margin-top: 12px;
  }

  .summary-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .summary-details {
    align-items: flex-start;
  }

  .edit-time-inputs {
    flex-direction: column;
    gap: 12px;
  }

  .edit-time-group {
    width: 100%;
  }

  .edit-time-arrow {
    display: none;
  }

  .quick-adjust-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .unblock-quick-btns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   Team Calendar - Enhanced Member Display
   ============================================ */

/* Header stats badges */
.team-day-stats {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.team-stat {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 600;
}

.team-stat.available {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.team-stat.unavailable {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* Members list container */
.team-members-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  max-height: 120px;
}

/* Individual member row */
.team-member-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--bg-inset);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 28px;
}

.team-member-row:hover {
  background: var(--bg-elevated);
  transform: translateX(2px);
}

/* Status indicators via left border */
.team-member-row.member-available {
  border-left-color: var(--success);
  background: rgba(16, 185, 129, 0.08);
}

.team-member-row.member-unavailable {
  border-left-color: var(--danger);
  background: rgba(239, 68, 68, 0.06);
  opacity: 0.7;
}

.team-member-row.member-undefined {
  border-left-color: var(--text-muted);
  background: rgba(100, 116, 139, 0.06);
  opacity: 0.6;
}

/* Member avatar */
.team-member-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.team-member-row.member-unavailable .team-member-avatar,
.team-member-row.member-undefined .team-member-avatar {
  filter: grayscale(60%);
}

/* Member name */
.team-member-name {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.team-member-row.member-unavailable .team-member-name,
.team-member-row.member-undefined .team-member-name {
  color: var(--text-muted);
}

/* Member hours badge */
.team-member-hours {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(99, 102, 241, 0.12);
  padding: 2px 6px;
  border-radius: 10px;
  flex-shrink: 0;
}

.team-member-row.has-hours {
  background: rgba(99, 102, 241, 0.06);
}

.team-member-row.member-available.has-hours {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(99, 102, 241, 0.08));
}

/* Day footer with total hours */
.team-day-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.team-total-hours {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
  padding: 3px 10px;
  border-radius: 12px;
}

/* No members placeholder */
.team-no-members {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Make the day cells taller for the team view */
.unified-cal-day.team-view {
  min-height: 160px;
  display: flex;
  flex-direction: column;
}

.unified-cal-day.team-view .unified-day-header {
  flex-shrink: 0;
}

/* Scrollbar styling for members list */
.team-members-list::-webkit-scrollbar {
  width: 4px;
}

.team-members-list::-webkit-scrollbar-track {
  background: transparent;
}

.team-members-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.team-members-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .team-member-name {
    display: none;
  }

  .team-member-row {
    padding: 3px 4px;
    gap: 4px;
  }

  .unified-cal-day.team-view {
    min-height: 140px;
  }
}

@media (max-width: 768px) {
  .unified-cal-day.team-view {
    min-height: 100px;
  }

  .team-members-list {
    max-height: 70px;
  }

  .team-member-avatar {
    width: 16px;
    height: 16px;
  }

  .team-member-hours {
    font-size: 0.6rem;
    padding: 1px 4px;
  }

  .team-stat {
    width: 14px;
    height: 14px;
    font-size: 0.55rem;
  }
}

/* ====================================
   Timeclock Admin - User Cards & Modal
   ==================================== */

/* User Cards Grid */
.tc-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* User Card */
.tc-user-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tc-user-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.tc-user-card.is-active {
  border-color: var(--success);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
}

.tc-user-card.has-blocked {
  border-color: var(--warning);
}

/* User Card Header */
.tc-user-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tc-user-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.tc-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.tc-user-online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  background: var(--success);
  border: 2px solid var(--card-bg);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

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

.tc-user-name {
  display: block;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-user-role {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tc-user-hours-badge {
  background: var(--primary);
  color: white;
  padding: 0.35rem 0.65rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.tc-user-hours-value {
  font-variant-numeric: tabular-nums;
}

/* Week Activity Bar */
.tc-user-week-bar {
  display: flex;
  gap: 3px;
  margin-bottom: 0.75rem;
}

.tc-week-day {
  flex: 1;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.tc-week-day-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.tc-week-day.has-blocked .tc-week-day-fill {
  background: var(--warning);
}

/* Card Action Hint */
.tc-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.tc-card-action-text {
  font-weight: 500;
}

.tc-card-action svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.tc-user-card:hover .tc-card-action svg {
  transform: translateX(4px);
}

.tc-user-card:hover .tc-card-action {
  color: var(--primary);
}

/* User Badges */
.tc-user-badges {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.tc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
}

.tc-badge.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.tc-badge.blocked {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

/* ====================================
   Timeclock User Modal (Full Screen)
   ==================================== */

.modal.modal-fullscreen {
  width: 95vw;
  max-width: 1100px;
  height: 90vh;
  max-height: 90vh;
  overflow: hidden;
}

.modal.modal-fullscreen .modal-header {
  display: none;
}

.modal.modal-fullscreen .modal-body {
  padding: 0;
  flex: 1;
  overflow: hidden;
}

.modal.modal-fullscreen .modal-footer:empty {
  display: none;
}

.tc-user-modal {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Modal Header */
.tc-user-modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark, #4338ca) 100%);
  color: white;
}

.tc-user-modal-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.tc-user-modal-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  object-fit: cover;
}

.tc-user-modal-online {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: var(--success);
  border: 3px solid white;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.tc-user-modal-name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-user-modal-role {
  opacity: 0.85;
  font-size: 0.9rem;
}

.tc-user-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.tc-user-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.tc-user-modal-close svg {
  width: 20px;
  height: 20px;
}

/* Modal Stats */
.tc-user-modal-stats {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.tc-user-modal-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--card-bg);
  border-radius: 10px;
  flex: 1;
  min-width: 140px;
}

.tc-user-modal-stat.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tc-user-modal-stat.warning .tc-user-modal-stat-icon {
  color: var(--warning);
}

.tc-user-modal-stat.active {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tc-user-modal-stat.active .tc-user-modal-stat-icon {
  color: var(--success);
}

.tc-user-modal-stat-icon {
  color: var(--primary);
}

.tc-user-modal-stat-icon svg {
  width: 24px;
  height: 24px;
}

.tc-user-modal-stat-content {
  display: flex;
  flex-direction: column;
}

.tc-user-modal-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.tc-user-modal-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Modal Actions */
.tc-user-modal-actions {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

/* Modal Sessions List */
.tc-user-modal-sessions {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.tc-user-modal-sessions-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1rem 0;
}

/* Day Group */
.tc-user-modal-day {
  margin-bottom: 1.5rem;
}

.tc-user-modal-day:last-child {
  margin-bottom: 0;
}

.tc-user-modal-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.tc-user-modal-day-date {
  font-weight: 600;
  color: var(--text);
}

.tc-user-modal-day-total {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.tc-user-modal-day-sessions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Individual Session Row */
.tc-modal-session {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border-left: 3px solid var(--success);
  transition: background 0.2s;
}

.tc-modal-session:hover {
  background: var(--bg-tertiary);
}

.tc-modal-session.blocked {
  border-left-color: var(--warning);
  background: rgba(245, 158, 11, 0.05);
}

.tc-modal-session.active {
  border-left-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.tc-modal-session-times {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.tc-modal-session-time {
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.tc-modal-session-arrow {
  color: var(--text-muted);
}

.tc-modal-session-arrow svg {
  width: 16px;
  height: 16px;
}

.tc-modal-session-pending {
  color: var(--success);
  font-style: italic;
  font-size: 0.85rem;
}

.tc-modal-session-duration {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.tc-modal-session-status {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.tc-modal-session-status.blocked {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.tc-modal-session-status.active {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.tc-modal-session-actions {
  display: flex;
  gap: 0.25rem;
}

.tc-modal-session-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.tc-modal-session-btn:hover {
  background: var(--bg-tertiary);
  color: var(--primary);
}

.tc-modal-session-btn.danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.tc-modal-session-btn.warning:hover {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.tc-modal-session-btn svg {
  width: 16px;
  height: 16px;
}

/* Empty State */
.tc-modal-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.tc-modal-empty svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
  margin-bottom: 1rem;
}

.tc-modal-empty-text {
  font-size: 0.9rem;
}

/* User Modal Empty State */
.tc-user-modal-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.tc-user-modal-empty-icon {
  margin-bottom: 1rem;
  opacity: 0.4;
}

.tc-user-modal-empty-icon svg {
  width: 48px;
  height: 48px;
}

.tc-user-modal-empty p {
  font-size: 0.9rem;
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .modal.modal-fullscreen {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .tc-user-modal-header {
    padding: 1rem;
  }

  .tc-user-modal-avatar {
    width: 56px;
    height: 56px;
  }

  .tc-user-modal-name {
    font-size: 1.25rem;
  }

  .tc-user-modal-stats {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .tc-user-modal-stat {
    padding: 0.5rem 0.75rem;
    min-width: 120px;
  }

  .tc-user-modal-stat-value {
    font-size: 1rem;
  }

  .tc-user-modal-sessions {
    padding: 1rem;
  }

  .tc-modal-session {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .tc-modal-session-actions {
    opacity: 1;
    width: 100%;
    justify-content: flex-end;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.25rem;
  }
}

/* ====================================
   Add Session Modal - Full Redesign
   ==================================== */

.modal.add-session-modal-container {
  width: 95vw;
  max-width: 1000px;
  max-height: 90vh;
}

.modal.add-session-modal-container .modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal.add-session-modal-container .modal-body {
  padding: 0;
  overflow: hidden;
}

.modal.add-session-modal-container .modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.add-session-modal {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.add-session-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(90vh - 140px);
  max-height: 600px;
  flex: 1;
}

/* Single user mode - no user panel */
.add-session-grid.no-user-panel {
  grid-template-columns: 1fr;
  height: auto;
  max-height: calc(90vh - 200px);
}

/* Fixed user header when preselected */
.add-session-user-fixed {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark, #4338ca) 100%);
  color: white;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.add-session-user-fixed .add-session-user-avatar {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.add-session-user-fixed .add-session-user-name {
  color: white;
  font-size: 1.1rem;
}

.add-session-user-fixed .add-session-user-role {
  color: rgba(255, 255, 255, 0.8);
}

/* Left Panel - User Selection */
.add-session-left {
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.add-session-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.add-session-users {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.add-session-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--card-bg);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-session-user:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}

.add-session-user.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.add-session-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

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

.add-session-user-name {
  display: block;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.add-session-user-role {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Right Panel - Date & Time */
.add-session-right {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}

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

/* Date Row */
.add-session-date-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.add-session-date-input {
  font-size: 1rem;
  padding: 0.75rem 1rem;
  min-width: 180px;
  border-radius: 8px;
}

.add-session-date-quick {
  display: flex;
  gap: 0.5rem;
}

.add-session-quick-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.add-session-quick-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
}

.add-session-quick-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Time Row */
.add-session-time-row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.add-session-time-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.add-session-time-input-group label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.add-session-time-input {
  font-size: 1.25rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  width: 140px;
  text-align: center;
  border-radius: 8px;
  font-family: 'SF Mono', Monaco, monospace;
}

.add-session-time-sep {
  font-size: 1.5rem;
  color: var(--text-muted);
  padding-bottom: 0.5rem;
}

.add-session-duration {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  margin-left: auto;
}

.add-session-duration-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'SF Mono', Monaco, monospace;
}

.add-session-duration-value.invalid {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

/* Time Presets */
.add-session-presets {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.add-session-presets-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.add-session-preset {
  padding: 0.35rem 0.75rem;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-session-preset:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
  color: var(--primary);
}

/* Summary */
.add-session-summary {
  margin-top: auto;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 2px dashed var(--border-color);
}

.add-session-summary-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-muted);
  padding: 1rem;
}

.add-session-summary-placeholder svg {
  width: 20px;
  height: 20px;
  opacity: 0.5;
}

.add-session-summary-ready {
  display: flex;
  align-items: center;
  gap: 1rem;
  border: none;
}

.add-session-summary-icon {
  width: 48px;
  height: 48px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.add-session-summary-icon svg {
  width: 24px;
  height: 24px;
}

.add-session-summary-info {
  flex: 1;
}

.add-session-summary-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.add-session-summary-user img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.add-session-summary-user strong {
  font-size: 1rem;
}

.add-session-summary-details {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.add-session-summary-duration {
  font-weight: 600;
  color: var(--primary);
}

/* Footer */
.add-session-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.add-session-tz {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.add-session-tz svg {
  width: 16px;
  height: 16px;
}

.add-session-actions {
  display: flex;
  gap: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
  .modal.add-session-modal-container {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .add-session-grid {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
  }

  .add-session-left {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    max-height: 200px;
  }

  .add-session-users {
    flex-direction: row;
    overflow-x: auto;
  }

  .add-session-user {
    flex-shrink: 0;
    flex-direction: column;
    text-align: center;
    padding: 0.5rem;
    width: 80px;
  }

  .add-session-user-avatar {
    width: 48px;
    height: 48px;
  }

  .add-session-user-info {
    width: 100%;
  }

  .add-session-user-name {
    font-size: 0.75rem;
  }

  .add-session-user-role {
    display: none;
  }

  .add-session-time-input {
    width: 100px;
    font-size: 1rem;
    padding: 0.5rem;
  }

  .add-session-duration {
    padding: 0.5rem 0.75rem;
  }

  .add-session-duration-value {
    font-size: 1.1rem;
  }
}

/* ====================================
   Edit Session Modal - Simplified
   ==================================== */

.edit-session-modal {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.edit-session-user {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.edit-session-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.edit-session-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.edit-session-duration {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.edit-session-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.edit-session-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.edit-session-times {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.edit-session-time-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.edit-session-time-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.edit-session-time-group .form-input {
  width: 120px;
  font-size: 1.1rem;
  padding: 0.6rem 0.75rem;
}

.edit-session-arrow {
  color: var(--text-muted);
  font-size: 1.25rem;
  margin-top: 1.25rem;
}

.edit-session-new-duration {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  margin-top: 1.25rem;
  margin-left: auto;
}

/* Edit Session Modal */
.edit-session-modal {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.edit-session-modal .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.edit-session-duration {
  text-align: center;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  font-weight: 600;
  color: var(--text-secondary);
}

.modal.edit-session-modal-container {
  max-width: 400px;
}

/* ============================================
   Page Layout System - Modern Grid Layout
   ============================================ */

.page-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.page-layout-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.page-header-right {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.page-layout-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.page-layout-title svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.page-layout-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8125rem;
  margin-bottom: 0.5rem;
  transition: color var(--transition);
}

.page-back-link:hover {
  color: var(--accent);
}

.page-back-link svg {
  width: 14px;
  height: 14px;
}

/* Stats Row */
.page-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.page-stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.page-stat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.page-stat-icon svg {
  width: 20px;
  height: 20px;
}

.page-stat-icon.primary {
  background: var(--accent-soft);
  color: var(--accent);
}

.page-stat-icon.success {
  background: var(--success-soft);
  color: var(--success);
}

.page-stat-icon.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.page-stat-icon.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.page-stat-icon.info {
  background: var(--info-soft);
  color: var(--info);
}

.page-stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.page-stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.page-stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Page Grid */
.page-grid {
  display: grid;
  gap: 1rem;
}

.page-grid.auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Page Cards */
.page-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.page-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.page-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.page-card-title svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.page-card-body {
  padding: 1.25rem;
}

.page-card-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.page-card-actions {
  display: flex;
  gap: 0.5rem;
}

/* Item Cards (for grids) */
.page-item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  cursor: pointer;
  transition: all var(--transition);
}

.page-item-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.page-item-card-header {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.page-item-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.page-item-icon svg {
  width: 20px;
  height: 20px;
}

.page-item-info {
  flex: 1;
  min-width: 0;
}

.page-item-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-item-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-item-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.page-item-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.page-item-badge svg {
  width: 12px;
  height: 12px;
}

/* Empty State */
.page-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
}

.page-empty-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: 50%;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.page-empty-icon svg {
  width: 32px;
  height: 32px;
}

/* SVG directly in page-empty (without icon wrapper) */
.page-empty > svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.page-empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.page-empty-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  max-width: 300px;
  margin-bottom: 1rem;
}

/* Help Section */
.page-help {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.page-help-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.page-help-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.page-help-title svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

.page-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
}

.page-help-item {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
}

.page-help-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  color: var(--text-secondary);
}

.page-help-icon svg {
  width: 18px;
  height: 18px;
}

.page-help-content {
  flex: 1;
}

.page-help-content h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
}

.page-help-content p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

/* Alert Messages */
.page-alert {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

.page-alert.warning {
  background: var(--warning-soft);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.page-alert.danger {
  background: var(--danger-soft);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.page-alert.success {
  background: var(--success-soft);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.page-alert.info {
  background: var(--info-soft);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.page-alert-icon {
  flex-shrink: 0;
  color: inherit;
}

.page-alert-icon svg {
  width: 20px;
  height: 20px;
}

.page-alert.warning .page-alert-icon {
  color: var(--warning);
}

.page-alert.danger .page-alert-icon {
  color: var(--danger);
}

.page-alert.success .page-alert-icon {
  color: var(--success);
}

.page-alert.info .page-alert-icon {
  color: var(--info);
}

.page-alert-content {
  flex: 1;
}

.page-alert-content h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.page-alert-content p {
  font-size: 0.8125rem;
  margin: 0;
  opacity: 0.9;
}

/* List Items */
.page-list {
  display: flex;
  flex-direction: column;
}

.page-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
}

.page-list-item:hover {
  background: var(--bg-hover);
}

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

.page-list-item-content {
  flex: 1;
  min-width: 0;
}

.page-list-item-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
}

.page-list-item-description {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.page-list-item-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.page-list-item-tag {
  font-size: 0.6875rem;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  background: var(--bg-active);
  color: var(--text-secondary);
}

.page-list-item-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity var(--transition);
}

.page-list-item:hover .page-list-item-actions {
  opacity: 1;
}

/* User Cards */
.page-user-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
}

.page-user-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
}

.page-user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

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

.page-user-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
}

.page-user-username {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.page-user-arrow {
  color: var(--text-muted);
}

.page-user-arrow svg {
  width: 16px;
  height: 16px;
}

/* Quick Widget (Dashboard) */
.page-quick-widget {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.page-quick-widget-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.page-quick-widget-icon svg {
  width: 24px;
  height: 24px;
}

.page-quick-widget-content {
  flex: 1;
  min-width: 0;
}

.page-quick-widget-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.page-quick-widget-title {
  font-weight: 600;
  color: var(--text-primary);
}

.page-quick-widget-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.page-quick-widget-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Section */
.page-section {
  margin-bottom: 1.5rem;
}

.page-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.page-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Card Grid */
.page-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.page-card-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

.page-card-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0.5rem 0;
  line-height: 1.5;
}

/* Error */
.page-error {
  text-align: center;
  padding: 2rem;
}

/* Page Scroll */
.page-scroll {
  height: 100%;
  overflow-y: auto;
  padding: 0;
}

/* Generic page titles */
.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

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

.page-header-content {
  flex: 1;
}

.page-header-back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 0.5rem;
}

.page-header-back:hover {
  color: var(--accent);
}

.page-header-actions {
  display: flex;
  gap: 0.5rem;
}

/* ============================================
   Page Layout System - Core Styles
   ============================================ */
.page-layout {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.page-layout-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
}

.page-header-left {
  flex: 1;
  min-width: 0;
}

.page-header-right {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.page-layout-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-layout-title svg {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.page-layout-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 4px 0 0 0;
}

.page-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.15s ease;
}

.page-back-link:hover {
  color: var(--accent);
}

.page-back-link svg {
  width: 16px;
  height: 16px;
}

/* Page Stats Row */
.page-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.page-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.page-stat-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  flex-shrink: 0;
}

.page-stat-icon svg {
  width: 20px;
  height: 20px;
}

.page-stat-icon.primary {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent);
}

.page-stat-icon.success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.page-stat-icon.warning {
  background: rgba(234, 179, 8, 0.1);
  color: #eab308;
}

.page-stat-icon.info {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.page-stat-content {
  min-width: 0;
}

.page-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.page-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Page Cards */
.page-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

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

.page-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-card-title svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.page-card-body {
  padding: 16px 20px;
}

/* Page Sections */
.page-section {
  margin-bottom: 24px;
}

.page-section:last-child {
  margin-bottom: 0;
}

/* Page Card Grid */
.page-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* Clickable Cards */
.page-card.clickable {
  cursor: pointer;
  transition: all 0.15s ease;
}

.page-card.clickable:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card Actions */
.page-card-actions {
  display: flex;
  gap: 4px;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.page-card:hover .page-card-actions {
  opacity: 1;
}

/* Card Description */
.page-card-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  padding: 0 20px 12px;
  line-height: 1.5;
}

/* Card Footer */
.page-card-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

/* Card Stats */
.page-card-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.page-card-stat svg {
  width: 14px;
  height: 14px;
}

.page-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* ============================================
   Templates Page - Grid & Items
   ============================================ */
.templates-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.template-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.template-item:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.template-item-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  flex-shrink: 0;
}

.template-item-icon svg {
  width: 24px;
  height: 24px;
}

.template-item-content {
  flex: 1;
  min-width: 0;
}

.template-item-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.template-item-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0 0 8px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.template-item-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

.template-item-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.template-item-stat svg {
  width: 14px;
  height: 14px;
}

.template-item-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.template-item:hover .template-item-actions {
  opacity: 1;
}

/* Template Detail - Tasks List */
.template-tasks-list {
  display: flex;
  flex-direction: column;
}

.template-task-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

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

.template-task-item:hover {
  background: var(--bg-elevated);
}

.template-task-number {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 2px;
}

.template-task-content {
  flex: 1;
  min-width: 0;
}

.template-task-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.template-task-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.template-task-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0 0 8px 0;
  line-height: 1.5;
}

.template-task-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.template-task-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 4px 8px;
  border-radius: 4px;
}

.template-task-tag svg {
  width: 12px;
  height: 12px;
}

.template-task-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.template-task-item:hover .template-task-actions {
  opacity: 1;
}

/* Help Steps */
.help-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.help-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.help-step-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.help-step-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 4px;
}

.help-step-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.help-step-content span {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.help-step-content svg {
  width: 14px;
  height: 14px;
  display: inline;
  vertical-align: middle;
}

/* Legacy template-card classes (for backward compatibility) */
.templates-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.template-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.template-card:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.template-card-content {
  flex: 1;
  min-width: 0;
}

.template-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.template-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.template-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 4px 10px;
  border-radius: 6px;
}

.template-card-badge svg {
  width: 14px;
  height: 14px;
}

.template-card-actions {
  display: flex;
  gap: 4px;
  margin-left: 16px;
}

/* Apps Portal Grid */
.apps-portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.app-portal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s ease;
}

.app-portal-card:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.app-portal-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 12px;
  margin-bottom: 12px;
}

.app-portal-icon svg {
  width: 24px;
  height: 24px;
}

.app-portal-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  text-align: center;
}

.app-portal-desc {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.4;
}

.app-portal-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--accent);
}

.app-portal-link svg {
  width: 12px;
  height: 12px;
}

/* ============================================
   Payment System Styles
   ============================================ */

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}

.status-badge.status-pending {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.status-badge.status-approved {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-badge.status-paid {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.status-badge.status-cancelled {
  background: rgba(107, 114, 128, 0.15);
  color: #6b7280;
}

/* Page Tabs */
.page-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.page-tab {
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.page-tab:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
  color: var(--text-primary);
}

.page-tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Empty State Small */
.page-empty-small {
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px dashed var(--border-color);
}

/* Payment Request Cards */
.payment-request-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all var(--transition);
}

.payment-request-card:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.payment-request-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.payment-request-period {
  font-weight: 600;
  color: var(--text-primary);
}

.payment-request-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.payment-request-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Payment Summary Cards */
.payment-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.payment-summary-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
}

.payment-summary-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.payment-summary-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.payment-summary-value.accent {
  color: var(--accent);
}

/* User Settings Table */
.payment-users-table {
  width: 100%;
  border-collapse: collapse;
}

.payment-users-table th,
.payment-users-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.payment-users-table th {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.payment-users-table tr:hover {
  background: var(--bg-elevated);
}

/* Adjustments List */
.adjustment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  margin-bottom: 8px;
}

.adjustment-amount {
  font-weight: 600;
}

.adjustment-amount.positive {
  color: #22c55e;
}

.adjustment-amount.negative {
  color: #ef4444;
}

.adjustment-note {
  font-size: 12px;
  color: var(--text-secondary);
  flex: 1;
  margin: 0 12px;
}

/* Timezone Badge */
.timezone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: help;
}

.timezone-badge svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

/* Calendar Blocked Alert */
.calendar-blocked-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: 8px;
  color: #eab308;
  font-size: 13px;
  margin-top: 12px;
}

.calendar-blocked-alert svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Payment Detail Modal Improvements */
.payment-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 16px 0;
}

.payment-detail-item {
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.payment-detail-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.payment-detail-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.payment-detail-value.highlight {
  color: var(--accent);
  font-size: 1.3rem;
}

/* ============================================
   Modal Forms - Modern Design
   ============================================ */

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-form-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

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

.modal-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.modal-form-field.full-width {
  grid-column: 1 / -1;
}

.modal-form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-form-input {
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.modal-form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.modal-form-input::placeholder {
  color: var(--text-muted);
}

.modal-form-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.modal-form-section {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.modal-form-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.modal-form-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 150px;
  overflow-y: auto;
}

.modal-form-history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  font-size: 13px;
}

.modal-form-history-date {
  color: var(--text-muted);
  font-size: 12px;
  min-width: 120px;
}

.modal-form-history-change {
  color: var(--text-primary);
  flex: 1;
}

.modal-form-history-by {
  color: var(--text-secondary);
  font-size: 12px;
}

/* Select styled like input */
.modal-form-select {
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8b8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.modal-form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.modal-form-select option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* Modal Form Notice */
.modal-form-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
}

.modal-form-notice svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.modal-form-notice strong {
  color: var(--text-primary);
}

/* Modal Form Period (date range picker) */
.modal-form-period {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.modal-form-period-sep {
  color: var(--text-muted);
  font-size: 13px;
}

/* Modal Form Hint */
.modal-form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Modal Form Section */
.modal-form-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Modal Form Info Grid (rate, minimum, etc.) */
.modal-form-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.modal-form-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-form-info-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-form-info-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Preview Stats Grid */
.preview-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.preview-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 12px 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  text-align: center;
}

.preview-stat.highlight {
  background: var(--accent-soft);
}

.preview-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.preview-stat.highlight .preview-stat-value {
  color: var(--accent);
}

.preview-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

@media (max-width: 480px) {
  .preview-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Modal Form Textarea */
.modal-form-textarea {
  min-height: 80px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

/* Modal Form Info Box */
.modal-form-info-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

/* Modal Form Payment Method Display */
.modal-form-payment-method {
  padding: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-primary);
}

/* Loading Dots Animation */
.loading-dots {
  color: var(--text-muted);
  animation: loadingPulse 1.2s ease-in-out infinite;
}

@keyframes loadingPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Modal Form Preview */
.modal-form-preview {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 8px;
  overflow: hidden;
}

.modal-form-preview-empty,
.modal-form-preview-loading {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.modal-form-preview-loading {
  color: var(--text-secondary);
}

.modal-form-preview-content {
  padding: 16px;
}

.modal-form-preview-title {
  margin: 0 0 12px 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-form-preview-error {
  padding: 16px;
  color: var(--danger);
  font-size: 13px;
}

/* Modal Form Alerts */
.modal-form-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
}

.modal-form-alert svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.modal-form-alert.success {
  background: var(--success-soft);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--success);
}

.modal-form-alert.error {
  background: var(--danger-soft);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
}

.modal-form-alert.warning {
  background: var(--warning-soft);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: var(--warning);
}

/* =========================================
   Payments Page Styles
   ========================================= */

/* Stats Bar */
.payments-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.payments-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.payments-stat:hover {
  border-color: var(--border-hover);
}

.payments-stat.highlight {
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  border-color: var(--accent);
}

.payments-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.payments-stat.highlight .payments-stat-value {
  color: var(--accent);
}

.payments-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Sections */
.payments-requests {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.payments-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payments-section.muted {
  opacity: 0.6;
}

.payments-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Payments List */
.payments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Payment Request Card */
.payment-request-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
}

.payment-request-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Status-specific card styling */
.payment-request-card.pending {
  border-left: 3px solid var(--warning);
}

.payment-request-card.approved {
  border-left: 3px solid var(--info);
}

.payment-request-card.paid {
  border-left: 3px solid var(--success);
}

.payment-request-card.cancelled {
  border-left: 3px solid var(--text-muted);
  opacity: 0.7;
}

/* Period */
.payment-request-period {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payment-request-dates {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Status Badge */
.payment-request-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 20px;
}

.payment-request-status.status-pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.payment-request-status.status-approved {
  background: var(--info-soft);
  color: var(--info);
}

.payment-request-status.status-paid {
  background: var(--success-soft);
  color: var(--success);
}

.payment-request-status.status-cancelled {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

/* Amount */
.payment-request-amount {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.payment-request-amount .amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.payment-request-amount .amount.loading {
  color: var(--text-muted);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.payment-request-amount .adjustments {
  font-size: 0.85rem;
  font-weight: 500;
}

.payment-request-amount .adjustments.positive {
  color: var(--success);
}

.payment-request-amount .adjustments.negative {
  color: var(--danger);
}

/* Empty State */
.payments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  text-align: center;
  background: var(--bg-secondary);
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
}

.payments-empty svg {
  width: 48px;
  height: 48px;
  color: var(--text-muted);
  opacity: 0.5;
}

.payments-empty h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.payments-empty p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.payments-empty .btn {
  margin-top: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .payments-stats {
    flex-direction: column;
    gap: 12px;
  }

  .payments-stat {
    flex-direction: row;
    justify-content: space-between;
    padding: 14px 16px;
  }

  .payment-request-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .payment-request-amount {
    width: 100%;
    justify-content: flex-end;
  }
}

/* =========================================
   Payment Detail Modal Styles
   ========================================= */

.payment-detail-modal {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Header */
.payment-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.payment-detail-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.payment-detail-username {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.payment-detail-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payment-detail-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Amount Card */
.payment-amount-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-align: center;
}

.payment-amount-card.pending {
  background: linear-gradient(135deg, var(--warning-soft), transparent);
  border-color: rgba(234, 179, 8, 0.3);
}

.payment-amount-card.approved {
  background: linear-gradient(135deg, var(--info-soft), transparent);
  border-color: rgba(59, 130, 246, 0.3);
}

.payment-amount-card.paid {
  background: linear-gradient(135deg, var(--success-soft), transparent);
  border-color: rgba(34, 197, 94, 0.3);
}

.payment-amount-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.payment-amount-value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.payment-amount-currency {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.payment-amount-breakdown {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.payment-amount-breakdown .positive {
  color: var(--success);
}

.payment-amount-breakdown .negative {
  color: var(--danger);
}

/* Stats Grid */
.payment-detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
}

.payment-detail-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  text-align: center;
}

.payment-detail-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.payment-detail-stat-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Sections */
.payment-detail-section {
  padding: 12px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.payment-detail-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.payment-detail-section-value {
  font-size: 0.95rem;
  color: var(--text-primary);
}

/* Adjustments */
.payment-adjustments {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.payment-adjustments-title {
  padding: 10px 14px;
  background: var(--bg-tertiary);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.payment-adjustment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

.payment-adjustment-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-adjustment-note {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.payment-adjustment-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.payment-adjustment-amount {
  font-weight: 600;
  font-size: 0.95rem;
}

.payment-adjustment-amount.positive {
  color: var(--success);
}

.payment-adjustment-amount.negative {
  color: var(--danger);
}

/* ============================================
   PAYMENTS SYSTEM - Complete Redesign
   ============================================ */

/* Payment Page Layout */
.payments-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1000px;
}

/* Hero Stats Section */
.payments-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .payments-hero {
    grid-template-columns: 1fr;
  }
}

.payments-hero-card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.payments-hero-card:hover {
  transform: translateY(-2px);
}

.payments-hero-card.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  color: white;
}

.payments-hero-card.secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.payments-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.payments-hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.payments-hero-card.primary .payments-hero-icon {
  background: rgba(255,255,255,0.2);
}

.payments-hero-card.secondary .payments-hero-icon {
  background: var(--accent-soft);
  color: var(--accent);
}

.payments-hero-icon svg {
  width: 24px;
  height: 24px;
}

.payments-hero-label {
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.payments-hero-card.primary .payments-hero-label {
  opacity: 0.85;
}

.payments-hero-card.secondary .payments-hero-label {
  color: var(--text-muted);
}

.payments-hero-value {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.payments-hero-card.secondary .payments-hero-value {
  color: var(--text-primary);
}

.payments-hero-sub {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.payments-hero-card.primary .payments-hero-sub {
  opacity: 0.8;
}

.payments-hero-card.secondary .payments-hero-sub {
  color: var(--text-secondary);
}

/* Quick Info Bar */
.payments-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.payments-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.payments-info-item svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

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

.payments-info-value {
  font-weight: 600;
  color: var(--text-primary);
}

/* Workflow Status Indicator */
.payment-workflow {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 12px 0;
}

.payment-workflow-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-secondary);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  transition: all 0.2s ease;
}

.payment-workflow-step:first-child {
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  padding-left: 20px;
}

.payment-workflow-step:last-child {
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding-right: 20px;
}

.payment-workflow-step.active {
  background: var(--accent);
  color: white;
}

.payment-workflow-step.completed {
  background: var(--success);
  color: white;
}

.payment-workflow-step.active svg,
.payment-workflow-step.completed svg {
  color: currentColor;
}

.payment-workflow-step svg {
  width: 14px;
  height: 14px;
}

/* Request Cards */
.payments-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.payments-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.payments-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.payments-section-title .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.payments-section-title .badge.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.payments-section-title .badge.approved {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.payments-section-title .badge.paid {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.payments-section-total {
  font-size: 1rem;
  font-weight: 700;
}

.payments-section-total.pending { color: #eab308; }
.payments-section-total.approved { color: #3b82f6; }
.payments-section-total.paid { color: #22c55e; }

/* Request Card - New Design */
.payment-card {
  display: flex;
  align-items: stretch;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.payment-card-status {
  width: 5px;
  flex-shrink: 0;
}

.payment-card-status.pending { background: #eab308; }
.payment-card-status.approved { background: #3b82f6; }
.payment-card-status.paid { background: #22c55e; }
.payment-card-status.cancelled { background: #6b7280; }

.payment-card-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  gap: 16px;
}

.payment-card-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.payment-card-period {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.payment-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.payment-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.payment-card-badge.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.payment-card-badge.approved {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.payment-card-badge.paid {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.payment-card-badge.cancelled {
  background: rgba(107, 114, 128, 0.15);
  color: #6b7280;
}

.payment-card-amount {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.payment-card-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.payment-card-value.loading {
  color: var(--text-muted);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.payment-card-adjustment {
  font-size: 12px;
  font-weight: 500;
}

.payment-card-adjustment.positive { color: var(--success); }
.payment-card-adjustment.negative { color: var(--danger); }

.payment-card-arrow {
  color: var(--text-muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s ease;
}

.payment-card:hover .payment-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

.payment-card-arrow svg {
  width: 20px;
  height: 20px;
}

/* User Info in Card (Admin) */
.payment-card-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}

.payment-card-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.payment-card-username {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

/* Empty State */
.payments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  background: var(--bg-elevated);
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  text-align: center;
}

.payments-empty svg {
  width: 56px;
  height: 56px;
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.5;
}

.payments-empty h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.payments-empty p {
  margin: 0 0 20px 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* Blocked Period Indicator */
.payment-blocked-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, rgba(234, 179, 8, 0.05) 100%);
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: var(--radius-lg);
  color: #ca8a04;
}

.payment-blocked-indicator svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.payment-blocked-indicator span {
  font-size: 13px;
  font-weight: 500;
}

/* Admin Page Specific */
.payments-admin-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.payments-admin-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.payments-admin-tab:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.payments-admin-tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.payments-admin-tab .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.payments-admin-tab .count.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.payments-admin-tab .count.approved {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.payments-admin-tab .count.paid {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

/* Admin Stats Row */
.payments-admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 800px) {
  .payments-admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.payments-admin-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.payments-admin-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  flex-shrink: 0;
}

.payments-admin-stat-icon svg {
  width: 22px;
  height: 22px;
}

.payments-admin-stat-icon.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.payments-admin-stat-icon.approved {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.payments-admin-stat-icon.paid {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.payments-admin-stat-icon.users {
  background: var(--accent-soft);
  color: var(--accent);
}

.payments-admin-stat-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payments-admin-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.payments-admin-stat-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* User Settings Cards */
.payments-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.payments-user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.2s ease;
}

.payments-user-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.payments-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

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

.payments-user-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.payments-user-rate {
  font-size: 13px;
  color: var(--text-secondary);
}

.payments-user-badges {
  display: flex;
  gap: 6px;
}

.payments-user-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

.payments-user-badge.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.payments-user-badge.approved {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

/* Modal Detail Redesign */
.payment-modal {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.payment-modal-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payment-modal-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.payment-modal-username {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.payment-modal-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.payment-modal-status.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.payment-modal-status.approved {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.payment-modal-status.paid {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.payment-modal-status.cancelled {
  background: rgba(107, 114, 128, 0.15);
  color: #6b7280;
}

.payment-modal-amount-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px;
  border-radius: var(--radius-xl);
  text-align: center;
}

.payment-modal-amount-card.pending {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.1) 0%, rgba(234, 179, 8, 0.05) 100%);
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.payment-modal-amount-card.approved {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.payment-modal-amount-card.paid {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.payment-modal-amount-card.cancelled {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.payment-modal-amount-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.payment-modal-amount-breakdown {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.payment-modal-amount-breakdown .positive { color: var(--success); font-weight: 600; }
.payment-modal-amount-breakdown .negative { color: var(--danger); font-weight: 600; }

.payment-modal-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 480px) {
  .payment-modal-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.payment-modal-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  text-align: center;
}

.payment-modal-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.payment-modal-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.payment-modal-info {
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.payment-modal-info-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.payment-modal-info-value {
  font-size: 14px;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Adjustment List in Modal */
.payment-modal-adjustments {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.payment-modal-adjustments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-tertiary);
}

.payment-modal-adjustments-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.payment-modal-adjustment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.payment-modal-adjustment-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-modal-adjustment-note {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.payment-modal-adjustment-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.payment-modal-adjustment-amount {
  font-size: 1rem;
  font-weight: 600;
}

.payment-modal-adjustment-amount.positive { color: var(--success); }
.payment-modal-adjustment-amount.negative { color: var(--danger); }

/* Notice Boxes */
.payment-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  font-size: 13px;
}

.payment-notice svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.payment-notice.info {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.payment-notice.warning {
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.3);
  color: #ca8a04;
}

.payment-notice.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #16a34a;
}

.payment-notice.locked {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #7c3aed;
}

.payment-notice-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.payment-notice-title {
  font-weight: 600;
}

/* Action Buttons Row */
.payment-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.payment-actions .btn {
  flex: 1;
  min-width: 120px;
}

@media (max-width: 480px) {
  .payment-actions {
    flex-direction: column;
  }
  .payment-actions .btn {
    width: 100%;
  }
}

/* Skeleton Loading */
.payment-skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 0%, var(--bg-tertiary) 50%, var(--bg-secondary) 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

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

.payment-skeleton-card {
  height: 80px;
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
}

.payment-skeleton-hero {
  height: 140px;
  border-radius: var(--radius-xl);
}

/* ============================================
   Payment System - Complete Redesign
   ============================================ */

/* Page Layout */
.payments-page {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 32px 60px;
}

@media (max-width: 1024px) {
  .payments-page {
    padding: 32px 24px 48px;
  }
}

@media (max-width: 768px) {
  .payments-page {
    padding: 24px 20px 40px;
    gap: 28px;
  }
}

@media (max-width: 480px) {
  .payments-page {
    padding: 20px 16px 32px;
    gap: 24px;
  }
}

/* Page Header */
.payments-page .page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 8px;
}

.payments-page .page-header-content {
  flex: 1;
  min-width: 200px;
}

.payments-page .page-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.payments-page .page-title svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.payments-page .page-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.payments-page .page-header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.payments-page .page-header-actions .btn {
  padding: 10px 18px;
  font-weight: 500;
}

@media (max-width: 600px) {
  .payments-page .page-header {
    flex-direction: column;
    gap: 20px;
  }
  .payments-page .page-header-actions {
    width: 100%;
  }
  .payments-page .page-header-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

/* Hero Stats Section */
.payments-hero {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .payments-hero {
    grid-template-columns: 1fr;
  }
}

.payments-hero-card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.payments-hero-card.primary {
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  color: white;
}

.payments-hero-card.secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.payments-hero-card .hero-label {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-bottom: 8px;
}

.payments-hero-card .hero-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
}

.payments-hero-card .hero-currency {
  font-size: 1rem;
  font-weight: 400;
  opacity: 0.7;
  margin-left: 4px;
}

.payments-hero-card .hero-subtext {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 4px;
}

/* Info Bar */
.payments-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
}

.payments-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.payments-info-item .label {
  opacity: 0.7;
}

.payments-info-item .value {
  font-weight: 600;
  color: var(--text-primary);
}

/* Payment Card - New Design */
.payment-card {
  display: flex;
  align-items: stretch;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.payment-card-status {
  width: 5px;
  flex-shrink: 0;
}

.payment-card-status.pending {
  background: #eab308;
}

.payment-card-status.approved {
  background: #3b82f6;
}

.payment-card-status.paid {
  background: #22c55e;
}

.payment-card-status.cancelled {
  background: #6b7280;
}

.payment-card-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  min-width: 0;
}

@media (max-width: 768px) {
  .payment-card-body {
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 18px;
  }

  .payment-card-user {
    flex: 0 0 auto;
  }

  .payment-card-main {
    flex: 1 1 100%;
    order: 3;
  }

  .payment-card-amount {
    flex: 1;
    text-align: right;
  }
}

.payment-card-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 140px;
}

.payment-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.payment-card-username {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.payment-card-main {
  flex: 1;
  min-width: 0;
}

.payment-card-period {
  font-weight: 500;
  margin-bottom: 4px;
}

.payment-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.payment-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
}

.payment-card-badge.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #ca8a04;
}

.payment-card-badge.approved {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.payment-card-badge.paid {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.payment-card-badge.cancelled {
  background: rgba(107, 114, 128, 0.15);
  color: #6b7280;
}

.payment-card-amount {
  text-align: right;
  min-width: 100px;
}

.payment-card-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.payment-card-value.loading {
  color: var(--text-muted);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.payment-card-adjustment {
  font-size: 0.8rem;
  font-weight: 500;
}

.payment-card-adjustment.positive {
  color: #22c55e;
}

.payment-card-adjustment.negative {
  color: #ef4444;
}

.payment-card-arrow {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Section Layout */
.payments-section {
  margin-bottom: 24px;
}

.payments-section:last-child {
  margin-bottom: 0;
}

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

.payments-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.payments-section-title .badge {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.payments-section-title .badge.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #ca8a04;
}

.payments-section-title .badge.approved {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.payments-section-title .badge.paid {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.payments-section-total {
  font-weight: 600;
  font-size: 0.9rem;
}

.payments-section-total.approved {
  color: #3b82f6;
}

.payments-section-total.paid {
  color: #22c55e;
}

.payments-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Admin Payments List Container */
#admin-payments-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Empty State */
.payments-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  color: var(--text-muted);
}

.payments-empty svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
}

.payments-empty h3 {
  margin: 0 0 8px;
  color: var(--text-secondary);
}

.payments-empty p {
  margin: 0;
  font-size: 0.9rem;
}

/* Admin Stats Grid */
.payments-admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .payments-admin-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .payments-admin-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.payments-admin-stat {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  transition: all 0.2s ease;
}

.payments-admin-stat:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.payments-admin-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
}

.payments-admin-stat-icon.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #ca8a04;
}

.payments-admin-stat-icon.approved {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.payments-admin-stat-icon.paid {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.payments-admin-stat-icon.users {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.payments-admin-stat-content {
  flex: 1;
}

.payments-admin-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.payments-admin-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Admin Tabs */
.payments-admin-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  width: fit-content;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .payments-admin-tabs {
    width: 100%;
  }

  .payments-admin-tab {
    flex: 1;
    justify-content: center;
  }
}

.payments-admin-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.payments-admin-tab:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.payments-admin-tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.payments-admin-tab .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.payments-admin-tab .count.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #ca8a04;
}

.payments-admin-tab .count.approved {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.payments-admin-tab .count.paid {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

/* Users Settings Section */
.payments-users-section {
  margin-top: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.payments-users-section .payments-section-header {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 20px;
}

/* Users Settings Grid */
.payments-users-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

@media (max-width: 640px) {
  .payments-users-grid {
    grid-template-columns: 1fr;
  }
}

.payments-user-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all 0.2s ease;
}

.payments-user-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.payments-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

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

.payments-user-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.payments-user-rate {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.payments-user-badges {
  display: flex;
  gap: 6px;
}

.payments-user-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.payments-user-badge.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #ca8a04;
}

.payments-user-badge.approved {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

/* ============================================
   Payment Modal Styles
   ============================================ */

.payment-modal-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.payment-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payment-modal-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
}

.payment-modal-id {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.payment-modal-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.payment-modal-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.payment-modal-username {
  font-weight: 600;
  font-size: 1.1rem;
}

.payment-modal-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.payment-modal-section {
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
}

.payment-modal-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.payment-modal-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.payment-modal-section-header .payment-modal-section-title {
  margin-bottom: 0;
}

.payment-modal-period {
  font-size: 1.1rem;
  font-weight: 500;
}

.payment-modal-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 400px) {
  .payment-modal-detail-grid {
    grid-template-columns: 1fr;
  }
}

.payment-modal-detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.payment-modal-detail .label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.payment-modal-detail .value {
  font-size: 1.1rem;
  font-weight: 600;
}

.payment-modal-loading,
.payment-modal-error {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
}

.payment-modal-error {
  color: var(--danger);
}

.payment-modal-adjustments {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payment-modal-adjustment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
}

.payment-modal-adjustment.positive {
  border-left: 3px solid #22c55e;
}

.payment-modal-adjustment.negative {
  border-left: 3px solid #ef4444;
}

.payment-modal-adjustment-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.payment-modal-adjustment-amount {
  font-weight: 700;
  font-size: 1rem;
}

.payment-modal-adjustment.positive .payment-modal-adjustment-amount {
  color: #22c55e;
}

.payment-modal-adjustment.negative .payment-modal-adjustment-amount {
  color: #ef4444;
}

.payment-modal-adjustment-note {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.payment-modal-adjustment-by {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.payment-modal-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.payment-modal-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  border-radius: var(--radius-lg);
  color: white;
}

.payment-modal-total .label {
  font-size: 0.9rem;
  opacity: 0.8;
}

.payment-modal-total .value {
  font-size: 1.75rem;
  font-weight: 700;
}

.payment-modal-total .adjustment {
  font-size: 0.85rem;
  opacity: 0.8;
}

.payment-modal-total .adjustment.positive {
  color: #a7f3d0;
}

.payment-modal-total .adjustment.negative {
  color: #fecaca;
}

.payment-modal-method {
  font-family: monospace;
  font-size: 0.9rem;
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  word-break: break-all;
}

.payment-modal-paid-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-lg);
  color: #22c55e;
}

.payment-modal-paid-info svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.payment-modal-paid-info .text-muted {
  color: var(--text-muted);
}

.payment-modal-payment-note {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Button Variants for Payments */
.btn-success {
  background: #22c55e;
  color: white;
  border: none;
}

.btn-success:hover {
  background: #16a34a;
}

.btn-danger-ghost {
  background: transparent;
  color: var(--danger);
  border: 1px solid transparent;
}

.btn-danger-ghost:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}

.btn-icon {
  padding: 8px;
  min-width: auto;
}

/* Payment Detail Grid (for preview) */
.payment-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.payment-detail-item {
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.payment-detail-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.payment-detail-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.payment-detail-value.highlight {
  color: var(--accent);
}

/* ============================================
   Blocked Periods Display (Payment Requests)
   ============================================ */

.modal-form-blocked-periods {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.blocked-periods-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #f59e0b;
  margin-bottom: 8px;
}

.blocked-periods-header svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.blocked-periods-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blocked-period-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.8rem;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.blocked-period-tag.pending {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
}

.blocked-period-tag.approved {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}

.blocked-period-tag.paid {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
}

.blocked-period-status {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.modal-form-overlap-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: #ef4444;
}

.modal-form-overlap-warning svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.modal-form-overlap-warning strong {
  color: inherit;
}

/* ============================================
   Modal - Glassmorphism
   ============================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: rgba(20, 20, 35, 0.9);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.9) translateY(-20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal.modal-wide {
  max-width: 700px;
}

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

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

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

.modal-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

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

/* ============================================
   Login Page - Glassmorphism
   ============================================ */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-app);
}

.login-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

.login-logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-subtitle {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 14px;
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  background: #5865F2;
  color: white;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-discord:hover {
  background: #4752C4;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(88, 101, 242, 0.4);
}

.btn-discord svg {
  width: 24px;
  height: 24px;
}

/* ============================================
   Toast Notifications - Glassmorphism
   ============================================ */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: rgba(20, 20, 35, 0.9);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  min-width: 280px;
  color: var(--text-primary);
  font-size: 13px;
  animation: slideIn 0.3s ease;
  box-shadow: var(--glass-shadow);
}

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--danger);
}

.toast.warning {
  border-left: 3px solid var(--warning);
}

.toast.info {
  border-left: 3px solid var(--info);
}

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

/* ===============================================
   UNIFIED CALENDAR - Glassmorphism Design
   =============================================== */

.unified-calendar-page {
  padding: 24px;
  min-height: 100vh;
}

.unified-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.unified-header-left {
  flex: 1;
}

.unified-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.unified-title svg {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.unified-subtitle {
  color: var(--text-muted);
  margin: 4px 0 0 0;
  font-size: 0.9rem;
}

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

/* Tabs for switching views */
.unified-tabs {
  display: flex;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}

.unified-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.unified-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.unified-tab.active {
  background: var(--accent);
  color: white;
}

.unified-tab svg {
  width: 18px;
  height: 18px;
}

/* Stats row */
.unified-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.unified-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
}

.unified-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(129, 140, 248, 0.2);
  color: var(--accent);
}

.unified-stat-icon.month {
  background: rgba(129, 140, 248, 0.2);
  color: #818cf8;
}

.unified-stat-icon.week {
  background: rgba(52, 211, 153, 0.2);
  color: #34d399;
}

.unified-stat-icon.today {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.unified-stat-icon svg {
  width: 24px;
  height: 24px;
}

.unified-stat-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.unified-stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.unified-stat-value {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
}

/* Calendar container */
.unified-calendar-container {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow);
  padding: 24px;
}

.unified-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}

.unified-month-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 200px;
  text-align: center;
}

/* Legend */
.unified-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
}

.unified-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  font-weight: 500;
}

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

.unified-legend-dot.available {
  background: var(--success);
}

.unified-legend-dot.unavailable {
  background: var(--danger);
}

.unified-legend-dot.hours {
  background: var(--accent);
}

.unified-legend-dot.active {
  background: #fbbf24;
  animation: pulse 2s infinite;
}

/* Calendar grid */
.unified-calendar-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.unified-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.unified-weekday {
  text-align: center;
  padding: 12px 8px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.unified-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

/* Calendar day */
.unified-cal-day {
  min-height: 100px;
  padding: 12px;
  background: rgba(30, 30, 50, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.unified-cal-day:hover {
  background: rgba(50, 50, 80, 0.7);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.unified-cal-day.empty {
  background: rgba(20, 20, 35, 0.3);
  cursor: default;
  border-color: transparent;
}

.unified-cal-day.empty:hover {
  transform: none;
  border-color: transparent;
  background: rgba(20, 20, 35, 0.3);
}

.unified-cal-day.today {
  background: rgba(129, 140, 248, 0.25);
  border-color: var(--accent);
  border-width: 2px;
}

.unified-cal-day.past {
  opacity: 0.7;
}

.unified-cal-day.available {
  border-left: 4px solid var(--success);
  background: rgba(52, 211, 153, 0.1);
}

.unified-cal-day.unavailable {
  border-left: 4px solid var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.unified-cal-day.has-hours {
  background: rgba(129, 140, 248, 0.15);
}

.unified-day-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.unified-day-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.unified-cal-day.today .unified-day-num {
  background: var(--accent);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.unified-note-indicator {
  font-size: 0.8rem;
}

.unified-day-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Availability badge */
.unified-avail-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.unified-avail-badge.available {
  background: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.5);
}

.unified-avail-badge.unavailable {
  background: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

/* Hours badge */
.unified-hours-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(129, 140, 248, 0.3);
  color: #a5b4fc;
  border: 1px solid rgba(129, 140, 248, 0.4);
}

.unified-hours-badge.active {
  background: rgba(251, 191, 36, 0.3);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.5);
}

/* Progress bar */
.unified-progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: auto;
  overflow: hidden;
}

.unified-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Active dot */
.unified-active-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
  animation: pulse 2s infinite;
}

/* Blocked indicator */
.unified-blocked-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  font-size: 0.75rem;
  font-weight: bold;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===============================================
   UNIFIED MODAL - Day Details
   =============================================== */

.unified-modal-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.unified-modal-section {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.unified-modal-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.unified-modal-section-title svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.unified-modal-section-title.hours svg {
  color: var(--accent);
}

/* Sessions list */
.unified-modal-sessions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.unified-modal-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}

.unified-modal-session.active {
  border-left-color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
}

.unified-modal-session.blocked {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.unified-modal-session-time {
  color: var(--text-primary);
  font-weight: 500;
}

.unified-modal-session-duration {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.unified-modal-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  margin-top: 12px;
  background: rgba(129, 140, 248, 0.1);
  border-radius: 8px;
}

.unified-modal-total-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.unified-modal-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

/* Availability buttons */
.unified-avail-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.unified-avail-buttons .btn {
  flex: 1;
  min-width: 120px;
}

/* Team Calendar specific */
.unified-team-members {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.unified-team-member {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  overflow: hidden;
}

.unified-member-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--glass-border);
}

.unified-member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.unified-member-name {
  font-weight: 600;
  color: #ffffff;
}

.unified-member-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.unified-member-day {
  padding: 12px 8px;
  text-align: center;
  border-right: 1px solid var(--glass-border);
  cursor: pointer;
  transition: background 0.2s ease;
}

.unified-member-day:last-child {
  border-right: none;
}

.unified-member-day:hover {
  background: var(--bg-hover);
}

.unified-member-day.available {
  background: rgba(52, 211, 153, 0.1);
}

.unified-member-day.unavailable {
  background: rgba(239, 68, 68, 0.1);
}

.unified-member-day.undefined {
  background: rgba(251, 191, 36, 0.05);
}

/* Team day modal */
.unified-modal-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(52, 211, 153, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.unified-modal-user:hover {
  background: rgba(52, 211, 153, 0.2);
}

.unified-modal-user.absent {
  background: rgba(239, 68, 68, 0.1);
}

.unified-modal-user.absent:hover {
  background: rgba(239, 68, 68, 0.2);
}

.unified-modal-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.unified-modal-user-info {
  flex: 1;
}

.unified-modal-user-name {
  font-weight: 600;
  color: #ffffff;
}

.unified-modal-user-note {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
}

/* Availability week widget (dashboard) */
.avail-week-widget {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.avail-week-day {
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  text-align: center;
}

.avail-week-day.today {
  background: rgba(129, 140, 248, 0.1);
  border: 1px solid var(--accent);
}

.avail-week-header {
  margin-bottom: 8px;
}

.avail-week-name {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  font-weight: 600;
}

.avail-week-date {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

.avail-week-names {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
}

.avail-week-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.avail-week-group.available {
  color: #6ee7b7;
}

.avail-week-group.unavailable {
  color: #fca5a5;
}

.avail-week-group.undefined {
  color: rgba(255, 255, 255, 0.5);
}

.avail-week-user-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  border-radius: 4px;
  cursor: default;
}

.avail-week-mini-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  object-fit: cover;
}

/* Note save status */
.note-save-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.note-save-status.saving {
  color: var(--warning);
}

.note-save-status.saved {
  color: var(--success);
}

/* Page fullscreen */
.page-fullscreen {
  min-height: calc(100vh - 48px);
}

/* ===============================================
   TEAM CALENDAR - Team View Specific Styles
   =============================================== */

.unified-cal-day.team-view {
  min-height: 140px;
  padding: 8px;
}

.unified-legend-dot.undefined {
  background: rgba(251, 191, 36, 0.6);
}

.team-members-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 120px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border) transparent;
}

.team-members-list::-webkit-scrollbar {
  width: 4px;
}

.team-members-list::-webkit-scrollbar-track {
  background: transparent;
}

.team-members-list::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 2px;
}

.team-member-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.75rem;
}

.team-member-row:hover {
  transform: scale(1.02);
}

.team-member-row.member-available {
  background: rgba(52, 211, 153, 0.15);
  border-left: 2px solid var(--success);
}

.team-member-row.member-available:hover {
  background: rgba(52, 211, 153, 0.25);
}

.team-member-row.member-unavailable {
  background: rgba(239, 68, 68, 0.15);
  border-left: 2px solid var(--danger);
  opacity: 0.8;
}

.team-member-row.member-unavailable:hover {
  background: rgba(239, 68, 68, 0.25);
}

.team-member-row.member-undefined {
  background: rgba(251, 191, 36, 0.1);
  border-left: 2px solid rgba(251, 191, 36, 0.5);
  opacity: 0.7;
}

.team-member-row.member-undefined:hover {
  background: rgba(251, 191, 36, 0.2);
}

.team-member-row.has-hours {
  border-right: 2px solid var(--accent);
}

.team-member-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.team-member-name {
  flex: 1;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.team-member-hours {
  color: #a5b4fc;
  font-weight: 700;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.team-no-members {
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  padding: 8px;
  font-style: italic;
}

.team-day-footer {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: flex-end;
}

.team-total-hours {
  background: rgba(129, 140, 248, 0.3);
  color: #a5b4fc;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid rgba(129, 140, 248, 0.4);
}

.team-day-stats {
  display: flex;
  gap: 4px;
}

.team-stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  font-size: 0.65rem;
  font-weight: 600;
}

.team-stat.available {
  background: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.5);
}

.team-stat.unavailable {
  background: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.5);
}
