/* =============================================
   BASHERETH HEALTH - KOSHER CERTIFICATION SYSTEM
   Main Stylesheet - Bootstrap 3 Admin Dashboard
   ============================================= */

/* ---- Base ---- */
body {
  background-color: #ecf0f1;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #333;
  overflow-x: hidden;
}

a { color: #2980b9; }
a:hover { color: #1a6692; text-decoration: none; }

/* ---- Top Navbar ---- */
.navbar-inverse {
  background-color: #1a2332;
  border-color: #111c2b;
  border-radius: 0;
  margin-bottom: 0;
  min-height: 50px;
}
.navbar-inverse .navbar-brand {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 14px 20px;
}
.navbar-inverse .navbar-brand span {
  color: #e74c3c;
}
.navbar-inverse .navbar-brand:hover { color: #e0e0e0; }
.navbar-inverse .navbar-nav > li > a {
  color: #bdc3c7;
  padding-top: 15px;
  padding-bottom: 15px;
}
.navbar-inverse .navbar-nav > li > a:hover { color: #fff; background: #111c2b; }
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .open > a:hover { background-color: #111c2b; color: #fff; }
.navbar-inverse .dropdown-menu { background-color: #1a2332; border-color: #111c2b; }
.navbar-inverse .dropdown-menu > li > a { color: #bdc3c7; }
.navbar-inverse .dropdown-menu > li > a:hover { background-color: #111c2b; color: #fff; }
.navbar-inverse .dropdown-menu .divider { background-color: #2c3e50; }
.navbar-brand-logo { height: 22px; margin-right: 5px; vertical-align: middle; }
.navbar-right { margin-right: 0; }

/* Notification bell */
.navbar-inverse .navbar-nav > li > a .badge {
  background-color: #e74c3c;
  position: absolute;
  top: 6px;
  right: 4px;
  font-size: 9px;
  padding: 2px 5px;
}

/* ---- Sidebar ---- */
.sidebar-nav {
  position: fixed;
  top: 50px;
  bottom: 0;
  left: 0;
  z-index: 1000;
  display: block;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: #2c3e50;
  border-right: 1px solid #1a252f;
  width: 220px;
  transition: width 0.2s;
  -webkit-transition: width 0.2s;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: #1a252f; }
.sidebar-nav::-webkit-scrollbar-thumb { background: #3d5166; }

.nav-sidebar {
  width: 220px;
  padding: 0;
  margin: 0;
}
.nav-sidebar > li { border-left: 3px solid transparent; }
.nav-sidebar > li > a {
  padding: 10px 15px;
  color: #bdc3c7;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
}
.nav-sidebar > li > a:hover {
  background-color: #34495e;
  color: #fff;
  border-radius: 0;
}
.nav-sidebar > li > a .fa,
.nav-sidebar > li > a .glyphicon {
  width: 20px;
  margin-right: 8px;
  font-size: 13px;
  text-align: center;
}
.nav-sidebar > li.active {
  background-color: #1a252f;
  border-left-color: #3498db;
}
.nav-sidebar > li.active > a { color: #fff; }
.nav-sidebar > li.active > a:hover { background-color: #1a252f; }

.nav-header {
  padding: 10px 15px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #7f8c8d;
  cursor: default;
}
.nav-divider {
  height: 1px;
  margin: 5px 0;
  overflow: hidden;
  background-color: #1a252f;
}

/* ---- Main Content ---- */
.main-content {
  margin-left: 220px;
  padding: 20px 25px;
  min-height: calc(100vh - 50px);
  background: #ecf0f1;
}

.page-section { display: none; }
.page-section.active { display: block; }

.page-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #ddd;
}
.page-header-bar h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1a2332;
}
.page-header-bar h2 small {
  font-size: 13px;
  color: #7f8c8d;
  font-weight: 400;
}
.page-header-bar .btn-group-actions { display: flex; gap: 5px; }

/* Breadcrumb */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0 0 15px;
  font-size: 12px;
}
.breadcrumb > li + li:before { color: #999; }

/* ---- Dashboard Stats Cards ---- */
.stat-card {
  border: none;
  border-radius: 4px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.stat-card .panel-body {
  padding: 15px;
  display: flex;
  align-items: center;
}
.stat-icon {
  font-size: 30px;
  opacity: 0.25;
  margin-right: 12px;
}
.stat-info .stat-number {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}
.stat-info .stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.8);
  margin-top: 2px;
}
.stat-card .panel-footer {
  background: rgba(0,0,0,0.1);
  padding: 6px 15px;
  font-size: 11px;
}
.stat-card .panel-footer a { color: rgba(255,255,255,0.8); }
.stat-card .panel-footer a:hover { color: #fff; }
.stat-card.panel-primary .stat-icon { color: #fff; }
.stat-card.panel-success .stat-icon { color: #fff; }
.stat-card.panel-info .stat-icon { color: #fff; }
.stat-card.panel-warning .stat-icon { color: #fff; }
.stat-card.panel-danger .stat-icon { color: #fff; }

/* ---- Panels ---- */
.panel {
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  border: 1px solid #e0e4e7;
  border-radius: 4px;
}
.panel-default { border-top-color: #e0e4e7; }
.panel-heading {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 15px;
}
.panel-heading .panel-title { font-size: 13px; font-weight: 600; }
.panel-heading .badge { float: right; margin-top: 1px; }
.panel-heading .btn-xs { float: right; margin-top: -2px; }
.panel .panel-body { padding: 15px; }

/* ---- Tables ---- */
.table { margin-bottom: 0; font-size: 12.5px; }
.table > thead > tr > th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #555;
  padding: 9px 12px;
  white-space: nowrap;
}
.table > tbody > tr > td {
  padding: 8px 12px;
  vertical-align: middle;
  border-top: 1px solid #f0f0f0;
}
.table > tbody > tr:hover > td { background-color: #f5f8fa; }
.table-panel { margin-bottom: 0; }
.table-actions .btn { margin: 1px; }

/* ---- Labels / Badges ---- */
.label { font-size: 10px; font-weight: 600; padding: 2px 6px; letter-spacing: 0.3px; }
.status-badge { display: inline-block; padding: 3px 8px; border-radius: 3px; font-size: 11px; font-weight: 600; }
.status-active    { background: #d4edda; color: #155724; }
.status-pending   { background: #fff3cd; color: #856404; }
.status-suspended { background: #f8d7da; color: #721c24; }
.status-inactive  { background: #e2e3e5; color: #383d41; }
.status-expired   { background: #f8d7da; color: #721c24; }
.status-revoked   { background: #343a40; color: #fff; }
.status-certified { background: #d4edda; color: #155724; }
.status-approved  { background: #d4edda; color: #155724; }
.status-rejected  { background: #f8d7da; color: #721c24; }
.status-compliant     { background: #d4edda; color: #155724; }
.status-noncompliant  { background: #f8d7da; color: #721c24; }
.status-underreview   { background: #fff3cd; color: #856404; }
.status-paid     { background: #d4edda; color: #155724; }
.status-overdue  { background: #f8d7da; color: #721c24; }
.status-draft    { background: #e2e3e5; color: #383d41; }
.status-sent     { background: #d1ecf1; color: #0c5460; }
.status-pass { background: #d4edda; color: #155724; }
.status-fail { background: #f8d7da; color: #721c24; }
.status-conditional { background: #fff3cd; color: #856404; }

/* ---- Forms ---- */
.form-control {
  font-size: 13px;
  border-radius: 3px;
  border-color: #ced4da;
  box-shadow: none;
}
.form-control:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52,152,219,0.15);
}
.form-group label { font-weight: 600; font-size: 12px; color: #555; }
.required-star { color: #e74c3c; }
.input-group-addon { background: #f8f9fa; border-color: #ced4da; font-size: 13px; }

/* ---- Buttons ---- */
.btn { font-size: 12.5px; border-radius: 3px; }
.btn-xs { font-size: 11px; padding: 2px 8px; }
.btn-sm { font-size: 12px; }
.btn-primary { background-color: #2980b9; border-color: #2471a3; }
.btn-primary:hover { background-color: #2471a3; border-color: #1f618d; }
.btn-success { background-color: #27ae60; border-color: #229954; }
.btn-success:hover { background-color: #229954; }
.btn-warning { background-color: #f39c12; border-color: #e67e22; }
.btn-danger { background-color: #e74c3c; border-color: #c0392b; }
.btn-info { background-color: #16a085; border-color: #138d75; }
.btn-default { background-color: #fff; border-color: #ced4da; color: #555; }
.btn-default:hover { background-color: #f8f9fa; }

/* ---- Modals ---- */
.modal-header { background-color: #1a2332; color: #fff; border-radius: 4px 4px 0 0; }
.modal-header h4 { color: #fff; font-size: 15px; font-weight: 600; }
.modal-header .close { color: #fff; opacity: 0.7; margin-top: -2px; }
.modal-header .close:hover { opacity: 1; }
.modal-footer { background-color: #f8f9fa; border-top: 1px solid #eee; }
.modal-body { padding: 20px; }

/* ---- Filter Panel ---- */
.filter-panel { margin-bottom: 15px; }
.filter-panel .panel-body { padding: 12px 15px; }
.filter-panel .form-control { height: 32px; font-size: 12px; }
.filter-panel .btn { height: 32px; padding: 5px 12px; font-size: 12px; }

/* ---- Activity Feed ---- */
.activity-feed { list-style: none; padding: 0; margin: 0; }
.activity-feed li {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.activity-feed li:last-child { border-bottom: none; }
.activity-icon {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.activity-text { flex: 1; }
.activity-text strong { display: block; font-size: 12.5px; color: #333; }
.activity-text span { font-size: 11px; color: #999; }

/* ---- Upcoming List ---- */
.upcoming-list { list-style: none; padding: 0; margin: 0; }
.upcoming-list li {
  padding: 8px 12px;
  border-left: 3px solid #3498db;
  margin-bottom: 8px;
  background: #f8f9fa;
  border-radius: 0 3px 3px 0;
}
.upcoming-list li .due-date { font-size: 10px; color: #e74c3c; font-weight: 600; }
.upcoming-list li .title { font-size: 12.5px; color: #333; font-weight: 500; }
.upcoming-list li .subtitle { font-size: 11px; color: #777; }

/* ---- Quick Actions ---- */
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px 10px;
  border: 1px solid #e0e4e7;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  text-align: center;
  color: #555;
  text-decoration: none;
  transition: all 0.15s;
}
.quick-action-btn:hover {
  border-color: #3498db;
  color: #3498db;
  background: #f0f7ff;
  text-decoration: none;
}
.quick-action-btn .fa,
.quick-action-btn .glyphicon {
  font-size: 20px;
  margin-bottom: 6px;
  display: block;
}
.quick-action-btn span { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }

/* ---- Calendar ---- */
#scheduleCalendar { background: #fff; border-radius: 4px; padding: 10px; }
.fc-toolbar h2 { font-size: 16px; }
.fc-button { font-size: 12px; }
.fc-event { font-size: 11px; cursor: pointer; }

/* ---- Pagination ---- */
.pagination { margin: 10px 0 0; }
.pagination > li > a { font-size: 12px; padding: 4px 10px; color: #2980b9; }
.pagination > .active > a { background-color: #2980b9; border-color: #2471a3; }

/* ---- Invoice Print View ---- */
.invoice-header { border-bottom: 2px solid #1a2332; padding-bottom: 15px; margin-bottom: 20px; }
.invoice-company { font-size: 22px; font-weight: 700; color: #1a2332; }
.invoice-number { font-size: 24px; color: #e74c3c; font-weight: 700; }
.invoice-table tfoot tr:last-child td { font-weight: 700; font-size: 14px; }
.invoice-footer { border-top: 1px solid #ddd; padding-top: 15px; margin-top: 20px; font-size: 11px; color: #777; }

/* ---- Certificate Print View ---- */
.cert-page {
  background: #fff;
  border: 3px double #1a2332;
  padding: 40px;
  margin: 20px auto;
  max-width: 700px;
  position: relative;
}
.cert-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-30deg);
  font-size: 80px;
  font-weight: 900;
  color: rgba(0,0,0,0.04);
  pointer-events: none;
  white-space: nowrap;
}
.cert-title { font-size: 28px; font-weight: 700; color: #1a2332; text-align: center; }
.cert-subtitle { font-size: 14px; color: #555; text-align: center; margin-bottom: 30px; }
.cert-body { font-size: 14px; line-height: 1.8; color: #333; }
.cert-body strong { color: #1a2332; }
.cert-signatures { display: flex; justify-content: space-around; margin-top: 50px; }
.cert-sig-line { border-top: 1px solid #333; width: 180px; text-align: center; padding-top: 5px; font-size: 12px; }
.cert-number { position: absolute; top: 15px; right: 20px; font-size: 11px; color: #999; }
.cert-seal { text-align: center; font-size: 60px; margin: 20px 0; }

/* ---- Report Styles ---- */
.report-filters { margin-bottom: 20px; }
.report-summary-card {
  border-left: 4px solid #3498db;
  padding: 10px 15px;
  background: #f8f9fa;
  margin-bottom: 10px;
  border-radius: 0 4px 4px 0;
}

/* ---- Document Upload ---- */
.doc-icon { font-size: 28px; margin-right: 10px; }
.doc-list-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}
.doc-list-item:last-child { border-bottom: none; }
.doc-info { flex: 1; }
.doc-info .doc-name { font-weight: 600; font-size: 13px; }
.doc-info .doc-meta { font-size: 11px; color: #888; }

/* ---- Notification Items ---- */
.notification-item {
  display: flex;
  align-items: flex-start;
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  gap: 12px;
}
.notification-item:hover { background: #f8f9fa; }
.notification-item.unread { background: #f0f7ff; border-left: 3px solid #3498db; }
.notification-item .notif-icon {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  color: #fff;
}
.notification-item .notif-content { flex: 1; }
.notification-item .notif-title { font-weight: 600; font-size: 12.5px; color: #333; }
.notification-item .notif-msg { font-size: 12px; color: #666; }
.notification-item .notif-time { font-size: 10px; color: #aaa; }

/* ---- Loading / Empty States ---- */
.loading-row td { text-align: center; padding: 30px; color: #999; font-style: italic; }
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #aaa;
}
.empty-state .fa { font-size: 48px; margin-bottom: 15px; display: block; }
.empty-state h4 { color: #bbb; font-weight: 400; }
.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.7);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  display: none;
}
.loading-spinner { font-size: 36px; color: #2980b9; }

/* ---- Tabs ---- */
.nav-tabs { border-bottom: 2px solid #dee2e6; }

.nav-tabs > li > a { font-size: 13px; border-radius: 3px 3px 0 0; color: #666; border-color: transparent; }
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  border-color: #dee2e6 #dee2e6 #fff;
  color: #1a2332;
  font-weight: 600;
}
.tab-content { padding-top: 15px; }

/* ---- Alerts ---- */
.alert { font-size: 12.5px; padding: 10px 15px; border-radius: 3px; }
.alert .fa { margin-right: 6px; }

/* ---- Select2 Overrides ---- */
.select2-container .select2-selection--single {
  height: 34px;
  border-color: #ced4da;
  border-radius: 3px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 34px;
  font-size: 13px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 32px;
}

/* ---- Datepicker overrides ---- */
.datepicker { font-size: 12px; }

/* ---- Timeline (Client History) ---- */
.timeline { list-style: none; padding: 0; position: relative; }
.timeline:before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #dee2e6;
}
.timeline > li {
  position: relative;
  padding-left: 50px;
  margin-bottom: 15px;
}
.timeline > li .timeline-badge {
  position: absolute;
  left: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  text-align: center;
  line-height: 26px;
  font-size: 11px;
  color: #fff;
}
.timeline > li .timeline-panel {
  background: #fff;
  border: 1px solid #e0e4e7;
  border-radius: 4px;
  padding: 10px 15px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.timeline > li .timeline-panel .timeline-title { font-weight: 600; font-size: 13px; margin-bottom: 3px; }
.timeline > li .timeline-panel .timeline-body { font-size: 12px; color: #666; }
.timeline > li .timeline-panel .timeline-footer { font-size: 11px; color: #aaa; margin-top: 5px; }

/* ---- Scheduling Views ---- */
.schedule-list-item {
  padding: 10px 15px;
  border-left: 4px solid #3498db;
  background: #fff;
  margin-bottom: 8px;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.schedule-list-item.completed { border-left-color: #27ae60; }
.schedule-list-item.missed { border-left-color: #e74c3c; }
.schedule-list-item.cancelled { border-left-color: #95a5a6; opacity: 0.7; }

/* ---- Print Styles ---- */
@media print {
  .sidebar-nav,
  .navbar,
  .filter-panel,
  .btn,
  .pagination,
  #topNav,
  .no-print { display: none !important; }

  .main-content { margin: 0; padding: 0; }
  .page-section { display: block !important; }

  body { background: #fff; font-size: 12px; }

  .panel { border: none; box-shadow: none; }
  .panel-heading { background: #fff; color: #333; border-bottom: 2px solid #333; }

  .table { font-size: 11px; }
  .table > thead > tr > th { background: #f5f5f5; }

  .cert-page {
    border: 3px double #000;
    page-break-inside: avoid;
  }

  .print-only { display: block !important; }
}
.print-only { display: none; }

/* ---- Sidebar overlay (mobile) ---- */
#sidebarOverlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1040;
}
#sidebarOverlay.active { display: block; }

/* Hide sidebar toggle on desktop */
#sidebarToggleBtn { display: none; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  /* Sidebar toggle button */
  #sidebarToggleBtn { display: inline-block; }

  /* Sidebar slides in as overlay */
  .sidebar-nav {
    transform: translateX(-100%);
    width: 260px;
    z-index: 1050;
    transition: transform 0.25s ease;
    -webkit-transition: transform 0.25s ease;
    box-shadow: none;
  }
  .sidebar-nav.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.35);
  }

  /* Main content fills full width */
  .main-content { margin-left: 0 !important; padding: 12px !important; }

  /* Page header wraps */
  .page-header-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .page-header-bar .btn, .page-header-bar .btn-group { width: 100%; text-align: left; }

  /* Stat cards stack */
  .stat-card .panel-body { flex-direction: column; text-align: center; }
  .col-sm-2.col-xs-6 { width: 50%; }

  /* Tables scroll horizontally */
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 500px; }

  /* Panel headings */
  .panel-heading .pull-right { float: none !important; display: block; margin-top: 6px; }
  .panel-heading .btn { margin-bottom: 2px; }

  /* Modals full-width */
  .modal-dialog { margin: 8px; }
  .modal-body { padding: 12px; }

  /* Tabs scroll */
  .nav-tabs { display: flex; overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; }
  .nav-tabs > li { flex-shrink: 0; }
  .nav-tabs > li > a { padding: 8px 12px; font-size: 12px; }

  /* Hide less-critical table columns */
  .hidden-mobile { display: none !important; }

  /* Navbar brand smaller */
  .navbar-brand span { font-size: 13px; }
  .navbar-brand span[style*="opacity"] { display: none; }

  /* Search bars full width */
  .input-group { width: 100% !important; }
  .search-bar { width: 100% !important; }
}

/* ---- Misc Utilities ---- */
.text-muted { color: #95a5a6; }
.text-bold { font-weight: 700; }
.cursor-pointer { cursor: pointer; }
.no-margin { margin: 0; }
.spacer-5  { height: 5px; }
.spacer-10 { height: 10px; }
.spacer-20 { height: 20px; }
.full-width { width: 100%; }
.right-align { text-align: right; }
.center-align { text-align: center; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.highlight-row { background-color: #fffde7 !important; }
.border-top { border-top: 1px solid #eee; padding-top: 10px; margin-top: 10px; }

/* ---- Summary Footer in Tables ---- */
.table-summary-row td { background: #f8f9fa; font-weight: 600; border-top: 2px solid #dee2e6; }

/* ---- Chart Placeholders ---- */
.chart-container { min-height: 200px; display: flex; align-items: center; justify-content: center; background: #f8f9fa; border-radius: 4px; color: #bbb; }

/* ---- Dashboard Welcome ---- */
.welcome-bar {
  background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
  color: #fff;
  padding: 18px 25px;
  margin: -20px -25px 20px;
  border-bottom: 3px solid #e74c3c;
}
.welcome-bar h3 { margin: 0 0 3px; font-size: 18px; font-weight: 600; color: #fff; }
.welcome-bar p  { margin: 0; font-size: 12px; color: rgba(255,255,255,0.65); }
.time-display {
  font-size: 26px;
  font-weight: 300;
  font-family: "Courier New", monospace;
  color: rgba(255,255,255,0.9);
  letter-spacing: 2px;
  text-align: right;
}

/* ---- Kosher Type Checkboxes ---- */
.kosher-type-panel {
  border: 1px solid #ced4da;
  border-radius: 3px;
  padding: 10px 12px 6px;
  background: #fafafa;
  max-height: 100px;
  overflow-y: auto;
}
.kosher-type-panel .kt-item {
  display: inline-block;
  margin-right: 12px;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
}
.kosher-type-panel .kt-item input[type="checkbox"] { margin-right: 4px; cursor: pointer; }

/* ---- Searchable List Component ---- */
.sl-widget { border: 1px solid #ced4da; border-radius: 3px; background: #fff; overflow: hidden; }
.sl-search-row { display: flex; align-items: center; padding: 0 8px; border-bottom: 1px solid #eee; background: #f8f9fa; }
.sl-search-icon { color: #aaa; font-size: 12px; margin-right: 6px; flex-shrink: 0; }
.sl-search-input { border: none; background: transparent; outline: none; flex: 1; padding: 7px 0; font-size: 12.5px; color: #333; }
.sl-badge { background: #3498db; color: #fff; border-radius: 10px; font-size: 10px; padding: 1px 6px; font-weight: 700; }
.sl-list { max-height: 180px; overflow-y: auto; }
.sl-list::-webkit-scrollbar { width: 4px; }
.sl-list::-webkit-scrollbar-thumb { background: #ccc; }
.sl-item { display: flex; align-items: center; padding: 7px 12px; border-bottom: 1px solid #f5f5f5; cursor: pointer; margin: 0; font-weight: 400; }
.sl-item:last-child { border-bottom: none; }
.sl-item:hover { background: #f0f7ff; }
.sl-item.sl-selected { background: #e8f4ff; }
.sl-item input { margin-right: 8px; flex-shrink: 0; cursor: pointer; }
.sl-label { font-size: 12.5px; color: #333; }
.sl-sub { font-size: 11px; color: #999; margin-left: 4px; }
.sl-empty { padding: 15px; text-align: center; color: #aaa; font-size: 12px; font-style: italic; }
.sl-footer { border-top: 1px solid #eee; padding: 5px 12px; background: #f8f9fa; display: flex; justify-content: space-between; align-items: center; font-size: 11.5px; }
.sl-footer .sl-clear-all { color: #e74c3c; }

/* ---- Client Detail Page ---- */
.client-detail-banner {
  background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
  color: #fff;
  margin: -20px -25px 0;
  border-bottom: 3px solid #2980b9;
}
.client-detail-header { padding: 22px 25px 14px; }
.client-detail-header .cd-name { font-size: 22px; font-weight: 700; margin: 0 0 3px; }
.client-detail-header .cd-meta { font-size: 12px; color: rgba(255,255,255,0.65); margin: 2px 0 0; }
.cd-stats-bar { padding: 10px 25px 14px; border-top: 1px solid rgba(255,255,255,0.12); }
.cd-stat-box { text-align: center; border-right: 1px solid rgba(255,255,255,0.2); padding: 4px 20px; display: inline-block; }
.cd-stat-box:last-child { border-right: none; }
.cd-stat-box .cd-stat-num { font-size: 22px; font-weight: 700; line-height: 1; }
.cd-stat-box .cd-stat-lbl { font-size: 10px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.5px; }
.cd-back-btn { color: rgba(255,255,255,0.7); font-size: 12px; text-decoration: none; }
.cd-back-btn:hover { color: #fff; text-decoration: none; }
.cd-body { padding-top: 20px; }
.cd-info-card .panel-heading { background: #1a2332; color: #fff; font-size: 12px; font-weight: 600; border: none; }
.cd-info-card .info-row { display: flex; padding: 8px 0; border-bottom: 1px solid #f5f5f5; font-size: 12.5px; }
.cd-info-card .info-row:last-child { border-bottom: none; }
.cd-info-card .info-lbl { width: 100px; font-weight: 700; color: #888; flex-shrink: 0; font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; }
.cd-info-card .info-val { color: #222; }
#cdTabs.nav-tabs { border-bottom: 2px solid #1a2332; }
#cdTabs.nav-tabs > li > a { border-radius: 0; font-size: 12px; padding: 8px 13px; color: #555; }
#cdTabs.nav-tabs > li.active > a,
#cdTabs.nav-tabs > li.active > a:hover,
#cdTabs.nav-tabs > li.active > a:focus { background: #1a2332; color: #fff; border-color: #1a2332; }

/* ---- Official Certificate ---- */
.cert-official { font-family: Calibri, Arial, sans-serif; background: #fff; max-width: 780px; margin: 0 auto; position: relative; }
.cert-official-border { border: 3px solid #1a2332; padding: 6px; }
.cert-official-inner  { border: 1px solid #ccc; padding: 36px 44px; position: relative; }
.cert-official-certnum { position: absolute; top: 10px; right: 14px; font-size: 10px; color: #aaa; font-family: monospace; }
.cert-official-watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-30deg); font-size: 90px; font-weight: 900; color: rgba(0,0,0,0.025); pointer-events: none; white-space: nowrap; letter-spacing: 5px; }
.cert-official-topbar { background: #1a2332; color: #fff; margin: -36px -44px 28px; padding: 18px 28px; display: table; width: calc(100% + 88px); box-sizing: border-box; }
.cert-official-topbar-left  { display: table-cell; vertical-align: middle; }
.cert-official-topbar-right { display: table-cell; vertical-align: middle; text-align: right; width: 200px; }
.cert-official-logo { width: 56px; height: 56px; border: 2px solid rgba(255,255,255,0.5); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; overflow: hidden; vertical-align: middle; margin-right: 14px; }
.cert-official-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.cert-official-org { font-size: 16px; font-weight: 700; color: #fff; display: inline; vertical-align: middle; }
.cert-official-tagline { font-size: 10px; color: rgba(255,255,255,0.65); display: block; margin-top: 3px; padding-left: 70px; }
.cert-official-certtype { font-size: 11px; color: rgba(255,255,255,0.75); text-transform: uppercase; letter-spacing: 1px; }
.cert-official-certlabel { font-size: 22px; font-weight: 700; color: #fff; }
.cert-official-divider { border: none; border-top: 1px solid #1a2332; margin: 18px 0; }
.cert-official-divider.light { border-top-color: #e0e0e0; }
.cert-official-declares { font-size: 11px; color: #888; text-align: center; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; }
.cert-official-entity { font-size: 28px; font-weight: 700; color: #1a2332; text-align: center; margin: 6px 0; font-family: Georgia, serif; }
.cert-official-body { text-align: center; font-size: 12px; color: #555; line-height: 1.9; margin: 14px 0; }
.cert-official-level { display: inline-block; background: #1a2332; color: #fff; padding: 7px 28px; font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin: 6px 0; }
.cert-official-dates { display: table; width: 100%; margin: 20px 0; }
.cert-official-dates .date-box { display: table-cell; text-align: center; border-right: 1px solid #e5e5e5; }
.cert-official-dates .date-box:last-child { border-right: none; }
.cert-official-dates .date-box .date-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: #aaa; }
.cert-official-dates .date-box .date-value { font-size: 13px; font-weight: 700; color: #1a2332; padding: 4px 0; }
.cert-official-sig-row { display: table; width: 80%; margin: 30px auto 0; }
.cert-official-sig { display: table-cell; text-align: center; }
.cert-official-sig .sig-line { border-top: 1px solid #333; padding-top: 6px; margin-top: 30px; }
.cert-official-sig .sig-name  { font-size: 12px; font-weight: 700; color: #1a2332; }
.cert-official-sig .sig-title { font-size: 10px; color: #888; }
.cert-official-notes { margin-top: 14px; text-align: center; font-size: 11px; color: #777; font-style: italic; }
.cert-official-footer { text-align: center; font-size: 10px; color: #aaa; margin-top: 14px; padding-top: 10px; border-top: 1px solid #eee; }


/* ---- MS-Word Invoice ---- */
.inv-word { font-family: Calibri, Arial, sans-serif; background: #fff; max-width: 750px; margin: 0 auto; padding: 40px 45px; font-size: 12pt; color: #000; }
.inv-word-top { display: table; width: 100%; margin-bottom: 25px; }
.inv-word-top-left  { display: table-cell; width: 55%; vertical-align: top; }
.inv-word-top-right { display: table-cell; width: 45%; vertical-align: top; text-align: right; }
.inv-word-company { font-size: 18pt; font-weight: 700; color: #000; margin-bottom: 4px; }
.inv-word-company-addr { font-size: 9pt; color: #333; line-height: 1.6; }
.inv-word-title { font-size: 28pt; font-weight: 700; color: #1a2332; letter-spacing: -1px; margin-bottom: 8px; }
.inv-word-meta { font-size: 9.5pt; color: #555; line-height: 1.8; }
.inv-word-meta strong { color: #000; }
.inv-word-hr { border: none; border-top: 2px solid #1a2332; margin: 18px 0; }
.inv-word-bill-row { display: table; width: 100%; margin-bottom: 20px; }
.inv-word-bill-left  { display: table-cell; width: 50%; vertical-align: top; }
.inv-word-bill-right { display: table-cell; width: 50%; vertical-align: top; text-align: right; }
.inv-word-bill-head { font-size: 8pt; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #777; margin-bottom: 4px; }
.inv-word-bill-name { font-size: 12pt; font-weight: 700; color: #000; }
.inv-word-bill-addr { font-size: 9.5pt; color: #333; line-height: 1.6; }
.inv-word-due-badge { display: inline-block; border: 2px solid #1a2332; padding: 4px 12px; font-size: 10pt; font-weight: 700; color: #1a2332; }
.inv-word-table { width: 100%; border-collapse: collapse; margin-bottom: 15px; font-size: 10pt; }
.inv-word-table th { background: #1a2332; color: #fff; padding: 7px 10px; text-align: left; font-weight: 600; font-size: 9pt; text-transform: uppercase; }
.inv-word-table th.right,.inv-word-table td.right { text-align: right; }
.inv-word-table td { padding: 7px 10px; border-bottom: 1px solid #e0e0e0; vertical-align: top; }
.inv-word-table tbody tr:nth-child(even) td { background: #f9f9f9; }
.inv-word-totals { width: 260px; margin-left: auto; font-size: 10pt; }
.inv-word-totals table { width: 100%; border-collapse: collapse; }
.inv-word-totals td { padding: 4px 8px; }
.inv-word-totals td:last-child { text-align: right; }
.inv-word-totals .total-row { font-weight: 700; font-size: 12pt; border-top: 2px solid #1a2332; }
.inv-word-totals .total-row td { padding-top: 7px; }
.inv-word-footer { margin-top: 25px; border-top: 1px solid #ddd; padding-top: 12px; font-size: 9pt; color: #666; }
.inv-word-footer strong { color: #000; }
.inv-status-paid    { background: #d4edda; color: #155724; padding: 2px 8px; border-radius: 3px; font-weight: 700; }
.inv-status-overdue { background: #f8d7da; color: #721c24; padding: 2px 8px; border-radius: 3px; font-weight: 700; }
.inv-status-sent    { background: #d1ecf1; color: #0c5460; padding: 2px 8px; border-radius: 3px; font-weight: 700; }
.inv-status-draft   { background: #e2e3e5; color: #383d41; padding: 2px 8px; border-radius: 3px; font-weight: 700; }

/* ---- Dashboard panel polish ---- */
.panel-default > .panel-heading {
  background: linear-gradient(to bottom, #f8f9fa, #f0f2f5);
  border-bottom: 2px solid #dee2e6;
  color: #1a2332;
  font-weight: 600;
  font-size: 12.5px;
}
.panel-default > .panel-heading .badge { background: #e74c3c; }
.upcoming-list { list-style: none; padding: 0; margin: 0; }
.upcoming-list li { padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.upcoming-list li:last-child { border-bottom: none; }
.upcoming-list .due-date { font-size: 11px; font-weight: 700; color: #2980b9; }
.upcoming-list .title { font-size: 13px; font-weight: 600; color: #1a2332; }
.upcoming-list .subtitle { font-size: 11px; color: #888; }
.quick-action-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #fff; border: 2px solid #dee2e6; border-radius: 6px; padding: 12px 6px; text-align: center; color: #1a2332; text-decoration: none; font-size: 11px; font-weight: 600; transition: border-color 0.15s, background 0.15s; min-height: 64px; }
.quick-action-btn:hover { border-color: #2980b9; background: #eaf3fb; color: #2980b9; text-decoration: none; }
.quick-action-btn i { font-size: 20px; margin-bottom: 5px; }


/* ---- Payroll ---- */
.stub-page { max-width: 760px; margin: 0 auto; }
