:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

/* Loading States */
.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  flex-direction: column;
  gap: 15px;
  padding: 40px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-container p {
  color: #666;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.error-container {
  padding: 30px;
  margin: 20px;
  color: #d32f2f;
  background-color: #ffebee;
  border: 2px solid #ef5350;
  border-radius: 8px;
  text-align: center;
}

.error-container p {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

/* ============================================
   THEME CSS - Dark/Light Mode Variables
   Import this file BEFORE App.css
   ============================================ */

/* Light theme (default — matches existing app appearance) */
:root,
[data-theme="light"] {
  /* Background Colors */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --bg-hover: #f1f3f5;
  --bg-nav: #232f3e;
  --bg-sidebar: #232f3e;

  /* Text Colors */
  --text-primary: #232f3e;
  --text-secondary: #495057;
  --text-tertiary: #6c757d;
  --text-muted: #868e96;
  --text-inverse: #ffffff;

  /* Border Colors */
  --border-color: #dee2e6;
  --border-light: #e9ecef;

  /* Shadows */
  --shadow-theme-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-theme-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-theme-lg: 0 4px 12px rgba(0, 0, 0, 0.15);

  /* Modal / Overlay */
  --bg-overlay: rgba(0, 0, 0, 0.5);

  /* Table */
  --bg-table-header: #f8f9fa;
  --bg-table-stripe: #f8f9fa;

  /* Input */
  --input-border: #e9ecef;
  --input-focus-border: #ff9900;
  --input-focus-shadow: rgba(255, 153, 0, 0.1);
}

/* Dark theme */
[data-theme="dark"] {
  /* Background Colors */
  --bg-primary: #1a1d23;
  --bg-secondary: #21252b;
  --bg-tertiary: #2c313a;
  --bg-card: #21252b;
  --bg-input: #2c313a;
  --bg-hover: #2c313a;
  --bg-nav: #13161a;
  --bg-sidebar: #13161a;

  /* Text Colors */
  --text-primary: #e4e7eb;
  --text-secondary: #b0b8c4;
  --text-tertiary: #8892a0;
  --text-muted: #6b7280;
  --text-inverse: #1a1d23;

  /* Border Colors */
  --border-color: #333a45;
  --border-light: #2c313a;

  /* Shadows */
  --shadow-theme-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-theme-md: 0 4px 8px rgba(0, 0, 0, 0.4);
  --shadow-theme-lg: 0 4px 12px rgba(0, 0, 0, 0.5);

  /* Modal / Overlay */
  --bg-overlay: rgba(0, 0, 0, 0.7);

  /* Table */
  --bg-table-header: #2c313a;
  --bg-table-stripe: #252930;

  /* Input */
  --input-border: #333a45;
  --input-focus-border: #ff9900;
  --input-focus-shadow: rgba(255, 153, 0, 0.2);

  /* Override existing App.css root variables for dark mode */
  --color-primary-dark: #e4e7eb;
  --color-gray-light: #21252b;
  --color-gray-border: #333a45;
  --color-gray-medium: #3d4450;
  --color-gray-dark: #8892a0;

  /* Status Light Backgrounds (dark-friendly) */
  --color-success-light: #1a3d2a;
  --color-success-text: #6ee7b7;
  --color-danger-light: #3d1f1f;
  --color-danger-text: #fca5a5;
  --color-warning-bg: #3d3018;
  --color-warning-text: #fcd34d;
  --color-pending-bg: #3d3018;
  --color-pending-text: #fcd34d;
  --color-approved-bg: #1a3d2a;
  --color-approved-text: #6ee7b7;
  --color-denied-bg: #3d1f1f;
  --color-denied-text: #fca5a5;
  --color-assigned-bg: #1a2d3d;
  --color-assigned-text: #7dd3fc;
}

/* ============================================
   DARK MODE COMPONENT OVERRIDES
   ============================================ */

/* Body */
[data-theme="dark"] body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Cards & Sections */
[data-theme="dark"] .card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .section {
  background: var(--bg-card);
  box-shadow: var(--shadow-theme-sm);
}

/* Tables */
[data-theme="dark"] table {
  background: var(--bg-card);
}

[data-theme="dark"] thead {
  background: var(--bg-table-header);
}

[data-theme="dark"] th {
  color: var(--text-primary);
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] td {
  border-bottom-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] tr:hover {
  background: var(--bg-hover);
}

/* Forms & Inputs */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea,
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background-color: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--input-border);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus {
  border-color: var(--input-focus-border);
  box-shadow: 0 0 0 3px var(--input-focus-shadow);
}

/* Modals */
[data-theme="dark"] .modal-overlay {
  background: var(--bg-overlay);
}

[data-theme="dark"] .modal-content {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* User Dropdown */
[data-theme="dark"] .user-dropdown {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-theme-lg);
}

[data-theme="dark"] .user-menu-section {
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .menu-section-title {
  color: var(--text-primary);
}

[data-theme="dark"] .break-select {
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--input-border);
}

/* Admin Tools Dropdown */
[data-theme="dark"] .admin-tools-dropdown {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .admin-tool-select,
[data-theme="dark"] .admin-tool-input {
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--input-border);
}

/* Buttons */
[data-theme="dark"] .btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

[data-theme="dark"] .btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--text-tertiary);
}

[data-theme="dark"] .btn-cancel-small {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

/* Badge - Site */
[data-theme="dark"] .badge-site,
[data-theme="dark"] .site-badge {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color);
}

/* Empty State */
[data-theme="dark"] .empty-state {
  color: var(--text-tertiary);
}

/* Divider */
[data-theme="dark"] .divider {
  background: var(--border-color);
}

/* Section Headers */
[data-theme="dark"] .section-header {
  border-bottom-color: var(--border-color);
}

/* Card Headers & Footers */
[data-theme="dark"] .card-header {
  border-bottom-color: var(--border-color);
}

[data-theme="dark"] .card-footer {
  border-top-color: var(--border-color);
}

/* Typography */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
  color: var(--text-primary);
}

[data-theme="dark"] .section-description,
[data-theme="dark"] .description-text {
  color: var(--text-secondary);
}

[data-theme="dark"] .label,
[data-theme="dark"] .info-label {
  color: var(--text-tertiary);
}

[data-theme="dark"] .info-value {
  color: var(--text-primary);
}

/* Break Popup */
[data-theme="dark"] .break-popup {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

/* Loading States */
[data-theme="dark"] .loading-container p {
  color: var(--text-secondary);
}

[data-theme="dark"] .spinner {
  border-color: var(--border-color);
  border-top-color: #667eea;
}

/* Simulation banners (keep slightly tinted in dark) */
[data-theme="dark"] .simulation-banner {
  background: #2a2520;
  color: var(--text-primary);
  border-color: #4a3520;
}

/* Scrollbars for dark mode (webkit) */
[data-theme="dark"] ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================
   THEME TOGGLE STYLES
   ============================================ */
.theme-toggle {
  display: flex;
  gap: 2px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 3px;
  margin-top: 8px;
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 28px;
  border: none !important;
  border-radius: 6px;
  background: transparent;
  color: #495057 !important;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  padding: 0;
}

.theme-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.theme-btn.active {
  background: var(--color-primary-orange, #ff9900) !important;
  color: #ffffff !important;
}

.theme-btn:hover:not(.active) {
  background: var(--bg-hover);
  color: #212529 !important;
}

.theme-btn:focus-visible {
  outline: 2px solid var(--color-primary-orange, #ff9900);
  outline-offset: 2px;
}

.theme-section-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 12px;
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
/* NotificationBell.css */

.notification-bell-container {
    position: relative;
}

.notification-bell-button {
    position: relative;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 50%;
    opacity: 1;
}

.notification-bell-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-primary-orange);
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--color-danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.35rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.notification-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 400px;
    max-height: 600px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid var(--color-gray-border);
    background: var(--color-gray-light);
}

.notification-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--color-primary-dark);
}

.close-panel-btn {
    background: none;
    border: none;
    color: var(--color-gray-dark);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.close-panel-btn:hover {
    background: var(--color-gray-border);
    color: var(--color-primary-dark);
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-gray-border);
    background: white;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-primary-blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover:not(:disabled) {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

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

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

.action-btn.danger:hover:not(:disabled) {
    background: var(--color-danger-hover);
}

.notification-list {
    overflow-y: auto;
    max-height: 500px;
    flex: 1;
}

.no-notifications {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--color-gray-dark);
    text-align: center;
}

.no-notifications svg {
    color: var(--color-gray-medium);
    margin-bottom: 1rem;
}

.no-notifications p {
    margin: 0;
    font-size: 1rem;
}

.notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-gray-border);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.notification-item:hover {
    background: var(--color-gray-light);
}

.notification-item.unread {
    background: #e3f2fd;
    border-left: 4px solid var(--color-primary-blue);
}

.notification-item.unread:hover {
    background: #d1e7f8;
}

.notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gray-light);
    border-radius: 50%;
}

.notification-item.unread .notification-icon {
    background: white;
}

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

.notification-title {
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.notification-message {
    color: var(--color-gray-dark);
    font-size: 0.875rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.notification-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--color-gray-dark);
}

.notification-time {
    font-weight: 600;
}

.notification-creator {
    opacity: 0.8;
}

.delete-notification-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--color-gray-dark);
    font-size: 0.875rem;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    opacity: 0;
    transition: all 0.2s ease;
}

.notification-item:hover .delete-notification-btn {
    opacity: 1;
}

.delete-notification-btn:hover {
    background: var(--color-danger);
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .notification-panel {
        width: 100vw;
        max-width: 400px;
        right: -1rem;
    }
}

@media (max-width: 480px) {
    .notification-panel {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        max-height: calc(100vh - 60px);
        border-radius: 0;
    }

    .notification-actions {
        flex-direction: column;
    }

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

/* Loading skeleton styles */
.notification-skeleton {
    padding: 0;
}

.notification-skeleton-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-gray-border);
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-icon {
    width: 40px;
    height: 40px;
    background: var(--color-gray-border);
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skeleton-title {
    height: 16px;
    width: 60%;
    background: var(--color-gray-border);
    border-radius: 4px;
}

.skeleton-message {
    height: 14px;
    width: 90%;
    background: var(--color-gray-border);
    border-radius: 4px;
}

.skeleton-meta {
    height: 12px;
    width: 40%;
    background: var(--color-gray-border);
    border-radius: 4px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

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

.custom-alert-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    padding: 2rem;
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.alert-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--color-gray-dark);
    cursor: pointer;
    transition: color 0.2s;
}

.alert-close-btn:hover {
    color: var(--color-danger);
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.alert-icon {
    font-size: 2.5rem;
}

.alert-icon.success {
    color: var(--color-success);
}

.alert-icon.warning {
    color: var(--color-warning);
}

.alert-icon.error {
    color: var(--color-danger);
}

.alert-icon.info {
    color: var(--color-primary-blue);
}

.alert-header h3 {
    margin: 0;
    color: var(--color-primary-dark);
    font-size: 1.5rem;
}

.alert-body {
    margin-bottom: 2rem;
}

.alert-body p {
    margin: 0;
    color: var(--color-gray-dark);
    line-height: 1.6;
    white-space: pre-line;
}

.acknowledge-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--color-warning-bg);
    border: 2px solid var(--color-warning);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: var(--color-warning-text);
}

.acknowledge-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.alert-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-alert-confirm,
.btn-alert-cancel {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-alert-confirm {
    background: var(--color-primary-orange);
    color: white;
}

.btn-alert-confirm:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.btn-alert-confirm:disabled {
    background: var(--color-gray-medium);
    color: var(--color-gray-dark);
    cursor: not-allowed;
    transform: none;
}

.btn-alert-cancel {
    background: var(--color-gray-medium);
    color: var(--color-gray-dark);
}

.btn-alert-cancel:hover {
    background: var(--color-gray-dark);
    color: white;
}

.btn-alert-third {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--color-gray-border);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    color: var(--color-gray-dark);
}

.btn-alert-third:hover {
    background: var(--color-gray-light);
    border-color: var(--color-gray-dark);
    transform: translateY(-2px);
}
/* ============================================
   APP INFO WIDGET - Floating version pill & menu
   ============================================ */

/* Floating pill button */
.app-info-widget {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 8000;
}

.app-info-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    background: var(--color-primary-dark);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}

.app-info-pill:hover {
    background: var(--color-primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.pill-icon {
    font-size: 1.1rem;
}

.pill-version {
    letter-spacing: 0.02em;
}

.pill-stage {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    letter-spacing: 0.04em;
}

.app-info-stage {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: var(--color-primary-orange, #f59e0b);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.3rem;
}

/* Popover menu */
.app-info-popover {
    position: absolute;
    bottom: calc(100% + 0.75rem);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    min-width: 220px;
    overflow: hidden;
    animation: popoverSlideUp 0.2s ease;
}

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

.app-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-gray-border);
    background: var(--color-gray-light);
}

.app-info-version {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-primary-dark);
}

.app-info-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-gray-dark);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    padding: 0.2rem;
    border-radius: 4px;
    transition: color 0.2s;
}

.app-info-close:hover {
    color: var(--color-danger);
}

.app-info-menu {
    padding: 0.5rem 0;
}

.app-info-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--color-primary-dark);
    transition: background 0.15s;
    text-align: left;
}

.app-info-menu-item:hover {
    background: var(--color-gray-light);
}

.menu-item-icon {
    font-size: 1.25rem;
}

.menu-item-icon.bug {
    color: var(--color-danger);
}

.menu-item-icon.feature {
    color: var(--color-primary-orange);
}

.menu-item-icon.changelog {
    color: var(--color-primary-blue);
}

/* ============================================
   BUG REPORT MODAL
   ============================================ */

.bug-report-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

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

.bug-report-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.bug-report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-gray-border);
}

.bug-report-title-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.bug-report-title-row h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--color-primary-dark);
}

.bug-report-icon {
    font-size: 1.5rem;
    color: var(--color-danger);
}

.feature-request-icon {
    font-size: 1.5rem;
    color: var(--color-primary-orange);
}

.bug-report-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    color: var(--color-gray-dark);
    display: flex;
    align-items: center;
    padding: 0.3rem;
    border-radius: 4px;
    transition: color 0.2s;
}

.bug-report-close:hover {
    color: var(--color-danger);
}

/* Form styles */
.bug-report-form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-primary-dark);
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--color-gray-border);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary-blue);
}

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

/* Auto-captured context */
.bug-report-context {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.8rem;
    background: var(--color-gray-light);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--color-gray-dark);
    margin-bottom: 1rem;
}

.context-tag {
    background: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--color-gray-border);
}

/* Error message */
.bug-report-error {
    color: var(--color-danger);
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    background: var(--color-danger-light);
    border-radius: 6px;
    margin-bottom: 1rem;
}

/* Action buttons */
.bug-report-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.btn-cancel {
    padding: 0.6rem 1.2rem;
    background: var(--color-gray-medium);
    color: var(--color-gray-dark);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: var(--color-gray-dark);
    color: white;
}

.btn-submit {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    background: var(--color-primary-orange);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.btn-submit:disabled {
    background: var(--color-gray-medium);
    color: var(--color-gray-dark);
    cursor: not-allowed;
    transform: none;
}

/* Success state */
.bug-report-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 2rem;
    text-align: center;
}

.success-icon {
    font-size: 3.5rem;
    color: var(--color-success);
    margin-bottom: 1rem;
}

.bug-report-success h3 {
    margin: 0 0 0.5rem;
    color: var(--color-primary-dark);
}

.bug-report-success p {
    margin: 0;
    color: var(--color-gray-dark);
}

/* ============================================
   CHANGELOG MODAL
   ============================================ */

.changelog-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.changelog-icon {
    font-size: 1.5rem;
    color: var(--color-primary-blue);
}

.changelog-content {
    padding: 1rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.changelog-empty {
    text-align: center;
    color: var(--color-gray-dark);
    padding: 2rem;
}

/* Changelog entry */
.changelog-entry {
    border: 1px solid var(--color-gray-border);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.changelog-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--color-gray-light);
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.changelog-entry-header:hover {
    background: var(--color-gray-border);
}

.changelog-entry-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.changelog-version {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-primary-dark);
    background: var(--color-primary-dark);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.changelog-title {
    font-size: 0.85rem;
    color: var(--color-primary-dark);
    font-weight: 500;
}

.changelog-entry-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-gray-dark);
}

.changelog-date {
    font-size: 0.75rem;
    color: var(--color-gray-dark);
}

.changelog-entry-body {
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid var(--color-gray-border);
}

.changelog-entry-body h4 {
    margin: 0.75rem 0 0.4rem;
    font-size: 0.85rem;
    color: var(--color-primary-blue);
}

.changelog-entry-body h4:first-child {
    margin-top: 0;
}

.changelog-entry-body ul {
    margin: 0;
    padding-left: 1.25rem;
}

.changelog-entry-body li {
    font-size: 0.85rem;
    color: var(--color-primary-dark);
    line-height: 1.6;
}

/* Archive section */
.changelog-archive-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-gray-border);
}

.changelog-archive-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: none;
    border: 1px dashed var(--color-gray-medium);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--color-gray-dark);
    transition: all 0.2s;
}

.changelog-archive-toggle:hover {
    border-color: var(--color-primary-blue);
    color: var(--color-primary-blue);
}

.changelog-archive-entries {
    margin-top: 0.75rem;
}
/* AkiStatusIndicator.css */

.aki-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
}

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

.aki-status__label {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ============================================
   APP.CSS - GLOBAL STYLESHEET
   Master stylesheet with common styles and components
   ============================================ */

/* ============================================
   1. ROOT VARIABLES & CONSTRAINTS
   ============================================ */
:root {
    /* Layout Constraints */
    --max-width: 1920px;
    --sidebar-width: 400px;
    --min-viewport: 320px;
    /* Color Palette */
    --color-primary-dark: #232f3e;
    --color-primary-orange: #ff9900;
    --color-primary-orange-hover: #e88b00;
    --color-primary-orange-dark: #ec7211;
    --color-primary-blue: #0066c0;
    --color-primary-blue-hover: #004d99;
    /* Status Colors */
    --color-success: #28a745;
    --color-success-hover: #218838;
    --color-success-light: #d4edda;
    --color-success-text: #155724;
    --color-danger: #d13212;
    --color-danger-hover: #a02810;
    --color-danger-light: #f8d7da;
    --color-danger-text: #721c24;
    --color-warning: #ffc107;
    --color-warning-bg: #fff3cd;
    --color-warning-text: #856404;
    /* Severity Colors */
    --color-sev-1: #d13212;
    --color-sev-2: #ff6b6b;
    --color-sev-3: #ff9900;
    --color-sev-4: #ffd93d;
    --color-sev-5: #6c757d;
    /* Gray Scale */
    --color-gray-dark: #6c757d;
    --color-gray-light: #f8f9fa;
    --color-gray-border: #e9ecef;
    --color-gray-medium: #dee2e6;
    /* Status Badge Colors */
    --color-pending-bg: #fff3cd;
    --color-pending-text: #856404;
    --color-approved-bg: #d4edda;
    --color-approved-text: #155724;
    --color-denied-bg: #f8d7da;
    --color-denied-text: #721c24;
    --color-assigned-bg: #e3f2fd;
    --color-assigned-text: #0066c0;
    /* Role Colors */
    --color-role-admin: #d4af37; /* Gold */
    --color-role-manager: #0066c0; /* Blue */
    --color-role-lead: #28a745; /* Green */
    /* Shift Colors */
    --color-shift-fhd: #3498db; /* Blue - Front Half Day */
    --color-shift-fhn: #9b59b6; /* Purple - Front Half Night */
    --color-shift-bhd: #2ecc71; /* Green - Back Half Day */
    --color-shift-bhn: #e74c3c; /* Red - Back Half Night */
    /* Lock Icon Colors */
    --color-lock-gold: #d4af37;
    --color-lock-orange: #ff9800;
    /* Tier Colors */
    --color-tier-t1: #d4af37; /* Gold */
    --color-tier-t2: #c0c0c0; /* Silver */
    --color-tier-t3: #cd7f32; /* Bronze */
    /* Priority Colors */
    --color-priority-critical: #d13212;
    --color-priority-high: #ff9800;
    --color-priority-medium: #ffc107;
    --color-priority-low: #0066c0;
    /* Status Colors */
    --color-status-new: #ff9800;
    --color-status-acknowledged: #ffc107;
    --color-status-in-progress: #0066c0;
    --color-status-resolved: #28a745;
    --color-status-missed: #6c757d;
    /* Dwell Time Colors */
    --color-dwell-critical: #d13212;
    --color-dwell-warning: #ff9800;
    --color-dwell-caution: #ffc107;
    --color-dwell-normal: #6c757d;
    /* Severity Colors */
    --color-severity-sev1: #d13212;
    --color-severity-sev2: #ff6600;
    --color-severity-sev3: #ff9900;
    --color-severity-sev4: #ffc107;
    --color-severity-sev5: #6c757d;
    /* Ticket Status Colors */
    --color-ticket-assigned: #0066c0;
    --color-ticket-researching: #ff9900;
    --color-ticket-in-progress: #0066c0;
    --color-ticket-pending: #ffc107;
    --color-ticket-resolved: #28a745;
    --color-ticket-closed: #6c757d;
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 4px 16px rgba(0, 0, 0, 0.2);
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

/* ============================================
   2. GLOBAL RESETS & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#root {
    width:100%;
}

body {
    font-family: 'Amazon Ember', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: clamp(12px, 1vw, 16px);
    line-height: 1.6;
    color: var(--color-primary-dark);
    background-color: var(--color-gray-light);
    min-width: var(--min-viewport);
    max-width: 100%;
    margin: 0 auto;
    place-items: start !important;
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
h1 {
    font-size: clamp(1.5rem, 2vw, 2rem);
    color: var(--color-primary-dark);
    margin-bottom: var(--spacing-md);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.25rem, 1.75vw, 1.75rem);
    color: var(--color-primary-dark);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

h3 {
    font-size: clamp(1.1rem, 1.5vw, 1.5rem);
    color: var(--color-primary-dark);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

h4 {
    font-size: clamp(1rem, 1.25vw, 1.25rem);
    color: var(--color-primary-dark);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

p {
    margin-bottom: var(--spacing-md);
}

.section-description,
.description-text {
    color: var(--color-gray-dark);
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
    margin-bottom: var(--spacing-lg);
    line-height: 1.5;
}

.label,
.info-label {
    font-size: clamp(0.7rem, 0.8vw, 0.85rem);
    color: var(--color-gray-dark);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ============================================
   4. HEADER & NAVIGATION
   ============================================ */
header {
    background-color: var(--color-primary-dark);
    color: white;
    padding: clamp(0.75rem, 1.5vw, 1rem) clamp(1rem, 2vw, 2rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    width: 100%;
    gap: var(--spacing-md);
}

.header-logo-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-logo {
    height: 40px;
    width: auto;
}

    header h1 {
        color: white;
        margin: 0;
        font-size: clamp(1.25rem, 2vw, 1.75rem);
    }

nav {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

    nav button {
        background: transparent;
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.3);
        padding: clamp(0.4rem, 0.8vw, 0.5rem) clamp(0.75rem, 1.5vw, 1rem);
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: all var(--transition-fast);
        font-size: clamp(0.8rem, 0.9vw, 0.9rem);
    }

        nav button:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.5);
        }

        nav button.active {
            background: var(--color-primary-orange);
            border-color: var(--color-primary-orange);
        }

/* ============================================
   5. BUTTONS
   ============================================ */
button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--color-primary-orange);
    color: white;
    padding: clamp(0.5rem, 1vw, 0.75rem) clamp(1rem, 2vw, 1.5rem);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: clamp(0.85rem, 1vw, 1rem);
}

    .btn-primary:hover {
        background: var(--color-primary-orange-hover);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

    .btn-primary:active {
        transform: translateY(0);
    }

.btn-secondary {
    background: var(--color-gray-light);
    color: var(--color-primary-dark);
    border: 1px solid var(--color-gray-border);
    padding: clamp(0.5rem, 1vw, 0.75rem) clamp(1rem, 2vw, 1.5rem);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: clamp(0.85rem, 1vw, 1rem);
}

    .btn-secondary:hover {
        background: white;
        border-color: var(--color-gray-dark);
    }

.btn-danger {
    background: var(--color-danger);
    color: white;
    padding: clamp(0.5rem, 1vw, 0.75rem) clamp(1rem, 2vw, 1.5rem);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: clamp(0.85rem, 1vw, 1rem);
}

    .btn-danger:hover {
        background: var(--color-danger-hover);
        transform: scale(1.05);
    }

.btn-warning {
    background: var(--color-warning);
    color: var(--color-primary-dark);
    padding: clamp(0.5rem, 1vw, 0.75rem) clamp(1rem, 2vw, 1.5rem);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: clamp(0.85rem, 1vw, 1rem);
}

    .btn-warning:hover {
        background: #e0a800;
    }

.btn-success,
.btn-approve {
    background: var(--color-success);
    color: white;
    padding: clamp(0.5rem, 1vw, 0.75rem) clamp(1rem, 2vw, 1.5rem);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: clamp(0.85rem, 1vw, 1rem);
}

    .btn-success:hover,
    .btn-approve:hover {
        background: var(--color-success-hover);
    }

.btn-deny {
    background: var(--color-danger);
    color: white;
    padding: clamp(0.5rem, 1vw, 0.75rem) clamp(1rem, 2vw, 1.5rem);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: clamp(0.85rem, 1vw, 1rem);
}

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

.btn-small,
.btn-edit-small,
.btn-save-small {
    padding: clamp(0.35rem, 0.6vw, 0.5rem) clamp(0.65rem, 1.2vw, 1rem);
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.btn-edit-small {
    background: var(--color-primary-blue);
    color: white;
}

    .btn-edit-small:hover {
        background: var(--color-primary-blue-hover);
    }

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

    .btn-save-small:hover {
        background: var(--color-success-hover);
    }

.btn-cancel-small {
    background: var(--color-gray-light);
    color: var(--color-primary-dark);
    border: 1px solid var(--color-gray-border);
    padding: clamp(0.35rem, 0.6vw, 0.5rem) clamp(0.65rem, 1.2vw, 1rem);
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

    .btn-cancel-small:hover {
        background: white;
    }

.btn-icon {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: clamp(0.25rem, 0.5vw, 0.5rem) clamp(0.5rem, 1vw, 0.75rem);
    transition: transform var(--transition-fast);
    color: var(--color-gray-dark);
}

    .btn-icon:hover {
        transform: scale(1.15);
        color: var(--color-primary-dark);
    }

.btn-delete {
    background: var(--color-danger);
    color: white;
    padding: clamp(0.35rem, 0.6vw, 0.5rem) clamp(0.65rem, 1.2vw, 1rem);
    border-radius: var(--radius-sm);
    font-size: clamp(0.7rem, 0.85vw, 0.85rem);
    font-weight: 600;
}

    .btn-delete:hover {
        background: var(--color-danger-hover);
        transform: scale(1.05);
    }

/* ============================================
   6. FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: var(--spacing-lg);
}

    .form-group label {
        display: block;
        margin-bottom: var(--spacing-sm);
        font-weight: 600;
        color: var(--color-primary-dark);
        font-size: clamp(0.85rem, 0.95vw, 0.95rem);
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: clamp(0.5rem, 1vw, 0.75rem);
        border: 1px solid var(--color-gray-border);
        border-radius: var(--radius-sm);
        font-size: clamp(0.85rem, 0.95vw, 0.95rem);
        font-family: inherit;
        transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--color-primary-orange);
            box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
        }

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

    .form-group input[type="checkbox"],
    .form-group input[type="radio"] {
        width: auto;
        margin-right: var(--spacing-sm);
    }

/* ============================================
   7. BADGES
   ============================================ */
.badge {
    display: inline-block;
    padding: clamp(0.2rem, 0.4vw, 0.35rem) clamp(0.5rem, 1vw, 0.75rem);
    border-radius: var(--radius-sm);
    font-size: clamp(0.7rem, 0.8vw, 0.8rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-pending,
.status-pending {
    background: var(--color-pending-bg);
    color: var(--color-pending-text);
}

.badge-approved,
.status-approved {
    background: var(--color-approved-bg);
    color: var(--color-approved-text);
}

.badge-denied,
.status-denied {
    background: var(--color-denied-bg);
    color: var(--color-denied-text);
}

.badge-assigned,
.status-assigned {
    background: var(--color-assigned-bg);
    color: var(--color-assigned-text);
}

.badge-researching {
    background: #fff3cd;
    color: #856404;
}

.badge-in-progress {
    background: #cfe2ff;
    color: #084298;
}

.badge-resolved {
    background: var(--color-success-light);
    color: var(--color-success-text);
}

.badge-sev-1,
.severity-sev_1 {
    background: var(--color-sev-1);
    color: white;
}

.badge-sev-2,
.severity-sev_2 {
    background: var(--color-sev-2);
    color: white;
}

.badge-sev-3,
.severity-sev_3 {
    background: var(--color-sev-3);
    color: white;
}

.badge-sev-4,
.severity-sev_4 {
    background: var(--color-sev-4);
    color: var(--color-primary-dark);
}

.badge-sev-5,
.severity-sev_5 {
    background: var(--color-sev-5);
    color: white;
}

.badge-priority,
.priority-badge {
    padding: clamp(0.15rem, 0.3vw, 0.25rem) clamp(0.5rem, 0.9vw, 0.75rem);
    color: white;
    border-radius: var(--radius-sm);
    font-size: clamp(0.65rem, 0.75vw, 0.75rem);
    font-weight: 600;
    text-transform: uppercase;
}

.badge-critical {
    background: var(--color-danger);
}

.badge-high {
    background: var(--color-primary-orange);
}

.badge-medium {
    background: var(--color-warning);
    color: var(--color-primary-dark);
}

.badge-low {
    background: var(--color-gray-dark);
}

.badge-role {
    background: var(--color-primary-blue);
    color: white;
}

.badge-t1 {
    background: #ffd700;
    color: var(--color-primary-dark);
}

.badge-t2 {
    background: #c0c0c0;
    color: var(--color-primary-dark);
}

.badge-t3 {
    background: #cd7f32;
    color: white;
}

.badge-site,
.site-badge {
    background: var(--color-gray-light);
    color: var(--color-primary-dark);
    border: 1px solid var(--color-gray-border);
    padding: clamp(0.2rem, 0.4vw, 0.35rem) clamp(0.5rem, 1vw, 0.75rem);
    border-radius: var(--radius-sm);
    font-size: clamp(0.7rem, 0.8vw, 0.8rem);
    font-weight: 600;
}
/* Role Badge Classes */
.role-badge-admin {
    background-color: var(--color-role-admin);
    color: white;
}

.role-badge-manager {
    background-color: var(--color-role-manager);
    color: white;
}

.role-badge-lead {
    background-color: var(--color-role-lead);
    color: white;
}
/* Role Icon Colors */
.role-icon.role-admin {
    color: var(--color-role-admin);
}

.role-icon.role-manager {
    color: var(--color-role-manager);
}

.role-icon.role-lead {
    color: var(--color-role-lead);
}

/* Role Border Colors */
.role-border-admin {
    border-color: var(--color-role-admin) !important;
}

.role-border-manager {
    border-color: var(--color-role-manager) !important;
}

.role-border-lead {
    border-color: var(--color-role-lead) !important;
}

/* Shift Badge Classes */
.shift-badge.shift-fhd {
    background-color: var(--color-shift-fhd);
    color: white;
}

.shift-badge.shift-fhn {
    background-color: var(--color-shift-fhn);
    color: white;
}

.shift-badge.shift-bhd {
    background-color: var(--color-shift-bhd);
    color: white;
}

.shift-badge.shift-bhn {
    background-color: var(--color-shift-bhn);
    color: white;
}

/* ============================================
   8. CARDS
   ============================================ */
.card {
    background: white;
    border-radius: var(--radius-md);
    padding: clamp(1rem, 2vw, 1.5rem);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

    .card:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-2px);
    }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(0.75rem, 1.5vw, 1rem);
    padding-bottom: clamp(0.5rem, 1vw, 0.75rem);
    border-bottom: 1px solid var(--color-gray-border);
}

.card-title {
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    font-weight: 600;
    color: var(--color-primary-dark);
    margin: 0;
}

.card-body {
    color: var(--color-primary-dark);
}

.card-footer {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--color-gray-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-card {
    background: white;
    border-radius: var(--radius-md);
    padding: clamp(1rem, 2vw, 1.5rem);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.stat-value {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--color-primary-orange);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: clamp(0.75rem, 0.9vw, 0.9rem);
    color: var(--color-gray-dark);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ============================================
   9. GRID LAYOUTS
   ============================================ */
.grid-auto-fill {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(200px, 25vw, 280px), 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.grid-two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.grid-three-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.grid-four-col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(150px, 20vw, 200px), 1fr));
    gap: clamp(0.75rem, 1.5vw, 1rem);
}

/* ============================================
   10. INFO/DETAIL ITEMS
   ============================================ */
.info-item,
.detail-item {
    display: flex;
    flex-direction: column;
    gap: clamp(0.25rem, 0.5vw, 0.5rem);
}

.info-value {
    font-size: clamp(0.85rem, 0.95vw, 0.95rem);
    color: var(--color-primary-dark);
    font-weight: 500;
}

/* ============================================
   11. MODALS & OVERLAYS
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    max-width: clamp(400px, 50vw, 600px);
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.modal-header .close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--color-text-secondary, #666);
    padding: 0.25rem;
    line-height: 1;
    flex-shrink: 0;
}

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

.modal-title {
    font-size: clamp(1.25rem, 1.5vw, 1.5rem);
    font-weight: 600;
    color: var(--color-primary-dark);
    margin: 0;
}

.modal-body {
    margin-bottom: var(--spacing-lg);
}

.modal-actions,
.modal-footer {
    display: flex;
    gap: var(--spacing-md);
    justify-content: flex-end;
}

/* ============================================
   12. SECTIONS & CONTAINERS
   ============================================ */
.section {
    background: white;
    border-radius: var(--radius-md);
    padding: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--color-gray-border);
}

.section-title {
    font-size: clamp(1.1rem, 1.4vw, 1.4rem);
    font-weight: 600;
    color: var(--color-primary-dark);
    margin: 0;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: clamp(1rem, 2vw, 2rem);
}

/* ============================================
   13. TABLES
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

thead {
    background: var(--color-gray-light);
}

th {
    padding: clamp(0.75rem, 1.5vw, 1rem);
    text-align: left;
    font-weight: 600;
    color: var(--color-primary-dark);
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--color-gray-border);
}

td {
    padding: clamp(0.75rem, 1.5vw, 1rem);
    border-bottom: 1px solid var(--color-gray-border);
    font-size: clamp(0.85rem, 0.95vw, 0.95rem);
}

tr:hover {
    background: var(--color-gray-light);
}

tr:last-child td {
    border-bottom: none;
}

/* ============================================
   14. UTILITY CLASSES
   ============================================ */
.empty-state {
    text-align: center;
    padding: clamp(2rem, 4vw, 3rem) var(--spacing-md);
    color: var(--color-gray-dark);
    font-style: italic;
    font-size: clamp(0.9rem, 1vw, 1rem);
}

.divider {
    height: 1px;
    background: var(--color-gray-border);
    margin: var(--spacing-lg) 0;
}

.error-message {
    background: var(--color-danger-light);
    color: var(--color-danger-text);
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--color-danger);
    margin-bottom: var(--spacing-md);
}

.warning-message {
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--color-warning);
    margin-bottom: var(--spacing-md);
}

.success-message {
    background: var(--color-success-light);
    color: var(--color-success-text);
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--color-success);
    margin-bottom: var(--spacing-md);
}

.info-message {
    background: var(--color-assigned-bg);
    color: var(--color-assigned-text);
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--color-primary-blue);
    margin-bottom: var(--spacing-md);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-muted {
    color: var(--color-gray-dark);
}

.text-primary {
    color: var(--color-primary-orange);
}

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

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

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: var(--spacing-xs);
}

.mt-2 {
    margin-top: var(--spacing-sm);
}

.mt-3 {
    margin-top: var(--spacing-md);
}

.mt-4 {
    margin-top: var(--spacing-lg);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: var(--spacing-xs);
}

.mb-2 {
    margin-bottom: var(--spacing-sm);
}

.mb-3 {
    margin-bottom: var(--spacing-md);
}

.mb-4 {
    margin-bottom: var(--spacing-lg);
}

.pt-0 {
    padding-top: 0;
}

.pt-1 {
    padding-top: var(--spacing-xs);
}

.pt-2 {
    padding-top: var(--spacing-sm);
}

.pt-3 {
    padding-top: var(--spacing-md);
}

.pt-4 {
    padding-top: var(--spacing-lg);
}

.pb-0 {
    padding-bottom: 0;
}

.pb-1 {
    padding-bottom: var(--spacing-xs);
}

.pb-2 {
    padding-bottom: var(--spacing-sm);
}

.pb-3 {
    padding-bottom: var(--spacing-md);
}

.pb-4 {
    padding-bottom: var(--spacing-lg);
}

.pl-0 {
    padding-left: 0;
}

.pl-1 {
    padding-left: var(--spacing-xs);
}

.pl-2 {
    padding-left: var(--spacing-sm);
}

.pl-3 {
    padding-left: var(--spacing-md);
}

.pl-4 {
    padding-left: var(--spacing-lg);
}

.pr-0 {
    padding-right: 0;
}

.pr-1 {
    padding-right: var(--spacing-xs);
}

.pr-2 {
    padding-right: var(--spacing-sm);
}

.pr-3 {
    padding-right: var(--spacing-md);
}

.pr-4 {
    padding-right: var(--spacing-lg);
}

/* ============================================
   15. USER CONTROLS & SPECIAL COMPONENTS
   ============================================ */
.user-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-left: auto;
}

.user-menu-container {
    position: relative;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: clamp(0.4rem, 0.8vw, 0.5rem) clamp(0.75rem, 1.5vw, 1rem);
    background: black;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-gray-border);
}

.user-badge-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info-badge {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-badge .role-icon {
    font-size: clamp(0.9rem, 1.1vw, 1.1rem);
}

.break-badge {
    background: #f39c12;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 4px;
}

.break-badge-left {
    background: #e74c3c;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    z-index: 1000;
    animation: slideDown 0.2s ease;
}

.user-menu-section {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-gray-border);
}

.user-menu-section:last-child {
    border-bottom: none;
}

.menu-section-title {
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: var(--spacing-md);
    font-size: clamp(0.85rem, 0.95vw, 0.95rem);
}

.break-section {
    margin-bottom: var(--spacing-md);
}

.break-section:last-of-type {
    margin-bottom: var(--spacing-sm);
}

.break-section label {
    display: block;
    color: var(--color-primary-dark);
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
    font-weight: 600;
    margin-bottom: clamp(0.35rem, 0.6vw, 0.5rem);
}

.break-select {
    width: 100%;
    padding: clamp(0.4rem, 0.8vw, 0.5rem) clamp(0.65rem, 1.2vw, 1rem);
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
    background: white;
    color: var(--color-primary-dark);
}

.break-select:focus {
    outline: none;
    border-color: var(--color-primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 192, 0.1);
}

.btn-go-break {
    width: 100%;
    background: var(--color-primary-blue);
    color: white;
    border: none;
    padding: clamp(0.5rem, 1vw, 0.75rem);
    border-radius: var(--radius-sm);
    font-size: clamp(0.85rem, 0.95vw, 0.95rem);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-go-break:hover {
    background: var(--color-primary-blue-hover);
    transform: translateY(-1px);
}

.return-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.35rem, 0.6vw, 0.5rem);
    background: var(--color-success);
    color: white;
    border: none;
    padding: clamp(0.5rem, 1vw, 0.75rem);
    border-radius: var(--radius-sm);
    font-size: clamp(0.85rem, 0.95vw, 0.95rem);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.return-btn:hover {
    background: var(--color-success-hover);
    transform: translateY(-1px);
}

.break-btn-container {
    position: relative;
}

.nav-icon-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    transition: background 0.2s;
}

.nav-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-icon-btn.on-break {
    background: #f39c12;
    border-color: #f39c12;
    animation: pulse-break 2s infinite;
}

.nav-icon-btn.on-leave {
    background: #e74c3c;
    border-color: #e74c3c;
}

@keyframes pulse-break {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.break-popup {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    z-index: 1000;
    animation: slideDown 0.2s ease;
}

.break-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-gray-border);
    font-weight: 600;
    color: var(--color-primary-dark);
}

.break-popup-body {
    padding: var(--spacing-md);
}

.admin-tools-menu {
    position: relative;
}

.admin-tools-toggle {
    display: flex;
    align-items: center;
    gap: clamp(0.35rem, 0.6vw, 0.5rem);
    background: var(--color-primary-orange);
    color: white;
    border: none;
    padding: clamp(0.4rem, 0.8vw, 0.5rem) clamp(0.75rem, 1.5vw, 1rem);
    border-radius: var(--radius-sm);
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.admin-tools-toggle:hover {
    background: var(--color-primary-orange-hover);
    transform: translateY(-1px);
}

.admin-tools-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-md);
    min-width: 300px;
    z-index: 1000;
    animation: slideDown 0.2s ease;
}

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

.admin-tool-section {
    margin-bottom: var(--spacing-md);
}

.admin-tool-section:last-child {
    margin-bottom: 0;
}

.admin-tool-section label {
    display: flex;
    align-items: center;
    gap: clamp(0.25rem, 0.5vw, 0.5rem);
    color: var(--color-primary-dark);
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
    font-weight: 600;
    margin-bottom: clamp(0.35rem, 0.6vw, 0.5rem);
}

.admin-tool-select,
.admin-tool-input {
    width: 100%;
    padding: clamp(0.4rem, 0.8vw, 0.5rem) clamp(0.65rem, 1.2vw, 1rem);
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
    background: white;
    color: var(--color-primary-dark);
}

.admin-tool-select:focus,
.admin-tool-input:focus {
    outline: none;
    border-color: var(--color-primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

.view-as-control {
    background: var(--color-warning-bg);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-warning);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.simulation-banner {
    background: linear-gradient(135deg, var(--color-primary-orange) 0%, #ff6600 100%);
    color: white;
    padding: var(--spacing-md);
    text-align: center;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
}

.date-sim-banner {
    background: linear-gradient(135deg, var(--color-warning) 0%, #e0a800 100%);
    color: var(--color-primary-dark);
}

.banner-icon {
    font-size: 1.2rem;
}

.banner-clear-btn {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border: none;
    padding: clamp(0.35rem, 0.6vw, 0.5rem) clamp(0.75rem, 1.5vw, 1rem);
    border-radius: var(--radius-sm);
    font-size: clamp(0.75rem, 0.85vw, 0.85rem);
    font-weight: 600;
    cursor: pointer;
    margin-left: var(--spacing-md);
    transition: all var(--transition-fast);
}

.banner-clear-btn:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

/* ============================================
   16. RESPONSIVE BREAKPOINTS
   ============================================ */
@media (max-width: 1920px) {
    :root {
        --max-width: 100%;
    }
}

@media (max-width: 1440px) {
    body {
        font-size: 15px;
    }
}

@media (max-width: 1024px) {
    .grid-four-col {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-three-col {
        grid-template-columns: repeat(2, 1fr);
    }

    header {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    nav {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .grid-two-col,
    .grid-three-col,
    .grid-four-col {
        grid-template-columns: 1fr;
    }

    .grid-auto-fill {
        grid-template-columns: 1fr;
    }

    .card-header,
    .card-footer,
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }

    .modal-content {
        width: 95%;
        padding: var(--spacing-lg);
    }

    .modal-actions,
    .modal-footer {
        flex-direction: column;
        width: 100%;
    }

        .modal-actions button,
        .modal-footer button {
            width: 100%;
        }
}

@media (max-width: 480px) {
    body {
        font-size: 12px;
    }

    header {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .container {
        padding: var(--spacing-md);
    }

    .section {
        padding: var(--spacing-md);
    }

    nav button {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }
}

/* ============================================
   17. PRINT STYLES
   ============================================ */
@media print {
    body {
        background: white;
        font-size: 12pt;
    }

    header,
    nav,
    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .modal-overlay {
        display: none;
    }

    .card,
    .section {
        box-shadow: none;
        border: 1px solid var(--color-gray-border);
        page-break-inside: avoid;
    }
}

/* ============================================
   18. HIGH DPI DISPLAYS
   ============================================ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}


/* Time Simulation Button */
.btn-apply-time {
    background: var(--color-success);
    color: white;
    border: none;
    padding: clamp(0.4rem, 0.8vw, 0.5rem) clamp(0.75rem, 1.5vw, 1rem);
    border-radius: var(--radius-sm);
    font-size: clamp(0.8rem, 0.9vw, 0.9rem);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-apply-time:hover {
    background: var(--color-success-hover);
    transform: translateY(-1px);
}

.time-sim-banner {
    background: linear-gradient(135deg, var(--color-primary-blue) 0%, #004d99 100%);
    color: white;
}

/* ============================================
   METRICSTRACKER.CSS - Workbook-style metrics page
   ============================================ */

/* Loading state */
.metrics-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    font-size: 16px;
    color: var(--color-gray-dark);
}

/* ============================================
   1. WORKBOOK CONTAINER
   ============================================ */
.metrics-workbook {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(12px, 2vw, 20px) clamp(12px, 2vw, 20px);
}

/* ============================================
   2. SITE TABS
   ============================================ */
.site-tabs {
    display: flex;
    gap: 2px;
    overflow-x: auto;
    padding-bottom: 0;
    border-bottom: 2px solid var(--color-gray-border);
    scrollbar-width: thin;
}

.site-tab {
    padding: 10px 20px;
    border: 1px solid var(--color-gray-border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: var(--color-gray-light);
    color: var(--color-gray-dark);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: background 0.15s, color 0.15s;
}

.site-tab:hover {
    background: #e8ecf1;
}

.site-tab.active {
    background: white;
    color: var(--color-primary-dark);
    border-color: var(--color-gray-border);
    margin-bottom: -2px;
    border-bottom: 2px solid white;
}

.site-tab.unsaved {
    font-style: italic;
}

.unsaved-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--color-primary-orange);
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
}

/* ============================================
   3. TOOLBAR
   ============================================ */
.metrics-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.toolbar-left h2 {
    margin: 0;
    font-size: clamp(18px, 2.5vw, 22px);
    color: var(--color-primary-dark);
}

.period-count {
    font-size: 13px;
    color: var(--color-gray-dark);
    background: var(--color-gray-light);
    padding: 2px 10px;
    border-radius: 12px;
}

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

.btn-add-period {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--color-primary-orange);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: opacity 0.15s;
}

.btn-add-period:hover:not(:disabled) {
    opacity: 0.9;
}

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

/* ============================================
   4. CATEGORY BLOCKS
   ============================================ */
.metrics-categories-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.metric-category-block {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px !important;
    margin: 0 0 4px 0 !important;
    background: var(--color-primary-dark);
    color: white;
}

.category-header h3 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 16px;
    color: var(--color-primary-orange) !important;
}

.metric-count-badge {
    font-size: 12px;
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: 10px;
}

/* ============================================
   5. METRICS TABLE
   ============================================ */
.metrics-table-wrapper {
    overflow-x: auto;
}

.metrics-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.metrics-table th,
.metrics-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--color-gray-border);
    font-size: 13px;
}

.metrics-table thead th {
    background: var(--color-gray-light);
    font-weight: 600;
    color: var(--color-primary-dark);
    position: sticky;
    top: 0;
    z-index: 1;
}

.metric-name-col {
    min-width: 180px;
}

.metric-target-col {
    min-width: 80px;
    color: var(--color-gray-dark);
    font-size: 12px;
}

.period-col {
    min-width: 100px;
    text-align: center;
}

.period-cell {
    text-align: center;
}

.period-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-remove-period {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
}

.btn-remove-period:hover {
    color: #e53e3e;
}

.metric-link-col {
    width: 50px;
    text-align: center;
}

.metric-label {
    display: block;
    font-weight: 500;
    color: var(--color-primary-dark);
}

.metric-code {
    display: block;
    font-size: 11px;
    color: var(--color-gray-dark);
    font-family: monospace;
}

/* ============================================
   6. METRIC INPUT CELLS
   ============================================ */
.metric-input {
    width: 100%;
    max-width: 100px;
    padding: 6px 8px;
    border: 1px solid var(--color-gray-border);
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    margin: 0 auto;
    display: block;
    background: #fafbfc;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.metric-input:focus {
    outline: none;
    border-color: var(--color-primary-orange);
    box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.15);
    background: white;
}

.metric-input::placeholder {
    color: #ccc;
}

.metric-value-display {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.9em;
}

.compare-col {
    background: #f0f4f8 !important;
}

.compare-cell {
    background: #f0f4f8;
}

.compare-diff {
    display: block;
    font-size: 0.75em;
    font-weight: 600;
    margin-top: 2px;
}

.compare-diff.positive {
    color: #27ae60;
}

.compare-diff.negative {
    color: #e74c3c;
}

/* ============================================
   7. EMPTY STATE
   ============================================ */
.metrics-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-gray-dark);
}

.metrics-empty p {
    margin: 8px 0;
    font-size: 14px;
}

/* ============================================
   8. RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .metrics-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .toolbar-right {
        width: 100%;
        justify-content: flex-end;
    }

    .site-tabs {
        gap: 1px;
    }

    .site-tab {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* ============================================
   9. PERIOD PICKER DROPDOWN
   ============================================ */
.period-picker-wrapper {
    position: relative;
}

.period-picker-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid var(--color-gray-border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    min-width: 140px;
    overflow: hidden;
}

.period-option {
    display: block;
    width: 100%;
    padding: 10px 16px;
    border: none;
    background: none;
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--color-primary-dark);
}

.period-option:hover {
    background: var(--color-gray-light);
}

.period-picker-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99;
}

/* ============================================
   10. BULK IMPORT MODAL
   ============================================ */
.bulk-import-modal {
    max-width: 600px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
}

.bulk-import-modal h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--color-primary-dark);
}

.modal-hint {
    font-size: 13px;
    color: var(--color-gray-dark);
    margin-bottom: 16px;
}

.bulk-import-modal input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--color-gray-border);
    border-radius: 6px;
    background: var(--color-gray-light);
    cursor: pointer;
    margin-bottom: 16px;
}

.import-period-select {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.import-period-select label {
    font-weight: 600;
    font-size: 13px;
}

.import-period-select select {
    padding: 6px 10px;
    border: 1px solid var(--color-gray-border);
    border-radius: 4px;
    font-size: 13px;
}

.import-mapping-list {
    margin-bottom: 16px;
}

.import-mapping-list h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: var(--color-primary-dark);
}

.mapping-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--color-gray-border);
}

.csv-col-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mapping-row select {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid var(--color-gray-border);
    border-radius: 4px;
    font-size: 13px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}


/* Escalation indicator inside period cells */
.esc-indicator {
    display: block;
    text-align: center;
    line-height: 1;
    margin-top: 2px;
}

.period-cell {
    position: relative;
}
/* ============================================
   WARROOM.CSS - PAGE-SPECIFIC STYLES
   Only unique styles for War Room page
   ============================================ */
/* ============================================
   1. WAR ROOM CONTAINER - MAXIMIZED LAYOUT
   ============================================ */
.war-room-container {
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f5f5f5;
}

.war-room-page {
    padding: clamp(16px, 2vw, 32px);
    max-width: 1600px;
    margin: 0 auto;
}

/* ============================================
   2. WAR ROOM HEADER
   ============================================ */
.war-room-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--color-gray-border);
    flex-shrink: 0;
    /* More padding all around */
    padding: var(--spacing-xl); /* 32px all sides */
    /* Custom padding (top/bottom, left/right) */
    padding: 1.5rem 2rem; /* 24px top/bottom, 32px left/right */
    /* Individual control */
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    padding-left: var(--spacing-xl);
    padding-right: var(--spacing-xl);
}

.header-left h1 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px 0;
    font-size: 24px;
    color: var(--color-primary-dark);
}

.shift-indicator {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-left: 8px;
}

.shift-indicator.shift-days {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    box-shadow: 0 2px 4px rgba(255, 183, 0, 0.3);
}

.shift-indicator.shift-nights {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.3);
}

.shift-indicator.shift-dtw {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.war-room-header p {
    margin: 4px 0;
    color: var(--color-gray-dark);
}

.lead-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.lead-name {
    font-weight: 600;
    color: var(--color-primary-dark);
}

.lead-coverage {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 600;
    font-size: 12px;
}

.lead-sites {
    color: var(--color-gray-dark);
}

.break-badge-inline {
    padding: 4px 12px;
    background: #ff9800;
    color: white;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

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

.sort-select {
    padding: 8px 12px;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

/* ============================================
   3. STATISTICS & FILTERS
   ============================================ */
.war-room-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.war-room-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .filter-group label {
        font-size: 13px;
        font-weight: 600;
        color: var(--color-primary-dark);
    }


/* Tier Coverage Badge Colors (Legacy - kept for backward compatibility) */
.lead-coverage.tier-t1 {
    background-color: var(--color-tier-t1);
}

.lead-coverage.tier-t2 {
    background-color: var(--color-tier-t2);
}

.lead-coverage.tier-t3 {
    background-color: var(--color-tier-t3);
}

.lead-coverage.tier-no-assignment {
    background-color: #6c757d;
}

/* Group Coverage Badge Colors (Dynamic) */
.lead-coverage[class*="group-"] {
    background-color: var(--color-primary-blue);
}

/* Tier Header Colors (Legacy - kept for backward compatibility) */
.tier-header.tier-t1 {
    border-left-color: var(--color-tier-t1);
}

.tier-header.tier-t2 {
    border-left-color: var(--color-tier-t2);
}

.tier-header.tier-t3 {
    border-left-color: var(--color-tier-t3);
}
.tier-header h2.tier-t1 {
    color: var(--color-tier-t1);
}

.tier-header h2.tier-t2 {
    color: var(--color-tier-t2);
}

.tier-header h2.tier-t3 {
    color: var(--color-tier-t3);
}

/* Group Header Colors (Dynamic) */
.tier-header[class*="group-"] {
    border-left-color: var(--color-primary-blue);
}

.tier-header h2[class*="group-"] {
    color: var(--color-primary-blue);
}

/* Priority Badge Colors */
.priority-badge.priority-critical {
    background-color: var(--color-priority-critical);
}

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

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

.priority-badge.priority-low {
    background-color: var(--color-priority-low);
}

/* Status Badge Colors */
.status-badge.status-new {
    background-color: var(--color-status-new);
}

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

.status-badge.status-in-progress {
    background-color: var(--color-status-in-progress);
}

.status-badge.status-handoff {
    background-color: #9b59b6;
    color: white;
}

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

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

/* Task Card Border Colors (by priority) */
.compact-task-card.priority-critical {
    border-left-color: var(--color-priority-critical);
}

.compact-task-card.priority-high {
    border-left-color: var(--color-priority-high);
}

.compact-task-card.priority-medium {
    border-left-color: var(--color-priority-medium);
}

.compact-task-card.priority-low {
    border-left-color: var(--color-priority-low);
}

/* Dwell Time Colors */
.dwell-critical {
    color: var(--color-dwell-critical);
    font-weight: bold;
}

.dwell-warning {
    color: var(--color-dwell-warning);
    font-weight: bold;
}

.dwell-caution {
    color: var(--color-dwell-caution);
    font-weight: bold;
}

.dwell-normal {
    color: var(--color-dwell-normal);
    font-weight: bold;
}

/* ============================================
   4. TIER SECTIONS
   ============================================ */
.tier-war-rooms {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.tier-section {
    margin-bottom: 16px;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
}

    .tier-section.tier-disabled {
        opacity: 0.5;
    }

.tier-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--color-gray-light);
    border-left: 6px solid;
    cursor: pointer;
    transition: background var(--transition-fast);
}

    .tier-header:hover {
        background: var(--color-gray-medium);
    }

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

.tier-header h2 {
    margin: 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.not-assigned {
    font-size: 14px;
    color: var(--color-gray-dark);
    font-weight: normal;
}

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

.stat-badge {
    padding: 4px 10px;
    background: var(--color-gray-medium);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary-dark);
}

    .stat-badge.critical {
        background: var(--color-danger);
        color: white;
    }

    .stat-badge.new {
        background: #ff9800;
        color: white;
    }

    .stat-badge.progress {
        background: var(--color-primary-blue);
        color: white;
    }

.tier-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary-dark);
    padding: 4px;
    display: flex;
    align-items: center;
}

/* ============================================
   5. TIER TASKS
   ============================================ */
.tier-tasks {
    padding: 16px;
}

.empty-tier {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--color-gray-dark);
}

    .empty-tier p {
        margin: 8px 0 0 0;
        font-size: 16px;
    }

/* ============================================
   6. TASK CARDS
   ============================================ */
.task-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 20px;
}

.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    grid-auto-rows: min-content;
    gap: 12px;
}

.task-card {
    background: white;
    border-radius: var(--radius-md);
    border-left: 6px solid var(--color-primary-orange);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

    .task-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

.task-card-header {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--color-gray-light);
    border-bottom: 1px solid var(--color-gray-border);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.task-site-badge {
    padding: 4px 12px;
    background: var(--color-primary-dark);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
}

.task-priority-badge,
.task-status-badge,
.priority-badge,
.status-badge {
    padding: 4px 12px;
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.task-card-body {
    padding: 16px;
}

.task-metric-name {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px 0;
    font-size: 18px;
    color: var(--color-primary-dark);
}

.task-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.task-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.task-detail-label {
    font-size: 12px;
    color: var(--color-gray-dark);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-detail-value {
    font-size: 14px;
    color: var(--color-primary-dark);
    font-weight: 600;
}

.task-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-gray-border);
}

.task-status-select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

/* ============================================
   7. COMPACT TASK CARDS
   ============================================ */
.compact-task-card {
    background: white;
    border: 1px solid var(--color-gray-border);
    border-left: 4px solid;
    border-radius: 6px;
    padding: 12px;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

    .compact-task-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    .compact-task-card.historical {
        opacity: 0.7;
    }

    .compact-task-card.locked {
        border-color: var(--color-gray-dark);
        opacity: 0.8;
    }

.task-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.task-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.task-metric {
    margin: 0 0 10px 0;
    font-size: 15px;
    color: var(--color-primary-dark);
    font-weight: 600;
}

.task-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.task-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--color-gray-border);
}

.task-card-actions button {
    flex: 1 1 auto;
    min-width: 100px;
    white-space: nowrap;
}

.compact-status-select {
    flex: 1;
    padding: 6px 8px;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.btn-notes {
    padding: 6px 12px;
    background: var(--color-gray-light);
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

    .btn-notes:hover {
        background: var(--color-gray-medium);
    }

/* ============================================
   8. TASK NOTES
   ============================================ */
.task-notes-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-gray-border);
}

.task-notes-list {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.task-notes {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--color-gray-border);
}

.notes-list {
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 8px;
}

.task-note,
.note-item {
    padding: 12px;
    background: var(--color-gray-light);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.note-item {
    padding: 8px;
    font-size: 12px;
}

.task-note-header,
.note-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
}

.note-header {
    font-size: 11px;
}

    .note-header strong {
        color: var(--color-primary-dark);
    }

    .note-header span {
        color: var(--color-gray-dark);
    }

.task-note-time {
    color: var(--color-gray-dark);
    font-size: 12px;
}

.task-note-text {
    font-size: 14px;
    color: var(--color-primary-dark);
}

.note-item p {
    margin: 0;
    color: var(--color-primary-dark);
}

.task-note-input,
.note-input {
    display: flex;
    gap: 8px;
}

.add-note-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    background: var(--color-gray-light);
    border-radius: var(--radius-sm);
}

.add-note {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.add-note input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.add-note button {
    padding: 8px 16px;
    background: var(--color-primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.add-note button:hover {
    opacity: 0.9;
}

.note-input {
    gap: 6px;
}

    .task-note-input textarea,
    .note-input textarea {
        padding: 8px;
        border: 1px solid var(--color-gray-border);
        border-radius: var(--radius-sm);
        font-family: inherit;
        resize: vertical;
    }

    .note-input textarea {
        flex: 1;
        padding: 10px;
        font-size: 14px;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        resize: vertical;
        min-height: 60px;
        border: 2px solid var(--color-gray-border);
        border-radius: 8px;
    }

.btn-add-note {
    padding: 8px 16px;
    background: var(--color-primary-orange);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
    align-self: flex-end;
}

    .btn-add-note:hover {
        background: var(--color-primary-orange-hover);
    }

/* ============================================
   9. HISTORICAL SECTION
   ============================================ */
.historical-section {
    background: white;
    border-top: 2px solid var(--color-gray-border);
    flex-shrink: 0;
}

.historical-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    cursor: pointer;
    background: var(--color-gray-light);
    transition: background var(--transition-fast);
}

    .historical-header:hover {
        background: var(--color-gray-medium);
    }

    .historical-header h2 {
        margin: 0;
        font-size: 18px;
        color: var(--color-primary-dark);
    }

.historical-tasks {
    padding: 16px 24px;
    max-height: 400px;
    overflow-y: auto;
}

/* ============================================
   10. SPECIAL FEATURES
   ============================================ */

/* See All Toggle */
.see-all-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

    .see-all-toggle input[type="checkbox"] {
        cursor: pointer;
    }

    .see-all-toggle span {
        font-size: 0.875rem;
        color: var(--color-primary-dark);
        font-weight: 500;
    }

.see-all-indicator {
    color: var(--color-primary-blue);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Deduplication Badge */
.dedup-badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--color-primary-orange);
    color: white;
    cursor: help;
}

/* Progress Button */
.btn-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
    flex: 1;
}

    .btn-progress:hover:not(.disabled) {
        background: var(--color-primary-blue-hover);
    }

    .btn-progress.disabled {
        background: var(--color-gray-dark);
        cursor: not-allowed;
        opacity: 0.6;
    }

/* Admin Features */
.admin-only-note {
    font-size: 0.875rem;
    color: var(--color-gray-dark);
    font-weight: normal;
}

.locked-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

.admin-only-message {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
    border-radius: var(--radius-sm);
    font-size: 12px;
    text-align: center;
    justify-content: center;
}

/* ============================================
   11. RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1400px) {
    .task-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 1024px) {
    .war-room-page {
        padding: 16px;
    }

    .tier-war-rooms {
        padding: 12px 16px;
    }

    .task-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 10px;
    }

    .compact-task-card {
        padding: 10px;
    }

    .task-metric {
        font-size: 14px;
    }

    .task-info-grid {
        gap: 6px;
    }

    .task-detail-label {
        font-size: 11px;
    }

    .task-detail-value {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .war-room-page {
        padding: 12px;
    }

    .war-room-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
        padding: 16px;
    }

    .header-left h1 {
        font-size: 20px;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .tier-war-rooms {
        padding: 8px 12px;
    }

    .tier-header {
        padding: 12px 16px;
    }

    .tier-header h2 {
        font-size: 18px;
    }

    .tier-tasks {
        padding: 12px;
    }

    .task-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .compact-task-card {
        padding: 8px;
    }

    .task-card-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .task-badges {
        flex-wrap: wrap;
    }

    .task-metric {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .task-info-grid {
        grid-template-columns: 1fr;
        gap: 6px;
        margin-bottom: 8px;
    }

    .task-detail-label {
        font-size: 10px;
    }

    .task-detail-value {
        font-size: 12px;
    }

    .task-card-actions {
        gap: 6px;
    }

    .task-card-actions button {
        min-width: 80px;
        font-size: 11px;
        padding: 6px 8px;
    }

    .compact-status-select {
        width: 100%;
    }

    .btn-notes {
        width: auto;
    }

    .tier-stats-inline {
        flex-wrap: wrap;
    }

    .stat-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
}

@media (max-width: 480px) {
    .war-room-page {
        padding: 8px;
    }

    .war-room-header {
        padding: 12px;
    }

    .header-left h1 {
        font-size: 18px;
    }

    .lead-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .tier-war-rooms {
        padding: 6px 8px;
    }

    .tier-header {
        padding: 10px 12px;
    }

    .tier-header h2 {
        font-size: 16px;
    }

    .tier-tasks {
        padding: 8px;
    }

    .compact-task-card {
        padding: 6px;
    }

    .task-metric {
        font-size: 12px;
    }

    .task-detail-label {
        font-size: 9px;
    }

    .task-detail-value {
        font-size: 11px;
    }

    .task-card-actions button {
        min-width: 70px;
        font-size: 10px;
        padding: 5px 6px;
    }

    .compact-status-select,
    .btn-notes,
    .btn-add-note {
        font-size: 10px;
        padding: 5px 6px;
    }

    .task-site-badge,
    .task-priority-badge,
    .task-status-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
}


/* ============================================
   COMPACT CARD SUMMARY ROW
   ============================================ */
.task-card-summary {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 12px;
    color: var(--color-gray-dark);
    padding-top: 6px;
    border-top: 1px solid var(--color-gray-border);
}

.notes-count-badge {
    padding: 2px 8px;
    background: var(--color-primary-blue);
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* ============================================
   TASK POPUP OVERLAY & MODAL
   ============================================ */
.task-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.15s ease;
}

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

.task-popup {
    background: white;
    border-radius: 10px;
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 20px;
    border-left: 5px solid;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.2s ease;
}

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

.task-popup.priority-critical { border-left-color: var(--color-priority-critical); }
.task-popup.priority-high { border-left-color: var(--color-priority-high); }
.task-popup.priority-medium { border-left-color: var(--color-priority-medium); }
.task-popup.priority-low { border-left-color: var(--color-priority-low); }

.task-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.task-popup-header .task-badges {
    flex: 1;
}

.task-popup-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-gray-dark);
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.task-popup-close:hover {
    background: var(--color-gray-medium);
    color: var(--color-primary-dark);
}

.task-popup .task-card-actions {
    margin-bottom: 16px;
}

.task-popup .task-notes-section {
    margin-top: 0;
    padding-top: 16px;
}

.popup-section-title {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: var(--color-primary-dark);
    font-weight: 600;
}

.task-popup .notes-list {
    max-height: 200px;
}

.task-popup .interaction-log-section {
    max-height: 200px;
    overflow-y: auto;
}

.btn-no-action {
    padding: 0.5rem 1rem;
    background: #e67e22;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.btn-no-action:hover {
    background: #d35400;
}

.time-to-resolve {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    color: var(--color-success);
    font-size: 13px;
    font-weight: 600;
}


/* Interaction Log Styles */
.interaction-log-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-gray-border);
}

.log-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 12px;
}

.log-list {
    max-height: 200px;
    overflow-y: auto;
}

.log-entry {
    padding: 10px;
    background: var(--color-gray-light);
    border-left: 3px solid var(--color-primary-blue);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.log-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.log-entry-body {
    margin-top: 2px;
}

.log-action {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary-dark);
    text-transform: uppercase;
}

.log-time {
    font-size: 11px;
    color: var(--color-gray-dark);
}

.log-user {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary-dark);
}

.log-details {
    font-size: 12px;
    color: var(--color-gray-dark);
    line-height: 1.4;
}

.log-status-change {
    font-size: 11px;
    color: var(--color-primary-orange);
    font-weight: 600;
}

.no-logs {
    text-align: center;
    color: var(--color-gray-dark);
    font-style: italic;
    padding: 20px;
}
.refresh-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #0073bb;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.refresh-button:hover:not(:disabled) {
    background: #005a8c;
}

.refresh-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.refresh-button.refreshing .refresh-icon {
    animation: spin 0.6s linear infinite;
}

.refresh-icon {
    font-size: 14px;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* ============================================
   LEADCONFIG.CSS - PAGE-SPECIFIC STYLES
   Only unique styles for Lead Config page
   ============================================ */
/* ============================================
   1. PAGE LAYOUT
   ============================================ */
.lead-config-page {
    padding: clamp(1rem, 2vw, 2rem);
    max-width: 1600px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 1rem;
}

.coverage-summary {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.coverage-summary h3 {
    margin: 0;
    color: var(--color-primary-dark);
}

.your-coverage-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.your-coverage-row h3 {
    margin: 0;
    white-space: nowrap;
}

.btn-copy-sites {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    background: white;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-copy-sites:hover {
    background: #edf2f7;
    border-color: #a0aec0;
}

.sites-list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sites-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.site-badge {
    background: var(--color-primary-blue);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

    .page-header h1 {
        color: var(--color-primary-dark);
        font-size: clamp(1.75rem, 3vw, 2.5rem);
        margin: 0;
    }

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

.user-display {
    color: var(--color-gray-dark);
    font-size: 0.95rem;
}

    .user-display strong {
        color: var(--color-primary-dark);
    }

/* ============================================
   2. LOGIN CONTAINER
   ============================================ */
.login-container {
    max-width: 500px;
    margin: 4rem auto;
    background: white;
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}

    .login-container h2 {
        color: var(--color-primary-dark);
        margin-bottom: 0.5rem;
    }

    .login-container p {
        color: var(--color-gray-dark);
        margin-bottom: 1.5rem;
    }

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

    .login-form input {
        padding: 0.75rem;
        border: 2px solid var(--color-gray-border);
        border-radius: 6px;
        font-size: 1rem;
    }

        .login-form input:focus {
            outline: none;
            border-color: var(--color-primary-orange);
        }

/* ============================================
   3. TAB NAVIGATION
   ============================================ */
.tab-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-gray-border);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--color-gray-dark);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

    .tab-btn:hover {
        color: var(--color-primary-dark);
        background: var(--color-gray-light);
    }

    .tab-btn.active {
        color: var(--color-primary-orange);
        border-bottom-color: var(--color-primary-orange);
    }

.tab-content {
    min-height: 600px;
}

/* ============================================
   4. COVERAGE DISPLAY CONTAINER
   ============================================ */
.coverage-display-container {
    background: white;
    border-radius: var(--radius-md);
    padding: clamp(1rem, 2vw, 1.5rem);
    box-shadow: var(--shadow-md);
}

.coverage-header {
    text-align: center;
    margin-bottom: 2rem;
}

    .coverage-header h2 {
        color: var(--color-primary-dark);
        margin-bottom: 0.5rem;
    }

.current-date {
    color: var(--color-primary-orange);
    font-size: 1.1rem;
    font-weight: 600;
}

/* ============================================
   5. SHIFT LEGEND
   ============================================ */
.shift-legend {
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--color-gray-border);
}

    .shift-legend h4 {
        color: var(--color-primary-dark);
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

.legend-items {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.legend-label {
    color: var(--color-primary-dark);
    font-size: 0.9rem;
}

    .legend-label strong {
        font-weight: 700;
    }
/* Legend Color Boxes */
.legend-color.legend-color-fhd {
    background-color: var(--color-shift-fhd);
}

.legend-color.legend-color-fhn {
    background-color: var(--color-shift-fhn);
}

.legend-color.legend-color-bhd {
    background-color: var(--color-shift-bhd);
}

.legend-color.legend-color-bhn {
    background-color: var(--color-shift-bhn);
}

/* ============================================
   6. SCHEDULE VIEW TABS
   ============================================ */
.schedule-view-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.view-tab {
    padding: 0.75rem 1.5rem;
    background: var(--color-gray-light);
    border: 2px solid var(--color-gray-border);
    border-radius: 6px;
    color: var(--color-primary-dark);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

    .view-tab:hover {
        background: var(--color-gray-border);
        border-color: var(--color-primary-orange);
    }

    .view-tab.active {
        background: var(--color-primary-orange);
        border-color: var(--color-primary-orange);
        color: white;
    }

/* Schedule View Info */
.schedule-view-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 2px solid var(--color-primary-blue);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.current-shift-badge {
    color: var(--color-primary-dark);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.current-shift-badge strong {
    color: var(--color-primary-blue);
    font-size: 1.3rem;
}

.shift-note {
    color: var(--color-gray-dark);
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================
   7. COVERAGE MASTER DISPLAY
   ============================================ */
.coverage-master-display {
    background: #fff8f0;
    border: 2px solid var(--color-primary-orange);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

    .coverage-master-display h3 {
        color: var(--color-primary-dark);
        margin-bottom: 1rem;
        font-size: 1.25rem;
    }

.master-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 6px;
    padding: 1rem;
}

.master-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.master-name {
    color: var(--color-primary-dark);
    font-weight: 700;
    font-size: 1.1rem;
}

.master-coverage-badge {
    background: var(--color-primary-blue);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.master-badge {
    background: var(--color-primary-orange);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 700;
}

.btn-override-cm {
    background: var(--color-danger);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.btn-override-cm:hover {
    background: var(--color-danger-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* No Coverage Master state */
.coverage-master-display.no-cm {
    background: #fff3f3;
    border-color: #e74c3c;
}

.no-cm-card {
    background: white;
    border-radius: 6px;
    padding: 1.25rem;
    text-align: center;
}

.no-cm-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #c0392b;
    margin-bottom: 0.75rem;
}

.no-cm-icon {
    font-size: 1.3rem;
}

.no-cm-contact {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.btn-claim-cm {
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 auto;
}

.master-badge-small {
    background: var(--color-primary-orange);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
}

/* ============================================
   8. PERSONNEL SECTION
   ============================================ */
.personnel-section {
    margin-top: 2rem;
}

    .personnel-section h3 {
        color: var(--color-primary-dark);
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--color-gray-border);
    }

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

.personnel-display-card {
    background: white;
    border: 2px solid var(--color-gray-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all var(--transition-fast);
    border-left-style: solid;
}

    .personnel-display-card:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-2px);
    }

.master-card-highlight {
    background: #fff8f0;
    border-color: var(--color-primary-orange);
}

.person-name {
    color: var(--color-primary-dark);
    font-weight: 700;
    font-size: 1rem;
}

.card-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-gray-dark);
    font-size: 0.9rem;
}

    .card-field strong {
        color: var(--color-primary-dark);
    }

.shift-badge {
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
}

/* ============================================
   9. CONFIGURATION SECTION
   ============================================ */
.config-section {
    background: white;
    border-radius: var(--radius-md);
    padding: clamp(1rem, 2vw, 2rem);
    box-shadow: var(--shadow-md);
}

    .config-section h2 {
        color: var(--color-primary-dark);
        margin-bottom: 0.5rem;
    }

    .config-section > p {
        color: var(--color-gray-dark);
        margin-bottom: 2rem;
    }

.config-form {
    max-width: 600px;
}

.coverage-preview {
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

    .coverage-preview h3 {
        color: var(--color-primary-dark);
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

.preview-sites {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tier-badge {
    background: var(--color-primary-orange);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.current-config {
    max-width: 800px;
}

.config-info {
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.info-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--color-gray-dark);
    font-size: 0.95rem;
}

    .info-field:last-child {
        margin-bottom: 0;
    }

    .info-field strong {
        color: var(--color-primary-dark);
    }

.config-sites {
    margin-bottom: 2rem;
}

    .config-sites h3 {
        color: var(--color-primary-dark);
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--color-gray-border);
    }

.sites-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ============================================
   10. OT REQUESTS SECTION
   ============================================ */
.ot-requests-section {
    background: white;
    border-radius: var(--radius-md);
    padding: clamp(1rem, 2vw, 2rem);
    box-shadow: var(--shadow-md);
}

    .ot-requests-section h2 {
        color: var(--color-primary-dark);
        margin-bottom: 0.5rem;
    }

    .ot-requests-section > p {
        color: var(--color-gray-dark);
        margin-bottom: 2rem;
    }

.manager-ot-approval-section {
    background: var(--color-warning-bg);
    border: 2px solid var(--color-warning);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.manager-ot-approval-section h3 {
    color: var(--color-primary-dark);
    margin-bottom: 0.5rem;
}

.section-note {
    color: var(--color-gray-dark);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.request-display-card.manager-initiated {
    border-color: var(--color-warning);
    border-width: 2px;
}

.manager-badge {
    background: var(--color-primary-orange);
    color: white;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.75rem;
}

.ot-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-gray-border);
}

.btn-approve,
.btn-deny {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.btn-approve:hover {
    background: var(--color-success-hover);
    transform: translateY(-2px);
}

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

.btn-deny:hover {
    background: var(--color-danger-hover);
    transform: translateY(-2px);
}

/* ============================================
   CALENDAR VIEW
   ============================================ */
.calendar-view-section {
    background: white;
    border-radius: var(--radius-md);
    padding: clamp(1rem, 2vw, 2rem);
    box-shadow: var(--shadow-md);
}

.calendar-view-section h2 {
    color: var(--color-primary-dark);
    margin-bottom: 0.5rem;
}

.calendar-view-section > p {
    color: var(--color-gray-dark);
    margin-bottom: 2rem;
}

.calendar-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.calendar-week-info {
    text-align: center;
    flex: 1;
}

.calendar-week-info h3 {
    color: var(--color-primary-dark);
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.week-id-badge {
    background: var(--color-gray-border);
    color: var(--color-primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

.calendar-legend {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.calendar-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-primary-dark);
}

.legend-box {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(0,0,0,0.1);
}

.legend-box.user-scheduled {
    background: #e3f2fd;
    border-color: var(--color-primary-blue);
}

.legend-box.user-ot {
    background: #fff3e0;
    border-color: var(--color-primary-orange);
}

.calendar-grid-container {
    overflow-x: auto;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1rem;
    min-width: 900px;
}

.calendar-day-card {
    background: white;
    border: 2px solid var(--color-gray-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.calendar-day-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.calendar-day-header {
    background: var(--color-primary-dark);
    color: white;
    padding: 0.75rem;
    text-align: center;
}

.calendar-day-header .day-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.calendar-day-header .day-date {
    font-size: 1.5rem;
    font-weight: 700;
}

.calendar-day-body {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.shift-section {
    padding: 0.75rem;
    background: var(--color-gray-light);
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
}

.shift-section.user-highlight {
    background: #e3f2fd;
    border-color: var(--color-primary-blue);
}

.shift-section.user-ot-highlight {
    background: #fff3e0;
    border-color: var(--color-primary-orange);
}

.shift-label {
    font-weight: 700;
    color: var(--color-primary-dark);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.personnel-count {
    color: var(--color-gray-dark);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.personnel-list-mini {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.person-mini {
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--color-gray-dark);
    border: 1px solid var(--color-gray-border);
}

.person-mini.current-user {
    background: var(--color-primary-orange);
    color: white;
    font-weight: 600;
    border-color: var(--color-primary-orange);
}

.person-mini.more {
    background: var(--color-gray-border);
    color: var(--color-primary-dark);
    font-weight: 600;
    text-align: center;
}

.ot-request-form {
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
    max-width: 800px;
}

    .ot-request-form h3 {
        color: var(--color-primary-dark);
        margin-bottom: 1rem;
    }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.requests-display {
    margin-bottom: 2rem;
}

    .requests-display h3 {
        color: var(--color-primary-dark);
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--color-gray-border);
    }

.requests-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.request-display-card {
    background: white;
    border: 2px solid var(--color-gray-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all var(--transition-fast);
}

    .request-display-card:hover {
        box-shadow: var(--shadow-lg);
        border-color: var(--color-primary-orange);
    }

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-gray-border);
}

.request-id {
    color: var(--color-primary-dark);
    font-weight: 700;
    font-size: 0.9rem;
}

.request-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.request-field {
    color: var(--color-gray-dark);
    font-size: 0.9rem;
}

    .request-field strong {
        color: var(--color-primary-dark);
    }

/* ============================================
   11. EDITING MODE - COVERAGE MASTER
   ============================================ */
.editing-mode {
    background: #fff8f0;
    border: 3px solid var(--color-primary-orange);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.editing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-primary-orange);
}

    .editing-header h3 {
        color: var(--color-primary-dark);
        margin: 0;
        font-size: 1.25rem;
    }

.editing-actions {
    display: flex;
    gap: 0.75rem;
}

    .editing-actions .btn-primary,
    .editing-actions .btn-secondary {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

/* Unassigned Personnel Pool */
.unassigned-pool {
    background: var(--color-warning-bg);
    border: 2px solid var(--color-warning);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

    .unassigned-pool h3 {
        color: var(--color-primary-dark);
        margin: 0 0 0.5rem 0;
        font-size: 1.1rem;
    }

.pool-description {
    color: var(--color-gray-dark);
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
}

.unassigned-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.unassigned-person-card {
    background: white;
    border: 2px solid var(--color-warning);
    border-radius: 6px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

    .unassigned-person-card .person-name {
        color: var(--color-primary-dark);
        font-weight: 700;
        font-size: 1rem;
        padding: 0.5rem;
        background: #fff8f0;
        border-radius: var(--radius-sm);
        border-left: 4px solid var(--color-warning);
    }

    .unassigned-person-card select {
        width: 100%;
        padding: 0.75rem;
        border: 2px solid var(--color-gray-border);
        border-radius: 6px;
        font-size: 0.9rem;
        color: var(--color-primary-dark);
        background: white;
        cursor: pointer;
        transition: all var(--transition-fast);
    }

        .unassigned-person-card select:hover {
            border-color: var(--color-success);
        }

        .unassigned-person-card select:focus {
            outline: none;
            border-color: var(--color-success);
            box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
        }

/* Editable Roles Grid */
.editable-roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.editable-role-card {
    background: white;
    border: 2px solid var(--color-gray-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all var(--transition-fast);
}

    .editable-role-card:hover {
        border-color: var(--color-primary-orange);
        box-shadow: 0 4px 12px rgba(255, 153, 0, 0.15);
    }

    .editable-role-card h4 {
        color: var(--color-primary-dark);
        font-size: 1rem;
        margin: 0 0 0.75rem 0;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--color-gray-border);
    }

.assigned-person-edit {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

    .assigned-person-edit > span {
        color: var(--color-primary-dark);
        font-weight: 700;
        font-size: 1rem;
        padding: 0.5rem;
        background: var(--color-gray-light);
        border-radius: var(--radius-sm);
        border-left: 4px solid var(--color-primary-orange);
    }

.edit-controls {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

    .edit-controls select {
        width: 100%;
        padding: 0.75rem;
        border: 2px solid var(--color-gray-border);
        border-radius: 6px;
        font-size: 0.9rem;
        color: var(--color-primary-dark);
        background: white;
        cursor: pointer;
        transition: all var(--transition-fast);
    }

        .edit-controls select:hover {
            border-color: var(--color-primary-orange);
        }

        .edit-controls select:focus {
            outline: none;
            border-color: var(--color-primary-orange);
            box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
        }

        .edit-controls select optgroup {
            font-weight: 600;
            color: var(--color-primary-dark);
        }

        .edit-controls select option:disabled {
            color: var(--color-gray-dark);
            font-style: italic;
        }

/* Empty Slot Actions */
.empty-slot-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.empty-slot {
    color: var(--color-gray-dark);
    font-style: italic;
    padding: 0.75rem;
    text-align: center;
    background: var(--color-gray-light);
    border-radius: var(--radius-sm);
    border: 2px dashed var(--color-gray-border);
}

.empty-slot-actions select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--color-gray-border);
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--color-primary-dark);
    background: white;
    cursor: pointer;
    transition: all var(--transition-fast);
}

    .empty-slot-actions select:hover {
        border-color: var(--color-success);
    }

    .empty-slot-actions select:focus {
        outline: none;
        border-color: var(--color-success);
        box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1);
    }

/* Published Badge */
.published-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-primary-blue);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Personnel Card Left Borders */
.personnel-display-card.personnel-card-fhd {
    border-left: 4px solid var(--color-shift-fhd);
}

.personnel-display-card.personnel-card-fhn {
    border-left: 4px solid var(--color-shift-fhn);
}

.personnel-display-card.personnel-card-bhd {
    border-left: 4px solid var(--color-shift-bhd);
}

.personnel-display-card.personnel-card-bhn {
    border-left: 4px solid var(--color-shift-bhn);
}

.personnel-display-card.personnel-card-not {
    border-left: 4px solid var(--color-gray-dark);
}

/* ============================================
   12. RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .personnel-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .requests-list {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .editable-roles-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }

    .unassigned-cards {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .legend-items {
        flex-direction: column;
    }

    .schedule-view-tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .requests-list {
        grid-template-columns: 1fr;
    }

    .editing-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .editing-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .editable-roles-grid {
        grid-template-columns: 1fr;
    }

    .unassigned-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .lead-config-page {
        padding: 0.75rem;
    }

    .coverage-display-container,
    .config-section,
    .ot-requests-section {
        padding: 0.75rem;
    }

    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .view-tab {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .editing-mode {
        padding: 1rem;
    }

    .editing-actions {
        flex-direction: column;
        width: 100%;
    }

        .editing-actions .btn-primary,
        .editing-actions .btn-secondary {
            width: 100%;
            justify-content: center;
        }

    .unassigned-pool {
        padding: 1rem;
    }
}

/* Time Indicator */
.time-indicator {
    background: var(--color-primary-orange);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}


/* Announcements Display on Lead Dashboard */
.announcements-display {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.announcements-display h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--color-primary-dark);
    font-size: 1.5rem;
}

.announcements-list-lead {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Scrollbar styling for announcements list */
.announcements-list-lead::-webkit-scrollbar {
    width: 8px;
}

.announcements-list-lead::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.announcements-list-lead::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.announcements-list-lead::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.announcement-item {
    padding: 16px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    position: relative;
    transition: all 0.2s;
}

.announcement-item:hover {
    background: #f5f5f5;
    transform: translateX(4px);
}

.announcement-item.pinned {
    border-left-color: #f39c12;
    background: linear-gradient(to right, #fff9e6 0%, #f9f9f9 10%);
}

.pin-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 18px;
}

.announcement-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 10px;
}

.announcement-body {
    line-height: 1.6;
    color: #333;
    margin-bottom: 12px;
}

.announcement-body b,
.announcement-body strong {
    font-weight: 600;
}

.announcement-body ul,
.announcement-body ol {
    margin: 8px 0;
    padding-left: 24px;
}

.announcement-body li {
    margin: 4px 0;
}

.announcement-body a {
    color: #667eea;
    text-decoration: underline;
}

.announcement-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #999;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}


.announcement-title-with-avatar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.announcement-title-with-avatar .announcement-title {
    flex: 1;
    margin-bottom: 0;
}


/* ============================================
   LOADING SKELETONS
   ============================================ */
@keyframes skeleton-pulse {
    0% { opacity: 0.12; }
    50% { opacity: 0.28; }
    100% { opacity: 0.12; }
}

.skeleton-block {
    display: inline-block;
    height: 14px;
    border-radius: 4px;
    background: currentColor;
    animation: skeleton-pulse 1.4s ease-in-out infinite;
    vertical-align: middle;
}

/* ============================================
   OT REQUEST CARDS (shared with ManagerPage)
   ============================================ */
.ot-requests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}

.ot-request-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 1rem;
    border-left: 4px solid var(--color-primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.ot-request-card.status-pending {
    border-left-color: var(--color-warning);
}

.ot-request-card.status-approved {
    border-left-color: var(--color-success);
}

.ot-request-card.status-denied {
    border-left-color: var(--color-danger);
}

.ot-request-card.status-cancelled {
    border-left-color: #95a5a6;
}

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

.ot-header h3 {
    color: var(--color-primary-dark);
    font-size: 1.25rem;
    margin: 0;
}

.ot-details-minimal {
    padding: 0.5rem 0;
}

.ot-details-minimal p {
    margin: 0.4rem 0;
    color: var(--color-gray-dark);
}

.ot-details-minimal strong {
    color: var(--color-primary-dark);
}

.badge-pending,
.badge-approved,
.badge-denied,
.badge-cancelled {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-pending {
    background-color: #f39c12;
    color: white;
}

.badge-approved {
    background-color: #27ae60;
    color: white;
}

.badge-denied {
    background-color: #e74c3c;
    color: white;
}

.badge-cancelled {
    background-color: #95a5a6;
    color: white;
}

@media (max-width: 768px) {
    .ot-requests-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================
   MISSED ESCALATIONS SECTION
   ============================================ */
.missed-alerts-section {
    margin: 20px 0;
    padding: 20px;
    background: #fff3e0;
    border-radius: 8px;
    border-left: 4px solid #e65100;
}

.missed-alerts-section h3 {
    margin: 0 0 4px 0;
    color: #e65100;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.missed-alerts-section .section-description {
    margin: 0 0 16px 0;
    color: #666;
    font-size: 0.85rem;
}

.missed-alerts-groups {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.missed-alert-group {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ffe0b2;
}

.missed-alert-group-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    text-align: left;
    transition: background 0.15s;
}

.missed-alert-group-header:hover {
    background: #fff8e1;
}

.group-toggle {
    color: #999;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.group-name {
    flex: 1;
}

.group-count {
    font-size: 0.8rem;
    color: #e65100;
    background: #ffe0b2;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.missed-alert-list {
    border-top: 1px solid #f0f0f0;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.missed-alert-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 12px;
    padding: 10px 12px;
    border-radius: 4px;
    background: #fafafa;
    border-left: 3px solid #ccc;
}

.missed-alert-item.priority-high {
    border-left-color: #d32f2f;
}

.missed-alert-item.priority-medium {
    border-left-color: #f57c00;
}

.missed-alert-item.priority-low {
    border-left-color: #fbc02d;
}

.missed-alert-site {
    font-weight: 700;
    color: #333;
    font-size: 0.9rem;
}

.missed-alert-metric {
    color: #555;
    font-size: 0.9rem;
}

.missed-alert-value {
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

.missed-alert-value .target-label {
    font-weight: 400;
    color: #999;
    font-size: 0.8rem;
}

.missed-alert-meta {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 0.78rem;
    color: #888;
    margin-top: 2px;
}

.priority-badge {
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
}

.priority-badge.high {
    background: #ffcdd2;
    color: #c62828;
}

.priority-badge.medium {
    background: #ffe0b2;
    color: #e65100;
}

.priority-badge.low {
    background: #fff9c4;
    color: #f57f17;
}

.fire-count {
    font-weight: 500;
}
.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    object-fit: cover;
}

.user-avatar:hover {
    transform: scale(1.05);
}

.user-avatar.small {
    width: 24px;
    height: 24px;
    font-size: 10px;
}

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

.user-avatar.large {
    width: 48px;
    height: 48px;
    font-size: 18px;
}

.user-avatar.system-avatar {
    background-color: #eceff1;
    padding: 2px;
}

/* ============================================
   ADMINCONFIG.CSS - PAGE-SPECIFIC STYLES
   Only unique styles for Admin Config page
   ============================================ */

/* ============================================
   1. PAGE LAYOUT
   ============================================ */
.admin-page {
    max-width: 1600px;
    margin: 0 auto;
    padding: clamp(1.5rem, 3vw, 3rem);
}

.admin-header {
    text-align: center;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

    .admin-header h1 {
        color: var(--color-primary-dark);
        margin-bottom: 0.5rem;
        font-size: clamp(1.75rem, 3vw, 2.5rem);
    }

    .admin-header p {
        color: var(--color-gray-dark);
        font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    }

/* ============================================
   2. ADMIN SECTION CONTAINERS
   ============================================ */
.admin-section {
    background: white;
    border-radius: var(--radius-md);
    padding: clamp(1.5rem, 2.5vw, 2rem);
    margin-bottom: clamp(1.5rem, 2.5vw, 2rem);
    box-shadow: var(--shadow-sm);
}

    .admin-section h2 {
        color: var(--color-primary-dark);
        margin-top: 0;
        margin-bottom: 0.5rem;
        font-size: clamp(1.25rem, 2vw, 1.75rem);
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

/* ============================================
   3. USER MANAGEMENT SECTION
   ============================================ */
.user-management-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: clamp(1.5rem, 2vw, 2rem);
    margin-top: 1.5rem;
}

.user-input-section {
    background: var(--color-gray-light);
    padding: clamp(1rem, 1.5vw, 1.5rem);
    border-radius: var(--radius-md);
}

    .user-input-section h3,
    .user-input-section h4 {
        margin-top: 0;
        margin-bottom: 1rem;
        color: var(--color-primary-dark);
        font-size: clamp(1rem, 1.5vw, 1.25rem);
    }

.bulk-input-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-gray-border);
}

.authorized-users-list h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-primary-dark);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
}

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

.user-card {
    background: white;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: all var(--transition-fast);
}

    .user-card:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-2px);
    }

.user-photo-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    overflow: hidden;
    color: white;
    font-size: 1.5rem;
}

    .user-photo-placeholder img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.photo-initials {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-info {
    text-align: center;
    width: 100%;
}

.user-name {
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.user-alias {
    color: var(--color-gray-dark);
    font-size: 0.85rem;
}

.btn-remove-user {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    box-shadow: 0 2px 4px rgba(238, 90, 111, 0.2);
}

.btn-remove-user::before {
    content: '×';
    font-size: 24px;
    font-weight: 300;
    line-height: 1;
    color: #ffffff;
}

.user-card:hover .btn-remove-user {
    opacity: 1;
}

.ios-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-top: 4px;
}

.ios-toggle-input {
    display: none;
}

.ios-toggle-track {
    position: relative;
    width: 36px;
    height: 20px;
    background: #ccc;
    border-radius: 10px;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.ios-toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.ios-toggle-input:checked + .ios-toggle-track {
    background: #34c759;
}

.ios-toggle-input:checked + .ios-toggle-track::after {
    transform: translateX(16px);
}

.ios-toggle-label {
    font-size: 11px;
    color: var(--color-gray-dark);
    white-space: nowrap;
}

.btn-remove-user:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e63946 100%);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(238, 90, 111, 0.4);
}

.btn-remove-user:active {
    transform: translateY(0) scale(0.98);
}

.user-photo-link {
    text-decoration: none;
    display: block;
}

    .user-photo-link:hover .user-photo-placeholder {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }
/* Tier Border Colors */
.tier-container.tier-t1 {
    border-left-color: #d4af37;
}
/* Gold */
.tier-container.tier-t2 {
    border-left-color: #c0c0c0;
}
/* Silver */
.tier-container.tier-t3 {
    border-left-color: #cd7f32;
}
/* Bronze */
.tier-container.tier-unassigned {
    border-left-color: #999;
}
/* Gray */
/* Role Stat Border Colors */
.role-stat.role-admin {
    border-left-color: var(--color-role-admin);
}

.role-stat.role-manager {
    border-left-color: var(--color-role-manager);
}

.role-stat.role-lead {
    border-left-color: var(--color-role-lead);
}

/* ============================================
   4. SITE MANAGEMENT CONTROLS
   ============================================ */
.site-management-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

    .input-group input {
        flex: 1;
    }

.bulk-input-section textarea {
    width: 100%;
    margin-bottom: 0.5rem;
}

.quick-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.master-site-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.site-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    transition: all 0.2s ease;
}

.site-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.site-badge .remove-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #ffffff !important;
    border: 2px solid white;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    box-shadow: 0 2px 6px rgba(238, 90, 111, 0.3);
}

.site-badge:hover .remove-btn {
    opacity: 1;
}

.site-badge .remove-btn:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e63946 100%);
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(238, 90, 111, 0.5);
}

.site-count {
    color: var(--color-gray-dark);
    font-size: 0.9rem;
    text-align: right;
}

/* ============================================
   5. TIER MANAGEMENT
   ============================================ */
.tier-actions {
    margin-bottom: 1.5rem;
}

.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.tier-container {
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    border-left: 4px solid;
}

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

    .tier-header h3 {
        margin: 0;
        font-size: 1rem;
        color: var(--color-primary-dark);
    }

.tier-count {
    background: var(--color-primary-dark);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tier-sites {
    min-height: 100px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.tier-site-item {
    background: white;
    border: 2px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: move;
    transition: all var(--transition-fast);
    text-align: center;
    font-weight: 600;
}

    .tier-site-item:hover {
        border-color: var(--color-primary-blue);
        background: #f0f8ff;
    }

    .tier-site-item.selected {
        border-color: var(--color-primary-blue);
        background: #e6f2ff;
        outline: 2px solid var(--color-primary-blue);
        outline-offset: 2px;
    }

.btn-move {
    width: 100%;
    margin-top: 0.5rem;
}

.move-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

    .move-buttons .btn-move {
        flex: 1;
        margin-top: 0;
    }

/* ============================================
   6. METRICS CONFIGURATION
   ============================================ */
.metrics-config-container {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 2vw, 2rem);
}

.add-metric-form {
    background: var(--color-gray-light);
    padding: clamp(1rem, 1.5vw, 1.5rem);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-primary-orange);
}

    .add-metric-form h3 {
        margin-top: 0;
        margin-bottom: 1rem;
        color: var(--color-primary-dark);
        font-size: clamp(1rem, 1.5vw, 1.25rem);
    }

    .add-metric-form select,
    .add-metric-form input {
        width: 100%;
        margin-bottom: 0.75rem;
        padding: 0.5rem;
        border: 1px solid var(--color-gray-border);
        border-radius: var(--radius-sm);
        font-size: 0.9rem;
    }

    .add-metric-form button {
        width: 100%;
    }

.metrics-categories {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.metric-category {
    background: var(--color-gray-light);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-primary-orange);
}

    .metric-category h3 {
        margin-top: 0;
        margin-bottom: 1rem;
        color: var(--color-primary-dark);
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: clamp(1rem, 1.5vw, 1.25rem);
    }

.metric-count {
    background: var(--color-primary-dark);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.metrics-table-wrapper {
    overflow-x: auto;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.metrics-table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    background: white;
}

    .metrics-table th {
        background: var(--color-primary-dark);
        color: white;
        padding: 0.75rem 1rem;
        text-align: left;
        font-weight: 600;
        font-size: 0.9rem;
        white-space: nowrap;
        border-bottom: 2px solid var(--color-primary-orange);
    }

    .metrics-table td {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--color-gray-border);
        font-size: 0.9rem;
    }

        .metrics-table td:first-child {
            font-weight: 600;
            color: var(--color-primary-dark);
        }

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

    .metrics-table tbody tr:hover {
        background: var(--color-gray-light);
    }

    .metrics-table code {
        background: var(--color-gray-border);
        padding: 0.25rem 0.5rem;
        border-radius: 3px;
        font-family: 'Courier New', monospace;
        font-size: 0.85rem;
        color: var(--color-primary-blue);
        white-space: nowrap;
    }

    .metrics-table td:last-child {
        text-align: center;
        width: 100px;
    }

    .metrics-table .metric-url-link {
        color: var(--color-primary-blue);
        text-decoration: none;
        font-weight: 600;
        font-size: 0.85rem;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
    }

    .metrics-table .metric-url-link:hover {
        text-decoration: underline;
        color: var(--color-primary-blue-hover);
    }

    .metrics-table .btn-remove {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        font-weight: 600;
        line-height: 1;
        background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
        color: #ffffff !important;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        white-space: nowrap;
        box-shadow: 0 2px 4px rgba(238, 90, 111, 0.2);
    }

        .metrics-table .btn-remove svg,
        .metrics-table .btn-remove path {
            fill: #ffffff !important;
            color: #ffffff !important;
            width: 14px;
            height: 14px;
        }

        .metrics-table .btn-remove:hover {
            background: linear-gradient(135deg, #ff5252 0%, #e63946 100%);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(238, 90, 111, 0.4);
        }

        .metrics-table .btn-remove:active {
            transform: translateY(0);
        }

.metrics-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-gray-dark);
    font-style: italic;
    background: white;
    border-radius: 6px;
}

/* ============================================
   7. ROLE MANAGEMENT
   ============================================ */
.role-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.beta-pin-control {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.beta-pin-control button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border-left: 4px solid;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    font-size: 14px;
}

    .role-stat strong {
        font-size: 18px;
        color: var(--color-primary-dark);
    }

.role-select {
    padding: 8px 12px;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.bulk-role-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

    .bulk-role-row .role-select {
        flex: 1;
    }

    .bulk-role-row button {
        flex: 2;
    }

.user-role-select {
    padding: 4px 8px;
    border: 2px solid;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    background: white;
    cursor: pointer;
    margin-top: 4px;
}

    .user-role-select:disabled {
        cursor: not-allowed;
        opacity: 0.6;
    }

.role-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    color: white;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    z-index: 1;
}

/* ============================================
   8. RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .user-management-grid,
    .metrics-config-container {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 768px) {
    .quick-actions {
        flex-direction: column;
    }

        .quick-actions button {
            width: 100%;
        }

    .role-summary {
        flex-direction: column;
    }

    .role-stat {
        width: 100%;
    }

    .bulk-role-row {
        flex-direction: column;
    }

        .bulk-role-row .role-select,
        .bulk-role-row button {
            width: 100%;
        }

    .metrics-table {
        min-width: 450px;
    }

        .metrics-table th,
        .metrics-table td {
            padding: 0.5rem;
            font-size: 0.8rem;
        }

    .btn-remove {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .admin-page {
        padding: 1rem;
    }

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

    .master-site-grid {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }

    .input-group {
        flex-direction: column;
    }

    .move-buttons {
        flex-direction: column;
    }

    .add-metric-form {
        padding: 1rem;
    }

    .metrics-table {
        min-width: 400px;
    }
}

/* ============================================
   9. SHIFT DEFINITIONS
   ============================================ */
.shift-definition-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.add-shift-form {
    background: var(--color-gray-light);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-primary-blue);
}

.add-shift-form h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-primary-dark);
}

.shift-input-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.shift-input-row select,
.shift-input-row input {
    padding: 0.5rem;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.shift-input-row select {
    width: 120px;
}

.shift-input-row input {
    flex: 1;
}

.day-checkboxes {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.day-checkbox {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.day-checkbox input {
    cursor: pointer;
}

.mandatory-ot-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mandatory-ot-row label {
    font-size: 0.9rem;
    color: var(--color-gray-dark);
}

.mandatory-ot-row select {
    padding: 0.5rem;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.mandatory-ot-badge {
    color: var(--color-danger);
    font-weight: 600;
}

.shift-alias {
    color: var(--color-primary-blue);
    font-size: 0.9rem;
    font-weight: normal;
}

.shift-list {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.shift-list h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-primary-dark);
}

.shift-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.shift-card {
    background: var(--color-gray-light);
    padding: 1rem;
    padding-right: 100px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

.shift-code {
    font-weight: 600;
    color: var(--color-primary-blue);
    font-size: 1.1rem;
}

.shift-days {
    color: var(--color-gray-dark);
    font-size: 0.9rem;
}

.btn-remove-shift {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(238, 90, 111, 0.2);
}

.btn-remove-shift::before {
    content: '×';
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
}

.btn-remove-shift:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e63946 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 90, 111, 0.4);
}

.btn-remove-shift:active {
    transform: translateY(0);
}

@media (max-width: 1024px) {
    .shift-definition-container {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   10. CUSTOM ROLES & PERMISSIONS
   ============================================ */
.custom-roles-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

.add-role-form {
    background: var(--color-gray-light);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-primary-blue);
}

.add-role-form h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-primary-dark);
}

.add-role-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}

.color-picker-row label {
    font-weight: 600;
    color: var(--color-primary-dark);
    font-size: 0.9rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.preset-colors {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.color-swatch.selected {
    border-color: var(--color-primary-dark);
    transform: scale(1.15);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--color-primary-dark);
}

.custom-color-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.custom-color-input input[type="text"] {
    width: 100px;
    padding: 0.5rem;
    border: 2px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.custom-color-input input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary-blue);
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--color-gray-border);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.icon-picker-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}

.icon-picker-row label {
    font-weight: 600;
    color: var(--color-primary-dark);
    font-size: 0.9rem;
    width: 100%;
    margin-bottom: 0.5rem;
}

.preset-icons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.icon-swatch {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gray-light);
    font-size: 1.2rem;
    color: var(--color-primary-dark);
}

.icon-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    background: #e0e7ff;
}

.icon-swatch.selected {
    border-color: var(--color-primary-blue);
    transform: scale(1.15);
    background: var(--color-primary-blue);
    color: white;
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--color-primary-blue);
}

.role-color-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

.permissions-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.permissions-checkboxes label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
}

.permissions-checkboxes label:hover {
    background: #f0f8ff;
    border-left: 3px solid var(--color-primary-blue);
}

.permissions-checkboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.permissions-checkboxes select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.permissions-checkboxes span {
    font-weight: 600;
    color: var(--color-primary-dark);
    min-width: 150px;
}

.custom-roles-list h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-primary-dark);
}

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.role-card {
    background: white;
    border: 2px solid var(--color-gray-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all var(--transition-fast);
}

.role-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--color-primary-blue);
}

.role-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-gray-border);
}

.role-card-header h4 {
    margin: 0;
    color: var(--color-primary-blue);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.role-card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
    white-space: nowrap;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-edit:active {
    transform: translateY(0);
}

.role-card-header .btn-remove {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(238, 90, 111, 0.2);
}

.role-card-header .btn-remove::before {
    content: '×';
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
}

.role-card-header .btn-remove:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e63946 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 90, 111, 0.4);
}

.role-card-header .btn-remove:active {
    transform: translateY(0);
}

.role-permissions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.perm-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.4rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ============================================
   11. AUDIT LOGS
   ============================================ */
.audit-logs-container {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.logs-controls {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--color-gray-light);
    border-radius: var(--radius-sm);
}

.logs-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.logs-filters label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.logs-filters input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.logs-filters input[type="date"],
.logs-filters select {
    padding: 0.5rem;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
}

.logs-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--color-gray-light);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.logs-list {
    max-height: 600px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.log-entry {
    background: var(--color-gray-light);
    border-left: 4px solid var(--color-primary-blue);
    border-radius: var(--radius-sm);
    padding: 1rem;
    transition: all var(--transition-fast);
}

.log-entry:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.log-entry.admin-command {
    background: #e3f2fd;
    border-left-color: #2196f3;
    border-left-width: 6px;
}

.admin-badge {
    background: #2196f3;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.log-entry.flagged {
    background: #fff3cd;
    border-left-color: var(--color-danger);
    border-left-width: 6px;
}

.log-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.log-time {
    color: var(--color-gray-dark);
    font-size: 0.85rem;
    font-family: 'Courier New', monospace;
}

.log-user {
    color: var(--color-primary-blue);
    font-weight: 600;
    font-size: 0.9rem;
}

.flag-badge {
    background: var(--color-danger);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.log-action {
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.log-details {
    color: var(--color-gray-dark);
    font-size: 0.85rem;
    font-style: italic;
}

@media (max-width: 1024px) {
    .custom-roles-container {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 768px) {
    .log-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .logs-list {
        max-height: 400px;
    }
}

/* ============================================
   12. SHIFT NOTE CONFIGURATION
   ============================================ */
.shift-note-config-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

.config-section {
    background: var(--color-gray-light);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-primary-orange);
}

.config-section h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-primary-dark);
}

.config-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.config-item {
    background: white;
    border: 2px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: all var(--transition-fast);
}

.config-item:hover {
    border-color: var(--color-primary-blue);
    box-shadow: var(--shadow-sm);
}

.config-item.default-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.default-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.config-item .remove-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(238, 90, 111, 0.2);
}

.config-item .remove-btn:hover {
    background: linear-gradient(135deg, #ff5252 0%, #e63946 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(238, 90, 111, 0.4);
}

.add-metric-category-form {
    background: var(--color-gray-light);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-primary-blue);
    margin-bottom: 1.5rem;
}

.add-metric-category-form h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-primary-dark);
}

.metric-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.metric-category-header h3 {
    margin: 0;
}

.metric-category-header .btn-remove {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 1024px) {
    .shift-note-config-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   12. SHIFT DEFINITION CALCULATED TIMES
   ============================================ */
.calculated-times {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border-left: 3px solid var(--color-primary-blue);
}

.time-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-gray-dark);
}

.time-info strong {
    color: var(--color-primary-dark);
    font-weight: 600;
}

.break-note {
    color: var(--color-primary-orange);
    font-size: 0.85rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .calculated-times {
        flex-direction: column;
        gap: 0.5rem;
    }
}


/* ============================================
   SKELETON LOADING STYLES
   ============================================ */
.skeleton-card {
    pointer-events: none;
    opacity: 0.7;
}

.skeleton-photo {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    position: relative;
    overflow: hidden;
}

.skeleton-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: shimmer 1.5s infinite;
}

.skeleton-text {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    height: 16px;
    margin: 4px 0;
}

.skeleton-name {
    width: 80%;
    margin: 0 auto 8px;
}

.skeleton-role {
    width: 60%;
    margin: 0 auto;
    height: 32px;
}

.skeleton-badge {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
    height: 24px;
    width: 80px;
    position: absolute;
    top: 8px;
    right: 8px;
}

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

/* ============================================
   BATCH PROGRESS INDICATOR
   ============================================ */
.batch-progress-container {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--color-gray-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-gray-medium);
}

.batch-progress-text {
    font-size: 0.9rem;
    color: var(--color-gray-dark);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.batch-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--color-gray-medium);
    border-radius: 4px;
    overflow: hidden;
}

.batch-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-dark));
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* ==================== METRIC MODAL ==================== */
.metric-modal h3 {
    margin: 0 0 16px 0;
    font-size: 1.2rem;
}

.metric-modal-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric-modal-form label {
    font-size: 0.8rem;
    color: #4a5568;
    margin-top: 4px;
    font-weight: 500;
}

.metric-modal-form input,
.metric-modal-form select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #d1d5db);
    background: #fff;
    color: #1a1a2e;
    font-size: 0.9rem;
}

.metric-modal-form input:focus,
.metric-modal-form select:focus {
    outline: none;
    border-color: var(--accent-color, #667eea);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.metric-modal-form input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.insert-variable-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.insert-label {
    font-size: 0.75rem;
    color: #4a5568;
    margin-right: 4px;
}

.btn-var-insert {
    padding: 2px 8px;
    font-size: 0.72rem;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: #f7f8fa;
    color: var(--accent-color, #667eea);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: monospace;
}

.btn-var-insert:hover {
    background: var(--accent-color, #667eea);
    color: #fff;
    border-color: var(--accent-color, #667eea);
}

.metric-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

/* ============================================
   WEBHOOKS
   ============================================ */
.webhook-create-form {
    background: var(--color-gray-light, #f8f9fa);
    border-radius: var(--radius-md, 8px);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.webhook-create-form h3 {
    margin: 0 0 1rem 0;
    color: var(--color-primary-dark);
}

.webhook-create-form .input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.webhook-create-form .input-group input {
    flex: 1;
    min-width: 200px;
}

.webhook-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.webhook-card {
    background: white;
    border: 1px solid var(--color-gray-border, #e0e0e0);
    border-radius: var(--radius-md, 8px);
    padding: 1.25rem;
    border-left: 4px solid var(--color-success, #27ae60);
}

.webhook-card.disabled {
    border-left-color: var(--color-gray-dark, #999);
    opacity: 0.7;
}

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

.webhook-header h4 {
    margin: 0;
    color: var(--color-primary-dark);
}

.webhook-actions {
    display: flex;
    gap: 0.5rem;
}

.webhook-details {
    margin-bottom: 0.75rem;
}

.webhook-url-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.webhook-url-row label {
    font-weight: 600;
    color: var(--color-primary-dark);
    white-space: nowrap;
}

.webhook-url {
    background: var(--color-gray-light, #f0f0f0);
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    word-break: break-all;
    flex: 1;
    min-width: 0;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.webhook-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--color-gray-dark, #666);
    flex-wrap: wrap;
}

.webhook-payload-example {
    margin-top: 0.5rem;
}

.webhook-payload-example summary {
    cursor: pointer;
    color: var(--color-primary);
    font-size: 0.9rem;
}

.webhook-payload-example pre {
    background: var(--color-gray-light, #f5f5f5);
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    overflow-x: auto;
    margin-top: 0.5rem;
}


/* ============================================
   TOGGLE SWITCHES (iOS-style)
   ============================================ */
.admin-toggle {
    width: 44px;
    height: 24px;
    background-color: #ccc;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.admin-toggle.active {
    background-color: #34c759;
}

.admin-toggle-knob {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.admin-toggle.active .admin-toggle-knob {
    transform: translateX(20px);
}

.day-toggles {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0 12px;
}

.day-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: #f9f9f9;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.day-toggle-row:hover {
    background: #f0f0f0;
}

.day-toggle-label {
    font-weight: 500;
    font-size: 0.9rem;
}


/* Edit shift button */
.btn-edit-shift {
    background: none;
    border: 1px solid #3498db;
    color: #3498db;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.btn-edit-shift:hover {
    background: #ebf5fb;
}


/* ============================================
   TOGGLE SWITCH (iOS-style)
   ============================================ */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #4cd964;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-gray-border);
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-gray-dark);
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--color-primary-orange);
    background: rgba(255, 153, 0, 0.05);
}

.tab-btn.active {
    color: var(--color-primary-orange);
    border-bottom-color: var(--color-primary-orange);
}

.admin-section {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.user-permission-editor {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.permission-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.permission-editor-header h3 {
    margin: 0;
    color: #333;
}

.role-badge {
    padding: 6px 16px;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.permission-info {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.permission-info p {
    margin: 0;
    color: #555;
}

.immutable-count {
    color: #666;
    font-size: 0.9em;
}

.permissions-by-category {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.permission-category {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.category-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.permission-list {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.permission-item {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 6px;
    padding: 12px;
    transition: all 0.2s ease;
}

.permission-item:hover {
    background: #e9ecef;
}

.permission-item.granted {
    background: #d4edda;
    border-color: #c3e6cb;
}

.permission-item.immutable {
    background: #fff3cd;
    border-color: #ffeaa7;
}

.permission-item.granted.immutable {
    background: #d1ecf1;
    border-color: #bee5eb;
}

.permission-item label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin: 0;
}

.permission-item.immutable label {
    cursor: not-allowed;
}

.permission-item input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.permission-item.immutable input[type="checkbox"] {
    cursor: not-allowed;
}

.permission-info-inline {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.permission-label {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.permission-description {
    font-size: 0.9em;
    color: #666;
}

.immutable-icon {
    color: #856404;
    font-size: 0.85em;
}

.permission-editor-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.permission-editor-admin-notice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    margin-top: 20px;
}

.permission-editor-admin-notice svg {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.permission-editor-admin-notice h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
}

.permission-editor-admin-notice p {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
}

.saving-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #667eea;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 600;
    animation: fadeIn 0.3s ease;
}

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

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

.user-selector-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.user-selector-section h3 {
    margin: 0 0 12px 0;
    color: #333;
}

.user-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.user-select:hover {
    border-color: #667eea;
}

.user-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.role-permission-manager {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.role-manager-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    min-height: 600px;
}

.role-selector-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: fit-content;
    max-height: calc(100vh - 300px);
    overflow: hidden;
}

.role-selector-section h3 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 18px;
}

.role-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 200px;
}

.role-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.role-item:hover {
    background: #f8f9fa;
}

.role-item.selected {
    background: #f0f4ff;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.role-item.selected .role-name {
    color: #333;
}

.role-item.selected .role-perm-count {
    color: #666;
}

.role-item.selected .role-icon {
    color: inherit;
}

.role-item.system-role {
    background: #fff3cd;
}

.role-item.system-role.selected {
    background: #f0f4ff;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.role-item.custom-role {
    background: #f8f9fa;
}

.role-item-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.role-name {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.system-icon {
    font-size: 0.85em;
    opacity: 0.8;
}

.role-perm-count {
    font-size: 0.85em;
    opacity: 0.8;
}

.delete-role-btn {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.delete-role-btn:hover {
    background: #dc3545;
    color: white;
}

.role-item.selected .delete-role-btn {
    color: #dc3545;
}

.role-item.selected .delete-role-btn:hover {
    background: #dc3545;
    color: white;
}

.add-role-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 2px solid #e0e0e0;
}

.add-role-section h4 {
    margin: 0;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-role-section input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
}

.add-role-section input:focus {
    outline: none;
    border-color: #667eea;
}

.template-selector {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.template-selector label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.template-select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.template-select:focus {
    outline: none;
    border-color: #667eea;
}

.template-select:hover {
    border-color: #667eea;
}

.role-customization-horizontal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
}

.customization-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.customization-item label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.color-picker-inline,
.icon-picker-inline {
    position: relative;
    display: flex;
    justify-content: center;
}

.color-preview-box,
.icon-preview-box {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.color-preview-box:hover,
.icon-preview-box:hover {
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-picker-dropdown,
.icon-picker-dropdown {
    position: absolute;
    top: 45px;
    left: 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.color-swatch,
.icon-swatch {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.color-swatch:hover,
.icon-swatch:hover {
    transform: scale(1.1);
    border-color: #667eea;
}

.color-swatch.selected,
.icon-swatch.selected {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.icon-swatch {
    background: #f8f9fa;
    font-size: 18px;
    color: #333;
}

.priority-input {
    width: 100%;
    padding: 12px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    font-weight: 600;
}

.priority-input:focus {
    outline: none;
    border-color: #667eea;
}

.role-count-info {
    font-size: 12px;
    color: #666;
    text-align: center;
    padding: 4px;
    background: #f8f9fa;
    border-radius: 4px;
}

.role-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
    font-size: 16px;
}

.btn-add-role {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s ease;
}

.btn-add-role:hover {
    background: #5568d3;
}

.permission-editor-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    border: 2px solid #e0e0e0;
}

.permission-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    min-height: 500px;
}

.available-permissions-column,
.role-permissions-column {
    background: white;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.column-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.permission-count {
    font-size: 14px;
    opacity: 0.9;
}

.permission-search {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
}

.permission-search:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.permission-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.permission-category-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-header {
    font-weight: 700;
    color: #667eea;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0 4px 0;
    border-bottom: 2px solid #e0e0e0;
}

.permission-card {
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    user-select: none;
}

.permission-card.available {
    background: #f8f9fa;
    border-color: #e0e0e0;
}

.permission-card.available:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.permission-card.available.selected {
    background: #cfe2ff;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.permission-card.assigned {
    background: #d4edda;
    border-color: #c3e6cb;
}

.permission-card.assigned:hover {
    background: #c3e6cb;
    border-color: #28a745;
}

.permission-card.assigned.selected {
    background: #b8daff;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.permission-card.assigned.immutable {
    background: #fff3cd;
    border-color: #ffeaa7;
    cursor: not-allowed;
}

.permission-card.assigned.immutable:hover {
    transform: none;
    border-color: #ffeaa7;
}

.permission-card.assigned.immutable.selected {
    background: #fff3cd;
    border-color: #ffeaa7;
    box-shadow: none;
}

.permission-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lock-icon {
    color: #856404;
    font-size: 0.85em;
}

.permission-description {
    font-size: 0.9em;
    color: #666;
    line-height: 1.4;
}

.drag-drop-hint {
    background: #d1ecf1;
    color: #0c5460;
    padding: 12px 16px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
    border: 1px solid #bee5eb;
}

.no-role-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    border: 2px dashed #e0e0e0;
    color: #999;
    font-size: 18px;
    padding: 60px;
    text-align: center;
}

.system-role-notice,
.admin-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
    text-align: center;
}

.system-role-notice svg,
.admin-notice svg {
    font-size: 48px;
    margin-bottom: 16px;
    color: #667eea;
}

.system-role-notice p,
.admin-notice p {
    margin: 0;
    font-size: 16px;
}

/* Scrollbar styling */
.permission-list::-webkit-scrollbar,
.role-list::-webkit-scrollbar {
    width: 8px;
}

.permission-list::-webkit-scrollbar-track,
.role-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.permission-list::-webkit-scrollbar-thumb,
.role-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.permission-list::-webkit-scrollbar-thumb:hover,
.role-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Drag and drop visual feedback */
.permission-card[draggable="true"] {
    cursor: move;
}

.permission-card[draggable="true"]:active {
    opacity: 0.5;
    cursor: grabbing;
}

.permission-card.assigned.immutable {
    cursor: not-allowed !important;
}

.permission-list {
    min-height: 200px;
}

.permission-list.drag-over {
    background: rgba(102, 126, 234, 0.05);
    border: 2px dashed #667eea;
}
.site-group-manager {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.site-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.site-group-header h2 {
    margin: 0 0 8px 0;
    color: #333;
}

.section-description {
    color: #666;
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.site-group-actions {
    display: flex;
    gap: 10px;
}

.add-group-section {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.add-group-section input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
}

.add-group-section input:focus {
    outline: none;
    border-color: #667eea;
}

.site-groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.site-group-card {
    background: white;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    overflow: hidden;
    transition: all 0.2s ease;
}

.site-group-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.site-group-card.t1 {
    border-top: 4px solid #dc3545;
}

.site-group-card.t2 {
    border-top: 4px solid #ffc107;
}

.site-group-card.t3 {
    border-top: 4px solid #28a745;
}

.site-group-card.unassigned {
    border-top: 4px solid #6c757d;
}

.group-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.group-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.group-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-count {
    font-size: 14px;
    opacity: 0.9;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-icon.success {
    background: #28a745;
}

.btn-icon.success:hover {
    background: #218838;
}

.btn-icon.danger {
    background: #dc3545;
}

.btn-icon.danger:hover {
    background: #c82333;
}

.group-name-edit {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
}

.group-name-edit input {
    flex: 1;
    padding: 6px 10px;
    border: 2px solid white;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
}

.group-name-edit input:focus {
    outline: none;
    border-color: #ffc107;
}

.group-sites {
    padding: 15px;
    min-height: 100px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.site-item {
    padding: 10px 12px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: move;
    transition: all 0.2s ease;
    user-select: none;
}

.site-item:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.site-item.selected {
    background: #cfe2ff;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.site-item:active {
    opacity: 0.5;
    cursor: grabbing;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-style: italic;
}

.no-permission {
    padding: 40px;
    text-align: center;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* Scrollbar styling */
.group-sites::-webkit-scrollbar {
    width: 8px;
}

.group-sites::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.group-sites::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.group-sites::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Drag and drop feedback */
.site-group-card.drag-over {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Button styles */
.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}
/* ============================================
   TICKETTRACKER.CSS - PAGE-SPECIFIC STYLES
   Only unique styles for Ticket Tracker page
   ============================================ */
/* ============================================
   1. PAGE LAYOUT
   ============================================ */
.ticket-tracker-page {
    padding: clamp(1rem, 2vw, 2rem);
    max-width: 1600px;
    margin: 0 auto;
}

/* ============================================
   2. TICKET HEADER
   ============================================ */
.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
    flex-wrap: wrap;
    gap: 1rem;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.ticket-header h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--color-primary-dark);
}

.lead-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
}

.lead-name {
    font-weight: 600;
    color: var(--color-primary-dark);
}

/* Coverage badges with gradient for T2/T3 */
.coverage-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

.coverage-t2\/t3 {
    background: linear-gradient(135deg, #c0c0c0 50%, #cd7f32 50%);
    color: var(--color-primary-dark);
}

.site-count {
    color: var(--color-gray-dark);
    font-size: 0.875rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ============================================
   3. SIMULATOR PANEL (Unique Feature)
   ============================================ */
.simulator-panel {
    background: white;
    border: 2px solid var(--color-primary-orange);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

    .simulator-panel h3 {
        margin: 0 0 1rem 0;
        color: var(--color-primary-dark);
    }

.simulator-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

/* ============================================
   4. STATS SECTION
   ============================================ */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Severity breakdown in stat cards */
.severity-card .stat-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--color-gray-dark);
}

/* Type card with gradient background */
.type-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

/* ============================================
   5. FILTERS SECTION
   ============================================ */
.filters-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .filter-group label {
        font-weight: 600;
        color: var(--color-primary-dark);
        font-size: 0.875rem;
    }

    .filter-group select {
        padding: 0.5rem;
        border: 1px solid var(--color-gray-border);
        border-radius: var(--radius-sm);
        font-size: 0.875rem;
        min-width: 150px;
    }

/* ============================================
   6. TICKETS SECTION
   ============================================ */
.tickets-section {
    margin-bottom: 2rem;
}

    .tickets-section h2 {
        margin-bottom: 1rem;
        color: var(--color-primary-dark);
    }

.tickets-grid {
    display: grid;
    gap: 1rem;
}

/* ============================================
   7. TICKET CARDS
   ============================================ */
.ticket-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    transition: box-shadow var(--transition-fast);
    border: 2px solid transparent;
}

.ticket-card.sev-1-card,
.ticket-card.sev-2-card {
    animation: flash-border 1s infinite;
}

.ticket-card.sev-1-card {
    animation: flash-border-red 1s infinite;
}

.ticket-card.sev-2-card {
    animation: flash-border-yellow 1s infinite;
}

    .ticket-card:hover {
        box-shadow: var(--shadow-lg);
    }

.ticket-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    cursor: pointer;
}

.ticket-main-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ticket-site {
    font-weight: 700;
    color: var(--color-primary-dark);
    font-size: 1rem;
}

.ticket-id {
    color: var(--color-primary-blue);
    font-family: monospace;
    font-size: 0.875rem;
}

.ticket-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dwell-time {
    font-weight: 700;
    font-size: 0.875rem;
}

.ticket-title {
    font-size: 1rem;
    color: var(--color-primary-dark);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.ticket-status-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.ticket-assignee {
    color: var(--color-gray-dark);
    font-size: 0.875rem;
}
/* Severity Badge Colors */
.severity-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
}

.severity-badge.severity-sev_1 {
    background-color: var(--color-severity-sev1);
    animation: flash-red 1s infinite;
}

.severity-badge.severity-sev_2 {
    background-color: var(--color-severity-sev2);
    animation: flash-red 1s infinite;
}

.severity-badge.severity-sev_3 {
    background-color: var(--color-severity-sev3);
}

.severity-badge.severity-sev_4 {
    background-color: #3498db;
}

.severity-badge.severity-sev_5 {
    background-color: var(--color-severity-sev5);
}

@keyframes flash-red {
    0%, 100% {
        background-color: #e74c3c;
        opacity: 1;
    }
    50% {
        background-color: #c0392b;
        opacity: 0.7;
    }
}

@keyframes flash-border-red {
    0%, 100% {
        border-color: #e74c3c;
        box-shadow: 0 0 8px rgba(231, 76, 60, 0.5);
    }
    50% {
        border-color: #c0392b;
        box-shadow: 0 0 15px rgba(231, 76, 60, 0.8);
    }
}

@keyframes flash-border-yellow {
    0%, 100% {
        border-color: #f39c12;
        box-shadow: 0 0 8px rgba(243, 156, 18, 0.5);
    }
    50% {
        border-color: #f1c40f;
        box-shadow: 0 0 15px rgba(243, 156, 18, 0.8);
    }
}
/* Status Badge Colors */
.status-badge.status-assigned {
    background-color: var(--color-ticket-assigned);
}

.status-badge.status-researching {
    background-color: var(--color-ticket-researching);
}

.status-badge.status-work-in-progress {
    background-color: var(--color-ticket-in-progress);
}

.status-badge.status-pending {
    background-color: var(--color-ticket-pending);
}

.status-badge.status-resolved {
    background-color: var(--color-ticket-resolved);
}

.status-badge.status-closed {
    background-color: var(--color-ticket-closed);
}

/* Dwell Time Colors */
.dwell-time.dwell-critical {
    color: var(--color-dwell-critical);
    font-weight: bold;
}

.dwell-time.dwell-warning {
    color: var(--color-dwell-warning);
    font-weight: bold;
}

.dwell-time.dwell-normal {
    color: var(--color-dwell-normal);
}

/* Coverage Badge Colors */
.coverage-badge.coverage-t1 {
    background-color: var(--color-tier-t1);
}

.coverage-badge.coverage-t2 {
    background-color: var(--color-tier-t2);
}

.coverage-badge.coverage-t3 {
    background-color: var(--color-tier-t3);
}

.coverage-badge.coverage-t2\/t3 {
    background-color: var(--color-tier-t2);
}

/* ============================================
   8. TICKET DETAILS (Expanded State)
   ============================================ */
.ticket-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-gray-border);
}

.ticket-description {
    margin-bottom: 1rem;
}

    .ticket-description strong {
        display: block;
        margin-bottom: 0.5rem;
        color: var(--color-primary-dark);
    }

    .ticket-description p {
        margin: 0;
        color: var(--color-gray-dark);
        line-height: 1.5;
    }

.ticket-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.ticket-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--color-gray-light);
    border-radius: var(--radius-sm);
}

    .ticket-actions label {
        font-weight: 600;
        color: var(--color-primary-dark);
        font-size: 0.875rem;
    }

    .ticket-actions select {
        padding: 0.5rem;
        border: 1px solid var(--color-gray-border);
        border-radius: var(--radius-sm);
        font-size: 0.875rem;
        flex: 1;
        max-width: 250px;
    }

/* ============================================
   9. COMMENTS SECTION
   ============================================ */
.ticket-comments {
    margin-top: 1rem;
}

    .ticket-comments h4 {
        margin: 0 0 0.75rem 0;
        color: var(--color-primary-dark);
        font-size: 0.875rem;
    }

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

.comment {
    padding: 0.75rem;
    background: var(--color-gray-light);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--color-primary-orange);
}

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

.comment-author {
    font-weight: 600;
    color: var(--color-primary-dark);
    font-size: 0.875rem;
}

.comment-time {
    font-size: 0.75rem;
    color: var(--color-gray-dark);
}

.comment-text {
    color: var(--color-primary-dark);
    font-size: 0.875rem;
    line-height: 1.5;
}

.add-comment input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

    .add-comment input:focus {
        outline: none;
        border-color: var(--color-primary-orange);
    }

/* ============================================
   10. HISTORICAL SECTION
   ============================================ */
.historical-section {
    margin-top: 3rem;
}

    .historical-section h2 {
        margin-bottom: 1rem;
        color: var(--color-primary-dark);
    }

.historical-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.historical-ticket {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.ticket-title-short {
    flex: 1;
    color: var(--color-primary-dark);
    font-size: 0.875rem;
}

.resolved-time {
    color: var(--color-gray-dark);
    font-size: 0.75rem;
}

/* ============================================
   11. SPECIAL FEATURES
   ============================================ */

/* See All Toggle */
.see-all-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

    .see-all-toggle input[type="checkbox"] {
        cursor: pointer;
    }

    .see-all-toggle span {
        font-size: 0.875rem;
        color: var(--color-primary-dark);
        font-weight: 500;
    }

/* Ticket Type Badge */
.ticket-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--color-primary-blue);
    color: white;
}

/* Ticket Labels */
.ticket-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.ticket-label {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    background: var(--color-assigned-bg);
    color: var(--color-assigned-text);
    border: 1px solid #90caf9;
}

/* Reassign Button */
.btn-reassign {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: var(--color-primary-blue);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background var(--transition-fast);
}

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

/* Label Selector */
.label-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.label-chip {
    padding: 0.5rem 1rem;
    border: 2px solid var(--color-gray-border);
    border-radius: 20px;
    background: white;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

    .label-chip:hover {
        border-color: var(--color-primary-blue);
        background: var(--color-assigned-bg);
    }

    .label-chip.selected {
        border-color: var(--color-primary-blue);
        background: var(--color-primary-blue);
        color: white;
        font-weight: 600;
    }

/* Root Cause Badge */
.root-cause-badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
    border: 1px solid var(--color-warning);
}

/* Root Cause Modal Select */
.root-cause-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

    .root-cause-select:focus {
        outline: none;
        border-color: var(--color-primary-orange);
    }

/* Empty State Hint */
.empty-hint {
    font-size: 0.875rem;
    color: #999;
}

/* ============================================
   12. RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .ticket-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
    }

        .header-actions button {
            flex: 1;
        }

    .stats-section {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .filters-section {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

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

    .ticket-main-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .ticket-info-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .see-all-toggle {
        width: 100%;
        justify-content: center;
    }

    .label-selector {
        max-height: 200px;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .ticket-tracker-page {
        padding: 1rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .simulator-panel {
        padding: 1rem;
    }
}

/* ============================================
   MANAGERPAGE.CSS - PAGE-SPECIFIC STYLES
   Only unique styles for Manager Page
   ============================================ */

/* ============================================
   1. PAGE LAYOUT
   ============================================ */
.manager-page {
    padding: clamp(1rem, 2vw, 2rem);
    max-width: 1600px;
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

    .page-header h1 {
        font-size: clamp(1.75rem, 3vw, 2.5rem);
        color: var(--color-primary-dark);
        margin-bottom: 0.5rem;
    }

    .page-header p {
        color: var(--color-gray-dark);
        font-size: clamp(0.9rem, 1.5vw, 1rem);
    }

/* ============================================
   2. ACCESS DENIED
   ============================================ */
.access-denied {
    text-align: center;
    padding: 3rem;
    background: var(--color-warning-bg);
    border: 2px solid var(--color-warning);
    border-radius: var(--radius-md);
    margin-top: 2rem;
}

    .access-denied h2 {
        color: var(--color-warning-text);
        margin-bottom: 1rem;
    }

    .access-denied p {
        color: var(--color-warning-text);
        margin: 0.5rem 0;
    }

/* ============================================
   3. TAB NAVIGATION
   ============================================ */
.tab-navigation {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--color-gray-border);
    flex-wrap: wrap;
}

    .tab-navigation button {
        padding: 0.75rem 1.5rem;
        background: none;
        border: none;
        border-bottom: 3px solid transparent;
        color: var(--color-gray-dark);
        font-size: 1rem;
        font-weight: 500;
        cursor: pointer;
        transition: all var(--transition-medium);
    }

        .tab-navigation button:hover {
            color: var(--color-primary-dark);
            background: var(--color-gray-light);
        }

        .tab-navigation button.active {
            color: var(--color-primary-orange);
            border-bottom-color: var(--color-primary-orange);
        }

/* ============================================
   4. WEEK NAVIGATION
   ============================================ */
.week-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.week-info {
    text-align: center;
    flex: 1;
    min-width: 250px;
}

    .week-info h2 {
        font-size: clamp(1.25rem, 2vw, 1.5rem);
        color: var(--color-primary-dark);
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

.week-id {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--color-gray-dark);
    font-weight: 600;
}

.published-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: var(--color-success);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid var(--color-gray-medium);
    border-radius: 6px;
    color: var(--color-primary-dark);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-medium);
}

    .nav-btn:hover {
        background: var(--color-primary-orange);
        color: white;
        border-color: var(--color-primary-orange);
    }

/* ============================================
   5. PUBLISH SECTION
   ============================================ */
.publish-section {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--color-warning-bg);
    border-radius: var(--radius-md);
    border: 2px solid var(--color-warning);
}

.btn-publish {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--color-success);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-medium);
}

    .btn-publish:hover {
        background: var(--color-success-hover);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

.btn-unpublish {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--color-danger);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-medium);
}

    .btn-unpublish:hover {
        background: var(--color-danger-hover);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

.publish-note {
    margin-top: 0.75rem;
    color: var(--color-warning-text);
    font-size: 0.875rem;
}

/* ============================================
   6. VIEW TOGGLE
   ============================================ */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

    .view-toggle button {
        padding: 0.75rem 2rem;
        background: white;
        border: 2px solid var(--color-gray-medium);
        border-radius: 6px;
        color: var(--color-gray-dark);
        font-weight: 600;
        cursor: pointer;
        transition: all var(--transition-medium);
    }

        .view-toggle button:hover {
            border-color: var(--color-primary-orange);
            color: var(--color-primary-orange);
        }

        .view-toggle button.active {
            background: var(--color-primary-orange);
            border-color: var(--color-primary-orange);
            color: white;
        }

/* ============================================
   7. SCHEDULE CONTAINER & GRID
   ============================================ */
.schedule-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
}

.schedule-grid {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow-x: auto;
}

.schedule-header {
    display: grid;
    grid-template-columns: 200px repeat(7, 1fr);
    background: var(--color-primary-dark);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.role-column {
    padding: 1rem;
    border-right: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-column {
    padding: 0.75rem;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.2);
}

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

.day-name {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.day-date {
    font-size: 0.75rem;
    opacity: 0.8;
}

.schedule-row {
    display: grid;
    grid-template-columns: 200px repeat(7, 1fr);
    border-bottom: 1px solid var(--color-gray-border);
}

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

.role-label {
    padding: 1rem;
    background: var(--color-gray-light);
    border-right: 1px solid var(--color-gray-border);
    font-weight: 600;
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
}

.coverage-slot {
    padding: 0.5rem;
    min-height: 60px;
    border-right: 1px solid var(--color-gray-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-medium);
    cursor: pointer;
    overflow: hidden;
    word-wrap: break-word;
    position: relative;
}

    .coverage-slot:hover {
        background: var(--color-gray-light);
    }

    .coverage-slot.filled {
        background: var(--color-success-light);
        border-left: 4px solid var(--color-success);
    }

    .coverage-slot.blocked {
        background: var(--color-danger-light);
        cursor: not-allowed;
    }

.assigned-person {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

    .assigned-person span {
        font-weight: 600;
        color: var(--color-primary-dark);
        font-size: 0.875rem;
    }

.remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--color-danger);
    color: white;
    border: none;
    border-radius: 3px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-medium);
    flex-shrink: 0;
    font-size: 12px;
    line-height: 1;
    padding: 0;
}

    .remove-btn:hover {
        background: var(--color-danger-hover);
        transform: scale(1.15);
    }

.remove-slot-btn {
    position: static;
    margin-left: 0.5rem;
    width: 20px;
    height: 20px;
    font-size: 14px;
}

.blocked-text {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--color-danger-text);
    font-size: 0.875rem;
    font-weight: 600;
}

.coverage-master-text {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--color-primary-blue);
    font-size: 0.75rem;
    font-weight: 600;
    font-style: italic;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
}


/* ============================================
   8. PERSONNEL POOL
   ============================================ */
.personnel-pool {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

    .personnel-pool h3 {
        color: var(--color-primary-dark);
        margin-bottom: 1rem;
        font-size: 1.25rem;
    }

.personnel-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.personnel-card {
    padding: 1rem;
    background: var(--color-gray-light);
    border: 2px solid var(--color-gray-medium);
    border-radius: 6px;
    cursor: grab;
    transition: all var(--transition-medium);
}

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

    .personnel-card:hover {
        border-color: var(--color-primary-orange);
        background: white;
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

.personnel-name {
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 0.5rem;
}

.eligible-shifts {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.personnel-stats {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.hours-stat,
.days-stat {
    padding: 0.25rem 0.5rem;
    background: var(--color-gray-border);
    border-radius: var(--radius-sm);
    color: var(--color-gray-dark);
    font-weight: 600;
}

.hours-stat {
    color: var(--color-primary-orange);
}

.days-stat {
    color: var(--color-primary-blue);
}

/* ============================================
   8b. SITE POOL & SITE CHIPS
   ============================================ */
.site-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.site-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--color-primary-blue);
    color: white;
    border-radius: 14px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.site-chip-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0 2px;
    margin-left: 2px;
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1;
    font-weight: 700;
}

    .site-chip-remove:hover {
        opacity: 1;
    }

.site-chip-draggable {
    cursor: grab;
    background: var(--color-primary-orange);
    transition: all var(--transition-medium);
}

    .site-chip-draggable:hover {
        transform: scale(1.05);
        box-shadow: var(--shadow-sm);
    }

    .site-chip-draggable:active {
        cursor: grabbing;
    }

.site-chip-small {
    font-size: 0.65rem;
    padding: 1px 6px;
    background: var(--color-gray-dark);
}

.site-chips-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0.5rem 0;
}

.site-group-card {
    border-left: 4px solid var(--color-primary-orange);
}

.site-group-sites {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.pool-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-gray-dark);
    margin: 0.75rem 0 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.site-individual-section {
    margin-top: 1rem;
    border-top: 1px solid var(--color-gray-border);
    padding-top: 0.5rem;
}

.person-name-label {
    display: block;
    font-weight: 600;
    font-size: 0.8rem;
}

.shift-code-badge {
    display: inline-block;
    font-size: 0.65rem;
    padding: 1px 5px;
    background: var(--color-gray-border);
    border-radius: var(--radius-sm);
    color: var(--color-gray-dark);
    margin-top: 2px;
}

.time-off-indicator {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-danger);
    opacity: 0.8;
}

/* ============================================
   9. OT REQUESTS SECTION
   ============================================ */
.ot-requests-section {
    padding: 1rem;
}

    .ot-requests-section h2 {
        color: var(--color-primary-dark);
        margin-bottom: 1.5rem;
    }

/* Loading skeleton for OT requests (Requirement 10.3) */
.loading-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.skeleton-card {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
    height: 200px;
}

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

.manager-ot-section {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.manager-ot-section h3 {
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.manager-ot-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: var(--color-primary-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500 !important;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    color: var(--color-warning-text);
}

.form-select,
.form-input {
    padding: 0.75rem;
    border: 2px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all var(--transition-medium);
}

.form-select:focus,
.form-input:focus {
    outline: none;
    border-color: var(--color-primary-orange);
}

.btn-add-ot {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--color-success);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-medium);
    align-self: flex-start;
}

.btn-add-ot:hover {
    background: var(--color-success-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ot-requests-group {
    margin-bottom: 2rem;
}

.ot-requests-group h4 {
    color: var(--color-primary-dark);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.ot-requests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.ot-request-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    border-left: 4px solid var(--color-gray-dark);
    transition: all var(--transition-medium);
}

    .ot-request-card:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-2px);
    }

    .ot-request-card.status-pending {
        border-left-color: var(--color-warning);
    }

    .ot-request-card.status-approved {
        border-left-color: var(--color-success);
    }

    .ot-request-card.status-denied {
        border-left-color: var(--color-danger);
    }

    .ot-request-card.status-cancelled {
        border-left-color: #95a5a6;
    }

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

    .ot-header h3 {
        color: var(--color-primary-dark);
        font-size: 1.25rem;
    }

.badge-pending,
.badge-approved,
.badge-denied,
.badge-cancelled {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending {
    background-color: #f39c12;
    color: white;
}

.badge-approved {
    background-color: #27ae60;
    color: white;
}

.badge-denied {
    background-color: #e74c3c;
    color: white;
}

.badge-cancelled {
    background-color: #95a5a6;
    color: white;
}

.ot-warning-banner {
    background: var(--color-primary-orange);
    color: white;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
}

.ot-details p {
    margin: 0.5rem 0;
    color: var(--color-gray-dark);
}

.ot-details strong {
    color: var(--color-primary-dark);
}

.override-notice {
    background: var(--color-warning-bg);
    border-left: 4px solid var(--color-warning);
    padding: 0.5rem;
    margin-top: 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--color-warning-text) !important;
    font-size: 0.875rem;
}

.ot-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-approve,
.btn-deny,
.btn-revoke,
.btn-cancel {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-medium);
}

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

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

.btn-deny,
.btn-revoke,
.btn-cancel {
    background: var(--color-danger);
    color: white;
}

.btn-deny:hover,
.btn-revoke:hover,
.btn-cancel:hover {
    background: var(--color-danger-hover);
}

.ot-review-info {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--color-gray-border);
}

    .ot-review-info p {
        margin: 0.25rem 0;
        font-size: 0.875rem;
        color: var(--color-gray-dark);
    }

/* ============================================
   10. SHIFT CONFIGURATION SECTION
   ============================================ */
.shift-config-section {
    padding: 1rem;
}

    .shift-config-section h2 {
        color: var(--color-primary-dark);
        margin-bottom: 1.5rem;
    }

    .shift-config-section h3 {
        color: var(--color-primary-dark);
        margin-bottom: 1rem;
        font-size: 1.25rem;
    }

/* Dynamic Roles Section */
.dynamic-roles-section {
    margin-bottom: 2rem;
}

.role-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.role-slot-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    text-align: center;
}

    .role-slot-card h4 {
        color: var(--color-primary-dark);
        margin-bottom: 1rem;
        font-size: 1.125rem;
    }

.slot-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.btn-add-slot,
.btn-remove-slot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-medium);
    font-size: 1rem;
}

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

    .btn-add-slot:hover {
        background: var(--color-success-hover);
        transform: scale(1.1);
    }

.btn-remove-slot {
    background: var(--color-danger);
    color: white;
}

    .btn-remove-slot:hover:not(:disabled) {
        background: var(--color-danger-hover);
        transform: scale(1.1);
    }

    .btn-remove-slot:disabled {
        background: var(--color-gray-border);
        color: var(--color-gray-dark);
        cursor: not-allowed;
    }

.slot-count {
    font-weight: 600;
    color: var(--color-primary-dark);
    min-width: 80px;
}

.slot-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.slot-badge {
    padding: 0.25rem 0.75rem;
    background: var(--color-primary-blue);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
}

/* Shift Toggle Active States */
.shift-toggle.active.shift-fhd {
    background-color: var(--color-shift-fhd);
    color: white;
}

.shift-toggle.active.shift-fhn {
    background-color: var(--color-shift-fhn);
    color: white;
}

.shift-toggle.active.shift-bhd {
    background-color: var(--color-shift-bhd);
    color: white;
}

.shift-toggle.active.shift-bhn {
    background-color: var(--color-shift-bhn);
    color: white;
}


/* Shift Color Bars */
.shift-color-bar.shift-fhd {
    background-color: var(--color-shift-fhd);
}

.shift-color-bar.shift-fhn {
    background-color: var(--color-shift-fhn);
}

.shift-color-bar.shift-bhd {
    background-color: var(--color-shift-bhd);
}

.shift-color-bar.shift-bhn {
    background-color: var(--color-shift-bhn);
}

/* Lock Icon Colors */
.lock-icon-gold {
    color: var(--color-lock-gold);
}

.lock-icon-orange {
    color: var(--color-lock-orange);
}

/* ============================================
   11. SHIFT ELIGIBILITY SECTION
   ============================================ */
.shift-eligibility-section {
    margin-bottom: 2rem;
}

.personnel-shift-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.personnel-shift-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
}

    .personnel-shift-card h4 {
        color: var(--color-primary-dark);
        margin-bottom: 1rem;
        font-size: 1.125rem;
    }

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

.shift-toggle {
    padding: 0.75rem;
    border: 2px solid transparent;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-medium);
}

    .shift-toggle:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

.eligibility-summary {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--color-gray-border);
}

.eligible-count {
    color: var(--color-success);
    font-weight: 600;
    font-size: 0.875rem;
}

.no-eligibility {
    color: var(--color-gray-dark);
    font-style: italic;
    font-size: 0.875rem;
}

/* ============================================
   12. SHIFT SUMMARY SECTION
   ============================================ */
.shift-summary-section {
    margin-bottom: 2rem;
}

.shift-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.shift-summary-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.shift-color-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.shift-summary-card h4 {
    color: var(--color-primary-dark);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.shift-code-detail {
    color: var(--color-gray-dark);
    font-size: 0.875rem;
    margin: 0.25rem 0;
    font-family: monospace;
}

.shift-days {
    color: var(--color-primary-blue);
    font-weight: 600;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.shift-mandatory-ot {
    color: var(--color-danger);
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0.25rem 0;
}

.shift-time {
    color: var(--color-gray-dark);
    font-size: 0.875rem;
    margin: 0.25rem 0;
}

.shift-hours {
    color: var(--color-primary-orange);
    font-weight: 600;
    margin: 0.5rem 0;
}

.assigned-personnel {
    color: var(--color-success);
    font-weight: 600;
    font-size: 0.875rem;
}

.eligible-personnel {
    color: var(--color-success);
    font-weight: 600;
    font-size: 0.875rem;
}

/* ============================================
   13. MODAL - ROLE SELECTION
   ============================================ */
.coverage-role-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--color-gray-light);
    border: 2px solid var(--color-gray-medium);
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-medium);
}

    .radio-option:hover {
        border-color: var(--color-primary-orange);
        background: white;
    }

    .radio-option input[type="radio"] {
        width: 20px;
        height: 20px;
        cursor: pointer;
    }

    .radio-option span {
        font-weight: 600;
        color: var(--color-primary-dark);
    }

/* ============================================
   14. RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .schedule-container {
        grid-template-columns: 1fr;
    }

    .personnel-pool {
        position: static;
        max-height: none;
    }

    .week-navigation {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .schedule-header,
    .schedule-row {
        grid-template-columns: 120px repeat(7, minmax(80px, 1fr));
    }

    .role-label,
    .role-column {
        font-size: 0.75rem;
        padding: 0.5rem;
    }

    .coverage-slot {
        padding: 0.5rem;
        min-height: 50px;
    }

    .assigned-person span {
        font-size: 0.75rem;
    }

    .ot-requests-grid {
        grid-template-columns: 1fr;
    }

    .personnel-shift-grid {
        grid-template-columns: 1fr;
    }

    .shift-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .manager-page {
        padding: 1rem;
    }

    .tab-navigation button {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .week-info h2 {
        font-size: 1rem;
    }

    .shift-summary-grid {
        grid-template-columns: 1fr;
    }

    .role-slots-grid {
        grid-template-columns: 1fr;
    }
}

/* Shift Assignment Dropdown */
.shift-assignment {
    margin-bottom: 1rem;
}

.shift-assignment label {
    display: block;
    font-size: 0.9rem;
    color: var(--color-gray-dark);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.shift-assignment .shift-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

/* Add Slot Row */
.add-slot-row {
    background: var(--color-gray-light);
    display: grid;
    grid-template-columns: 150px 1fr;
}

.add-slot-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-left: 1px solid var(--color-gray-border);
}

.btn-add-slot-grid {
    background: var(--color-success);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-medium);
    font-weight: 600;
}

.btn-add-slot-grid:hover {
    background: var(--color-success-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Drag and Drop Visual Feedback */
.coverage-slot.drag-unavailable {
    background: repeating-linear-gradient(
        45deg,
        #f0f0f0,
        #f0f0f0 10px,
        #e0e0e0 10px,
        #e0e0e0 20px
    );
    cursor: not-allowed;
    opacity: 0.6;
}

.coverage-slot.drag-available {
    background: #e8f5e9;
    border: 2px dashed var(--color-success);
}

/* ============================================
   15. MAX HOURS SECTION
   ============================================ */
.max-hours-section {
    margin-bottom: 2rem;
}

.set-all-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
}

.set-all-controls label {
    font-weight: 600;
    color: var(--color-primary-dark);
}

.set-all-input {
    width: 100px;
    padding: 0.5rem;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
}

.btn-set-all {
    padding: 0.5rem 1.5rem;
    background: var(--color-primary-orange);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-medium);
}

.btn-set-all:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
}

.max-hours-calendar {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow-x: auto;
}

.calendar-header {
    display: grid;
    grid-template-columns: 100px repeat(7, 1fr);
    background: var(--color-primary-dark);
    color: white;
    font-weight: 600;
}

.calendar-label {
    padding: 1rem;
    border-right: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day {
    padding: 0.75rem;
    text-align: center;
    border-right: 1px solid rgba(255,255,255,0.2);
}

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

.calendar-day .day-name {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.calendar-day .day-date {
    font-size: 0.75rem;
    opacity: 0.8;
}

.calendar-row {
    display: grid;
    grid-template-columns: 100px repeat(7, 1fr);
    border-bottom: 1px solid var(--color-gray-border);
}

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

.shift-label {
    padding: 1rem;
    background: var(--color-gray-light);
    border-right: 1px solid var(--color-gray-border);
    font-weight: 600;
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-cell {
    padding: 0.75rem;
    border-right: 1px solid var(--color-gray-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.calendar-cell:last-child {
    border-right: none;
}

.scheduled-hours {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary-orange);
}

.scheduled-hours.hours-yellow {
    color: #f39c12;
}

.scheduled-hours.hours-green {
    color: #27ae60;
}

.scheduled-hours.hours-red {
    color: #e74c3c;
}

.calendar-input {
    width: 60px;
    padding: 0.25rem;
    border: 2px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-weight: 600;
    font-size: 0.875rem;
}

.calendar-input:focus {
    outline: none;
    border-color: var(--color-primary-orange);
}

/* ============================================
   16. REPORTS SECTION
   ============================================ */
.reports-section {
    padding: 1rem;
}

.reports-section h2 {
    color: var(--color-primary-dark);
    margin-bottom: 1.5rem;
}

.report-filters {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    flex-wrap: wrap;
}

.report-results {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 2rem;
}

.report-results h3 {
    color: var(--color-primary-dark);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--color-gray-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    border-left: 4px solid var(--color-primary-orange);
}

.stat-card h4 {
    color: var(--color-gray-dark);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary-dark);
    margin: 0;
}

.multi-select-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-header {
    padding: 0.75rem;
    border: 2px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    background: white;
    cursor: pointer;
    transition: all var(--transition-medium);
}

.dropdown-header:hover {
    border-color: var(--color-primary-orange);
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 2px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    margin-top: 0.25rem;
    box-shadow: var(--shadow-md);
    z-index: 100;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: background var(--transition-medium);
}

.dropdown-item:hover {
    background: var(--color-gray-light);
}

.dropdown-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.dropdown-item span {
    font-weight: 500;
    color: var(--color-primary-dark);
}

/* ============================================
   SHIFT TRANSITIONS
   ============================================ */
.pending-transitions-section {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.pending-transitions-section h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transitions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.transition-card {
    background: white;
    border: 1px solid #ffc107;
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-fast);
}

.transition-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.transition-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.transition-arrow {
    color: var(--color-gray-dark);
    font-weight: 600;
}

.shift-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.shift-badge.from-shift {
    background: #e0e0e0;
    color: var(--color-gray-dark);
}

.shift-badge.to-shift {
    background: var(--color-primary-blue);
    color: white;
}

.effective-date {
    color: var(--color-gray-dark);
    font-size: 0.9rem;
    font-style: italic;
}

.btn-cancel-transition {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.btn-cancel-transition svg {
    color: #dc3545 !important;
    fill: #dc3545 !important;
}

.btn-cancel-transition:hover {
    transform: scale(1.2);
    color: #c82333;
}

.btn-cancel-transition:hover svg {
    color: #c82333 !important;
    fill: #c82333 !important;
}

.transition-indicator {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    margin-bottom: 0.75rem;
}

.transition-badge {
    color: #1976d2;
    font-size: 0.85rem;
    font-weight: 600;
}

.personnel-shift-card select:disabled {
    background: var(--color-gray-light);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Transition Modal */
.transition-modal {
    max-width: 700px;
    width: 90%;
}

.transition-summary {
    background: var(--color-gray-light);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.transition-summary p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.transition-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.option-card {
    background: white;
    border: 2px solid var(--color-gray-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all var(--transition-fast);
}

.option-card:hover {
    border-color: var(--color-primary-blue);
    box-shadow: var(--shadow-md);
}

.option-card h4 {
    margin: 0;
    color: var(--color-primary-dark);
    font-size: 1.1rem;
}

.option-card p {
    margin: 0;
    color: var(--color-gray-dark);
    font-size: 0.9rem;
    flex-grow: 1;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.date-input-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-primary-dark);
}

.date-input-group input {
    padding: 0.5rem;
    border: 1px solid var(--color-gray-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.option-card button {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.option-card .btn-primary {
    background: var(--color-primary-orange);
    color: white;
}

.option-card .btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.option-card .btn-secondary {
    background: var(--color-primary-blue);
    color: white;
}

.option-card .btn-secondary:hover {
    background: #1976d2;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .transition-options {
        grid-template-columns: 1fr;
    }
    
    .transition-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Cancellation Info */
.cancellation-info {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 1rem;
}

.cancellation-info p {
    margin: 0.5rem 0;
    color: var(--color-gray-dark);
    font-size: 0.9rem;
}

.cancellation-info p:first-child {
    color: #856404;
    font-weight: 600;
}

.cancellation-info strong {
    color: var(--color-primary-dark);
}

.ot-request-card.status-cancelled .cancellation-info {
    background: #f8d7da;
    border-color: #f5c6cb;
}

.ot-request-card.status-cancelled .cancellation-info p:first-child {
    color: #721c24;
}

/* Reinstatement Info */
.reinstatement-info {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 1rem;
}

.reinstatement-info p {
    margin: 0.5rem 0;
    color: var(--color-gray-dark);
    font-size: 0.9rem;
}

.reinstatement-info p:first-child {
    color: #155724;
    font-weight: 600;
}

.reinstatement-info strong {
    color: var(--color-success);
}

/* Clickable OT Request Cards */
.ot-request-card.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.ot-request-card.clickable:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.ot-details-minimal {
    padding: 0.5rem 0;
}

.ot-details-minimal p {
    margin: 0.4rem 0;
    color: var(--color-gray-dark);
    font-size: 0.9rem;
}

.ot-details-minimal strong {
    color: var(--color-primary-dark);
}

/* OT Detail Modal */
.ot-detail-modal {
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.ot-detail-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-gray-border);
}

.ot-detail-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ot-detail-section h4 {
    margin: 0 0 1rem 0;
    color: var(--color-primary-dark);
    font-size: 1.1rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item strong {
    color: var(--color-gray-dark);
    font-size: 0.85rem;
    font-weight: 600;
}

.detail-item span {
    color: var(--color-primary-dark);
    font-size: 0.95rem;
}

.ot-actions-modal {
    display: flex;
    gap: 1rem;
}

.ot-actions-modal button {
    flex: 1;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .ot-actions-modal {
        flex-direction: column;
    }
}


/* Announcements Section */
.announcements-section {
    padding: 20px;
}

.announcement-form {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: visible;
}

.announcement-form h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--color-primary-dark);
}

.announcement-popup {
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}

.announcements-list {
    margin-top: 30px;
}

.announcements-list h3 {
    margin-bottom: 20px;
    color: var(--color-primary-dark);
}

.announcements-grid {
    display: grid;
    gap: 20px;
}

.announcement-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    position: relative;
    transition: all 0.3s;
}

.announcement-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.announcement-card.pinned {
    border-left-color: #f39c12;
    background: linear-gradient(to right, #fff9e6 0%, white 10%);
}

.pin-badge {
    background: #f39c12;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.announcement-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    padding-right: 10px;
}

.announcement-header h4 {
    margin: 0;
    color: var(--color-primary-dark);
}

.announcement-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: #f5f5f5;
    border-color: #999;
    transform: scale(1.1);
}

.icon-btn.delete:hover {
    background: #fee;
    border-color: #f66;
}

.announcement-content {
    margin: 15px 0;
    line-height: 1.6;
    color: #333;
}

.announcement-content b,
.announcement-content strong {
    font-weight: 600;
}

.announcement-content ul,
.announcement-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.announcement-content li {
    margin: 4px 0;
}

.announcement-content a {
    color: #667eea;
    text-decoration: underline;
}

.announcement-footer {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.updated-badge {
    background: #e8f4f8;
    color: #3498db;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}


.expiry-badge {
    background: #e8f4f8;
    color: #3498db;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 11px;
}

.expiry-badge.expired {
    background: #fee;
    color: #e74c3c;
}

/* ============================================
   SKELETON LOADING STYLES
   ============================================ */
.skeleton-block {
    display: inline-block;
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, #e0e0e0 25%, #d0d0d0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    vertical-align: middle;
}

.skeleton-loading {
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0;
}

.skeleton-box {
    width: 100%;
    height: 30px;
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

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

.coverage-slot.skeleton-loading {
    padding: 8px;
}

/* ============================================
   BREAK LOGS
   ============================================ */
.break-logs-section {
    padding: 20px;
}

.break-log-grid {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.break-log-grid.gantt .break-log-gantt-header,
.break-log-grid.gantt .break-log-gantt-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    border-bottom: 1px solid #eee;
}

.break-log-grid.gantt .break-log-gantt-header {
    background: var(--color-primary-dark, #1a1a2e);
    color: white;
    font-weight: 600;
    font-size: 13px;
}

.break-log-user-col {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 13px;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.break-log-gantt-timeline-header {
    position: relative;
    padding: 8px 0;
    min-height: 32px;
}

.break-log-hour-markers {
    position: relative;
    width: 100%;
    height: 100%;
}

.hour-marker {
    position: absolute;
    transform: translateX(-50%);
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    user-select: none;
}

.break-log-gantt-cell {
    padding: 6px 8px;
    min-height: 36px;
}

.break-log-timeline {
    position: relative;
    height: 28px;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.gantt-gridline {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(0,0,0,0.06);
}

.break-block-label {
    font-size: 10px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
    line-height: 24px;
}

.break-log-date-picker {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    cursor: pointer;
}

.break-block {
    position: absolute;
    top: 2px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.break-block:hover {
    opacity: 0.8;
}

.block-break {
    background: #f39c12;
}

.block-lunch {
    background: #3498db;
}

.block-leave {
    background: #e74c3c;
}

.break-log-legend {
    display: flex;
    gap: 20px;
    padding: 12px 16px;
    font-size: 12px;
    color: #666;
    border-top: 1px solid #eee;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

.break-log-gantt-row:last-of-type {
    border-bottom: none;
}

.break-log-gantt-row .break-log-user-col {
    border-right: 1px solid #eee;
    color: var(--color-primary-dark, #333);
}

/* Break Log Detail Card */
.break-log-detail-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    width: 360px;
    max-width: 90vw;
    margin: auto;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

.break-log-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.break-log-detail-header h3 {
    margin: 0;
    font-size: 16px;
    color: var(--color-primary-dark, #1a1a2e);
}

.break-log-detail-body {
    padding: 16px 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
}

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

.detail-label {
    font-weight: 600;
    color: #555;
}

.break-type-badge {
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.type-break { background: #f39c12; }
.type-lunch { background: #3498db; }
.type-leave { background: #e74c3c; }

.break-log-detail-actions {
    padding: 12px 20px 16px;
    border-top: 1px solid #eee;
}

.break-log-detail-actions .btn-danger {
    width: 100%;
    padding: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.break-log-detail-actions .btn-danger:hover {
    background: #c0392b;
}

.break-log-shift-label {
    padding: 10px 16px;
    font-weight: 700;
    font-size: 14px;
    color: white;
    background: var(--color-primary-dark, #1a1a2e);
    border-radius: 8px 8px 0 0;
}


/* iOS-style toggle switch */
.ios-toggle {
    width: 51px;
    height: 31px;
    border-radius: 16px;
    background-color: #e0e0e0;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.ios-toggle.active {
    background-color: #34c759;
}

.ios-toggle-knob {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: white;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ios-toggle.active .ios-toggle-knob {
    transform: translateX(20px);
}


/* Past date slots — locked regardless of publish status */
.coverage-slot.past-date {
    opacity: 0.65;
    background: #f5f5f5;
}

.coverage-slot.past-date .assigned-person {
    color: #999;
}
.rich-text-editor {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: visible;
    background: white;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 6px 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #333;
    font-size: 14px;
}

.toolbar-btn:hover {
    background: #e8e8e8;
    border-color: #999;
}

.toolbar-btn:active {
    background: #d8d8d8;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: #ddd;
    margin: 0 4px;
}

.emoji-picker-container {
    position: relative;
}

.emoji-picker {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-width: 200px;
    max-height: 250px;
    overflow-y: auto;
}

.emoji-btn {
    padding: 6px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover {
    background: #f0f0f0;
    border-color: #ddd;
    transform: scale(1.1);
}

.editor-content {
    min-height: 150px;
    max-height: 400px;
    overflow-y: auto;
    padding: 12px;
    font-size: 14px;
    line-height: 1.6;
    outline: none;
}

.editor-content:empty:before {
    content: attr(data-placeholder);
    color: #999;
    font-style: italic;
}

.editor-content:focus {
    background: #fafafa;
}

/* Formatting styles within editor */
.editor-content b,
.editor-content strong {
    font-weight: 600;
}

.editor-content i,
.editor-content em {
    font-style: italic;
}

.editor-content u {
    text-decoration: underline;
}

.editor-content ul,
.editor-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.editor-content li {
    margin: 4px 0;
}

.editor-content a {
    color: #667eea;
    text-decoration: underline;
}

.editor-content a:hover {
    color: #764ba2;
}
/* ============================================
   DEV CONSOLE - HIDDEN DEV PAGE STYLES
   ============================================ */

.dev-console {
    min-height: 100vh;
    background: var(--color-gray-light, #f5f5f5);
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}

/* ============================================
   AUTH SCREEN
   ============================================ */
.dev-auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.dev-auth-loading {
    text-align: center;
    color: var(--color-gray-dark, #666);
}

.dev-auth-loading .spin {
    font-size: 2rem;
    animation: dev-spin 1s linear infinite;
}

.dev-auth-card {
    background: white;
    border-radius: var(--radius-lg, 12px);
    padding: 2.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.dev-auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.dev-auth-header h2 {
    margin: 0.75rem 0 0.5rem;
    color: var(--color-primary-dark, #1a1a2e);
}

.dev-auth-header p {
    color: var(--color-gray-dark, #666);
    font-size: 0.9rem;
    margin: 0;
}

.dev-auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.dev-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.dev-form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-gray-dark, #555);
}

.dev-form-group input {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--color-gray-border, #ddd);
    border-radius: var(--radius-sm, 6px);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.dev-form-group input:focus {
    outline: none;
    border-color: var(--color-primary-orange, #f59e0b);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.dev-auth-error {
    color: var(--color-danger, #dc2626);
    font-size: 0.85rem;
    margin: 0;
    padding: 0.5rem;
    background: rgba(220, 38, 38, 0.05);
    border-radius: var(--radius-sm, 4px);
}

.dev-auth-btn {
    padding: 0.75rem;
    background: var(--color-primary-dark, #1a1a2e);
    color: white;
    border: none;
    border-radius: var(--radius-sm, 6px);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.dev-auth-btn:hover {
    background: var(--color-primary-orange, #f59e0b);
}

/* ============================================
   HEADER
   ============================================ */
.dev-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: var(--color-primary-dark, #1a1a2e);
    color: white;
}

.dev-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dev-header-icon {
    font-size: 1.5rem;
    color: var(--color-primary-orange, #f59e0b);
}

.dev-header h1 {
    margin: 0;
    font-size: 1.25rem;
}

.dev-auth-badge {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

.dev-refresh-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm, 6px);
    cursor: pointer;
    transition: background 0.2s;
}

.dev-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

/* ============================================
   TABS
   ============================================ */
.dev-tabs {
    display: flex;
    gap: 0;
    background: white;
    border-bottom: 2px solid var(--color-gray-border, #e5e5e5);
    padding: 0 2rem;
}

.dev-tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--color-gray-dark, #666);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.dev-tab:hover {
    color: var(--color-primary-dark, #1a1a2e);
    background: var(--color-gray-light, #f9f9f9);
}

.dev-tab.active {
    color: var(--color-primary-orange, #f59e0b);
    border-bottom-color: var(--color-primary-orange, #f59e0b);
}

/* ============================================
   FILTERS
   ============================================ */
.dev-filters {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 2rem;
    background: white;
    border-bottom: 1px solid var(--color-gray-border, #eee);
}

.dev-filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dev-filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-gray-dark, #555);
}

.dev-filter-group select {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--color-gray-border, #ddd);
    border-radius: var(--radius-sm, 4px);
    font-size: 0.85rem;
    background: white;
}

.dev-item-count {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--color-gray-dark, #888);
}

/* ============================================
   CONTENT LAYOUT (LIST + DETAIL)
   ============================================ */
.dev-content {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 0;
    height: calc(100vh - 180px);
    overflow: hidden;
}

/* ============================================
   LIST PANEL
   ============================================ */
.dev-list {
    overflow-y: auto;
    border-right: 1px solid var(--color-gray-border, #e5e5e5);
    background: white;
}

.dev-loading,
.dev-empty {
    padding: 3rem;
    text-align: center;
    color: var(--color-gray-dark, #888);
}

.dev-list-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-gray-border, #eee);
    cursor: pointer;
    transition: background 0.15s;
}

.dev-list-item:hover {
    background: var(--color-gray-light, #f9f9f9);
}

.dev-list-item.selected {
    background: rgba(245, 158, 11, 0.06);
    border-left: 3px solid var(--color-primary-orange, #f59e0b);
}

.dev-list-item-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.dev-severity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dev-list-item-title {
    font-weight: 500;
    font-size: 0.9rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dev-type-icon {
    flex-shrink: 0;
    font-size: 1rem;
}

.dev-type-icon.bug {
    color: var(--color-danger, #dc2626);
}

.dev-type-icon.feature {
    color: var(--color-info, #2563eb);
}

.dev-list-item-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
}

.dev-list-item-date {
    color: var(--color-gray-dark, #888);
}

.dev-comment-count {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    color: var(--color-gray-dark, #888);
}

/* ============================================
   STATUS BADGE
   ============================================ */
.dev-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

/* ============================================
   DETAIL PANEL
   ============================================ */
.dev-detail {
    overflow-y: auto;
    padding: 2rem;
    background: var(--color-gray-light, #fafafa);
}

.dev-detail-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-gray-dark, #aaa);
    gap: 1rem;
}

.dev-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.dev-detail-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--color-primary-dark, #1a1a2e);
}

.dev-delete-btn {
    padding: 0.4rem 0.75rem;
    background: var(--color-danger, #dc2626);
    color: white;
    border: none;
    border-radius: var(--radius-sm, 4px);
    font-size: 0.8rem;
    cursor: pointer;
    transition: opacity 0.2s;
}

.dev-delete-btn:hover {
    opacity: 0.85;
}

/* ============================================
   DETAIL META
   ============================================ */
.dev-detail-meta {
    background: white;
    border-radius: var(--radius-md, 8px);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dev-meta-row {
    display: flex;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--color-gray-border, #f0f0f0);
}

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

.dev-meta-label {
    width: 120px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-gray-dark, #555);
}

.dev-meta-value {
    font-size: 0.85rem;
    color: var(--color-primary-dark, #333);
}

/* ============================================
   DESCRIPTION
   ============================================ */
.dev-detail-description {
    background: white;
    border-radius: var(--radius-md, 8px);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dev-detail-description h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: var(--color-primary-dark, #1a1a2e);
}

.dev-detail-description p {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.6;
    color: var(--color-gray-dark, #444);
}

/* ============================================
   STATUS ACTIONS
   ============================================ */
.dev-detail-actions {
    background: white;
    border-radius: var(--radius-md, 8px);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dev-detail-actions h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.dev-status-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dev-status-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    border: 2px solid var(--btn-color, #888);
    background: white;
    color: var(--btn-color, #888);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.dev-status-btn:hover {
    background: var(--btn-color, #888);
    color: white;
}

.dev-status-btn.active {
    background: var(--btn-color, #888);
    color: white;
}

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

/* ============================================
   COMMENTS
   ============================================ */
.dev-detail-comments {
    background: white;
    border-radius: var(--radius-md, 8px);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dev-detail-comments h3 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 1rem;
    font-size: 1rem;
}

.dev-comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dev-comment {
    padding: 0.75rem;
    background: var(--color-gray-light, #f5f5f5);
    border-radius: var(--radius-sm, 6px);
    border-left: 3px solid var(--color-primary-orange, #f59e0b);
}

.dev-comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
}

.dev-comment-header strong {
    color: var(--color-primary-dark, #1a1a2e);
}

.dev-comment-header span {
    color: var(--color-gray-dark, #888);
}

.dev-comment p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

.dev-comment-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dev-comment-input textarea {
    padding: 0.75rem;
    border: 1.5px solid var(--color-gray-border, #ddd);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.85rem;
    resize: vertical;
    font-family: inherit;
}

.dev-comment-input textarea:focus {
    outline: none;
    border-color: var(--color-primary-orange, #f59e0b);
}

.dev-comment-input button {
    align-self: flex-end;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    background: var(--color-primary-dark, #1a1a2e);
    color: white;
    border: none;
    border-radius: var(--radius-sm, 6px);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.dev-comment-input button:hover:not(:disabled) {
    background: var(--color-primary-orange, #f59e0b);
}

.dev-comment-input button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   USER AGENT
   ============================================ */
.dev-detail-useragent {
    background: white;
    border-radius: var(--radius-md, 8px);
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dev-detail-useragent h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.dev-detail-useragent code {
    display: block;
    font-size: 0.75rem;
    color: var(--color-gray-dark, #666);
    word-break: break-all;
    background: var(--color-gray-light, #f5f5f5);
    padding: 0.5rem;
    border-radius: var(--radius-sm, 4px);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes dev-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: dev-spin 1s linear infinite;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .dev-content {
        grid-template-columns: 1fr;
        height: auto;
    }

    .dev-list {
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--color-gray-border, #e5e5e5);
    }

    .dev-header {
        padding: 1rem;
    }

    .dev-tabs {
        padding: 0 1rem;
    }

    .dev-filters {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
}

/* ============================================
   PATCH RELEASE MODAL
   ============================================ */
.dev-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.dev-modal {
    background: white;
    border-radius: var(--radius-lg, 12px);
    padding: 2rem;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.dev-modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.dev-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--color-primary-dark, #1a1a2e);
}

.dev-modal-icon {
    font-size: 1.5rem;
    color: var(--color-success, #16a34a);
}

.dev-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.dev-stage-selector {
    display: flex;
    gap: 0.5rem;
}

.dev-stage-btn {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 2px solid var(--stage-color, #888);
    background: white;
    color: var(--stage-color, #888);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.dev-stage-btn:hover {
    background: var(--stage-color, #888);
    color: white;
}

.dev-stage-btn.active {
    background: var(--stage-color, #888);
    color: white;
}

.dev-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.dev-modal-confirm {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    background: var(--color-success, #16a34a);
    color: white;
    border: none;
    border-radius: var(--radius-sm, 6px);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.dev-modal-confirm:hover:not(:disabled) {
    opacity: 0.85;
}

.dev-modal-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dev-modal-cancel {
    padding: 0.6rem 1.25rem;
    background: none;
    color: var(--color-gray-dark, #666);
    border: 1px solid var(--color-gray-border, #ddd);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.dev-modal-cancel:hover {
    background: var(--color-gray-light, #f5f5f5);
}

/* ============================================
   PATCH DEPLOYMENT HISTORY
   ============================================ */
.dev-patch-history {
    background: white;
    border-radius: var(--radius-md, 8px);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dev-patch-history h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: 1rem;
    color: var(--color-primary-dark, #1a1a2e);
}

.dev-patch-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dev-patch-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem;
    background: var(--color-gray-light, #f5f5f5);
    border-radius: var(--radius-sm, 6px);
    border-left: 3px solid var(--color-success, #16a34a);
}

.dev-patch-entry-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.dev-patch-version {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-primary-dark, #1a1a2e);
}

.dev-patch-stage-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

.dev-patch-date {
    font-size: 0.75rem;
    color: var(--color-gray-dark, #888);
}

.dev-patch-author {
    font-size: 0.75rem;
    color: var(--color-gray-dark, #888);
    font-style: italic;
}

.dev-rollback-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.6rem;
    background: none;
    color: var(--color-danger, #dc2626);
    border: 1px solid var(--color-danger, #dc2626);
    border-radius: var(--radius-sm, 4px);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.dev-rollback-btn:hover:not(:disabled) {
    background: var(--color-danger, #dc2626);
    color: white;
}

.dev-rollback-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dev-patch-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    background: rgba(22, 163, 106, 0.06);
    border: 1px solid rgba(22, 163, 106, 0.2);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.85rem;
}

.dev-patch-current strong {
    color: var(--color-success, #16a34a);
}

/* ============================================
   VERSION COMBOBOX
   ============================================ */
.dev-version-combobox {
    position: relative;
}

.dev-version-combobox input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--color-gray-border, #ddd);
    border-radius: var(--radius-sm, 6px);
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.dev-version-combobox input:focus {
    outline: none;
    border-color: var(--color-primary-orange, #f59e0b);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.dev-version-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 180px;
    overflow-y: auto;
    background: white;
    border: 1px solid var(--color-gray-border, #ddd);
    border-top: none;
    border-radius: 0 0 var(--radius-sm, 6px) var(--radius-sm, 6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.dev-version-option {
    display: block;
    width: 100%;
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.9rem;
    color: var(--color-primary-dark, #1a1a2e);
    cursor: pointer;
    transition: background 0.15s;
}

.dev-version-option:hover {
    background: var(--color-gray-light, #f5f5f5);
}

.dev-version-option:not(:last-child) {
    border-bottom: 1px solid var(--color-gray-border, #f0f0f0);
}

/* ============================================
   PROMOTION PLAN
   ============================================ */
.dev-promotion-plan {
    background: white;
    border-radius: var(--radius-md, 8px);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.dev-promotion-plan h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
    font-size: 1rem;
    color: var(--color-primary-dark, #1a1a2e);
}

.dev-promotion-pipeline {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 1rem 0;
}

.dev-promotion-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    min-width: 80px;
}

.dev-promotion-stage-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    border: 3px solid var(--color-gray-border, #e0e0e0);
    transition: all 0.3s;
}

.dev-promotion-stage.completed .dev-promotion-stage-dot {
    border-color: transparent;
}

.dev-promotion-stage.current .dev-promotion-stage-dot {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.dev-promotion-stage-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-gray-dark, #666);
}

.dev-promotion-stage.completed .dev-promotion-stage-label {
    color: var(--color-primary-dark, #1a1a2e);
}

.dev-promotion-current-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-info, #6366f1);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
}

.dev-promotion-connector {
    flex: 1;
    height: 3px;
    background: var(--color-gray-border, #e0e0e0);
    margin: 0 0.25rem;
    margin-bottom: 2.5rem;
    border-radius: 2px;
    transition: background 0.3s;
}

.dev-promotion-connector.completed {
    background: var(--color-success, #16a34a);
}

.dev-promote-btn {
    padding: 0.3rem 0.6rem;
    background: var(--color-primary-orange, #f59e0b);
    color: white;
    border: none;
    border-radius: var(--radius-sm, 4px);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.dev-promote-btn:hover:not(:disabled) {
    opacity: 0.85;
}

.dev-promote-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dev-promotion-notes {
    margin-top: 1rem;
    padding: 0.75rem;
    background: var(--color-gray-light, #f5f5f5);
    border-radius: var(--radius-sm, 6px);
    border-left: 3px solid var(--color-info, #6366f1);
    font-size: 0.85rem;
}

.dev-promotion-notes strong {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--color-primary-dark, #1a1a2e);
}

.dev-promotion-notes p {
    margin: 0;
    color: var(--color-gray-dark, #555);
    line-height: 1.5;
}

/* AuthWrapper.css */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.auth-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: clamp(2rem, 4vw, 3rem);
    max-width: 500px;
    width: 100%;
    text-align: center;
}

/* Sign In State */
.auth-signin {
    padding: 2rem 0;
}

.auth-signin h2 {
    color: #232f3e;
    margin-bottom: 0.5rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.auth-signin > p {
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.signin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #6c757d;
    font-size: 1.2rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.user-display {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    color: #232f3e;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.pin-hint {
    color: #6c757d;
    font-size: 0.85rem;
    margin: -0.5rem 0 0 0;
    text-align: left;
}

.error-message {
    background: #fff3cd;
    color: #856404;
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
    font-size: 0.9rem;
    text-align: left;
}

.btn-signin {
    background: #ff9900;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-signin:hover {
    background: #e88b00;
}

/* Midway Sign In Button */
.btn-midway-signin {
    background: #232f3e;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 1rem;
}

.btn-midway-signin:hover {
    background: #37475a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(35, 47, 62, 0.3);
}

.auth-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #232f3e;
}

.auth-info p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

.button-group {
    display: flex;
    gap: 0.75rem;
}

.btn-back {
    flex: 1;
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-back:hover {
    background: #5a6268;
}

.button-group .btn-signin {
    flex: 2;
}

/* Loading State */
.auth-loading {
    padding: 2rem 0;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff9900;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.auth-loading h2 {
    color: #232f3e;
    margin-bottom: 0.5rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.auth-loading p {
    color: #6c757d;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

/* Error State */
.auth-error {
    padding: 2rem 0;
}

.error-icon {
    font-size: 4rem;
    color: #d13212;
    margin-bottom: 1rem;
}

.auth-error h2 {
    color: #232f3e;
    margin-bottom: 1rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.auth-error p {
    color: #6c757d;
    margin-bottom: 1.5rem;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.btn-retry {
    background: #ff9900;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .btn-retry:hover {
        background: #e88b00;
    }

/* Access Denied State */
.auth-denied {
    padding: 2rem 0;
}

.lock-icon {
    font-size: 4rem;
    color: #d13212;
    margin-bottom: 1rem;
}

.auth-denied h2 {
    color: #232f3e;
    margin-bottom: 1rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.auth-denied > p {
    color: #6c757d;
    margin-bottom: 1.5rem;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.user-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #ff9900;
}

    .user-info strong {
        color: #232f3e;
        margin-right: 0.5rem;
    }

.access-request {
    background: #fff3cd;
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #ff9900;
}

    .access-request p {
        color: #232f3e;
        font-weight: 600;
        margin-bottom: 0.75rem;
    }

    .access-request ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .access-request li {
        color: #6c757d;
        padding: 0.5rem 0;
        font-size: 0.95rem;
    }

.btn-phonetool {
    display: inline-block;
    background: #232f3e;
    color: white;
    text-decoration: none;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s ease;
}

    .btn-phonetool:hover {
        background: #37475a;
    }

/* Responsive Design */
@media (max-width: 480px) {
    .auth-wrapper {
        padding: 1rem;
    }

    .auth-container {
        padding: 1.5rem;
    }

    .lock-icon,
    .error-icon {
        font-size: 3rem;
    }

    .button-group {
        flex-direction: column;
    }

    .button-group .btn-signin,
    .btn-back {
        width: 100%;
    }
}
