:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --primary-50: #f0f7ff;
  --primary-ring: rgba(37, 99, 235, 0.18);
  --accent: #f97316;
  --accent-light: #fff7ed;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  --text: #0f172a;
  --text-secondary: #475569;
  --muted: #64748b;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --danger-light: #fef2f2;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --success: #10b981;
  --success-light: #ecfdf5;
  --sidebar-bg: #0f172a;
  --sidebar-border: #1e293b;
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Slim Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Base Headings & Text */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.015em;
}
h2 {
  font-size: 20px;
  margin: 0 0 12px;
}
h3 {
  font-size: 13.5px;
  margin: 18px 0 6px;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}
p {
  margin: 0 0 8px;
  line-height: 1.5;
}

/* Layout Shell */
.app-shell {
  background: var(--bg);
  min-height: 100vh;
}

.content {
  margin-left: 240px;
  min-height: 100vh;
  padding: 0;
  background: var(--bg);
  transition: margin-left 0.2s ease;
}

main {
  padding: 28px 32px 64px;
  max-width: 1360px;
  margin: 0 auto;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.2s ease forwards;
}
.tab-panel.active {
  display: block;
}

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

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 12px;
}
.panel-header h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.02em;
}

/* ===== Sidebar Layout ===== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 240px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  z-index: 40;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}
.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand-logo-wrap {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
  box-sizing: border-box;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}
.brand-logo-wrap:hover {
  transform: scale(1.05);
}
.brand-logo-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6 0%, #f97316 100%);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
  flex-shrink: 0;
}
.side-brand .brand-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.side-brand h1 {
  font-size: 16px;
  margin: 0;
  line-height: 1.2;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.side-brand .brand-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.side-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
/* Prevent unauthorized tab flash on page refresh / load */
.side-nav.is-loading .tab-btn[data-roles],
.side-nav.is-loading .tab-btn[data-tab="myprojects"],
.side-nav.is-loading .nav-section[data-roles],
.side-nav.is-loading .nav-section:nth-of-type(n+3) {
  display: none !important;
}
.nav-section {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  margin: 16px 8px 6px;
  font-weight: 700;
}
.side-nav .tab-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
  padding: 9.5px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.side-nav .tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(2px);
}
.side-nav .tab-btn.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}
.nav-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
}
.tab-btn.active .nav-ico {
  opacity: 1;
}
.ico {
  display: inline-block;
  vertical-align: -3px;
  flex-shrink: 0;
}
.inline-ico {
  display: inline-flex;
  vertical-align: -3px;
  margin-right: 4px;
}
.inline-ico .ico {
  vertical-align: baseline;
}
.side-user {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
  color: #fff;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.side-user #userName {
  font-weight: 700;
  color: #ffffff;
}
.side-user .role-badge {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Form Card & Two Col Layout ===== */
.two-col {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  width: 480px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}
.form-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}
.form-card label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-top: 8px;
  display: block;
}
.form-card .opt {
  font-weight: 400;
  color: var(--muted);
  font-size: 11.5px;
}

/* Input Fields & Controls */
input[type=text], input[type=number], input[type=date],
input[type=month], input[type=password], input[type=email],
input[type=tel], input[type=url], input[type=search],
select, textarea {
  width: 100%;
  padding: 9.5px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  background: #ffffff;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-ring);
  outline: none;
}
input[readonly] {
  background: #f1f5f9;
  color: var(--primary-dark);
  font-weight: 700;
  border-color: #e2e8f0;
  cursor: not-allowed;
}
textarea {
  resize: vertical;
  line-height: 1.45;
}
select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
  padding-right: 32px;
  appearance: none;
  -webkit-appearance: none;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.row-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}
.upload-row .muted {
  font-size: 11.5px;
  line-height: 1.4;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  margin-top: 10px;
  cursor: pointer;
  user-select: none;
}
.checkbox-row input {
  width: 16px !important;
  height: 16px !important;
  accent-color: var(--primary);
  margin: 0 !important;
  cursor: pointer;
}
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
  align-items: center;
}

/* ===== Button Styles ===== */
.btn-primary {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: 1px solid #1d4ed8;
  padding: 9.5px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(37, 99, 235, 0.15);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0) scale(0.98);
}
.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-1px);
}
.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

.btn-small {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-small:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

.btn-danger {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: 1px solid #dc2626;
  padding: 6.5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

/* ===== Items & Preview Area ===== */
.items-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-top: 8px;
  background: #f8fafc;
}
.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 8px;
}
.items-table th {
  text-align: left;
  padding: 6px 8px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.items-table td {
  padding: 4px;
}
.items-table input {
  width: 100%;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}
.items-table .amt-cell {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
  padding-right: 8px;
  color: var(--text);
}
.totals-preview {
  font-size: 13px;
  text-align: right;
  align-self: end;
  line-height: 1.7;
}
.totals-preview b {
  font-size: 15px;
  color: var(--primary-dark);
}

/* ================= Modern DocStudio Architecture ================= */
.docstudio-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  flex-wrap: wrap;
}
.docstudio-title-block {
  display: flex;
  align-items: center;
  gap: 12px;
}
.docstudio-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  border: 1.5px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.docstudio-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.docstudio-template-picker-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.doc-top-lbl {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin: 0 !important;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.docstudio-quick-select {
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 220px;
}
.docstudio-quick-select:hover {
  border-color: #3b82f6;
  background: #ffffff;
}
.docstudio-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  user-select: none;
}
.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
  animation: syncPulse 2s infinite ease-in-out;
}
@keyframes syncPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}
.doc-top-save-btn {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.docstudio-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(460px, 1.15fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 1080px) {
  .docstudio-grid {
    grid-template-columns: 1fr;
  }
}

.docstudio-editor-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.doc-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}
.doc-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.doc-card-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}
.doc-step-num {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #2563eb;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Rich Toolbar & Editor Modernization */
.rich-toolbar {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  border: 1.5px solid #cbd5e1;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 6px 8px;
  background: #f8fafc;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 2px;
}
.toolbar-divider {
  width: 1px;
  height: 20px;
  background: #cbd5e1;
  margin: 0 4px;
}
.rich-toolbar button {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.rich-toolbar button:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.rich-toolbar button:active {
  background: #dbeafe;
  color: #1d4ed8;
}
.tb-insert-btn {
  background: #eff6ff !important;
  color: #2563eb !important;
  border: 1px solid #bfdbfe !important;
  font-weight: 600;
  gap: 4px;
  padding: 0 8px !important;
}
.tb-insert-btn:hover {
  background: #dbeafe !important;
}

.rich-editor {
  border: 1.5px solid #cbd5e1;
  border-radius: 0 0 10px 10px;
  padding: 14px 16px;
  min-height: 240px;
  max-height: 460px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.6;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s;
}
.rich-editor:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}
.rich-editor:empty:before {
  content: attr(data-placeholder);
  color: #94a3b8;
  font-style: italic;
}

.doc-upload-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  transition: all 0.15s ease;
}
.doc-upload-strip:hover {
  border-color: #3b82f6;
  background: #f0f7ff;
}
.upload-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.upload-text-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.upload-browse-btn {
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  cursor: pointer;
  margin: 0 !important;
}
.upload-browse-btn:hover {
  text-decoration: underline;
}
.upload-hint {
  font-size: 11px;
  color: #64748b;
}

/* Custom Toggle Switch for Items */
.doc-toggle-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0 !important;
  user-select: none;
}
.doc-toggle-switch input {
  display: none;
}
.doc-toggle-slider {
  width: 34px;
  height: 18px;
  background: #cbd5e1;
  border-radius: 20px;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.doc-toggle-slider:before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  top: 2px;
  left: 2px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.doc-toggle-switch input:checked + .doc-toggle-slider {
  background: #2563eb;
}
.doc-toggle-switch input:checked + .doc-toggle-slider:before {
  transform: translateX(16px);
}
.doc-toggle-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.doc-options-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.doc-option-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: #334155;
  margin: 0 !important;
  cursor: pointer;
  padding: 4px 0;
}
.doc-option-check input {
  width: auto !important;
  margin: 0;
}

.doc-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* ================= Right Preview Column & Sticky Stage ================= */
.docstudio-preview-pane {
  position: relative;
}
.preview-sticky-wrap {
  position: sticky;
  top: 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}
.preview-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #1e293b;
  color: #f8fafc;
  gap: 10px;
  flex-wrap: wrap;
  border-bottom: 1px solid #334155;
}
.preview-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.preview-badge-live {
  font-size: 12px;
  font-weight: 700;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
}
.preview-page-pill {
  background: #334155;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
}
.preview-header-tools {
  display: flex;
  align-items: center;
  gap: 5px;
}
.preview-tool-icon-btn {
  background: #334155;
  border: none;
  color: #f8fafc;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.15s ease;
}
.preview-tool-icon-btn:hover {
  background: #475569;
  color: #ffffff;
}
.preview-zoom-text {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
  min-width: 38px;
  text-align: center;
}
.preview-tools-sep {
  width: 1px;
  height: 18px;
  background: #475569;
  margin: 0 4px;
}
.preview-tool-btn {
  background: #334155;
  border: 1px solid #475569;
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.preview-tool-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.preview-stage-container {
  background: #e2e8f0;
  min-height: 480px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}
.preview-stage-container::-webkit-scrollbar {
  width: 6px;
}
.preview-stage-container::-webkit-scrollbar-track {
  background: #cbd5e1;
}
.preview-stage-container::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 10px;
}

.preview-pages {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  align-items: center;
  transition: transform 0.2s ease;
  transform-origin: top center;
}
.preview-pages canvas {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  background: #ffffff;
}

.doc-empty-preview {
  margin: auto;
  text-align: center;
  padding: 40px 20px;
  color: #64748b;
}

.preview-card {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.center-note {
  margin: auto;
}
.card-pair {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.card-pair canvas {
  width: 240px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.mini-preview {
  margin-top: 6px;
  min-height: 44px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
}
.mini-preview img {
  max-height: 90px;
  max-width: 100%;
}
.mini-preview.sq img {
  max-height: 60px;
}

/* ===== Search & Records Tables ===== */
.search-box {
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  width: 280px;
  background: #ffffff;
}
.records-heading {
  margin: 24px 0 10px;
  font-size: 14.5px;
  color: #1e3a8a;
}
.records-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.records-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.records-table th {
  text-align: left;
  padding: 12px 16px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.records-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}
.records-table tr:hover td {
  background: #f8fafc;
}
.records-table tr:last-child td {
  border-bottom: none;
}
.records-table .num {
  font-weight: 700;
  color: var(--primary-dark);
}
.records-actions {
  display: flex;
  gap: 8px;
}
.empty-state {
  color: var(--muted);
  padding: 36px 20px;
  text-align: center;
  font-size: 14px;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.hidden {
  display: none !important;
}

/* Setup Banner */
.setup-banner {
  background: linear-gradient(90deg, #fff7ed 0%, #ffedd5 100%);
  border-bottom: 1px solid #fed7aa;
  color: #9a3412;
  padding: 12px 28px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== Modern Responsive Dashboard ===== */
.dash-header-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  position: relative;
  overflow: hidden;
}
.dash-header-banner::after {
  content: '';
  position: absolute;
  top: -60%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.18) 0%, rgba(59, 130, 246, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}
.dash-hero-info {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 2;
}
.dash-hero-avatar {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.dash-hero-title {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dash-hero-subtitle {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dash-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.dash-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.dash-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
.dash-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.dash-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.dash-card-icon.blue { background: #eff6ff; color: #2563eb; }
.dash-card-icon.emerald { background: #ecfdf5; color: #059669; }
.dash-card-icon.amber { background: #fffbeb; color: #d97706; }
.dash-card-icon.purple { background: #faf5ff; color: #7e22ce; }
.dash-card-icon.rose { background: #fff1f2; color: #e11d48; }
.dash-card-icon.cyan { background: #ecfeff; color: #0891b2; }

.dash-card .dc-value {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.dash-card .dc-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 6px;
}
.dash-card .dc-sub {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dash-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  align-items: start;
}
.dash-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
}
.dash-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.dash-panel-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-panel-title i {
  color: #2563eb;
  font-size: 15px;
}
.dash-panel-action-link {
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dash-panel-action-link:hover {
  text-decoration: underline;
}

.dash-action-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dash-item-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
}
.dash-item-card:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}
.dash-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.dash-item-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-item-meta {
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-checkin-widget {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1.5px solid #86efac;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.dash-checkin-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dash-clock-display {
  font-size: 26px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #166534;
  letter-spacing: 0.05em;
}
.dash-checkin-btn {
  font-size: 14.5px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
  cursor: pointer;
  transition: all 0.18s ease;
}

/* ===== Kanban Board (Tasks & Leads) ===== */
.task-board {
  display: flex;
  gap: 10px;
  align-items: stretch;
  width: 100%;
  height: calc(100vh - 245px);
  min-height: 480px;
  overflow: hidden;
  padding-bottom: 2px;
}
.lead-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  align-items: start;
}
.task-col {
  flex: 1 1 0;
  min-width: 0;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  transition: flex 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
}
.task-col.stage-todo { border-top: 3.5px solid #64748b; }
.task-col.stage-inprogress { border-top: 3.5px solid #2563eb; }
.task-col.stage-testing { border-top: 3.5px solid #7c3aed; }
.task-col.stage-review { border-top: 3.5px solid #d97706; }
.task-col.stage-done { border-top: 3.5px solid #059669; }

.task-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 4px 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.task-col-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1e293b;
  min-width: 0;
  overflow: hidden;
}
.task-col-title span:first-of-type {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.task-col-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.btn-col-quick-add {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #64748b;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s ease;
}
.btn-col-quick-add:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
.btn-col-collapse {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #64748b;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.15s ease;
}
.btn-col-collapse:hover {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

/* Collapsed Done Column */
.task-col.is-collapsed {
  flex: 0 0 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  padding: 8px 3px;
  cursor: pointer;
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.task-col.is-collapsed .task-col-cards,
.task-col.is-collapsed .task-col-empty,
.task-col.is-collapsed .task-col-title,
.task-col.is-collapsed .btn-col-quick-add {
  display: none !important;
}
.task-col.is-collapsed .task-col-header {
  flex-direction: column;
  height: 100%;
  align-items: center;
  border-bottom: none;
  margin-bottom: 0;
  padding: 0;
}
.task-col.is-collapsed .btn-col-collapse {
  margin-top: 4px;
}
.task-col-collapsed-indicator {
  display: none;
}
.task-col.is-collapsed .task-col-collapsed-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  height: 100%;
  margin-top: 14px;
}
.task-col-collapsed-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #059669;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Independent Column Scrolling */
.task-col-cards {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.task-col-cards::-webkit-scrollbar {
  width: 3px;
}
.task-col-cards::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

/* Modern High-Density Task Card */
.task-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 9px;
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: grab;
  position: relative;
  user-select: none;
  border-left: 3px solid #cbd5e1;
}
.task-card.prio-urgent { border-left-color: #ef4444; }
.task-card.prio-high { border-left-color: #f97316; }
.task-card.prio-normal { border-left-color: #3b82f6; }
.task-card.prio-low { border-left-color: #94a3b8; }

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px -2px rgba(15, 23, 42, 0.09);
  border-color: #cbd5e1;
}
.task-card:active {
  cursor: grabbing;
}
.task-card .tk-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}
.task-card .tk-top-left {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}
.task-card .tk-top-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.tk-tag-type {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 95px;
}
.tk-prio-chip {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tk-prio-chip.urgent { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.tk-prio-chip.high { background: #fff7ed; color: #ea580c; border: 1px solid #ffedd5; }
.tk-prio-chip.normal { background: #f1f5f9; color: #64748b; }
.tk-prio-chip.low { background: #f8fafc; color: #94a3b8; }

.tk-tag-project {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75px;
}

.task-card .tk-title-text {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.35;
  margin: 1px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.task-card .tk-meta-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-height: 16px;
}

.task-card .tk-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 3px;
  padding-top: 5px;
  border-top: 1px solid #f1f5f9;
  gap: 4px;
  min-width: 0;
}
.task-card .tk-footer-left {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  flex: 1 1 auto;
}
.task-card .tk-footer-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.tk-avatar-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}
.tk-avatar-circle.reviewer {
  background: #7c3aed;
  margin-left: -7px;
  border: 1.5px solid #ffffff;
  font-size: 8.5px;
  box-shadow: 0 1px 2px rgba(124, 58, 237, 0.2);
}
.tk-assignee-name {
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60px;
}
.tk-remarks-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
}
.btn-card-timer {
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.btn-card-timer:hover {
  background: #dcfce7;
  border-color: #86efac;
  transform: scale(1.05);
}
.btn-card-timer.running {
  width: auto;
  padding: 0 6px;
  height: 22px;
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
  animation: timerCardPulse 2s infinite;
  gap: 3px;
  font-size: 10px;
  font-weight: 700;
}
.btn-card-quick-move {
  height: 22px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-card-quick-move:hover {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
  transform: scale(1.03);
}
.btn-card-quick-move.done {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}
.btn-card-quick-move.done:hover {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}

.tk-chip-overdue {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.tk-chip-blocked {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.tk-chip-due {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.tk-chip-subtasks {
  font-size: 10px;
  color: #475569;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
  white-space: nowrap;
}
.tk-badge-velocity {
  font-size: 10px;
  color: #0284c7;
  background: #eff6ff;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.tk-badge-velocity.qa { color: #7c3aed; background: #f5f3ff; }
.tk-badge-velocity.done { color: #16a34a; background: #f0fdf4; }
.tk-badge-est {
  font-size: 10px;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.task-card.dragging {
  opacity: 0.45;
  transform: scale(0.97) rotate(1.5deg);
  border: 2px dashed #0284c7 !important;
  box-shadow: 0 14px 28px -6px rgba(2, 132, 199, 0.25) !important;
}
.task-col {
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.task-col.drag-target-valid {
  border: 2px dashed #0284c7;
  background: #f0f9ff;
}
.task-col.drag-target-invalid {
  opacity: 0.75;
}
.task-col.drag-over-active {
  background: #e0f2fe !important;
  border: 2px solid #0284c7 !important;
  box-shadow: inset 0 0 12px rgba(2, 132, 199, 0.15);
}
.task-col.drag-over-active {
  background: #e0f2fe !important;
  border: 2px solid #0284c7 !important;
  box-shadow: inset 0 0 12px rgba(2, 132, 199, 0.15);
}
.tk-remarks-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tk-remarks-badge:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}
.tk-title-clickable {
  cursor: pointer;
  transition: color 0.15s ease;
}
.tk-title-clickable:hover {
  color: #0284c7;
  text-decoration: underline;
}

/* Priority Left Accent Borders on Task Cards */
.task-card.prio-urgent {
  border-left: 4px solid #ef4444 !important;
}
.task-card.prio-high {
  border-left: 4px solid #f59e0b !important;
}
.task-card.prio-normal {
  border-left: 4px solid #0284c7 !important;
}
.task-card.prio-low {
  border-left: 4px solid #94a3b8 !important;
}

/* Project Badge on Kanban Card */
.tk-project-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid #e2e8f0;
}
.tk-project-pill i {
  color: #0284c7;
  font-size: 9.5px;
}

/* Reviewer Pill on Card */
.tk-reviewer-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #7c3aed;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  padding: 1px 6px;
  border-radius: 4px;
}

/* Kanban Column Header */
.task-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.task-col-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
}
.col-count-badge {
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
}
.btn-col-quick-add {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #64748b;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.15s ease;
}
.btn-col-quick-add:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: scale(1.08);
}

/* Sleek Stage Action Bar on Card */
.tk-card-stage-action {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed #e2e8f0;
}
.tk-stage-action-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}
.tk-stage-select-pill {
  flex: 1;
  padding: 4px 8px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  color: #334155 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}
.tk-stage-select-pill:hover {
  border-color: #94a3b8 !important;
  background: #ffffff !important;
}

/* Empty Column State */
.task-col-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 8px;
  color: #94a3b8;
  font-size: 11px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
}
.task-col-empty i {
  font-size: 18px;
  margin-bottom: 4px;
  color: #cbd5e1;
}

/* ================= Modern Task Details & Execution Modal ================= */
.task-details-modal-box {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.tdm-header-sticky {
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.tdm-body-scrollable {
  background: #ffffff;
}

/* Stage Tracker in Details Modal */
.task-stage-tracker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 18px;
  padding: 16px 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}
.stage-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 72px;
  text-align: center;
}
.step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.step-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.stage-step.active .step-dot {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.22);
}
.stage-step.active .step-label {
  color: #0284c7;
  font-weight: 700;
}
.stage-step.completed .step-dot {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}
.stage-step.completed .step-label {
  color: #059669;
  font-weight: 600;
}
.stage-connector {
  flex: 1;
  height: 3px;
  background: #e2e8f0;
  margin: 0 8px;
  border-radius: 4px;
  position: relative;
  top: -12px;
  transition: background 0.3s ease;
}
.stage-connector.completed {
  background: #10b981;
}

/* Stage Duration / Turnaround Time Card */
.task-turnaround-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
}
.tat-lead-badge {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tat-stages-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.tat-stage-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  transition: all 0.15s ease;
}
.tat-stage-pill.is-active {
  background: #f0f9ff;
  border-color: #7dd3fc;
  box-shadow: 0 1px 3px rgba(2, 132, 199, 0.1);
}
.tat-stage-pill.is-done {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.tat-stage-pill .tat-stage-name {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tat-stage-pill .tat-stage-duration {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}
.tat-stage-pill.is-active .tat-stage-duration {
  color: #0284c7;
}
.tat-stage-pill.is-done .tat-stage-duration {
  color: #15803d;
}
@media (max-width: 768px) {
  .tat-stages-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Task Meta Grid */
.task-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.task-meta-cell {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  transition: all 0.15s ease;
}
.task-meta-cell:hover {
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.task-meta-cell .meta-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}
.task-meta-cell .meta-val {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Work Log & Subtask Checklist Cards */
.task-worklog-card, .task-subtasks-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.tdm-subtask-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 6px;
}
.tdm-subtask-row:hover {
  background: #f1f5f9;
}
.tdm-subtask-row.is-done {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
  text-decoration: line-through;
}
.subtask-progress-bar-bg {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}
.subtask-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.worklog-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 12.5px;
  margin-bottom: 6px;
}
.worklog-item:last-child {
  margin-bottom: 0;
}
.worklog-history-list {
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Remarks Timeline */
.task-remarks-timeline {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 2px;
}
.remark-bubble {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.15s ease;
}
.remark-bubble:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.remark-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.remark-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.remark-author-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.remark-role-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  letter-spacing: 0.03em;
}
.remark-time {
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 500;
}
.remark-text {
  font-size: 13.5px;
  color: #334155;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Mention Pill Chip inside Remarks Bubble */
.task-mention-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0284c7;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid rgba(2, 132, 199, 0.25);
  margin: 0 2px;
  vertical-align: baseline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.task-mention-chip.is-me {
  background: #fef08a;
  color: #854d0e;
  border-color: #fde047;
}
.task-mention-chip i {
  font-size: 10px;
  opacity: 0.85;
}

/* Mention Autocomplete Floating Dropdown Menu */
.mention-autocomplete-menu {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  width: 320px;
  max-width: 90vw;
  max-height: 220px;
  overflow-y: auto;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16), 0 4px 10px rgba(15, 23, 42, 0.08);
  z-index: 9999;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mention-autocomplete-menu.hidden {
  display: none !important;
}
.mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
  user-select: none;
}
.mention-item:hover,
.mention-item.selected {
  background: #f0f9ff;
}
.mention-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0284c7;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
}
.mention-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.mention-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mention-role {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prio-high {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
}
.prio-low {
  background: #f1f5f9;
  color: #64748b;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
}
.overdue {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

/* ===== Badges & Status Pills ===== */
.badge {
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge.lead { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.badge.onboarded { background: #eff6ff; color: #1e40af; border: 1px solid #dbeafe; }
.badge.inprogress { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge.delivered { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge.amc { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }
.badge.closed { background: #f3f4f6; color: #9ca3af; border: 1px solid #e5e7eb; }
.badge.active { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.badge.onboarding { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge.notice { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.badge.relieved { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }
.badge.due { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.badge.pending { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge.issued { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }

.role-badge {
  background: #eef2ff;
  color: #1e3a8a;
  border-radius: 20px;
  padding: 2.5px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.toggle-btn {
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  transition: all 0.15s ease;
}
.toggle-btn.on {
  background: #d1fae5;
  border-color: #a7f3d0;
  color: #065f46;
  font-weight: 700;
}

/* ===== Modals & Dialog System ===== */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 1000;
  padding: 24px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}
.modal.hidden {
  display: none !important;
}
.modal-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 22px 24px;
  width: 460px;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.9);
  margin: auto;
  animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-sizing: border-box;
  position: relative;
}
.modal-box::-webkit-scrollbar {
  width: 6px;
}
.modal-box::-webkit-scrollbar-track {
  background: #f8fafc;
}
.modal-box::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
.modal-box::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

@keyframes modalPopIn {
  from { transform: scale(0.95) translateY(6px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -22px -24px 10px -24px;
  padding: 16px 24px 12px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  position: sticky;
  top: -22px;
  z-index: 20;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}
.modal-header-row h3,
.modal-box > h3:first-child {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}
.modal-box > h3:not(:first-child) {
  margin: 14px 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}

.modal-close-btn {
  background: #f1f5f9;
  border: none;
  font-size: 13px;
  cursor: pointer;
  color: #64748b;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.modal-close-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  transform: scale(1.05);
}

.modal-box label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-top: 6px;
  display: block;
}
.modal-box .opt {
  font-weight: 400;
  color: var(--muted);
  font-size: 11px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 16px -24px -22px -24px;
  padding: 14px 24px 18px;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
  position: sticky;
  bottom: -22px;
  z-index: 20;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

/* ===== Attendance & Shifts ===== */
/* ===== Modern Attendance & Shift Management ===== */
.att-header-date {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.att-main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.att-clock-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700;
  color: #1e40af;
  background: #dbeafe;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
}

/* Executive 5-KPI Grid */
.att-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 1200px) {
  .att-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}
.att-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.att-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.att-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.att-kpi-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.att-kpi-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
}
.att-kpi-val {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  margin: 2px 0;
}
.att-kpi-sub {
  font-size: 11.5px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* KPI Card Color Accents */
.att-kpi-card.kpi-blue .att-kpi-icon { background: #eff6ff; color: #2563eb; }
.att-kpi-card.kpi-emerald .att-kpi-icon { background: #ecfdf5; color: #059669; }
.att-kpi-card.kpi-rose .att-kpi-icon { background: #fff1f2; color: #e11d48; }
.att-kpi-card.kpi-purple .att-kpi-icon { background: #f5f3ff; color: #7c3aed; }
.att-kpi-card.kpi-amber .att-kpi-icon { background: #fffbeb; color: #d97706; }

/* View Switcher / Management Navigation Bar */
.att-view-switcher {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 6px 12px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  flex-wrap: wrap;
  gap: 12px;
}
.att-nav-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.att-view-pill {
  background: transparent;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}
.att-view-pill:hover {
  color: #0f172a;
  background: #f1f5f9;
}
.att-view-pill.active {
  color: #ffffff;
  background: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

/* Founder Quick Punch Pill / Bar */
.btn-executive-punch {
  background: #16a34a;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.15s ease;
}
.btn-executive-punch:hover {
  background: #15803d;
  transform: scale(1.02);
}
.exec-punch-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 4px 10px;
  border-radius: 20px;
}
.exec-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 6px rgba(22, 163, 74, 0.7);
  animation: pulse 2s infinite;
}
.btn-exec-action {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #bbf7d0;
  background: #ffffff;
  color: #166534;
  transition: all 0.15s ease;
}
.btn-exec-action:hover {
  background: #dcfce7;
}
.btn-exec-action.out {
  border-color: #fecdd3;
  color: #be123c;
}
.btn-exec-action.out:hover {
  background: #ffe4e6;
}

/* Roster Toolbar */
.att-roster-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}
.att-roster-search-wrap {
  position: relative;
  width: 100%;
}
.att-roster-search-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
}
.att-roster-search-wrap input {
  width: 100%;
  padding: 9px 36px 9px 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13.5px;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.att-roster-search-wrap input:focus {
  border-color: #0284c7;
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}
.btn-clear-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
}
.btn-clear-search:hover { color: #475569; }

.att-roster-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.att-status-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.att-status-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.att-status-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.att-status-chip.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
.att-status-chip .chip-count {
  background: rgba(255, 255, 255, 0.2);
  color: inherit;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
}
.att-status-chip:not(.active) .chip-count {
  background: #e2e8f0;
  color: #334155;
}
.att-dept-select {
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  background: #ffffff;
  color: #334155;
}

/* Full Team Roster Grid (Cards) */
.att-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
}
.att-emp-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.att-emp-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Left Status Border Stripes */
.att-emp-card.status-office { border-left: 4px solid #10b981; }
.att-emp-card.status-remote { border-left: 4px solid #f59e0b; }
.att-emp-card.status-paused { border-left: 4px solid #0284c7; }
.att-emp-card.status-completed { border-left: 4px solid #64748b; }
.att-emp-card.status-missing { border-left: 4px solid #f43f5e; background: #fffdfd; }
.att-emp-card.status-leave { border-left: 4px solid #8b5cf6; background: #faf5ff; }

.att-emp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.att-emp-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.att-emp-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  position: relative;
}
.att-emp-avatar.online::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  background: #10b981;
  border: 2px solid #ffffff;
  border-radius: 50%;
}
.att-emp-name-title {
  display: flex;
  flex-direction: column;
}
.att-emp-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.2;
}
.att-emp-role {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}
.att-emp-dept-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  display: inline-block;
  margin-top: 3px;
}

.att-emp-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}
.att-emp-time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.att-emp-location-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.att-emp-location-row a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

/* Status Badges */
.badge-office {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-remote {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-permission {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-completed {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-absent {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-leave {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Monthly Table Toolbar & Banner */
.att-table-search-wrap {
  position: relative;
}
.att-table-search-wrap i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 11.5px;
}
.att-table-search-wrap input {
  padding: 6px 12px 6px 30px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
}
.btn-month-nav {
  background: transparent;
  border: none;
  color: #475569;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 4px;
}
.btn-month-nav:hover { background: #e2e8f0; color: #0f172a; }

.att-monthly-kpi-banner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .att-monthly-kpi-banner {
    grid-template-columns: repeat(2, 1fr);
  }
}
.att-mkpi-item {
  display: flex;
  flex-direction: column;
}
.att-mkpi-label {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
}
.att-mkpi-val {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2px;
}

.att-grid-top {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  margin-bottom: 24px;
}
.att-grid-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 1200px) {
  .att-grid-bottom {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 980px) {
  .att-grid-top {
    grid-template-columns: 1fr;
  }
  .att-grid-bottom {
    grid-template-columns: 1fr;
  }
}
.att-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.att-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.att-live-clock {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13.5px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 4px 12px;
  border-radius: 8px;
}
.att-status-box {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
}
.att-punch-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0;
}
.att-punch-btn {
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
}
.att-today-roster-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
}
.att-roster-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  transition: all 0.15s ease;
}
.att-roster-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.shift-tracker {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 6px;
  box-shadow: var(--shadow-xs);
}
.shift-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  margin-bottom: 10px;
}
.shift-progress-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}
.shift-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  border-radius: 6px;
  transition: width 0.4s ease;
}
.shift-progress-fill.overtime {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}
.shift-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.badge-ot {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-auto {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.ot-card {
  background: #fff;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-xs);
}
.ot-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.ot-card-user {
  font-weight: 700;
  font-size: 14px;
  color: #0f172a;
}
.ot-card-body {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 12px;
}
.ot-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Permissions Grid */
.perm-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-top: 10px;
}
.perm-box-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.perm-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
}
.perm-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  color: #334155;
}
.perm-item input {
  width: auto !important;
  margin: 0;
  cursor: pointer;
}

/* Employee Profile */
.emp-prof-head {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}
.emp-prof-head .avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #eff6ff;
  color: #1d4ed8;
  border: 2px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
}
.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  font-size: 13.5px;
  margin: 12px 0;
}
.kv-grid .k {
  color: var(--muted);
  font-weight: 500;
}

/* Modern Team Picker & Projects */
.team-picker-section {
  margin: 12px 0 8px;
}
.team-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.team-picker-label {
  margin: 0 !important;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
}
.team-picker-badge {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 2px 9px;
  border-radius: 12px;
  transition: all 0.2s ease;
}
.team-picker-container {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}
.team-picker-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}
.team-picker-search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 5px 10px;
  transition: all 0.15s ease;
}
.team-picker-search-box:focus-within {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}
.team-picker-search-box i {
  color: #94a3b8;
  font-size: 12px;
}
.team-picker-search-box input {
  flex: 1;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 12.5px;
  color: #1e293b;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}
.team-picker-clear-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 2px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.team-picker-clear-btn:hover {
  color: #ef4444;
}
.team-picker-toggle-all-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  padding: 6px 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.team-picker-toggle-all-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}
.team-picker-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
}
.team-picker-pills::-webkit-scrollbar {
  height: 4px;
}
.team-picker-pills::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.team-dept-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.team-dept-pill:hover {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #94a3b8;
}
.team-dept-pill.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.25);
}
.team-dept-pill.selected-filter.active {
  background: #059669;
  border-color: #059669;
  color: #ffffff;
}
.team-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  padding: 10px;
  max-height: 190px;
  overflow-y: auto;
  background: #f8fafc;
  box-sizing: border-box;
}
.team-picker::-webkit-scrollbar {
  width: 6px;
}
.team-picker::-webkit-scrollbar-track {
  background: #f1f5f9;
}
.team-picker::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}
.team-picker::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
.team-pick-card {
  display: flex !important;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  position: relative;
  margin: 0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  box-sizing: border-box;
}
.team-pick-card:hover {
  border-color: #93c5fd;
  background: #fbfdff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
}
.team-pick-card.is-selected {
  background: #eff6ff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6, 0 2px 6px rgba(37, 99, 235, 0.12);
}
.team-pick-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.team-pick-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  overflow: hidden;
}
.team-pick-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.team-pick-card.is-selected .team-pick-name {
  color: #1d4ed8;
}
.team-pick-role {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.team-pick-checkbox {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 5px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: transparent;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.team-pick-card.is-selected .team-pick-checkbox {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  transform: scale(1.05);
}
.team-picker-empty {
  grid-column: 1 / -1;
  padding: 24px 12px;
  text-align: center;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 500;
}
.myprj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}
.myprj-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow-xs);
}
.myprj-card h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 16px;
}
.myprj-card .client {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}
.myprj-card .ms-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  padding: 3px 0;
}
.myprj-card .prj-tasks {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* Rich Text Editor & Table Builder */
.rich-toolbar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  border: 1.5px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 6px;
  background: #f8fafc;
}
.rich-toolbar button {
  min-width: 32px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: all 0.15s ease;
}
.rich-toolbar button:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.rich-editor {
  border: 1.5px solid var(--border);
  border-radius: 0 0 8px 8px;
  padding: 14px 16px;
  min-height: 220px;
  max-height: 440px;
  overflow: auto;
  font-size: 14px;
  line-height: 1.6;
  background: #ffffff;
  outline: none;
}
.rich-editor:focus {
  border-color: var(--border-focus);
}
.rich-editor:empty:before {
  content: attr(data-placeholder);
  color: var(--muted);
}
.tb-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.tb-controls input {
  width: 64px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-left: 4px;
}
.tb-grid {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  overflow: auto;
  max-height: 52vh;
  padding: 2px;
}
.tb-grid input {
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  width: 100%;
}
.tb-grid input.tb-head {
  background: #eff6ff;
  font-weight: 700;
  color: #1e40af;
}

/* Edit Banner */
.edit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 8px;
}

/* ===== Chat ===== */
.chat-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  line-height: 1.5;
}
.chat-shell {
  display: flex;
  height: calc(100vh - 120px);
  min-height: 500px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.chat-sidebar {
  width: 280px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: #f8fafc;
}
.chat-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--border);
}
.chat-sidebar-head h3 {
  margin: 0;
  font-size: 15px;
}
.chat-conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.chat-conv-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 4px;
  transition: all 0.15s ease;
}
.chat-conv-item:hover {
  background: #edf2f7;
}
.chat-conv-item.active {
  background: #eff6ff;
  border-left: 3px solid #2563eb;
}
.chat-conv-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.chat-conv-name {
  font-weight: 600;
  font-size: 13.5px;
  color: #0f172a;
}
.chat-conv-time {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}
.chat-conv-preview {
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #ffffff;
}
.chat-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  gap: 12px;
}
.chat-header-bar .chat-header {
  padding: 0;
  border: none;
  font-weight: 700;
  font-size: 14.5px;
  color: #0f172a;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.chat-hdr-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: #475569;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chat-hdr-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}
.chat-links-count {
  background: #2563eb;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.4;
}
.chat-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.chat-search-icon {
  color: #94a3b8;
  font-size: 13px;
}
.chat-search-row input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  outline: none;
  color: #0f172a;
  padding: 4px 0;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fafbfc;
}
.chat-msg {
  max-width: 68%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  position: relative;
  word-break: break-word;
}
.chat-msg.mine {
  align-self: flex-end;
  background: #2563eb;
  color: #ffffff;
  border-bottom-right-radius: 3px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.chat-msg.theirs {
  align-self: flex-start;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.chat-msg .chat-msg-sender {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.8;
  margin-bottom: 2px;
  display: block;
}
.chat-msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 4px;
}
.chat-msg-time {
  font-size: 10.5px;
  opacity: 0.75;
}
.chat-msg-status {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  line-height: 1;
}
/* Tick marks for sent messages */
.chat-msg.mine .chat-tick-sent {
  color: rgba(255, 255, 255, 0.65);
}
.chat-msg.mine .chat-tick-delivered {
  color: rgba(255, 255, 255, 0.95);
}
.chat-msg.mine .chat-tick-read {
  color: #38bdf8;
  filter: drop-shadow(0 0 1px rgba(56, 189, 248, 0.8));
}
.chat-msg.mine .chat-msg-status {
  cursor: pointer;
  transition: transform 0.1s ease;
}
.chat-msg.mine .chat-msg-status:hover {
  transform: scale(1.15);
}
.chat-text-link {
  color: inherit;
  text-decoration: underline;
  word-break: break-all;
  font-weight: 500;
}
.chat-msg.theirs .chat-text-link {
  color: #2563eb;
}
/* In-chat rich link cards */
.chat-link-card {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  transition: all 0.15s ease;
}
.chat-link-card.mine {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.chat-link-card.theirs {
  background: #f8fafc;
  border: 1px solid var(--border);
  color: #0f172a;
}
.chat-link-card-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.chat-link-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
  flex-shrink: 0;
  font-size: 11px;
}
.chat-link-card.mine .chat-link-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.chat-link-info {
  min-width: 0;
  flex: 1;
}
.chat-link-domain {
  font-weight: 700;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-link-url {
  font-size: 11px;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  color: inherit;
  text-decoration: none;
}
.chat-link-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.chat-link-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11.5px;
  transition: background 0.15s ease;
  text-decoration: none;
}
.chat-link-card.mine .chat-link-btn {
  background: rgba(255, 255, 255, 0.2);
}
.chat-link-btn:hover {
  background: rgba(0, 0, 0, 0.12);
}
.chat-link-card.mine .chat-link-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}
/* Shared Links Sliding Drawer */
.chat-links-panel {
  width: 320px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: #ffffff;
}
.chat-links-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.chat-links-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}
.chat-links-title .badge {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
}
.chat-links-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-shared-link-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.chat-shared-link-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.chat-shared-link-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.chat-shared-link-domain {
  font-weight: 700;
  font-size: 12.5px;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-shared-link-domain i {
  color: #2563eb;
  font-size: 11px;
}
.chat-shared-link-url {
  font-size: 12px;
  color: #2563eb;
  word-break: break-all;
  line-height: 1.35;
  text-decoration: none;
}
.chat-shared-link-url:hover {
  text-decoration: underline;
}
.chat-shared-link-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
  font-size: 11px;
  color: var(--muted);
}
.chat-shared-link-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-shared-btn {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chat-shared-btn:hover {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}
.chat-empty-links {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.chat-empty-links i {
  font-size: 28px;
  color: #cbd5e1;
}
.chat-empty-links p {
  margin: 0;
  font-size: 13px;
}
.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  align-items: flex-end;
  background: #ffffff;
}
.chat-input-row textarea {
  flex: 1;
  resize: none;
  max-height: 120px;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
}
.chat-empty {
  margin: auto;
  color: var(--muted);
  font-size: 14px;
}

/* ===== Toast Notification System ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: calc(100vw - 48px);
  width: 380px;
}
.toast-item {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-left: 5px solid #3b82f6;
  animation: toastSlideIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.toast-item.toast-hiding {
  animation: toastSlideOut 0.28s cubic-bezier(0.4, 0, 1, 1) forwards;
}
@keyframes toastSlideIn {
  0% { transform: translateX(115%) scale(0.96); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes toastSlideOut {
  0% { transform: translateX(0) scale(1); opacity: 1; max-height: 120px; margin-bottom: 0; }
  100% { transform: translateX(115%) scale(0.92); opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: -12px; border-width: 0; }
}

.toast-item.toast-success { border-left-color: #10b981; }
.toast-item.toast-success .toast-icon-wrap { background: #ecfdf5; color: #059669; }
.toast-item.toast-success .toast-progress-bar { background: linear-gradient(90deg, #10b981, #059669); }

.toast-item.toast-error, .toast-item.toast-failure { border-left-color: #ef4444; }
.toast-item.toast-error .toast-icon-wrap, .toast-item.toast-failure .toast-icon-wrap { background: #fef2f2; color: #dc2626; }
.toast-item.toast-error .toast-progress-bar, .toast-item.toast-failure .toast-progress-bar { background: linear-gradient(90deg, #ef4444, #dc2626); }

.toast-item.toast-warning { border-left-color: #f59e0b; }
.toast-item.toast-warning .toast-icon-wrap { background: #fffbeb; color: #d97706; }
.toast-item.toast-warning .toast-progress-bar { background: linear-gradient(90deg, #f59e0b, #d97706); }

.toast-item.toast-info { border-left-color: #3b82f6; }
.toast-item.toast-info .toast-icon-wrap { background: #eff6ff; color: #2563eb; }
.toast-item.toast-info .toast-progress-bar { background: linear-gradient(90deg, #3b82f6, #2563eb); }

.toast-icon-wrap {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toast-icon-wrap svg {
  width: 20px;
  height: 20px;
}
.toast-content {
  flex: 1;
  min-width: 0;
}
.toast-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 2px;
}
.toast-message {
  font-size: 13px;
  color: #475569;
  line-height: 1.45;
  word-break: break-word;
}
.toast-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  margin-top: -2px;
  margin-right: -4px;
}
.toast-close:hover {
  color: #334155;
  background: #f1f5f9;
}
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: rgba(0, 0, 0, 0.04);
}
.toast-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
}

/* ===== Custom Confirmation & Prompt Dialog (Redesigned) ===== */
.confirm-dialog-box {
  width: 480px !important;
  max-width: 94vw !important;
  padding: 24px !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
  border: 1px solid rgba(226, 232, 240, 0.95) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
}

.confirm-dialog-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 0;
}

.confirm-dialog-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.confirm-dialog-icon {
  flex-shrink: 0;
}

.confirm-icon-wrap {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.confirm-icon-wrap.danger {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #ef4444;
  border: 1px solid #fecaca;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.12);
}

.confirm-icon-wrap.warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #f59e0b;
  border: 1px solid #fde68a;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
}

.confirm-icon-wrap.primary {
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
  color: #0284c7;
  border: 1px solid #bae6fd;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.12);
}

.confirm-dialog-header-text {
  flex: 1;
}

.confirm-dialog-title {
  margin: 0 0 4px 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.confirm-dialog-msg {
  margin: 0;
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.5;
}

.confirm-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.confirm-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.confirm-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}

.confirm-chip.active {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

.confirm-input-field,
textarea.confirm-input-field {
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 10px 14px !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  background: #ffffff !important;
  color: #0f172a !important;
  line-height: 1.5 !important;
  transition: all 0.15s ease !important;
}

textarea.confirm-input-field {
  min-height: 82px !important;
  resize: vertical !important;
}

.confirm-input-field:focus,
textarea.confirm-input-field:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
  outline: none !important;
}

.confirm-dialog-box.is-danger .confirm-input-field:focus,
.confirm-dialog-box.is-danger textarea.confirm-input-field:focus {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.confirm-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.confirm-dialog-actions button {
  padding: 9.5px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.confirm-dialog-actions .btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.confirm-dialog-actions .btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.confirm-dialog-actions .btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25) !important;
}

.confirm-dialog-actions .btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.35) !important;
  transform: translateY(-1px);
}

.confirm-dialog-actions .btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25) !important;
}

.confirm-dialog-actions .btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35) !important;
  transform: translateY(-1px);
}

/* ===== Login Page ===== */
.login-body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 25%, #eff6ff 0%, #f8fafc 55%, #e2e8f0 100%);
  padding: 24px 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  box-sizing: border-box;
}

.login-wrapper {
  width: 100%;
  max-width: 430px;
  margin: auto;
}

.login-box {
  background: #ffffff;
  border-radius: 20px;
  padding: 38px 32px 30px;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(226, 232, 240, 0.85);
  box-sizing: border-box;
  animation: loginFadeIn 0.35s ease-out;
}

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

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  text-align: center;
}

.login-logo-wrap {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  box-sizing: border-box;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.15), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-logo-wrap:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -4px rgba(37, 99, 235, 0.2);
}

.login-logo-img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.login-brand .brand-logo {
  width: 44px;
  height: 44px;
  font-size: 17px;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.login-brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.login-brand-text h1 {
  font-size: 24px;
  margin: 0;
  color: #0f172a;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.login-brand-text .brand-sub {
  font-size: 11.5px;
  color: #2563eb;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-block;
  background: rgba(37, 99, 235, 0.08);
  padding: 3px 12px;
  border-radius: 20px;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

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

.login-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px;
}

.login-header p {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}

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

.login-form label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.login-form input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  box-sizing: border-box;
  transition: all 0.18s ease;
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrap input {
  width: 100%;
  padding-right: 44px !important;
}

.btn-toggle-pw {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.btn-toggle-pw:hover {
  color: #1e293b;
  background: rgba(15, 23, 42, 0.06);
}

.login-form input:focus {
  outline: none;
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.14);
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
  font-weight: 500;
}

.login-submit-btn {
  width: 100%;
  padding: 12px 18px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-submit-btn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

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

.login-submit-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

.login-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.login-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 11.5px;
  color: #94a3b8;
  border-top: 1px solid #f1f5f9;
  padding-top: 16px;
}

/* ================= In-House Product Tags (Login & Sidebar) ================= */
.login-product-tag {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}
.login-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.06);
}
.login-tag-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.7);
}
.login-tag-sub {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

/* ================= Fixed Floating In-House Pill (Bottom Center) ================= */
.fixed-inhouse-pill {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
  font-size: 11.5px;
  color: #334155;
  pointer-events: auto;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

@media (min-width: 981px) {
  .fixed-inhouse-pill {
    left: calc(50% + 120px);
  }
}

.fixed-inhouse-pill:hover {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.12);
  transform: translateX(-50%) translateY(-1px);
  border-color: #93c5fd;
}

.pill-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25), 0 0 8px rgba(16, 185, 129, 0.6);
  animation: pulse-dot 2.5s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

.pill-badge-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 2px 7px;
  border-radius: 999px;
}

.pill-divider {
  width: 1px;
  height: 11px;
  background: #cbd5e1;
}

.pill-brand-text {
  font-weight: 600;
  color: #475569;
  font-size: 11.5px;
  letter-spacing: 0.01em;
}

/* ================= Lead CRM & Pipeline Styles ================= */
.leads-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

/* Leads Scope & Filter Toolbar */
.lead-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.lead-scope-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
}

.lead-scope-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.lead-scope-btn:hover {
  color: #0f172a;
}
.lead-scope-btn.active {
  background: #ffffff;
  color: #2563eb;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.lead-filter-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}
@media (max-width: 800px) {
  .lead-filter-controls {
    margin-left: 0;
    width: 100%;
  }
}

.lead-search-box-wrap {
  position: relative;
  min-width: 220px;
  flex: 1 1 auto;
}
.lead-search-box-wrap i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 12px;
  pointer-events: none;
}
.lead-search-input {
  width: 100% !important;
  height: 38px !important;
  padding: 0 12px 0 34px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
  border: 1.5px solid var(--border) !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
}
.lead-owner-select {
  height: 38px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  border: 1.5px solid var(--border) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  min-width: 170px !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  box-sizing: border-box !important;
}

.lead-stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lead-stat-info {
  display: flex;
  flex-direction: column;
}

.lead-stat-label {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lead-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2px;
}

.lead-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* Kanban Lead Card Styles */
.lead-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  position: relative;
}

.lead-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.lead-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.lead-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 2px 0 0;
  line-height: 1.25;
}

.lead-card-company {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

.lead-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.lead-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lead-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2.5px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.lead-priority-hot {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.lead-priority-warm {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.lead-priority-cold {
  background: #f0f9ff;
  color: #0284c7;
  border: 1px solid #bae6fd;
}

.lead-pill-service {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.lead-pill-stage {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

/* Quick Action Buttons on Lead Cards */
.lead-quick-actions-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.lead-icon-btn {
  flex: 1;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}

.lead-icon-wa {
  background: #ecfdf5;
  color: #059669;
  border-color: #a7f3d0;
}
.lead-icon-wa:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

.lead-icon-call {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}
.lead-icon-call:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.lead-icon-mail {
  background: #fdf4ff;
  color: #a21caf;
  border-color: #f5d0fe;
}
.lead-icon-mail:hover {
  background: #a21caf;
  color: #ffffff;
  border-color: #a21caf;
}

/* Lead Detail Modal Styles */
.lead-detail-header {
  padding: 18px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.lead-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.lead-info-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
}

.lead-info-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
}

.lead-info-val {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lead-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.lead-action-btn {
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.lead-btn-wa {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.lead-btn-wa:hover {
  background: #10b981;
  color: #ffffff;
}

.lead-btn-call {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.lead-btn-call:hover {
  background: #2563eb;
  color: #ffffff;
}

.lead-btn-mail {
  background: #faf5ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}
.lead-btn-mail:hover {
  background: #9333ea;
  color: #ffffff;
}

.lead-conversion-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  background: #f1f5f9;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
}

/* ================= Advanced Tasks Workspace Styles ================= */
.tasks-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.task-stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 8px 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.task-stat-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
}

.task-stat-card.active {
  border-color: var(--primary, #4f46e5);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.task-stat-subtag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  letter-spacing: 0.02em;
}

.pill-counter-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 4px;
}

/* Kanban Done Column Grouping */
.kanban-done-subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  margin: 6px 0;
  user-select: none;
}
.done-today-subheading {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}
.done-earlier-subheading {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s ease;
}
.done-earlier-subheading:hover {
  background: #f1f5f9;
}
.done-subheading-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-stat-info {
  display: flex;
  flex-direction: column;
}

.task-stat-label {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.task-stat-val {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 1px;
}

.task-stat-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.task-toolbar-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-toolbar-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

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

.task-toolbar-row-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.filter-strip-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.filter-dropdowns-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
}

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

.filter-date-input-wrap {
  flex: 0 0 auto;
  min-width: 135px;
}
.task-filter-date-input {
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 12px;
  background: #ffffff;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  height: 33px;
  box-sizing: border-box;
}
.task-filter-date-input:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.search-input-wrap {
  position: relative;
  min-width: 240px;
  flex: 1;
  max-width: 360px;
}

.search-icon-fa {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  background: #f8fafc;
  color: #0f172a;
  transition: all 0.15s ease;
}

.search-input-wrap input:focus {
  background: #ffffff;
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.view-mode-toggle {
  display: inline-flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-toggle-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-filter-pill.active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.task-filter-select {
  width: 100%;
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  font-size: 12.5px;
  background: #ffffff;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.task-filter-select:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.tk-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tk-type-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tk-type-frontend { background: #e0e7ff; color: #3730a3; }
.tk-type-backend { background: #ecfdf5; color: #065f46; }
.tk-type-feature { background: #eff6ff; color: #1d4ed8; }
.tk-type-mobile { background: #fff7ed; color: #c2410c; }
.tk-type-devops { background: #f0fdfa; color: #0f766e; }
.tk-type-bug { background: #fee2e2; color: #dc2626; }
.tk-type-design { background: #faf5ff; color: #7e22ce; }
.tk-type-qa { background: #fef3c7; color: #b45309; }
.tk-type-marketing { background: #fff7ed; color: #ea580c; }
.tk-type-hr { background: #fce7f3; color: #be185d; }
.tk-type-mgmt { background: #ede9fe; color: #6d28d9; }
.tk-type-doc { background: #f1f5f9; color: #475569; }
.tk-type-client { background: #fefce8; color: #854d0e; }

.tk-prio-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.tk-prio-urgent { background: #991b1b; color: #ffffff; }
.tk-prio-high { background: #fee2e2; color: #dc2626; }
.tk-prio-normal { background: #f1f5f9; color: #64748b; }
.tk-prio-low { background: #f8fafc; color: #94a3b8; }

.tk-title-text {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin: 0;
}

.tk-project-pill {
  font-size: 11px;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tk-subtask-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}
.tk-subtask-mini-bg {
  flex: 1;
  height: 5px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.tk-subtask-mini-fill {
  height: 100%;
  background: #10b981;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.tk-overdue-alert {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.tk-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  font-size: 11.5px;
  color: #64748b;
}

.tk-assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: #334155;
}
.tk-avatar-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ================= Table / List View Styles ================= */
.task-table-wrap {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

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

.task-data-table th {
  background: #f8fafc;
  padding: 12px 14px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}

.task-data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #334155;
}

.task-data-table tr:hover td {
  background: #f8fafc;
}

.task-data-table tr {
  cursor: pointer;
}

/* Modal Subtasks Checklist Builder & Progress */
.modal-subtasks-builder {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  padding: 4px 2px;
}

.subtask-builder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12.5px;
}

.subtask-del-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
}
.subtask-del-btn:hover {
  color: #dc2626;
  background: #fee2e2;
}

.subtask-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.subtask-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #10b981);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.tdm-subtasks-checklist-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tdm-subtask-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.tdm-subtask-row:hover {
  background: #f1f5f9;
}

.tdm-subtask-row.is-done {
  background: #f0fdf4;
  border-color: #bbf7d0;
  text-decoration: line-through;
  color: #64748b;
}

.tdm-subtask-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.worklog-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
}

.worklog-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid #f1f5f9;
}

/* Blocked / On Hold Banner & Badges */
.badge-blocked {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  font-weight: 700;
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.blocked-alert-banner {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.blocked-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.blocked-banner-icon {
  font-size: 20px;
}

.blocked-banner-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #92400e;
}

.blocked-banner-reason {
  font-size: 12px;
  color: #b45309;
  margin-top: 2px;
}

.btn-resume-task {
  background: #10b981;
  color: #ffffff;
  border: none;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-resume-task:hover {
  background: #059669;
}

.tk-blocked-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

/* Responsive */
@media (max-width: 1400px) {
  .lead-board { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .lead-board { grid-template-columns: repeat(2, 1fr); }
  .lead-info-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .sidebar { position: static; width: 100%; height: auto; }
  .side-nav { flex-direction: row; flex-wrap: wrap; }
  .nav-section { width: 100%; margin: 8px 8px 2px; }
  .side-nav .tab-btn { width: auto; }
  .content { margin-left: 0; }
  .two-col { flex-direction: column; }
  .form-card { width: 100%; }
  .lead-quick-actions { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .lead-board { grid-template-columns: 1fr; }
  .row-2, .row-4 { grid-template-columns: 1fr; }
}

/* ================= ID CARDS DIRECTORY & STAGE ================= */
.id-cards-container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1024px) {
  .id-cards-container {
    grid-template-columns: 1fr;
  }
}
.id-cards-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.id-cards-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 7px 12px;
}
.id-cards-search-box input {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 13px;
  flex: 1;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}
.id-cards-filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}
.id-card-pill {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.id-card-pill.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}
.id-cards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 520px;
  padding-right: 4px;
}
.id-card-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.id-card-item:hover {
  border-color: #93c5fd;
  background: #f8faff;
  transform: translateX(2px);
}
.id-card-item.active {
  background: #eff6ff;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb, 0 2px 8px rgba(37, 99, 235, 0.12);
}
.id-card-item-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.id-card-item-info {
  flex: 1;
  min-width: 0;
}
.id-card-item-name {
  font-weight: 700;
  font-size: 13.5px;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.id-card-item-role {
  font-size: 11.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.id-cards-stage-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.id-card-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.id-card-stage-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stage-emp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  background-size: cover;
  background-position: center;
}
.stage-emp-name {
  font-weight: 800;
  font-size: 16px;
  color: #0f172a;
}
.stage-emp-meta {
  font-size: 12px;
  color: #64748b;
}
.id-card-stage-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.id-card-canvas-stage {
  background: #0f172a;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 440px;
  overflow-x: auto;
}
.id-card-canvas-stage .card-pair {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.id-card-canvas-stage canvas {
  max-width: 270px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease;
}
.id-card-canvas-stage canvas:hover {
  transform: scale(1.02);
}

/* ================= ID Card Print Modal & Layouts ================= */
.card-print-modal-box {
  width: 660px;
  max-width: 96vw;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-print-layout-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.card-print-layout-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.card-print-layout-card:hover {
  border-color: #93c5fd;
  background: #f8fafc;
  transform: translateY(-1px);
}
.card-print-layout-card.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #2563eb, 0 4px 12px rgba(37, 99, 235, 0.12);
}
.card-print-layout-card .layout-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  margin-bottom: 8px;
  transition: all 0.18s ease;
}
.card-print-layout-card.active .layout-icon {
  background: #2563eb;
  color: #ffffff;
}
.card-print-layout-card .layout-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2px;
}
.card-print-layout-card .layout-desc {
  font-size: 10.5px;
  color: #64748b;
  line-height: 1.3;
}
.card-print-preview-wrap {
  background: #f8fafc;
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  position: relative;
}
.card-print-mini-sheet {
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
}
.card-print-mini-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 4px;
  font-size: 10px;
  color: #334155;
  font-weight: 600;
}
.card-print-mini-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 6px 0;
}
.card-print-mini-card {
  width: 72px;
  height: 114px;
  border-radius: 4px;
  border: 1px dashed #94a3b8;
  padding: 2px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  box-sizing: border-box;
}
.card-print-mini-card img,
.card-print-mini-card canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}
.card-print-mini-footer {
  width: 100%;
  border-top: 1px solid #e2e8f0;
  padding-top: 4px;
  font-size: 9px;
  color: #94a3b8;
  text-align: center;
}

/* ===== Records Filter Toolbar & Scope Pills ===== */
.record-filter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 20px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.record-scope-pills,
.record-status-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.scope-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.scope-pill:hover,
.status-pill:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}
.scope-pill.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}
.status-pill.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}
.status-pill-draft.active {
  background: #475569 !important;
  border-color: #475569 !important;
  color: #ffffff !important;
}
.status-pill-pending.active {
  background: #d97706 !important;
  border-color: #d97706 !important;
  color: #ffffff !important;
}
.status-pill-issued.active {
  background: #16a34a !important;
  border-color: #16a34a !important;
  color: #ffffff !important;
}
.status-pill-rejected.active {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
}
.pill-badge {
  display: inline-block;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.08);
}
.scope-pill.active .pill-badge,
.status-pill.active .pill-badge {
  background: rgba(255, 255, 255, 0.25);
}

/* ===== Permission Item Highlights ===== */
.perm-item-highlight {
  background: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
  font-weight: 600 !important;
  color: #15803d !important;
}
.perm-item-highlight:has(input[value="logs"]) {
  background: #f5f3ff !important;
  border-color: #ddd6fe !important;
  color: #6d28d9 !important;
}

/* ===== Activity & Audit Logs ===== */
/* ================= Activity & Audit Logs Design ================= */
.audit-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.audit-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Audit KPI Stat Cards */
.audit-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 1200px) {
  .audit-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .audit-stats-grid { grid-template-columns: 1fr; }
}

.audit-stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.audit-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.audit-stat-card.card-blue { border-left: 4px solid #2563eb; }
.audit-stat-card.card-blue .audit-stat-icon { background: #eff6ff; color: #2563eb; }
.audit-stat-card.card-blue .audit-stat-val { color: #1e40af; }

.audit-stat-card.card-emerald { border-left: 4px solid #10b981; }
.audit-stat-card.card-emerald .audit-stat-icon { background: #ecfdf5; color: #059669; }
.audit-stat-card.card-emerald .audit-stat-val { color: #065f46; }

.audit-stat-card.card-amber { border-left: 4px solid #f59e0b; }
.audit-stat-card.card-amber .audit-stat-icon { background: #fffbeb; color: #d97706; }
.audit-stat-card.card-amber .audit-stat-val { color: #92400e; }

.audit-stat-card.card-purple { border-left: 4px solid #8b5cf6; }
.audit-stat-card.card-purple .audit-stat-icon { background: #f5f3ff; color: #7c3aed; }
.audit-stat-card.card-purple .audit-stat-val { color: #5b21b6; }

.audit-stat-card.card-rose { border-left: 4px solid #ef4444; }
.audit-stat-card.card-rose .audit-stat-icon { background: #fef2f2; color: #dc2626; }
.audit-stat-card.card-rose .audit-stat-val { color: #b91c1c; }

.audit-stat-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.audit-stat-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.audit-stat-val {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.audit-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex-shrink: 0;
}

/* Filter Box & Toolbar */
.log-filter-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.log-filter-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: nowrap;
}
.log-filter-search-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 220px;
}
.log-filter-search-wrap .search-ico {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}
.log-filter-search-wrap .search-box {
  width: 100% !important;
  height: 40px !important;
  padding-left: 36px !important;
  padding-right: 12px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 10px !important;
  font-size: 13.5px !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
}
.log-select-input {
  flex: 0 0 230px !important;
  width: 230px !important;
  height: 40px !important;
  padding: 0 12px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  box-sizing: border-box !important;
}
.log-date-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.log-date-input {
  width: 155px !important;
  height: 40px !important;
  padding: 0 10px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  box-sizing: border-box !important;
}

@media (max-width: 900px) {
  .log-filter-toolbar {
    flex-wrap: wrap;
  }
  .log-select-input {
    flex: 1 1 200px !important;
    width: auto !important;
  }
}

.log-quick-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}
.log-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.log-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}
.log-pill.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.audit-table-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.log-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}
.log-badge.cat-auth { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.log-badge.cat-doc, .log-badge.cat-docs { background: #f5f3ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.log-badge.cat-attendance { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.log-badge.cat-leave, .log-badge.cat-leaves { background: #fff7ed; color: #c2410c; border: 1px solid #ffedd5; }
.log-badge.cat-task, .log-badge.cat-tasks { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.log-badge.cat-project, .log-badge.cat-projects { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.log-badge.cat-team { background: #fdf2f8; color: #be185d; border: 1px solid #fbcfe8; }
.log-badge.cat-employee, .log-badge.cat-employees { background: #fefce8; color: #a16207; border: 1px solid #fef08a; }
.log-badge.cat-card, .log-badge.cat-cards { background: #f8fafc; color: #334155; border: 1px solid #cbd5e1; }
.log-badge.cat-payslip, .log-badge.cat-payslips { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.log-badge.cat-settings { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.log-badge.cat-system, .log-badge.cat-general { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.log-badge.cat-error { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

.log-pill.log-pill-danger { border-color: #fecaca; color: #dc2626; }
.log-pill.log-pill-danger:hover { background: #fef2f2; border-color: #f87171; }
.log-pill.log-pill-danger.active { background: #dc2626; color: #ffffff; border-color: #dc2626; }

.log-error-trace {
  margin-top: 6px;
  padding: 6px 10px;
  background: #fff1f2;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  color: #9f1239;
  border: 1px solid #ffe4e6;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 140px;
  overflow-y: auto;
}

.log-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.log-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.log-user-role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 2px;
}
.log-time-chip {
  font-size: 11px;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 2px;
}
.log-ip-badge {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  background: #f8fafc;
  padding: 3px 8px;
  border-radius: 6px;
  color: #475569;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

/* ================= Platform & Company Settings Modern UI ================= */
.settings-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.settings-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 1fr);
  gap: 22px;
  align-items: start;
}
@media (max-width: 1100px) {
  .settings-layout-grid {
    grid-template-columns: 1fr;
  }
}

.settings-forms-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.settings-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.settings-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.settings-card-icon.blue { background: #eff6ff; color: #2563eb; }
.settings-card-icon.purple { background: #f5f3ff; color: #7c3aed; }
.settings-card-icon.emerald { background: #ecfdf5; color: #059669; }
.settings-card-icon.amber { background: #fffbeb; color: #d97706; }

.settings-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}
.settings-card-sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.4;
}

.settings-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}
.settings-label .opt {
  font-weight: 400;
  color: #94a3b8;
  font-size: 11px;
}

.settings-input-wrap {
  position: relative;
  width: 100%;
}
.settings-input-wrap .input-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13.5px;
  pointer-events: none;
}
.settings-input {
  width: 100% !important;
  height: 42px !important;
  padding: 0 14px 0 38px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 10px !important;
  font-size: 13.5px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  box-sizing: border-box !important;
  transition: all 0.15s ease;
}
.settings-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
  outline: none;
}
.settings-textarea {
  height: 72px !important;
  padding-top: 10px !important;
  resize: vertical;
  line-height: 1.45;
}

/* Upload Dropzone */
.settings-upload-zone {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 18px 20px;
  transition: all 0.2s ease;
  position: relative;
}
.settings-upload-zone:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}
.upload-dropzone-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}
.upload-ico-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(37,99,235,0.12);
}
.upload-prompt {
  font-size: 13.5px;
  color: #0f172a;
}
.upload-hint {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}
.hidden-file-input {
  display: none !important;
}

.settings-file-preview {
  margin-top: 12px;
  border-radius: 10px;
  overflow: hidden;
  display: none;
}
.settings-file-preview.has-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.settings-file-preview img {
  max-height: 52px;
  max-width: 140px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}
.settings-file-preview.sq img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* 4-Quadrant Margin Grid */
.settings-margins-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 680px) {
  .settings-margins-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.margin-input-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.margin-lbl {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 4px;
}
.margin-field {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  padding-right: 8px;
}
.margin-num-input {
  border: none !important;
  width: 100% !important;
  height: 34px !important;
  padding: 0 8px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  box-shadow: none !important;
}
.margin-num-input:focus {
  outline: none !important;
}
.margin-unit {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
}
.margin-hint {
  font-size: 10.5px;
  color: #64748b;
}

/* Asset Box (Logo & Signature) */
.settings-asset-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
}
.asset-dropzone-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.asset-dropzone-mini:hover {
  border-color: #2563eb;
  background: #eff6ff;
}
.asset-ico {
  font-size: 14px;
  color: #2563eb;
}
.asset-txt {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

/* Prefix Grid */
.settings-prefix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}
.prefix-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}
.prefix-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.prefix-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.prefix-input {
  width: 65px !important;
  height: 32px !important;
  padding: 0 8px !important;
  border: 1.5px solid var(--border) !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  background: #ffffff !important;
}
.prefix-sample-pill {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 3px 8px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.prefix-info-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  color: #92400e;
  line-height: 1.4;
}

/* Bottom Actions */
.settings-bottom-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.settings-sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
}
.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

/* Right Column Live Preview */
.settings-preview-col {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-live-preview-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

/* A4 Sheet Mockup */
.settings-a4-wrapper {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: center;
}
.settings-a4-sheet {
  width: 250px;
  height: 354px; /* Standard A4 proportion: 1 : 1.414 */
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 8px 24px -4px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
  position: relative;
  overflow: hidden;
}
.a4-letterhead-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.95;
}
.a4-printable-area {
  position: absolute;
  top: 17%;
  bottom: 8%;
  left: 10%;
  right: 10%;
  border: 1.5px dashed rgba(37, 99, 235, 0.55);
  background: rgba(239, 246, 255, 0.25);
  border-radius: 4px;
  padding: 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}
.a4-mock-doc {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.a4-mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.a4-mock-type {
  font-size: 8px;
  font-weight: 800;
  color: #1e40af;
  letter-spacing: 0.05em;
}
.a4-mock-num {
  font-size: 7px;
  font-weight: 700;
  color: #64748b;
  font-family: monospace;
}
.a4-mock-title {
  font-size: 9px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.a4-mock-line {
  height: 3.5px;
  background: #cbd5e1;
  border-radius: 2px;
  margin-bottom: 3.5px;
}
.a4-mock-line.full { width: 100%; }
.a4-mock-line.medium { width: 75%; }
.a4-mock-line.short { width: 45%; }

.a4-mock-footer {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}
.a4-mock-sig-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.a4-mock-sig-img {
  height: 18px;
  max-width: 50px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center bottom;
}
.a4-mock-sig-line {
  font-size: 6.5px;
  font-weight: 700;
  color: #475569;
  border-top: 1px solid #94a3b8;
  padding-top: 1px;
}

.a4-margin-legend {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  font-size: 11.5px;
  color: #475569;
}
.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}
.legend-dot.top { background: #3b82f6; }
.legend-dot.bot { background: #10b981; }
.legend-dot.side { background: #8b5cf6; }

/* Guide Card */
.settings-guide-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.guide-title {
  margin: 0 0 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
}
.guide-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.guide-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
}
.guide-icon {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  flex-shrink: 0;
}

/* ==========================================================================
   IN-APPLICATION NOTIFICATIONS & DRAWER
   ========================================================================== */
.side-notif-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  padding: 0;
}
.side-notif-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}
.side-notif-btn:active {
  transform: translateY(0);
}
.side-notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 0 2px #0f172a, 0 2px 4px rgba(239, 68, 68, 0.4);
  pointer-events: none;
  animation: notifPulse 2s infinite ease-in-out;
}
@keyframes notifPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.notif-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 999980;
  opacity: 1;
  transition: opacity 0.25s ease;
}
.notif-drawer-backdrop.hidden {
  display: none !important;
  opacity: 0;
}

.notif-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 420px;
  max-width: 92vw;
  background: #ffffff;
  z-index: 999985;
  box-shadow: 8px 0 32px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.notif-drawer.hidden {
  display: none !important;
  transform: translateX(-100%);
}

.notif-drawer-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}
.notif-drawer-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.notif-drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.notif-head-icon {
  font-size: 17px;
  color: #3b82f6;
}
.notif-drawer-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.notif-unread-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}
.notif-drawer-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.notif-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
}
.notif-icon-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}
.notif-icon-btn.is-muted {
  color: #94a3b8;
  background: #f1f5f9;
}
.notif-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
}

.notif-filter-tabs {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
}
.notif-tab {
  flex: 1;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}
.notif-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.notif-perm-banner {
  margin-top: 10px;
  padding: 10px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  animation: notifSlideDown 0.2s ease-out;
}
.notif-perm-banner.is-blocked {
  background: #fef2f2;
  border-color: #fecaca;
}
.notif-perm-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.notif-perm-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #dbeafe;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.notif-perm-banner.is-blocked .notif-perm-icon {
  background: #fee2e2;
  color: #dc2626;
}
.notif-perm-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.notif-perm-title {
  font-size: 12px;
  font-weight: 600;
  color: #1e3a8a;
  line-height: 1.3;
}
.notif-perm-banner.is-blocked .notif-perm-title {
  color: #991b1b;
}
.notif-perm-desc {
  font-size: 11px;
  color: #3b82f6;
  line-height: 1.3;
}
.notif-perm-banner.is-blocked .notif-perm-desc {
  color: #b91c1c;
}
.btn-notif-perm {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.btn-notif-perm:hover {
  background: #1d4ed8;
}
@keyframes notifSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.global-notif-prompt {
  margin: 14px 20px 0;
  padding: 12px 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.08);
  animation: notifSlideDown 0.25s ease-out;
}
.global-notif-prompt.hidden {
  display: none !important;
}
.gnp-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.gnp-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.gnp-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.gnp-text strong {
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
  line-height: 1.3;
}
.gnp-text span {
  font-size: 12px;
  color: #2563eb;
  line-height: 1.3;
}
.gnp-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.gnp-btn-enable {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: #2563eb;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.gnp-btn-enable:hover {
  background: #1d4ed8;
}
.gnp-btn-dismiss {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid #bfdbfe;
  background: #ffffff;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.15s ease;
}
.gnp-btn-dismiss:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8fafc;
}
.notif-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  color: #94a3b8;
  text-align: center;
  gap: 10px;
}
.notif-empty-state i {
  font-size: 32px;
  color: #cbd5e1;
}
.notif-empty-state p {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
}

.notif-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
}
.notif-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}
.notif-item.is-unread {
  background: #f8fbff;
  border-color: #bfdbfe;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}
.notif-item.is-unread::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 6px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #2563eb;
}

.notif-icon-chip {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.notif-icon-chip.chip-task {
  background: #eff6ff;
  color: #2563eb;
}
.notif-icon-chip.chip-chat {
  background: #ecfdf5;
  color: #059669;
}
.notif-icon-chip.chip-leave {
  background: #fffbeb;
  color: #d97706;
}
.notif-icon-chip.chip-attendance {
  background: #f5f3ff;
  color: #7c3aed;
}
.notif-icon-chip.chip-doc {
  background: #ecfdf5;
  color: #059669;
}
.notif-icon-chip.chip-system {
  background: #f1f5f9;
  color: #475569;
}

.notif-item-body {
  flex: 1;
  min-width: 0;
}
.notif-item-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.notif-item-msg {
  font-size: 12.5px;
  color: #475569;
  line-height: 1.45;
  margin-bottom: 6px;
  word-break: break-word;
}
.notif-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
}
.notif-item-time {
  font-weight: 500;
}
.notif-item-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.notif-del-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.notif-del-btn:hover {
  color: #ef4444;
  background: #fee2e2;
}

.notif-drawer-footer {
  padding: 12px 16px;
  border-top: 1px solid #f1f5f9;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.btn-notif-clear {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.btn-notif-clear:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

@media (max-width: 768px) {
  .notif-drawer {
    width: 100vw;
    max-width: 100vw;
  }
}

/* ==========================================================================
   ENTERPRISE TASK SYSTEM UPGRADE STYLES
   ========================================================================== */

/* Floating Global Live Task Timer Bar */
.global-task-timer-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 18px;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
  color: #ffffff;
  animation: gtbSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  min-width: 380px;
  max-width: 90vw;
}
.global-task-timer-bar.hidden {
  display: none !important;
}

@keyframes gtbSlideUp {
  from {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

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

.gtb-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseGreen 1.8s infinite;
  flex-shrink: 0;
}

@keyframes pulseGreen {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.gtb-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.gtb-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #86efac;
}
.gtb-title {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.gtb-center {
  padding: 0 4px;
}
.gtb-clock {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
}

.gtb-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gtb-btn-view {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 6px 13px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.gtb-btn-view:hover {
  background: rgba(255, 255, 255, 0.22);
}
.gtb-btn-stop {
  background: #ef4444;
  border: none;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
  transition: all 0.15s ease;
}
.gtb-btn-stop:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* Modal Live Stopwatch Pulse Dot */
.timer-pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.timer-pulse-dot.running {
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: pulseGreen 1.8s infinite;
}
.timer-pulse-dot.static {
  background: #94a3b8;
}

/* Due Date vs Actual Completed Badges */
.badge-on-time {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border: 1px solid #a7f3d0 !important;
  font-weight: 700;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.badge-delayed {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
  font-weight: 700;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Deliverables Link Chips */
.deliverable-link-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.deliverable-link-chip:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  transform: translateY(-1px);
  color: #0284c7;
}

/* Rating Stars Interactive Widget */
.rating-interactive-stars .star-btn {
  color: #cbd5e1;
  transition: transform 0.15s ease, color 0.15s ease;
}
.rating-interactive-stars .star-btn:hover {
  transform: scale(1.2);
}
.rating-interactive-stars .star-btn.active {
  color: #eab308;
}

@media (max-width: 600px) {
  .global-task-timer-bar {
    bottom: 12px;
    width: calc(100% - 24px);
    min-width: unset;
    border-radius: 16px;
    padding: 10px 14px;
    gap: 10px;
  }
  .gtb-title {
    max-width: 110px;
  }
  .gtb-clock {
    font-size: 15px;
    padding: 2px 8px;
  }
}

/* ==========================================================================
   TASK CREATION & EDIT MODAL REDESIGN (ENTERPRISE TWO-COLUMN SAAS)
   ========================================================================== */
.task-modal-redesign {
  width: 960px !important;
  max-width: 95vw !important;
  height: 88vh !important;
  max-height: 840px !important;
  padding: 0 !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 25px 65px -15px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.9) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.task-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
  z-index: 10;
}

.task-modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.task-modal-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  border: 1px solid #bfdbfe;
}

.task-modal-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 2px;
}

.task-modal-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
}

.task-modal-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.task-modal-body-split {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Left Canvas */
.task-modal-canvas {
  flex: 1.55;
  min-width: 0;
  padding: 24px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #ffffff;
}

.task-modal-canvas::-webkit-scrollbar {
  width: 6px;
}
.task-modal-canvas::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.form-group-modern {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-field-label {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #334155 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin: 0 !important;
}

.task-title-input {
  font-size: 15.5px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  padding: 12px 16px !important;
  border-radius: 10px !important;
  border: 1.5px solid #cbd5e1 !important;
  background: #ffffff !important;
  transition: all 0.15s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.task-title-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
  outline: none !important;
}

.task-desc-textarea {
  font-size: 13.5px !important;
  line-height: 1.6 !important;
  color: #334155 !important;
  padding: 12px 16px !important;
  border-radius: 10px !important;
  border: 1.5px solid #cbd5e1 !important;
  background: #ffffff !important;
  min-height: 95px !important;
  resize: vertical !important;
  transition: all 0.15s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.task-desc-textarea:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
  outline: none !important;
}

/* Checklist builder */
.checklist-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.checklist-count-badge {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
  font-weight: 700;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
}

.modal-subtasks-builder {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
}

.subtask-builder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.15s ease;
}

.subtask-builder-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.subtask-del-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.subtask-del-btn:hover {
  color: #ef4444;
  background: #fee2e2;
}

.subtask-add-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.subtask-input-field {
  flex: 1;
  font-size: 12.5px !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  border: 1.5px solid #cbd5e1 !important;
}

.btn-subtask-add {
  background: #0284c7;
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-subtask-add:hover {
  background: #0369a1;
}

/* Deliverables Modern Box */
.deliverables-box-modern {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.deliverables-box-title {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.deliverables-box-badge {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 2px 7px;
  border-radius: 10px;
}

.deliverables-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.deliverable-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.deliverable-input-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.deliverable-input-wrapper input {
  padding-left: 36px !important;
  padding-right: 12px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: all 0.15s ease !important;
}

.deliverable-input-wrapper input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
  outline: none !important;
}

.task-tags-input {
  font-size: 12.5px !important;
  padding: 9px 14px !important;
  border-radius: 8px !important;
  border: 1.5px solid #cbd5e1 !important;
  background: #ffffff !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Right Sidebar */
.task-modal-sidebar {
  flex: 1;
  min-width: 310px;
  max-width: 360px;
  background: #f8fafc;
  border-left: 1px solid #e2e8f0;
  padding: 20px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-modal-sidebar::-webkit-scrollbar {
  width: 5px;
}
.task-modal-sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.sidebar-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

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

.sidebar-field-label {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #475569 !important;
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin: 0 !important;
}

.sidebar-field-select,
.sidebar-field-input {
  font-size: 12.5px !important;
  padding: 8px 10px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #0f172a !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: all 0.15s ease !important;
}

.sidebar-field-select:focus,
.sidebar-field-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
  outline: none !important;
}

.sidebar-watchers-select {
  height: 68px !important;
}

.sidebar-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Billable toggle */
.billable-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
  margin: 0 !important;
  transition: background 0.15s ease;
}

.billable-toggle-row:hover {
  background: #d1fae5;
}

.billable-toggle-label {
  font-size: 12px;
  font-weight: 700;
  color: #047857;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modern-switch-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 38px;
  height: 20px;
  background: #cbd5e1;
  border-radius: 20px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
  margin: 0 !important;
}

.modern-switch-checkbox::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.modern-switch-checkbox:checked {
  background: #059669;
}

.modern-switch-checkbox:checked::after {
  transform: translateX(18px);
}

/* Footer Actions */
.task-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  flex-shrink: 0;
  z-index: 10;
}

.task-modal-footer-hint {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-modal-footer-btns {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-btn-cancel {
  padding: 9px 18px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 9px !important;
}

.task-btn-save {
  padding: 9px 24px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 9px !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  border: none !important;
  color: #ffffff !important;
  cursor: pointer !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.task-btn-save:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 14px rgba(37, 99, 235, 0.4) !important;
}

/* Responsive */
@media (max-width: 820px) {
  .task-modal-redesign {
    height: 94vh !important;
    max-height: 94vh !important;
  }
  .task-modal-body-split {
    flex-direction: column !important;
    overflow-y: auto !important;
  }
  .task-modal-canvas {
    overflow-y: visible !important;
    padding: 18px 20px !important;
  }
  .task-modal-sidebar {
    min-width: 100% !important;
    max-width: 100% !important;
    border-left: none !important;
    border-top: 1px solid #e2e8f0 !important;
    overflow-y: visible !important;
    padding: 18px 20px !important;
  }
  .deliverables-inputs-grid {
    grid-template-columns: 1fr !important;
  }
  .task-modal-footer {
    flex-direction: column-reverse !important;
    gap: 10px !important;
    align-items: stretch !important;
  }
  .task-modal-footer-btns {
    justify-content: flex-end !important;
  }
}

/* ===== Modern Employee Workspace Dashboard Redesign ===== */
.dash-emp-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 22px;
  align-items: start;
  margin-top: 4px;
}

@media (max-width: 960px) {
  .dash-emp-layout {
    grid-template-columns: 1fr;
  }
}

.dash-emp-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dash-sec-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-sec-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.dash-sec-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-task-modern-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 13px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  transition: all 0.15s ease;
}

.dash-task-modern-item:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}

.dash-punch-modern-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-punch-state-card {
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-punch-state-card.working {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.dash-punch-state-card.paused {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.dash-punch-state-card.completed {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.dash-punch-state-card.not-in {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
}

.dash-btn-checkin {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.28);
  transition: all 0.15s ease;
}

.dash-btn-checkin:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.35);
}

.dash-btn-checkout {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: none;
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.25);
  transition: all 0.15s ease;
}

.dash-btn-checkout:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(239, 68, 68, 0.35);
}

.dash-btn-stepout {
  background: #ffffff;
  color: #0369a1;
  border: 1.5px solid #38bdf8;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.dash-btn-stepout:hover {
  background: #f0f9ff;
  border-color: #0284c7;
}

.dash-btn-resume {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff;
  border: none;
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s ease;
}

.dash-btn-recheckin {
  background: #ffffff;
  color: #2563eb;
  border: 1.5px solid #93c5fd;
  font-size: 13.5px;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all 0.15s ease;
}

.dash-btn-recheckin:hover {
  background: #eff6ff;
  border-color: #2563eb;
}

.dash-shortcuts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dash-shortcut-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.dash-shortcut-chip:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.dash-shortcut-chip i {
  font-size: 14px;
  color: #2563eb;
}

/* Live Task Card Quick Timer Button */
.btn-card-timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}
.btn-card-timer:hover {
  background: #dcfce7;
  border-color: #86efac;
  transform: translateY(-1px);
}
.btn-card-timer.running {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
  animation: timerCardPulse 2s infinite;
}
.btn-card-timer.running:hover {
  background: #fee2e2;
  border-color: #f87171;
}
.card-timer-clock {
  font-family: monospace;
  font-weight: 800;
  font-size: 11px;
}
@keyframes timerCardPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.35); }
  50% { box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15); }
}

/* Error / Bug Screenshot Upload & Preview Styles */
.screenshot-dropzone {
  border: 2px dashed #cbd5e1;
  background: #ffffff;
  border-radius: 10px;
  padding: 16px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.screenshot-dropzone:hover,
.screenshot-dropzone.drag-over {
  border-color: #ef4444;
  background: #fef2f2;
}
.screenshot-dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.dropzone-icon {
  font-size: 26px;
  color: #ef4444;
  margin-bottom: 2px;
}
.dropzone-text {
  font-size: 13px;
  font-weight: 500;
  color: #334155;
}
.dropzone-action {
  font-weight: 700;
  color: #dc2626;
  text-decoration: underline;
}
.dropzone-hint {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 3px;
}
.dropzone-hint kbd {
  background: #e2e8f0;
  color: #1e293b;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10.5px;
  font-family: inherit;
  font-weight: 600;
  border: 1px solid #cbd5e1;
}
.screenshot-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.screenshot-preview-box {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid #cbd5e1;
  max-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.screenshot-preview-box img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
}
.screenshot-preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.screenshot-preview-box:hover .screenshot-preview-overlay {
  opacity: 1;
}
.btn-preview-action {
  background: #ffffff;
  color: #1e293b;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.btn-preview-action:hover {
  transform: translateY(-1px);
}
.btn-preview-action.btn-danger {
  background: #ef4444;
  color: #ffffff;
}
.btn-preview-action.btn-danger:hover {
  background: #dc2626;
}
.screenshot-preview-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #64748b;
  padding: 0 4px;
}
.screenshot-filename {
  font-family: monospace;
  font-size: 11.5px;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 70%;
}
.screenshot-status-badge {
  font-weight: 700;
  color: #16a34a;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ========================================================
   CHAT MODULE V2 ENHANCEMENTS: GROUPS, DIRECTORY & INFO
   ======================================================== */
.chat-hdr-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  background-size: cover;
  background-position: center;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  user-select: none;
  overflow: hidden;
}
.chat-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.chat-header-sub {
  font-size: 12px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}
.chat-modal-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.chat-modal-large {
  max-width: 560px !important;
  width: 95% !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.06) !important;
  padding: 22px 24px 20px 24px !important;
  background: #ffffff !important;
}

.chat-modal-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #eff6ff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  border: 1px solid #dbeafe;
}

.chat-tab-switch {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
}

.chat-tab-btn {
  flex: 1;
  padding: 9px 14px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
}

.chat-tab-btn:hover:not(.active) {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.6);
}

.chat-tab-btn.active {
  background: #ffffff;
  color: #2563eb;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.chat-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  align-items: center;
}

.chat-pill {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.2;
}

.chat-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.chat-pill.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.chat-search-wrap {
  position: relative;
  margin-bottom: 12px;
  width: 100%;
}

.chat-search-wrap i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}

.chat-search-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px 9px 36px;
  font-size: 13px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  outline: none;
  background: #f8fafc;
  color: #0f172a;
  transition: all 0.15s ease;
}

.chat-search-wrap input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.chat-contact-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.chat-contact-list::-webkit-scrollbar {
  width: 5px;
}
.chat-contact-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.chat-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1.5px solid #f1f5f9;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
  width: 100%;
}

.chat-contact-item:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.08);
}

.chat-contact-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  color: #1e293b;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.chat-contact-avatar.avatar-online::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
}

.chat-contact-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chat-contact-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-contact-name {
  font-weight: 600;
  font-size: 13px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-contact-role-badge {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 1.5px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.chat-contact-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #64748b;
  flex-wrap: wrap;
}

.chat-subdept-tag {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #bfdbfe;
}

.chat-skill-tag {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  font-size: 9.5px;
  padding: 0 5px;
  border-radius: 3px;
}

.chat-form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.chat-form-field label {
  font-size: 11.5px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
  color: #475569 !important;
  margin-top: 0 !important;
  display: block !important;
}

.chat-form-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  font-size: 13.5px;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
  border-radius: 9px;
  background: #ffffff;
  outline: none;
  transition: all 0.15s ease;
}

.chat-form-field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.chat-section-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}

/* Explicit override for .modal-box label to fix row layout for member items */
.modal-box label.chat-group-member-check,
label.chat-group-member-check {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 8px 12px !important;
  margin: 0 !important;
  border: 1.5px solid #f1f5f9 !important;
  border-radius: 10px !important;
  background: #ffffff !important;
  cursor: pointer !important;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-sizing: border-box !important;
  user-select: none !important;
  width: 100% !important;
}

.modal-box label.chat-group-member-check:hover,
label.chat-group-member-check:hover {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

.modal-box label.chat-group-member-check:has(input:checked),
label.chat-group-member-check:has(input:checked),
.modal-box label.chat-group-member-check.selected,
label.chat-group-member-check.selected {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.08) !important;
}

.chat-group-member-check input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  accent-color: #2563eb !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  border-radius: 4px !important;
}

#chatGroupSelectedCount {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  font-size: 11.5px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 12px;
}
.chat-group-members-scroll {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}
.chat-member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #f1f5f9;
}
.chat-member-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-member-admin-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  background: #fef3c7;
  color: #b45309;
  padding: 2px 6px;
  border-radius: 4px;
}
.chat-msg-actions-hover {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
}
.chat-msg-info-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 11px;
  opacity: 0.6;
  border-radius: 3px;
  color: inherit;
  transition: opacity 0.15s ease;
}
.chat-msg:hover .chat-msg-info-btn {
  opacity: 1;
}
.chat-msg-info-btn:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.08);
}
.chat-msg.mine .chat-msg-info-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}
.chat-msg-del-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 11px;
  opacity: 0;
  border-radius: 3px;
  color: inherit;
  transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.chat-msg:hover .chat-msg-del-btn {
  opacity: 0.65;
}
.chat-msg-del-btn:hover {
  opacity: 1 !important;
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.12) !important;
}
.chat-msg.mine .chat-msg-del-btn:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #fecaca !important;
}
@media (max-width: 768px) {
  .chat-msg-del-btn {
    opacity: 0.65;
  }
}
.chat-msg-info-preview {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #0284c7;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.chat-msg-info-text {
  font-size: 13px;
  color: #1e293b;
  line-height: 1.45;
  word-break: break-word;
}
.chat-msg-info-time {
  font-size: 11px;
  margin-top: 4px;
}
.chat-info-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  color: #475569;
}
.badge-read {
  background: #e0f2fe;
  color: #0369a1;
}
.chat-info-user-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chat-info-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  font-size: 12.5px;
}
.chat-info-user-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-info-user-time {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
}

/* ==========================================================================
   Holidays & Company Calendar Module
   ========================================================================== */
.holiday-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.holiday-top-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.holiday-year-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 4px 10px;
  color: var(--muted, #64748b);
  font-size: 13px;
}
.holiday-select-input {
  border: none;
  background: transparent;
  color: var(--text, #0f172a);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  outline: none;
  padding: 2px 4px;
}
.holiday-view-toggle {
  display: inline-flex;
  background: var(--bg-alt, #f1f5f9);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
}
.holiday-vt-btn {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted, #64748b);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.holiday-vt-btn.active {
  background: var(--card-bg, #ffffff);
  color: var(--primary, #4f46e5);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.holiday-ctrl-btn {
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* Upcoming Hero Banner */
.holiday-hero-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #4338ca 100%);
  border-radius: 16px;
  padding: 24px 28px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 25px -5px rgba(67, 56, 202, 0.3), 0 8px 10px -6px rgba(67, 56, 202, 0.2);
  position: relative;
  overflow: hidden;
}
.holiday-hero-banner::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}
.holiday-hero-main {
  flex: 1;
  min-width: 280px;
}
.holiday-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a5b4fc;
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.holiday-hero-title {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.25;
}
.holiday-hero-date-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.holiday-hero-date-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}
.holiday-hero-countdown-pill {
  background: #fbbf24;
  color: #78350f;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(251, 191, 36, 0.3);
}
.holiday-hero-lw-pill {
  background: #ec4899;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 6px rgba(236, 72, 153, 0.35);
}
.holiday-hero-desc {
  font-size: 13px;
  color: #e0e7ff;
  line-height: 1.5;
  margin: 0;
  max-width: 650px;
}
.holiday-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  min-width: 240px;
}
.holiday-stat-box {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease;
}
.holiday-stat-box:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}
.holiday-stat-num {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 4px;
}
.holiday-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #c7d2fe;
}

/* Category Filters Bar */
.holiday-filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.holiday-cat-pills {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.holiday-cat-pill {
  border: 1px solid var(--border, #e2e8f0);
  background: var(--card-bg, #ffffff);
  color: var(--muted, #64748b);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.holiday-cat-pill:hover {
  border-color: var(--primary, #4f46e5);
  color: var(--primary, #4f46e5);
}
.holiday-cat-pill.active {
  background: var(--primary, #4f46e5);
  color: #ffffff;
  border-color: var(--primary, #4f46e5);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}
.holiday-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.holiday-search-wrap i {
  position: absolute;
  left: 12px;
  color: var(--muted, #94a3b8);
  font-size: 13px;
  pointer-events: none;
}
.holiday-search-wrap input {
  padding: 7px 12px 7px 34px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 999px;
  background: var(--card-bg, #ffffff);
  color: var(--text, #0f172a);
  font-size: 12.5px;
  width: 230px;
  outline: none;
  transition: all 0.15s ease;
}
.holiday-search-wrap input:focus {
  border-color: var(--primary, #4f46e5);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
  width: 270px;
}

/* Holiday Cards Grid (List View) */
.holiday-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.holiday-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 16px;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.holiday-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}
.holiday-card.is-past {
  opacity: 0.65;
  background: var(--bg-alt, #f8fafc);
}
.holiday-card.is-next {
  border: 2px solid var(--primary, #4f46e5);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.15);
}
.holiday-card.is-next::after {
  content: "NEXT";
  position: absolute;
  top: -9px;
  right: 14px;
  background: var(--primary, #4f46e5);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 999px;
}
.holiday-card-date-box {
  width: 62px;
  height: 68px;
  border-radius: 10px;
  background: var(--bg-alt, #f1f5f9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border, #e2e8f0);
}
.holiday-card.is-next .holiday-card-date-box {
  background: #e0e7ff;
  border-color: #c7d2fe;
}
.holiday-date-month {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary, #4f46e5);
  letter-spacing: 0.05em;
}
.holiday-date-day {
  font-size: 24px;
  font-weight: 800;
  color: var(--text, #0f172a);
  line-height: 1;
  margin: 2px 0;
}
.holiday-date-weekday {
  font-size: 10px;
  color: var(--muted, #64748b);
  font-weight: 600;
}
.holiday-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.holiday-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.holiday-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #0f172a);
  line-height: 1.3;
}
.holiday-card-desc {
  font-size: 12px;
  color: var(--muted, #64748b);
  line-height: 1.4;
  margin: 0 0 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.holiday-card-meta-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.holiday-badge-lw {
  font-size: 10.5px;
  font-weight: 700;
  background: #fdf2f8;
  color: #be185d;
  border: 1px solid #fbcfe8;
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.holiday-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.holiday-icon-btn {
  background: transparent;
  border: none;
  color: var(--muted, #94a3b8);
  font-size: 12px;
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.holiday-icon-btn:hover {
  color: var(--text, #0f172a);
  background: var(--bg-alt, #f1f5f9);
}
.holiday-icon-btn.btn-del:hover {
  color: #dc2626;
  background: #fee2e2;
}

/* Category Badges */
.hol-cat-national {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}
.hol-cat-festival {
  background: #e0e7ff;
  color: #4338ca;
  border: 1px solid #c7d2fe;
}
.hol-cat-company {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.hol-cat-restricted {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

/* Interactive Monthly Calendar View */
.holiday-calendar-view {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  padding: 20px;
}
.holiday-cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
  position: relative;
}
.holiday-cal-month-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  min-width: 180px;
  text-align: center;
}
.holiday-cal-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--bg-alt, #f8fafc);
  color: var(--text, #1e293b);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}
.holiday-cal-nav-btn:hover {
  background: #e2e8f0;
}
.holiday-cal-today-btn {
  position: absolute;
  right: 0;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--card-bg, #ffffff);
  border-radius: 6px;
  cursor: pointer;
}
.holiday-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.holiday-cal-dayname {
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  letter-spacing: 0.05em;
  padding: 6px 0;
}
.holiday-calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.holiday-cal-cell {
  min-height: 95px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  padding: 8px;
  background: var(--card-bg, #ffffff);
  display: flex;
  flex-direction: column;
  transition: all 0.15s ease;
}
.holiday-cal-cell.is-other-month {
  background: var(--bg-alt, #f8fafc);
  opacity: 0.45;
}
.holiday-cal-cell.is-weekend {
  background: #fdfefe;
}
.holiday-cal-cell.is-today {
  border-color: var(--primary, #4f46e5);
  box-shadow: 0 0 0 1px var(--primary, #4f46e5);
}
.holiday-cal-cell.has-holiday {
  background: #f5f3ff;
  border-color: #c7d2fe;
}
.holiday-cal-cell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.holiday-cal-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #1e293b);
}
.holiday-cal-cell.is-today .holiday-cal-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary, #4f46e5);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
}
.holiday-cal-event-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 6px;
  margin-bottom: 4px;
  line-height: 1.25;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.1s ease;
}
.holiday-cal-event-pill:hover {
  transform: scale(1.02);
}

/* Warnings & Notes */
.task-due-holiday-warning {
  margin-top: 6px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  animation: fadeIn 0.2s ease;
}
.leave-protection-info {
  margin-top: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #1e40af;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  animation: fadeIn 0.2s ease;
}

@media (max-width: 860px) {
  .holiday-hero-banner {
    flex-direction: column;
    padding: 20px;
  }
  .holiday-hero-stats {
    width: 100%;
  }
  .holiday-top-controls {
    width: 100%;
    justify-content: flex-start;
  }
  .holiday-calendar-days-grid, .holiday-calendar-grid {
    gap: 4px;
  }
  .holiday-cal-cell {
    min-height: 65px;
    padding: 4px;
  }
}

/* ==========================================================================
   MODULE 4: NOTICE BOARD (EXECUTIVE BULLETIN BOARD)
   ========================================================================== */

/* Celebrations Banner Strip */
.notice-celebration-strip {
  background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 50%, #eff6ff 100%);
  border: 1px solid #f0abfc;
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 4px rgba(240, 171, 252, 0.15);
}
.celebration-strip-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #86198f;
  white-space: nowrap;
}
.celebration-strip-items {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.celebration-chip {
  background: #ffffff;
  border: 1px solid #f5d0fe;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  color: #701a75;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* Notice Board Toolbar */
.notice-board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.notice-board-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.notice-tab-btn {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  color: var(--text-muted, #475569);
  border-radius: 8px;
  padding: 7px 15px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.notice-tab-btn:hover {
  background: #f8fafc;
  color: var(--text, #0f172a);
}
.notice-tab-btn.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}
.notice-board-search {
  position: relative;
  min-width: 280px;
}
.notice-board-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
}
.notice-board-search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg-card, #ffffff);
  color: var(--text, #0f172a);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.notice-board-search input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Featured Pinned Announcement Card */
.pinned-notice-slot {
  margin-bottom: 16px;
}
.pinned-bulletin-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 40%, #ffffff 100%);
  border: 1.5px solid #fcd34d;
  border-radius: 14px;
  padding: 22px 26px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
  position: relative;
}
.pinned-badge-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #b45309;
  background: #fde68a;
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}
.pinned-bulletin-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 10px 0;
  line-height: 1.35;
}
.pinned-bulletin-body {
  font-size: 14px;
  color: #334155;
  line-height: 1.65;
  white-space: pre-line;
  margin-bottom: 16px;
}

/* Announcements Grid & Cards */
.notice-board-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 680px) {
  .notice-board-cards-grid {
    grid-template-columns: 1fr;
  }
}
.notice-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.notice-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.06);
  transform: translateY(-1px);
}
.notice-card.urgent {
  border-left: 4px solid #ef4444;
  background: linear-gradient(180deg, #fff5f5 0%, var(--bg-card, #ffffff) 60px);
}
.notice-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.notice-card-author-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}
.notice-card-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  font-weight: 700;
  border: 1px solid #bfdbfe;
  flex-shrink: 0;
}
.notice-card-author-meta {
  display: flex;
  flex-direction: column;
}
.notice-card-author-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text, #0f172a);
}
.notice-card-timestamp {
  font-size: 11.5px;
  color: var(--muted, #64748b);
}
.notice-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.notice-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
}
.notice-badge.urgent { background: #fee2e2; color: #dc2626; }
.notice-badge.important { background: #fef3c7; color: #b45309; }
.notice-badge.pinned { background: #fae8ff; color: #86198f; }
.notice-badge.cat { background: #f1f5f9; color: #475569; }

.notice-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text, #0f172a);
  margin: 0 0 8px 0;
  line-height: 1.35;
}
.notice-card-body {
  font-size: 13.5px;
  color: var(--text-muted, #334155);
  line-height: 1.6;
  white-space: pre-line;
  flex: 1;
  margin-bottom: 16px;
}
.notice-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border, #f1f5f9);
  gap: 10px;
  flex-wrap: wrap;
}
.notice-target-pill {
  font-size: 11.5px;
  color: var(--muted, #64748b);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.notice-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-ack {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 7px 15px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}
.btn-ack:hover {
  background: #1d4ed8;
}
.btn-ack.is-read {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  box-shadow: none;
  cursor: default;
}


/* ==========================================================================
   MODULE 6: KNOWLEDGE BASE & SOPS (EXPANDABLE ACCORDION FAQ STYLE)
   ========================================================================== */
.wiki-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.wiki-search-box {
  position: relative;
  width: 100%;
}
.wiki-search-box i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #6366f1;
  font-size: 15px;
}
.wiki-search-box input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1.5px solid var(--border, #cbd5e1);
  border-radius: 10px;
  font-size: 14px;
  background: var(--bg-card, #ffffff);
  color: var(--text, #0f172a);
  box-sizing: border-box;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.wiki-search-box input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.wiki-filter-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wiki-pill {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  color: var(--text-muted, #475569);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.wiki-pill:hover {
  background: #f8fafc;
  color: var(--text, #0f172a);
}
.wiki-pill.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

/* Accordion Container & Cards */
.wiki-accordion-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wiki-acc-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.wiki-acc-card:hover {
  border-color: #a5b4fc;
  box-shadow: 0 3px 10px rgba(0,0,0,0.04);
}
.wiki-acc-card.open {
  border-color: #6366f1;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.08);
}
.wiki-acc-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  user-select: none;
  background: var(--bg-card, #ffffff);
  transition: background 0.15s ease;
}
.wiki-acc-header:hover {
  background: #f8fafc;
}
.wiki-acc-card.open .wiki-acc-header {
  background: #fcfdff;
}
.wiki-acc-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}
.wiki-acc-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.wiki-acc-icon.app_guide { background: #eff6ff; color: #2563eb; }
.wiki-acc-icon.attendance { background: #ecfdf5; color: #059669; }
.wiki-acc-icon.engineering { background: #f5f3ff; color: #7c3aed; }
.wiki-acc-icon.policies { background: #fffbeb; color: #d97706; }
.wiki-acc-icon.documents { background: #e0e7ff; color: #4338ca; }
.wiki-acc-icon.security { background: #fff1f2; color: #e11d48; }
.wiki-acc-icon.onboarding { background: #cffafe; color: #0891b2; }

.wiki-acc-info {
  flex: 1;
  min-width: 0;
}
.wiki-acc-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.wiki-acc-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #0f172a);
  margin: 0;
}
.wiki-acc-cat-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: capitalize;
}
.wiki-acc-cat-pill.app_guide { background: #dbeafe; color: #1d4ed8; }
.wiki-acc-cat-pill.attendance { background: #d1fae5; color: #047857; }
.wiki-acc-cat-pill.engineering { background: #ede9fe; color: #6d28d9; }
.wiki-acc-cat-pill.policies { background: #fef3c7; color: #b45309; }
.wiki-acc-cat-pill.marketing { background: #ffedd5; color: #c2410c; }
.wiki-acc-cat-pill.management { background: #f3e8ff; color: #7e22ce; }
.wiki-acc-cat-pill.documents { background: #e0e7ff; color: #3730a3; }
.wiki-acc-cat-pill.security { background: #ffe4e6; color: #be123c; }
.wiki-acc-cat-pill.onboarding { background: #cffafe; color: #0e7490; }

.wiki-acc-audience-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.wiki-acc-audience-pill.audience-all { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.wiki-acc-audience-pill.audience-dev { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }
.wiki-acc-audience-pill.audience-marketing { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }
.wiki-acc-audience-pill.audience-management { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }
.wiki-acc-audience-pill.audience-hr { background: #fce7f3; color: #be185d; border: 1px solid #fbcfe8; }
.wiki-acc-audience-pill.audience-design { background: #ccfbf1; color: #0f766e; border: 1px solid #99f6e4; }

.wiki-acc-preview {
  font-size: 12.5px;
  color: var(--text-muted, #64748b);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wiki-acc-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted, #94a3b8);
}
.wiki-acc-chevron {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  background: #f1f5f9;
  font-size: 12px;
  transition: transform 0.25s ease, background 0.15s ease, color 0.15s ease;
}
.wiki-acc-card.open .wiki-acc-chevron {
  transform: rotate(180deg);
  background: #6366f1;
  color: #ffffff;
}

/* Accordion Body & SOP Content */
.wiki-acc-body {
  display: none;
  padding: 22px 26px 26px;
  border-top: 1px solid var(--border, #f1f5f9);
  background: #ffffff;
  animation: fadeIn 0.2s ease;
}
.wiki-acc-card.open .wiki-acc-body {
  display: block;
}
.wiki-acc-summary-box {
  background: #f8fafc;
  border-left: 3px solid #6366f1;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 13.5px;
  color: #334155;
  line-height: 1.6;
  margin-bottom: 20px;
}
.wiki-acc-content {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text, #1e293b);
}
.wiki-acc-content h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 22px 0 8px 0;
}
.wiki-acc-content ul, .wiki-acc-content ol {
  padding-left: 20px;
  margin: 8px 0 16px 0;
}
.wiki-acc-content li {
  margin-bottom: 6px;
}
.wiki-acc-content code {
  background: #f1f5f9;
  color: #be185d;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.wiki-acc-content pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 14px 18px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13px;
  margin: 12px 0 18px 0;
}
.wiki-acc-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}
.wiki-acc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--border, #f1f5f9);
  gap: 12px;
  flex-wrap: wrap;
}
.wiki-acc-footer-meta {
  font-size: 12px;
  color: var(--muted, #94a3b8);
}
.wiki-acc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== Geofence Location Verification Modal ===== */
.geofence-modal-box {
  width: 460px;
  max-width: 94vw;
  padding: 28px 24px 24px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
  text-align: center;
  position: relative;
}
.geofence-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 6px;
}
.geofence-header .modal-close-btn {
  position: absolute;
  top: -8px;
  right: -4px;
}
.geofence-radar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}
.geofence-radar-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.12);
  border: 1.5px solid rgba(239, 68, 68, 0.25);
  animation: geofencePulse 2s infinite ease-out;
}
@keyframes geofencePulse {
  0% { transform: scale(0.7); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}
.geofence-radar-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.35);
  position: relative;
  z-index: 1;
}
.geofence-title {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  margin: 8px 0 4px;
  letter-spacing: -0.02em;
}
.geofence-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}
.geofence-distance-card {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.geofence-dist-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 14px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.geofence-distance-rule {
  font-size: 12.5px;
  color: #7f1d1d;
  line-height: 1.45;
}
.geofence-office-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  text-align: left;
  margin-bottom: 12px;
}
.geofence-office-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 3px;
}
.geofence-office-address {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}
.geofence-office-address i {
  color: #2563eb;
  margin-top: 2px;
  flex-shrink: 0;
}
.geofence-security-notice {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 18px;
}
.geofence-security-notice i {
  color: #10b981;
}
.geofence-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.geofence-actions button {
  flex: 1;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
}

/* ==========================================================================
   Modern Employee / Person Modal Redesign
   ========================================================================== */
.employee-modal-box {
  width: 720px !important;
  max-width: 95vw !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3) !important;
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
}

.employee-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.employee-modal-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.employee-modal-header-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
  color: #0284c7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
  flex-shrink: 0;
}

.employee-modal-header-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.employee-modal-header-subtitle {
  font-size: 12px;
  color: #64748b;
  margin-top: 3px;
  font-weight: 400;
}

.employee-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #f8fafc;
  flex: 1;
}

.emp-card-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.emp-card-section:hover {
  border-color: #cbd5e1;
}

.emp-card-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 8px;
}

.emp-card-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.emp-card-section-title i {
  color: #0284c7;
  font-size: 13.5px;
}

.emp-card-section-desc {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
}

.emp-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.emp-field-group label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
}

.emp-field-group label .required-star {
  color: #ef4444;
  font-weight: 700;
}

.emp-field-group label .opt-hint {
  font-size: 11px;
  font-weight: 400;
  color: #94a3b8;
  margin-left: auto;
}

.emp-input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.emp-input-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  font-size: 13.5px;
  pointer-events: none;
  z-index: 2;
  transition: color 0.15s ease;
}

.emp-input-with-icon:focus-within .emp-input-icon {
  color: #0284c7;
}

.emp-input-with-icon input,
.emp-input-with-icon select {
  padding-left: 36px !important;
  height: 42px !important;
  box-sizing: border-box !important;
  font-size: 13.5px !important;
  border-radius: 9px !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #ffffff !important;
  color: #0f172a !important;
  width: 100% !important;
}

.emp-input-with-icon input:focus,
.emp-input-with-icon select:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

.emp-field-group textarea {
  border-radius: 9px !important;
  border: 1.5px solid #e2e8f0 !important;
  font-size: 13.5px !important;
  padding: 10px 12px !important;
  line-height: 1.5 !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.emp-field-group textarea:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
  outline: none !important;
}

.employee-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .employee-modal-box {
    width: 96vw !important;
    max-height: 92vh !important;
    border-radius: 14px !important;
  }
  .emp-card-section .row-2 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .employee-modal-header {
    padding: 14px 16px !important;
  }
  .employee-modal-body {
    padding: 14px 16px !important;
    gap: 12px !important;
  }
  .emp-card-section {
    padding: 14px !important;
  }
  .employee-modal-footer {
    padding: 12px 16px !important;
  }
}

/* ==========================================================================
   MOBILE ISOLATION — GUARANTEE ZERO LEAK ON DESKTOP (Screens > 768px only)
   ========================================================================== */
@media (min-width: 769px) {
  #mobileAppHeader,
  #mobileBottomNav,
  #mobileMoreDrawerOverlay,
  #mobileMoreDrawer,
  #mobileInstallCard,
  #mobilePtrIndicator,
  #btnMobileChatBack {
    display: none !important;
  }
}

/* ==========================================================================
   MY PROFILE MODULE — MODERN ENTERPRISE UI
   ========================================================================== */
.profile-page-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 0 40px 0;
}

.profile-header-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.25);
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 16px;
}

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

.profile-header-badge-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #60a5fa;
  flex-shrink: 0;
}

.profile-header-banner h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.profile-header-banner p {
  margin: 4px 0 0 0;
  font-size: 13.5px;
  color: #94a3b8;
}

.profile-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-layout-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  min-width: 0;
}

.profile-main-content {
  min-width: 0;
}

/* Identity Card (Left) */
.profile-identity-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 2px 8px -1px rgba(0, 0, 0, 0.05);
  padding: 26px 22px;
  text-align: center;
  position: sticky;
  top: 24px;
}

.profile-avatar-wrap {
  position: relative;
  display: inline-block;
  margin: 0 auto 14px auto;
}

.profile-avatar-large {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.profile-avatar-change-btn {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
  border: 2.5px solid #ffffff;
  transition: transform 0.15s ease, background 0.15s;
}

.profile-avatar-change-btn:hover {
  transform: scale(1.08);
  background: #1d4ed8;
}

.profile-user-name {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 6px 0;
  letter-spacing: -0.2px;
}

.profile-user-empno {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: monospace;
  font-size: 12.5px;
  font-weight: 700;
  background: #f1f5f9;
  color: #1e293b;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  margin-bottom: 12px;
  transition: background 0.15s;
}

.profile-user-empno:hover {
  background: #e2e8f0;
}

.profile-badge-tags {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.profile-tag {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
}

.profile-tag.role-tag {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.profile-tag.dept-tag {
  background: #f5f3ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
}

.profile-active-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #15803d;
  background: #dcfce7;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #86efac;
}

.pulse-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 6px #16a34a;
}

.profile-card-divider {
  border: 0;
  height: 1px;
  background: #f1f5f9;
  margin: 18px 0;
}

.profile-contact-list {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.profile-contact-item .contact-ico {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.profile-contact-item .contact-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-contact-item .contact-lbl {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 2px;
}

.profile-contact-item .contact-val {
  font-size: 13px;
  color: #0f172a;
  font-weight: 600;
  word-break: break-word;
}

.profile-card-cta-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-side-btn {
  width: 100%;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.profile-side-btn.primary {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.profile-side-btn.primary:hover {
  background: #dbeafe;
}

.profile-side-btn.secondary {
  background: #f8fafc;
  color: #334155;
  border-color: #e2e8f0;
}
.profile-side-btn.secondary:hover {
  background: #f1f5f9;
}

/* Right Column / Subtabs */
.profile-tab-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 20px;
  overflow-x: auto;
}

.profile-nav-btn {
  padding: 10px 18px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.15s ease;
  margin-bottom: -2px;
}

.profile-nav-btn:hover {
  color: #1e293b;
}

.profile-nav-btn.active {
  color: #2563eb;
  border-bottom-color: #2563eb;
  background: rgba(37, 99, 235, 0.04);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.profile-subtab-panel {
  display: none;
}
.profile-subtab-panel.active {
  display: block;
}

.profile-section-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  padding: 22px 24px;
  margin-bottom: 20px;
}

.profile-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-admin-badge {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

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

.profile-kv-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pkv-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  font-weight: 600;
}

.pkv-value {
  font-size: 13.5px;
  color: #0f172a;
}
.pkv-value.highlight {
  font-family: monospace;
  font-weight: 700;
  color: #2563eb;
}

/* Forms */
.profile-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.profile-form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.profile-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-input-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.profile-input-group .req {
  color: #dc2626;
}

.profile-input-group .input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.profile-input-group .input-ico {
  position: absolute;
  left: 12px;
  font-size: 14px;
  color: #94a3b8;
  pointer-events: none;
}

.profile-input-group input,
.profile-input-group select,
.profile-input-group textarea {
  width: 100%;
  padding: 9px 12px 9px 36px;
  font-size: 13.5px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.profile-input-group textarea {
  padding: 10px 12px;
  resize: vertical;
}

.profile-input-group input:focus,
.profile-input-group select:focus,
.profile-input-group textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.profile-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Stat cards grid */
.profile-stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
}

.profile-stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

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

.profile-stat-card .stat-lbl {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.profile-stat-card .stat-ico {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.profile-stat-card .stat-val {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.1;
}

.profile-stat-card .stat-unit {
  font-size: 13px;
  font-weight: 500;
  color: #94a3b8;
}

.profile-stat-card .stat-sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 4px;
}

/* Tables */
.profile-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.profile-table th {
  text-align: left;
  padding: 10px 14px;
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e2e8f0;
}

.profile-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.profile-table tr:hover td {
  background: #f8fafc;
}

.profile-empty-state {
  text-align: center;
  padding: 36px 16px;
  color: #64748b;
  font-size: 13.5px;
}

@media (max-width: 900px) {
  .profile-layout-grid {
    grid-template-columns: 1fr;
  }
  .profile-identity-card {
    position: static;
  }
  .profile-form-grid-2,
  .profile-form-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ================= Employee Progress Matrix & AI Digest ================= */
#tab-tasks.task-matrix-active #taskSummaryBar,
#tab-tasks.task-matrix-active .task-toolbar-row-filters,
#tab-tasks.task-matrix-active .task-toolbar-actions > .btn-filter-pill {
  display: none !important;
}

#tab-tasks.task-matrix-active .task-toolbar-box {
  margin-bottom: 14px;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.task-matrix-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.matrix-dept-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
}

.matrix-dept-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.matrix-dept-pill:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.matrix-dept-pill.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.matrix-kpi-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.matrix-kpi-chip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.matrix-kpi-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.06);
}

.matrix-kpi-info .val {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.matrix-kpi-info .lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.matrix-kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.matrix-kpi-icon.blue { background: #eff6ff; color: #2563eb; }
.matrix-kpi-icon.green { background: #dcfce7; color: #16a34a; }
.matrix-kpi-icon.amber { background: #fef3c7; color: #d97706; }
.matrix-kpi-icon.red { background: #fee2e2; color: #dc2626; }
.matrix-kpi-icon.purple { background: #f3e8ff; color: #9333ea; }

/* AI Digest Card */
.ai-digest-banner {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
  border-left: 4px solid #7c3aed;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.ai-digest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ai-digest-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e1b4b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-digest-sparkle {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: #ffffff;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ai-digest-bullets {
  margin: 0;
  padding-left: 18px;
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
}

/* Members Matrix Grid */
.matrix-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}

.matrix-member-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
  transition: all 0.2s ease;
}

.matrix-member-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

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

.matrix-member-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}

.matrix-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.matrix-live-badge.active {
  background: #ecfdf5;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.matrix-live-badge.idle {
  background: #fefce8;
  color: #a16207;
  border: 1px solid #fef08a;
}

.matrix-live-badge.blocked {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  animation: pulse 2s infinite;
}

.matrix-live-badge.paused {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.matrix-live-badge.offline {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.matrix-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.matrix-live-badge.active .matrix-pulse-dot {
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.matrix-live-badge.blocked .matrix-pulse-dot {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}

.matrix-live-badge.idle .matrix-pulse-dot {
  background: #eab308;
}

.matrix-live-badge.offline .matrix-pulse-dot {
  background: #94a3b8;
}

.matrix-multi-bar {
  display: flex;
  height: 7px;
  border-radius: 6px;
  overflow: hidden;
  background: #e2e8f0;
  width: 100%;
}

.matrix-multi-seg.done { background: #16a34a; }
.matrix-multi-seg.review { background: #8b5cf6; }
.matrix-multi-seg.inprogress { background: #3b82f6; }
.matrix-multi-seg.overdue { background: #ef4444; }

.matrix-metric-pill {
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.matrix-metric-pill b {
  color: #0f172a;
}

/* ================= Proof of Work Image Upload & Paste ================= */
.pow-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 14px 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
}

.pow-dropzone:hover,
.pow-dropzone:focus-visible {
  border-color: #3b82f6;
  background: #eff6ff;
}

.pow-dropzone.dragover {
  border-color: #16a34a;
  background: #f0fdf4;
  transform: scale(1.01);
}

.pow-dropzone-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.pow-dropzone-icon {
  font-size: 24px;
  color: #3b82f6;
  margin-bottom: 2px;
}

.pow-dropzone-title {
  font-size: 13px;
  color: #334155;
  font-weight: 500;
}

.pow-dropzone-title span {
  color: #2563eb;
  font-weight: 700;
  text-decoration: underline;
}

.pow-dropzone-hint {
  font-size: 11px;
  color: #94a3b8;
}

.pow-preview-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 12px;
  text-align: left;
}

.pow-preview-thumb-wrap {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pow-preview-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pow-preview-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pow-preview-title {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pow-preview-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.pow-btn-remove {
  background: #fee2e2;
  color: #dc2626;
  border: none;
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.15s ease;
}

.pow-btn-remove:hover {
  background: #fecaca;
  color: #b91c1c;
}

/* ================= Bulk Task Import Styles ================= */
.bulk-table-row {
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.bulk-table-row:hover {
  background: #f8fafc;
}

.bulk-table-row.has-error {
  background: #fff5f5;
}

.bulk-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}

.bulk-status-badge.valid {
  background: #ecfdf5;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.bulk-status-badge.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* ==========================================================================
   ENHANCED LEAVE MANAGEMENT & QUOTA MODULE (ZOHO PEOPLE STYLE)
   ========================================================================== */

/* Top Summary Grid (Zoho People Screenshot 1 & 2) */
.leave-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.leave-summary-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}

.leave-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

.leave-summary-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.leave-card-casual::before { background: #0284c7; }
.leave-card-sick::before { background: #e11d48; }
.leave-card-emergency::before { background: #ea580c; }
.leave-card-permission::before { background: #8b5cf6; }
.leave-card-lop::before { background: #64748b; }

.leave-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.leave-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
}

.leave-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.leave-card-casual .leave-card-icon { background: #e0f2fe; color: #0284c7; }
.leave-card-sick .leave-card-icon { background: #ffe4e6; color: #e11d48; }
.leave-card-emergency .leave-card-icon { background: #ffedd5; color: #ea580c; }
.leave-card-permission .leave-card-icon { background: #ede9fe; color: #8b5cf6; }
.leave-card-lop .leave-card-icon { background: #f1f5f9; color: #64748b; }

.leave-card-body {
  margin-bottom: 14px;
}

.leave-card-stat {
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.leave-card-stat small {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.leave-card-sub {
  font-size: 12px;
  color: #64748b;
  margin-top: 4px;
}

.btn-quick-apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
}

.btn-quick-apply:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* Modal Request Type Grid */
.leave-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

@media (max-width: 600px) {
  .leave-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.leave-type-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  user-select: none;
}

.leave-type-card:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.leave-type-card.selected {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 0 0 1px #0284c7;
}

.leave-type-card.selected.type-emergency {
  border-color: #ea580c;
  background: #fff7ed;
  box-shadow: 0 0 0 1px #ea580c;
}

.leave-type-card.selected.type-sick {
  border-color: #e11d48;
  background: #fff1f2;
  box-shadow: 0 0 0 1px #e11d48;
}

.leave-type-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.leave-type-top i {
  font-size: 16px;
}

.type-casual-icon { color: #0284c7; }
.type-sick-icon { color: #e11d48; }
.type-emergency-icon { color: #ea580c; }
.type-half_day-icon { color: #f59e0b; }
.type-permission-icon { color: #8b5cf6; }
.type-unpaid-icon { color: #64748b; }

.leave-type-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2px;
}

.leave-type-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
}

.leave-type-pill.urgent {
  background: #ffedd5;
  color: #c2410c;
}

.leave-type-pill.lop {
  background: #fee2e2;
  color: #991b1b;
}

/* Callout Alert Banners in Modal */
.leave-lop-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #991b1b;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.2s ease;
}

.leave-emergency-alert {
  background: #fff7ed;
  border: 1px solid #ffedd5;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #c2410c;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeIn 0.2s ease;
}

/* Reason Quick Tags Chips */
.leave-reason-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px 0;
}

.btn-reason-chip {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-reason-chip:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
}

.btn-reason-chip i {
  font-size: 10px;
  color: #64748b;
}

/* Approval Route Notice */
.leave-approval-route-preview {
  margin-top: 12px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  font-size: 11.5px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 8px;
}

.leave-approval-route-preview i {
  color: #0284c7;
}

/* Sub Navigation for Leaves Tab (Zoho People Tab Style) */
.leave-tab-subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 8px;
}

.leave-nav-pill {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  border-radius: 20px;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.leave-nav-pill:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.leave-nav-pill.active {
  color: #0284c7;
  background: #e0f2fe;
  border-color: #bae6fd;
}

/* Zoho Team Matrix Table (Screenshot 3) */
.team-matrix-table th {
  text-align: center;
}

.team-matrix-table th.matrix-group-paid {
  background: #eff6ff;
  color: #1e40af;
  border-bottom: 2px solid #bfdbfe;
}

.team-matrix-table th.matrix-group-unpaid {
  background: #fef2f2;
  color: #991b1b;
  border-bottom: 2px solid #fecaca;
}

.matrix-emp-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.matrix-emp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.matrix-balance-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}

.matrix-balance-badge.ok {
  background: #ecfdf5;
  color: #047857;
}

.matrix-balance-badge.warn {
  background: #fffbeb;
  color: #b45309;
}

.matrix-balance-badge.danger {
  background: #fef2f2;
  color: #b91c1c;
}

/* ==========================================================================
   MODERN PERMISSION TIME RANGE COMPONENT
   ========================================================================== */
.perm-time-card {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  transition: border-color 0.15s ease;
}

.perm-time-card:focus-within {
  border-color: #8b5cf6;
  background: #ffffff;
}

.perm-time-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.perm-time-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.perm-time-box label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.perm-time-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.perm-time-input-wrap i {
  position: absolute;
  left: 10px;
  color: #8b5cf6;
  font-size: 14px;
  pointer-events: none;
}

.perm-time-input {
  width: 100%;
  padding: 8px 10px 8px 32px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  outline: none;
  transition: all 0.15s ease;
}

.perm-time-input:focus {
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12) !important;
}

.perm-time-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ede9fe;
  color: #7c3aed;
  font-size: 12px;
  margin-top: 18px;
}

.perm-duration-bar {
  margin-top: 12px;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.perm-duration-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.perm-duration-pill {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  background: #ede9fe;
  color: #6d28d9;
}

.perm-duration-pill.warn {
  background: #fef3c7;
  color: #b45309;
}

.perm-duration-pill.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.perm-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.btn-perm-slot {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-perm-slot:hover {
  background: #ede9fe;
  color: #6d28d9;
  border-color: #c4b5fd;
}


@keyframes shakeHighlight {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.shake-highlight {
  animation: shakeHighlight 0.5s ease-in-out;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35) !important;
}











