/* ============================================================
   COMPONENTS – Buttons, Cards, Forms, Tables, Badges, Modals
   ============================================================ */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 1.14rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
  line-height: 1.4;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(140deg, var(--primary), #2a85ff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 20px rgba(15, 95, 214, 0.22);
}
.btn-primary:hover {
  background: linear-gradient(140deg, var(--primary-dark), var(--primary));
  border-color: transparent;
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.btn-success:hover {
  background: #15803d;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover {
  background: #b91c1c;
}

.btn-warning {
  background: var(--warning);
  color: #fff;
  border-color: var(--warning);
}
.btn-warning:hover {
  background: #b45309;
}

.btn-outline {
  background: #fff;
  color: var(--text-2);
  border-color: var(--border-dark);
}
.btn-outline:hover {
  background: var(--bg);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--bg);
}

.btn-sm {
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
}
.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn:disabled,
.btn.loading {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Card ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card-title {
  font-size: 1rem;
  font-weight: 600;
}
.card-body {
  padding: 1.35rem;
}
.card-footer {
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ── Stat Cards (Dashboard) ── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  box-shadow: var(--shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: #c4d6ea;
  box-shadow: var(--shadow-md);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.stat-icon.blue {
  background: var(--primary-light);
  color: var(--primary);
}
.stat-icon.green {
  background: var(--success-light);
  color: var(--success);
}
.stat-icon.yellow {
  background: var(--warning-light);
  color: var(--warning);
}
.stat-icon.red {
  background: var(--danger-light);
  color: var(--danger);
}
.stat-icon.cyan {
  background: var(--info-light);
  color: var(--info);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-2);
  font-weight: 500;
}
.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0.15rem 0;
}
.stat-change {
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.stat-change.up {
  color: var(--success);
}
.stat-change.down {
  color: var(--danger);
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}
.badge-success {
  background: var(--success-light);
  color: var(--success);
}
.badge-warning {
  background: var(--warning-light);
  color: var(--warning);
}
.badge-danger {
  background: var(--danger-light);
  color: var(--danger);
}
.badge-info {
  background: var(--info-light);
  color: var(--info);
}
.badge-neutral {
  background: var(--bg);
  color: var(--text-2);
  border: 1px solid var(--border);
}

/* ── Table ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 0.875rem;
}
thead th {
  padding: 0.65rem 0.75rem;
  text-align: left;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--bg);
}
tbody td {
  padding: 0.75rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
  white-space: nowrap;
  font-size: 0.855rem;
}
tbody td.td-wrap {
  white-space: normal;
}
tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover {
  background: #f8fbff;
}

.table-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.action-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-size: 0.78rem;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s,
    transform 0.15s;
}
.action-btn:hover {
  transform: translateY(-1px);
}
.action-btn:hover.view {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}
.action-btn:hover.edit {
  background: var(--warning-light);
  color: var(--warning);
  border-color: var(--warning);
}
.action-btn.delete,
.action-btn.danger {
  background: linear-gradient(180deg, #fff7f7, #ffecec);
  border-color: #f2b7b7;
  color: #b22222;
  box-shadow: 0 2px 6px rgba(210, 45, 45, 0.12);
}
.action-btn.delete i,
.action-btn.danger i {
  font-size: 0.95rem;
  font-weight: 900;
}
.action-btn:hover.delete {
  background: linear-gradient(150deg, #d22d2d, #b91c1c);
  color: #fff;
  border-color: #a01515;
  box-shadow: 0 8px 14px rgba(185, 28, 28, 0.28);
}
.action-btn:hover.danger {
  background: linear-gradient(150deg, #d22d2d, #b91c1c);
  color: #fff;
  border-color: #a01515;
  box-shadow: 0 8px 14px rgba(185, 28, 28, 0.28);
}
.action-btn.delete:active,
.action-btn.danger:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(185, 28, 28, 0.24);
}
.action-btn:hover {
  background: var(--bg);
}

/* ── Employee Avatar ── */
.emp-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.emp-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.emp-avatar.green {
  background: var(--success);
}
.emp-avatar.orange {
  background: var(--warning);
}
.emp-avatar.red {
  background: var(--danger);
}
.emp-avatar.cyan {
  background: var(--info);
}
.emp-name {
  font-weight: 600;
  font-size: 0.875rem;
}
.emp-email {
  font-size: 0.78rem;
  color: var(--text-3);
}

/* ── Table cell helpers ── */
.cell-id {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.1rem 0.45rem;
  color: var(--text-2);
  letter-spacing: 0.02em;
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.cell-sub {
  font-size: 0.82rem;
  color: var(--text-2);
}
.cell-label {
  font-size: 0.72rem;
  color: var(--text-3);
}
.cell-warning {
  color: var(--warning);
  font-weight: 600;
}
.cell-success {
  color: var(--success);
  font-weight: 600;
}
.cell-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}
.cell-meta {
  font-size: 0.78rem;
  color: var(--text-3);
}
.card-header .cell-title,
.card-header .cell-meta {
  color: inherit;
}

/* ── Forms ── */
.form-group {
  margin-bottom: 1.2rem;
}
.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 0.46rem;
}
.form-label .req {
  color: var(--danger);
  margin-left: 0.2rem;
}

.form-control {
  width: 100%;
  min-height: 44px;
  padding: 0.64rem 0.9rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text);
  background: #fbfdff;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: var(--shadow-focus);
}
.form-control::placeholder {
  color: var(--text-3);
}
.form-control.error {
  border-color: var(--danger);
}
.form-control:disabled {
  background: var(--bg);
  cursor: not-allowed;
}

.form-error {
  font-size: 0.78rem;
  color: var(--danger);
  margin-top: 0.3rem;
}
.form-hint {
  font-size: 0.78rem;
  color: var(--text-3);
  margin-top: 0.3rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 700px) {
  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}

/* ── Layout utilities ── */
.btn-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}
.mb-0 { margin-bottom: 0 !important; }

/* ── Search + Filter bar ── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
}
.search-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: 0 0.82rem;
  gap: 0.5rem;
  min-width: 220px;
  box-shadow: 0 1px 0 rgba(15, 50, 99, 0.04);
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}
.search-box input {
  border: none;
  outline: none;
  padding: 0.55rem 0;
  font-size: 0.875rem;
  background: transparent;
  color: var(--text);
  width: 100%;
}
.search-icon {
  color: var(--text-3);
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ── Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(12, 23, 38, 0.52);
  /* backdrop-filter removed — causes GPU lag on modal open */
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.14s ease,
    visibility 0.14s ease;
  will-change: opacity;
}
.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transform: translateY(-8px);
  transition: transform 0.14s ease;
  will-change: transform;
}
.modal-backdrop.open .modal {
  transform: translateY(0);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text-3);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition:
    background 0.15s,
    color 0.15s;
}
.modal-close:hover {
  background: #edf4ff;
  color: var(--text);
}
.modal-body {
  padding: 1.5rem;
}
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ── Alert ── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  border: 1px solid transparent;
  box-shadow: 0 3px 10px rgba(15, 50, 99, 0.06);
}
.alert-success {
  background: var(--success-light);
  color: var(--success);
  border-color: #bbf7d0;
}
.alert-danger {
  background: var(--danger-light);
  color: var(--danger);
  border-color: #fecaca;
}
.alert-warning {
  background: var(--warning-light);
  color: var(--warning);
  border-color: #fde68a;
}
.alert-info {
  background: var(--info-light);
  color: var(--info);
  border-color: #a5f3fc;
}

/* ── Toast ── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 999;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  background: var(--text);
  color: #fff;
  border-radius: 14px;
  font-size: 0.875rem;
  box-shadow: var(--shadow-md);
  min-width: 260px;
  max-width: 380px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  animation: slideUp 0.24s ease;
}
.toast.success {
  background: var(--success);
}
.toast.error {
  background: var(--danger);
}
.toast.warning {
  background: var(--warning);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Loading states ── */
.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-3);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-3);
  gap: 0.75rem;
}
.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #edf4ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
}
.empty-state h3 {
  color: var(--text-2);
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.825rem;
  color: var(--text-2);
  flex-wrap: wrap;
  gap: 0.75rem;
}
.pagination-btns {
  display: flex;
  gap: 0.4rem;
}
.page-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.825rem;
  color: var(--text-2);
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s,
    transform 0.15s;
}
.page-btn:hover {
  background: #edf4ff;
  color: var(--primary);
  transform: translateY(-1px);
}
.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
}
.tab-item {
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition:
    color 0.15s,
    border-color 0.15s;
  white-space: nowrap;
}

.btn i,
.action-btn i,
.topbar-btn i,
.nav-icon i,
.search-icon i,
.modal-title i,
.empty-state-icon i,
.login-logo-icon i {
  line-height: 1;
}
.tab-item:hover {
  color: var(--text);
}
.tab-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ── Dropdown ── */
.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 180px;
  z-index: 150;
  overflow: hidden;
  display: none;
}
.dropdown-menu.open {
  display: block;
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s;
}

/* ── Notification Bell ──────────────────────────────────────
   Used in the topbar for employee portal real-time notifications.
   Bell is injected by UI.renderLayout() and activated by
   _initNotificationBell() inside components.js.
──────────────────────────────────────────────────────────── */
.notif-bell { position: relative; }

.notif-btn  { position: relative; }

.notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--danger, #dc2626);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
  line-height: 1;
}

.notif-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 320px;
  background: var(--surface, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.13);
  z-index: 1001;
  display: none;
  flex-direction: column;
  max-height: 440px;
  overflow: hidden;
}
.notif-dropdown.open { display: flex; }

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary, #f7fafd);
  flex-shrink: 0;
}
.notif-header-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.notif-mark-all {
  background: none;
  border: none;
  color: var(--primary, #2563eb);
  font-size: 0.76rem;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  transition: background 0.15s;
}
.notif-mark-all:hover { background: var(--bg, #f3f4f6); }

.notif-list {
  overflow-y: auto;
  flex: 1;
}

.notif-empty {
  padding: 2.2rem 1rem;
  text-align: center;
  color: var(--text-3, #9ca3af);
  font-size: 0.85rem;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: background 0.13s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover      { background: var(--bg-secondary, #f7fafd); }
.notif-item.unread     { background: #eff6ff; }
.notif-item.unread:hover { background: #dbeafe; }

.notif-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #dbeafe;
  color: var(--primary, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.notif-item-icon.danger  { background: #fee2e2; color: #dc2626; }
.notif-item-icon.success { background: #dcfce7; color: #16a34a; }
.notif-item-icon.self    { background: #f3f4f6; color: #6b7280; }

.notif-item-body { flex: 1; min-width: 0; }

.notif-item-title {
  font-weight: 600;
  font-size: 0.83rem;
  color: var(--text);
  margin-bottom: 0.12rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item-msg {
  font-size: 0.78rem;
  color: var(--text-2, #6b7280);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item-from {
  font-size: 0.7rem;
  color: var(--text-3, #9ca3af);
  font-style: italic;
  margin-top: 0.1rem;
}
.notif-item-time {
  font-size: 0.7rem;
  color: var(--text-3, #9ca3af);
  margin-top: 0.22rem;
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary, #2563eb);
  flex-shrink: 0;
  margin-top: 5px;
}

@media (max-width: 480px) {
  .notif-dropdown {
    width: calc(100vw - 1.5rem);
    right: -0.5rem;
  }
}

/* ── Notification detail modal ───────────────────────────── */
.notif-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: notifFadeIn 0.15s ease;
}
@keyframes notifFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.notif-modal {
  background: #fff;
  border-radius: 18px;
  padding: 2rem 1.75rem 1.5rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  animation: notifSlideUp 0.2s ease;
  text-align: center;
}
@keyframes notifSlideUp {
  from { transform: translateY(18px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.notif-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  color: #9ca3af;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.notif-modal-close:hover { background: #f3f4f6; color: #374151; }

.notif-modal-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #dbeafe;
  color: var(--primary, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 1.1rem;
}
.notif-modal-icon-wrap.danger  { background: #fee2e2; color: #dc2626; }
.notif-modal-icon-wrap.success { background: #dcfce7; color: #16a34a; }
.notif-modal-icon-wrap.self    { background: #f3f4f6; color: #6b7280; }

.notif-modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.notif-modal-message {
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.65;
  margin-bottom: 0.6rem;
}

.notif-modal-time {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 1rem;
}

.notif-modal-meta {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1.25rem;
  font-size: 0.82rem;
  text-align: left;
}
.notif-modal-meta:empty { display: none; }

.notif-modal-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.28rem 0;
  color: #374151;
}
.notif-modal-meta-row + .notif-modal-meta-row {
  border-top: 1px solid #e5e7eb;
}
.notif-modal-meta-label {
  color: #9ca3af;
  font-weight: 500;
  margin-right: 0.5rem;
  white-space: nowrap;
}

.notif-modal-footer-btn { width: 100%; }

@media (max-width: 480px) {
  .notif-modal { padding: 1.5rem 1.1rem 1.2rem; border-radius: 14px; }
}

/* ── Announcement modal extras ───────────────────────────── */
.announce-modal { text-align: center; }

.announce-icon {
  background: #fef9c3;
  color: #ca8a04;
}

.announce-to {
  font-size: 0.82rem;
  color: #6b7280;
  margin-bottom: 1.1rem;
  background: #f3f4f6;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  display: inline-block;
}

.announce-form {
  text-align: left;
  margin-bottom: 1.1rem;
}
.announce-form .form-group { margin-bottom: 0.85rem; }
.announce-form .form-group:last-child { margin-bottom: 0; }

.announce-err {
  color: #dc2626;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.required-star { color: #dc2626; }

.announce-footer {
  display: flex;
  gap: 0.6rem;
}
.announce-footer .btn { flex: 1; }
.dropdown-item:hover {
  background: var(--bg);
  color: var(--text);
}
.dropdown-divider {
  border-top: 1px solid var(--border);
  margin: 0.25rem 0;
}

/* ── Progress ── */
.progress {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
  transition: width 0.4s;
}
.progress-bar.success {
  background: var(--success);
}
.progress-bar.warning {
  background: var(--warning);
}
.progress-bar.danger {
  background: var(--danger);
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}
