/* Light Clean Theme - No Dark Theme */
:root {
  --bg-main: #f4f6f9;
  --bg-card: #ffffff;
  --bg-sidebar: #0f172a;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: #cbd5e1;
  --accent-primary: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --status-productive: #059669;
  --status-productive-bg: #ecfdf5;
  --status-down: #dc2626;
  --status-down-bg: #fef2f2;
  --status-warning: #d97706;
  --status-warning-bg: #fffbe6;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius-lg: 12px;
  --radius-md: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Modal Overlay & Card */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 900px;
  padding: 24px;
}

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

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Global Top Toolbar Filter Bar */
.global-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  padding: 14px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.toolbar-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* Login Screen Styles */
.login-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: #f1f5f9;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  padding: 36px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #ffffff;
  margin-bottom: 12px;
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Sidebar Layout */
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  color: #ffffff;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 50;
}

/* Collapsed Sidebar (Icon-Only Mode) */
.sidebar.collapsed {
  width: 72px;
  padding: 24px 10px;
}

.sidebar.collapsed .brand-title,
.sidebar.collapsed .brand-subtitle,
.sidebar.collapsed .nav-btn span,
.sidebar.collapsed .sidebar-footer div {
  display: none !important;
}

.sidebar.collapsed .brand {
  justify-content: center;
  margin-bottom: 24px;
}

.sidebar.collapsed .nav-btn {
  justify-content: center;
  padding: 12px;
  position: relative;
}

.sidebar-toggle-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: auto;
  transition: background 0.2s ease, transform 0.3s ease;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.sidebar.collapsed .sidebar-toggle-btn {
  margin: 0 auto 16px auto;
  transform: rotate(180deg);
}

/* SAP Fiori Tile Launchpad Styles */
.fiori-launchpad-container {
  padding: 8px 4px;
}

.fiori-section-header {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 16px;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fiori-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.fiori-tile {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 125px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.fiori-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.12);
  border-color: #93c5fd;
}

.fiori-tile-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.fiori-tile-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 4px;
}

.fiori-tile-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
}

.fiori-tile-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fiori-tile-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: #f1f5f9;
  color: #475569;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
  color: #fff;
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-subtitle {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item .nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-item .nav-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.nav-item .nav-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: 600;
}

.nav-icon {
  flex-shrink: 0;
  stroke-width: 2px;
}

/* Priority & Criticality Badges */
.badge-critical { background-color: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-high { background-color: #fffbe6; color: #d97706; border: 1px solid #fef08a; }
.badge-medium { background-color: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.badge-low { background-color: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: #94a3b8;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

.select-input {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #ffffff;
  border: none;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s ease;
}

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

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

/* Professional Sub-Tab Pill Navigation */
.user-tab-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease-in-out;
}

.user-tab-btn:hover {
  background-color: #f8fafc;
  color: #1e293b;
  border-color: #94a3b8;
}

.user-tab-btn.active {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
}

/* Stats Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Grid Layout for Charts in Separate Full-Width Rows */
.dashboard-rows {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-bottom: 28px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* High Legibility Interactive Chart Container */
.svg-chart-container {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 12px 0;
}

/* Interactive Hover States */
.interactive-bar-item {
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.interactive-bar-item:hover {
  opacity: 0.9;
  transform: translateX(4px);
}

.chart-node {
  cursor: pointer;
  transition: r 0.2s ease, fill 0.2s ease;
}

.chart-node:hover {
  r: 8;
  fill: #2563eb;
}

/* Data Tables */
.table-container {
  overflow-x: auto;
  max-height: 420px;
  overflow-y: auto;
}

/* Full-flow table unconstrained height */
.table-container.full-flow-table {
  max-height: none;
  overflow-y: visible;
}

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

th {
  background-color: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  user-select: none;
}

th.sortable {
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

th.sortable:hover {
  background-color: #e2e8f0;
  color: var(--accent-primary);
}

.sort-icon {
  font-size: 12px;
  margin-left: 4px;
  color: var(--text-muted);
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

tr:hover {
  background-color: #f8fafc;
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-productive {
  background-color: var(--status-productive-bg);
  color: var(--status-productive);
}

.badge-down {
  background-color: var(--status-down-bg);
  color: var(--status-down);
}

.badge-warning {
  background-color: var(--status-warning-bg);
  color: var(--status-warning);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 14px;
  background-color: #ffffff;
  color: var(--text-primary);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Tab pages */
.page-view {
  display: none;
}

.page-view.active {
  display: block;
}

/* Toast Notification Banners */
#notificationBannerContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  width: 90%;
  pointer-events: none;
}

.toast-banner {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  border-left: 5px solid var(--accent-primary);
  animation: slideInBanner 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
}

.toast-banner.toast-success {
  border-left-color: var(--status-productive);
  background: #f0fdf4;
}

.toast-banner.toast-error {
  border-left-color: var(--status-down);
  background: #fef2f2;
}

.toast-banner.toast-info {
  border-left-color: var(--accent-primary);
  background: #eff6ff;
}

.toast-banner.toast-warning {
  border-left-color: var(--status-warning);
  background: #fffbe6;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: pre-line;
}

.toast-close {
  background: transparent;
  border: none;
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

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

@keyframes slideInBanner {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ─── PM Calendar Styles ──────────────────────────────────────────── */

/* View Toggle Group (Strategy Table / Calendar) */
.pm-view-toggle-group {
  display: flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 8px;
  gap: 2px;
}

.pm-view-toggle {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.pm-view-toggle:hover {
  background: rgba(255,255,255,0.5);
  color: var(--text-primary);
}

.pm-view-toggle.active {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Calendar Toolbar */
.pm-cal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 10px;
}

.pm-cal-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pm-cal-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pm-cal-nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.pm-cal-nav-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.pm-cal-today-btn {
  padding: 6px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.pm-cal-today-btn:hover {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.pm-cal-date-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-left: 4px;
}

/* Calendar View Group (Day / 3-Day / Work Week / Week / Month) */
.pm-cal-view-group {
  display: flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: 8px;
  gap: 1px;
}

.pm-cal-view-btn {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.pm-cal-view-btn:hover {
  background: rgba(255,255,255,0.5);
  color: var(--text-primary);
}

.pm-cal-view-btn.active {
  background: #ffffff;
  color: var(--accent-primary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Calendar Filter Bar */
.pm-cal-filter-bar {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.pm-cal-filter-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pm-cal-filter-item label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Calendar Grid Wrapper */
.pm-cal-grid-wrapper {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

/* Time Grid Calendar (Day / 3-Day / Work Week / Week) */
.pm-cal-time-grid {
  display: grid;
  min-height: 600px;
  max-height: 700px;
  overflow-y: auto;
  position: relative;
}

.pm-cal-time-gutter {
  width: 60px;
  min-width: 60px;
  border-right: 1px solid var(--border-color);
  background: #f8fafc;
}

.pm-cal-time-label {
  height: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid #f1f5f9;
  position: relative;
  top: -6px;
}

.pm-cal-day-header {
  text-align: center;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 10;
}

.pm-cal-day-header-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.pm-cal-day-header-date {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.pm-cal-day-header.today .pm-cal-day-header-date {
  background: var(--accent-primary);
  color: #ffffff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pm-cal-day-column {
  border-left: 1px solid var(--border-color);
  position: relative;
}

.pm-cal-time-slot {
  height: 48px;
  border-bottom: 1px solid #f1f5f9;
  position: relative;
}

.pm-cal-time-slot:nth-child(even) {
  border-bottom: 1px solid var(--border-color);
}

.pm-cal-time-slot.drop-target {
  background: rgba(37, 99, 235, 0.06);
}

/* Event Block */
.pm-cal-event {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 11px;
  cursor: grab;
  overflow: hidden;
  z-index: 5;
  border-left: 3px solid;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
  user-select: none;
}

.pm-cal-event:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 6;
}

.pm-cal-event.dragging {
  opacity: 0.7;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  cursor: grabbing;
  z-index: 100;
  transform: scale(1.02);
}

.pm-cal-event-title {
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-cal-event-meta {
  font-size: 10px;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Event Type Colors */
.pm-cal-event.type-pm {
  background: #eff6ff;
  color: #1e40af;
  border-left-color: #3b82f6;
}

.pm-cal-event.type-wo {
  background: #fffbeb;
  color: #92400e;
  border-left-color: #f59e0b;
}

.pm-cal-event.type-overdue {
  background: #fef2f2;
  color: #991b1b;
  border-left-color: #ef4444;
}

/* Priority indicators on events */
.pm-cal-event.priority-emergency {
  border-left-color: #dc2626;
}

.pm-cal-event.priority-high {
  border-left-color: #f97316;
}

/* Month View Grid */
.pm-cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.pm-cal-month-header {
  text-align: center;
  padding: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

.pm-cal-month-cell {
  min-height: 100px;
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 4px;
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pm-cal-month-cell:hover {
  background: #f8fafc;
}

.pm-cal-month-cell.today {
  background: #eff6ff;
}

.pm-cal-month-cell.other-month {
  opacity: 0.4;
}

.pm-cal-month-day-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.pm-cal-month-cell.today .pm-cal-month-day-num {
  background: var(--accent-primary);
  color: #ffffff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pm-cal-month-event {
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  border-left: 2px solid;
}

.pm-cal-month-event.type-pm {
  background: #eff6ff;
  color: #1e40af;
  border-left-color: #3b82f6;
}

.pm-cal-month-event.type-wo {
  background: #fffbeb;
  color: #92400e;
  border-left-color: #f59e0b;
}

.pm-cal-month-more {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-primary);
  padding: 1px 4px;
  cursor: pointer;
}

/* Event Detail Side Panel */
.pm-event-detail-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 380px;
  background: #ffffff;
  border-left: 1px solid var(--border-color);
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

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

.pm-event-detail-header h4 {
  font-size: 16px;
  font-weight: 700;
}

.pm-event-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.pm-event-detail-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Detail panel field rows */
.pm-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.pm-detail-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 110px;
}

.pm-detail-value {
  font-size: 13px;
  color: var(--text-primary);
  text-align: right;
  font-weight: 500;
}

/* Drag ghost element */
.pm-drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.85;
  transform: rotate(2deg);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

/* Now / Current time indicator */
.pm-cal-now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #dc2626;
  z-index: 8;
}

.pm-cal-now-line::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -4px;
  width: 10px;
  height: 10px;
  background: #dc2626;
  border-radius: 50%;
}
