/* ==========================================================================
   e-Legis Reference System — Enterprise Design System
   DILG Enterprise Portal · Version 2.0
   ========================================================================== */

:root {
  --primary: #0B3C74;
  --primary-hover: #154D91;
  --primary-light: #EDF5FF;
  --secondary: #1C5D99;
  --accent-gold: #E2B93B;
  --success: #17A673;
  --warning: #F4B740;
  --danger: #D64545;
  --info: #3498DB;

  --bg: #F5F7FA;
  --card: #FFFFFF;
  --border: #E5EAF1;
  --border-light: #EEF2F7;
  --text: #223042;
  --text-muted: #6B7280;
  --disabled: #C6CDD7;
  --topbar-bg: rgba(255, 255, 255, 0.85);

  --sidebar-w: 300px;
  --sidebar-collapsed: 80px;
  --topbar-h: 72px;

  --radius-card: 18px;
  --radius-btn: 12px;
  --radius-input: 12px;
  --radius-table: 16px;
  --radius-modal: 20px;

  --shadow-card: 0 10px 35px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 20px 50px rgba(15, 23, 42, 0.12);
  --shadow-dropdown: 0 15px 35px rgba(15, 23, 42, 0.15);

  --font: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

img { max-width: 100%; height: auto; }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.text-muted { color: var(--text-muted) !important; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-gold { color: var(--accent-gold) !important; }
.bg-primary-light { background: var(--primary-light) !important; }

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

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

.app-sidebar {
  width: var(--sidebar-w);
  background: var(--card);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  transition: width var(--transition), transform var(--transition);
  box-shadow: 2px 0 24px rgba(15, 23, 42, 0.04);
}

.app-sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-h);
}

.sidebar-brand .brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(11, 60, 116, 0.16);
  padding: 0;
}

.sidebar-brand .brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-brand .brand-text { overflow: hidden; }
.sidebar-brand .brand-text .title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  white-space: nowrap;
}
.sidebar-brand .brand-text .subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-sidebar.collapsed .brand-text,
.app-sidebar.collapsed .nav-label,
.app-sidebar.collapsed .nav-section-title,
.app-sidebar.collapsed .sidebar-user-meta { display: none; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--disabled);
  padding: 14px 14px 8px;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  margin-bottom: 2px;
  border-radius: 12px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13.5px;
  transition: all var(--transition);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.sidebar-nav .nav-link i,
.sidebar-nav .nav-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 1.75;
}

.sidebar-nav .nav-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.sidebar-nav .nav-link.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 22px rgba(11, 60, 116, 0.28);
}

.sidebar-nav .nav-link .badge-nav {
  margin-left: auto;
  background: rgba(226, 185, 59, 0.15);
  color: #B8860B;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

.sidebar-nav .nav-link.active .badge-nav {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sidebar-user {
  padding: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user .avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar-user-meta .name { font-size: 13px; font-weight: 600; color: var(--text); }
.sidebar-user-meta .role { font-size: 11px; color: var(--text-muted); }

/* Main column */
.app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition);
}

.app-shell.sidebar-collapsed .app-main { margin-left: var(--sidebar-collapsed); }
.app-shell.sidebar-collapsed .app-sidebar { width: var(--sidebar-collapsed); }

/* Topbar */
.app-topbar {
  height: var(--topbar-h);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 20px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0;
}

.btn-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  box-shadow: var(--shadow-card);
}

.breadcrumb-el {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumb-el a {
  color: var(--primary);
  text-decoration: none;
}

.breadcrumb-el a:hover { text-decoration: underline; }

.breadcrumb-el .current { color: var(--text); font-weight: 600; }
.breadcrumb-el .sep { opacity: 0.4; color: var(--text-muted); }

.topbar-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.topbar-search input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 54px 0 42px;
  background: var(--bg);
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--text);
  transition: all var(--transition);
  outline: none;
}

.topbar-search input:focus {
  background: var(--card);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(11, 60, 116, 0.1);
}

.topbar-search .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.topbar-search-shortcut {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--card);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 11px;
  line-height: 17px;
  pointer-events: none;
}

.smart-search-panel {
  position: absolute;
  z-index: 1060;
  top: calc(100% + 10px);
  left: 50%;
  width: min(680px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 100px));
  overflow-y: auto;
  transform: translateX(-50%);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-dropdown);
  overscroll-behavior: contain;
}

.smart-search-panel[hidden] { display: none; }

.smart-search-section {
  padding: 8px;
  border-bottom: 1px solid var(--border-light);
}

.smart-search-section-title,
.smart-search-section-head {
  padding: 6px 8px 7px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.smart-search-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.smart-search-section-head button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.smart-search-option {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 11px;
  color: inherit;
  text-decoration: none;
  outline: none;
}

.smart-search-option:hover,
.smart-search-option:focus,
.smart-search-option.is-active {
  background: var(--primary-light);
  color: inherit;
  text-decoration: none;
}

.smart-search-option.tone-primary {
  background: linear-gradient(135deg, rgba(11, 60, 116, 0.09), rgba(79, 174, 232, 0.08));
}

.smart-search-option.tone-ai {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(79, 174, 232, 0.08));
}

.smart-search-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
  background: var(--bg);
  color: var(--primary);
}

.smart-search-option-icon svg { width: 17px; height: 17px; }
.smart-search-option-copy { flex: 1; min-width: 0; }

.smart-search-option-copy strong,
.smart-search-option-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-search-option-copy strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
}

.smart-search-option-copy span {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11.5px;
}

.smart-search-option-badge {
  max-width: 100px;
  padding: 3px 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-search-option-arrow {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--text-muted);
  opacity: 0;
}

.smart-search-option:hover .smart-search-option-arrow,
.smart-search-option.is-active .smart-search-option-arrow { opacity: 1; }

.smart-search-loading,
.smart-search-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 88px;
  padding: 18px;
  color: var(--text-muted);
  font-size: 12px;
}

.smart-search-loading svg {
  width: 17px;
  height: 17px;
  animation: smart-search-spin 0.8s linear infinite;
}

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

.smart-search-empty { flex-direction: column; text-align: center; }
.smart-search-empty svg { width: 25px; height: 25px; }
.smart-search-empty strong { color: var(--text); font-size: 13px; }

.smart-search-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 8px 14px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 10px;
}

.smart-search-footer span { display: inline-flex; align-items: center; gap: 4px; }
.smart-search-footer kbd {
  min-width: 19px;
  padding: 1px 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 9px;
  text-align: center;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notif-bell { position: relative; }
.notif-bell .dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--card);
}
.notif-count {
  position: absolute;
  top: -5px;
  right: -6px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid var(--card);
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}
.notifications-disabled { opacity: 0.65; }
.notifications-dropdown {
  width: min(400px, calc(100vw - 24px));
  max-height: min(620px, calc(100vh - 90px));
  margin-top: 10px !important;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-dropdown);
}
.notifications-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.notifications-head > div {
  display: grid;
}
.notifications-head strong {
  color: var(--text);
  font-size: 14px;
}
.notifications-head span {
  color: var(--text-muted);
  font-size: 11px;
}
.notifications-head form { margin: 0; }
.notification-mark-all {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}
.notifications-list {
  max-height: 430px;
  overflow-y: auto;
}
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  color: inherit;
  text-decoration: none;
}
.notification-item:hover {
  background: #F8FAFC;
  color: inherit;
}
.notification-item.unread { background: #F4F8FD; }
.notification-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
}
.notification-icon i { width: 16px; height: 16px; }
.notification-icon.type-workflow { background: #FEF3C7; color: #B45309; }
.notification-icon.type-review { background: #DBEAFE; color: #1D4ED8; }
.notification-icon.type-hearing { background: #F3E8FF; color: #7E22CE; }
.notification-icon.type-collaboration { background: #DCFCE7; color: #15803D; }
.notification-icon.type-comment { background: #E0F2FE; color: #0369A1; }
.notification-icon.type-version { background: #EDE9FE; color: #6D28D9; }
.notification-content {
  display: grid;
  flex: 1;
  min-width: 0;
}
.notification-content strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notification-content > span {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.notification-content time {
  margin-top: 5px;
  color: #9CA3AF;
  font-size: 10px;
}
.notification-unread-dot {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary);
}
.notifications-empty {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 30px 20px;
  color: var(--text-muted);
  text-align: center;
}
.notifications-empty i {
  width: 28px;
  height: 28px;
  margin-bottom: 3px;
}
.notifications-empty strong {
  color: var(--text);
  font-size: 13px;
}
.notifications-empty span {
  max-width: 270px;
  font-size: 11px;
}
.notifications-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 14px;
  background: #F8FAFC;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.notifications-footer i { width: 13px; height: 13px; }
.notification-page-list { display: grid; }
.notification-page-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}
.notification-page-item:last-child { border-bottom: 0; }
.notification-page-item:hover {
  background: #F8FAFC;
  color: inherit;
}
.notification-page-item.unread { background: #F4F8FD; }
.notification-state {
  color: var(--text-muted);
  font-size: 11px;
}
.notification-page-item.unread .notification-state {
  color: var(--primary);
  font-weight: 700;
}
.notification-page-arrow {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}
.notification-page-empty { padding: 54px 24px; }

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: all var(--transition);
}

.topbar-profile:hover { box-shadow: var(--shadow-card); border-color: var(--primary); }

.topbar-profile .avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
}

.topbar-profile .meta { line-height: 1.2; }
.topbar-profile .meta .name { font-size: 13px; font-weight: 600; }
.topbar-profile .meta .role { font-size: 11px; color: var(--text-muted); }

/* Content */
.app-content {
  padding: 28px 32px 40px;
  flex: 1;
}

.app-footer {
  padding: 16px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--card);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.el-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}

.el-card:hover { box-shadow: var(--shadow-hover); }

.el-card-body { padding: 24px; }
.el-card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.el-card-header h3,
.el-card-header .card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.el-card-header .card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-el {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-btn);
  font-family: var(--font);
  font-weight: 600;
  font-size: 14px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn-el svg { width: 18px; height: 18px; stroke-width: 2; }

.btn-el-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(11, 60, 116, 0.25);
}
.btn-el-primary:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(11, 60, 116, 0.32);
}

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

.btn-el-success { background: var(--success); color: #fff; }
.btn-el-success:hover { filter: brightness(0.95); color: #fff; transform: translateY(-1px); }

.btn-el-danger { background: var(--danger); color: #fff; }
.btn-el-danger:hover { filter: brightness(0.95); color: #fff; }

.btn-el-gold {
  background: var(--accent-gold);
  color: #3d2e00;
  box-shadow: 0 8px 20px rgba(226, 185, 59, 0.3);
}
.btn-el-gold:hover { filter: brightness(1.05); color: #3d2e00; transform: translateY(-1px); }

.btn-el-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-el-lg { height: 52px; padding: 0 28px; font-size: 15px; }

.btn-el-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
}
.btn-el-ghost:hover { background: var(--bg); color: var(--text); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-label-el {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-control-el {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--card);
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}

.form-control-el:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(11, 60, 116, 0.1);
}

.form-control-el::placeholder { color: var(--disabled); }

textarea.form-control-el {
  height: auto;
  min-height: 120px;
  padding: 14px 16px;
  resize: vertical;
}

.form-floating-el {
  position: relative;
}

.form-floating-el .form-control-el {
  padding-top: 18px;
  padding-bottom: 6px;
}

.form-floating-el label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: all var(--transition);
  background: transparent;
}

.form-floating-el .form-control-el:focus + label,
.form-floating-el .form-control-el:not(:placeholder-shown) + label {
  top: 12px;
  transform: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
}

.form-check-el {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  cursor: pointer;
}

.form-check-el input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Badges & Status
   -------------------------------------------------------------------------- */
.badge-el {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-el-success { background: rgba(23, 166, 115, 0.12); color: #0f7a54; }
.badge-el-warning { background: rgba(244, 183, 64, 0.18); color: #9a6b00; }
.badge-el-danger { background: rgba(214, 69, 69, 0.12); color: #b03030; }
.badge-el-info { background: rgba(52, 152, 219, 0.12); color: #1a6fa0; }
.badge-el-primary { background: var(--primary-light); color: var(--primary); }
.badge-el-neutral { background: var(--bg); color: var(--text-muted); }

/* --------------------------------------------------------------------------
   KPI / Stat Cards
   -------------------------------------------------------------------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  animation: fadeSlideUp 0.5s ease both;
}

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

.kpi-card .kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.kpi-card .kpi-icon svg { width: 22px; height: 22px; }

.kpi-card .kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.kpi-card .kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.kpi-card .kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px;
}

.kpi-card .kpi-trend.up { color: var(--success); }
.kpi-card .kpi-trend.down { color: var(--danger); }

.kpi-icon.blue { background: var(--primary-light); color: var(--primary); }
.kpi-icon.green { background: rgba(23, 166, 115, 0.12); color: var(--success); }
.kpi-icon.gold { background: rgba(226, 185, 59, 0.15); color: #b8860b; }
.kpi-icon.red { background: rgba(214, 69, 69, 0.1); color: var(--danger); }
.kpi-icon.cyan { background: rgba(52, 152, 219, 0.12); color: var(--info); }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-el-wrap {
  border-radius: var(--radius-table);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}

.table-el {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table-el thead th {
  background: var(--bg);
  padding: 14px 18px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  white-space: nowrap;
}

.table-el tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

.table-el tbody tr:last-child td { border-bottom: none; }
.table-el tbody tr { transition: background var(--transition); }
.table-el tbody tr:hover { background: var(--primary-light); }

/* --------------------------------------------------------------------------
   Welcome Banner
   -------------------------------------------------------------------------- */
.welcome-banner {
  background: linear-gradient(135deg, #0B3C74 0%, #1C5D99 55%, #0B3C74 100%);
  border-radius: var(--radius-card);
  padding: 36px 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(11, 60, 116, 0.28);
  margin-bottom: 28px;
}

.welcome-banner::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -5%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.welcome-banner::after {
  content: "";
  position: absolute;
  bottom: -30%;
  right: 18%;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(226, 185, 59, 0.12);
  pointer-events: none;
}

.welcome-banner .banner-content { position: relative; z-index: 1; max-width: 640px; }

.welcome-banner .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.welcome-banner h1 {
  color: #fff;
  font-size: 28px;
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}

.welcome-banner p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  margin: 0 0 22px;
  max-width: 520px;
}

.banner-search {
  display: flex;
  gap: 10px;
  max-width: 560px;
}

.banner-search input {
  flex: 1;
  height: 50px;
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.banner-search .btn-el { height: 50px; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   Activity / Timeline / Lists
   -------------------------------------------------------------------------- */
.activity-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-dot svg { width: 16px; height: 16px; }

.activity-body .title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.activity-body .meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  transition: all var(--transition);
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
}

.quick-action:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.quick-action .qa-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-action:hover .qa-icon { background: var(--primary); color: #fff; }
.quick-action .qa-icon svg { width: 18px; height: 18px; }
.quick-action span { font-size: 13px; font-weight: 600; }

/* --------------------------------------------------------------------------
   Page Header
   -------------------------------------------------------------------------- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 26px;
  margin-bottom: 4px;
}

.page-header .page-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Search Module
   -------------------------------------------------------------------------- */
.search-hero {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 32px;
  margin-bottom: 24px;
}

.search-hero .search-input-wrap {
  position: relative;
  margin-bottom: 18px;
}

.search-hero .search-input-wrap input {
  width: 100%;
  height: 58px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 0 140px 0 52px;
  font-family: var(--font);
  font-size: 16px;
  outline: none;
  transition: all var(--transition);
}

.search-hero .search-input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(11, 60, 116, 0.1);
}

.search-hero .search-input-wrap .si-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 22px;
  height: 22px;
}

.search-hero .search-input-wrap .btn-el {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 42px;
}

.ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ai-chips .label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.chip:hover { background: var(--primary); color: #fff; }
a.chip:hover { color: #fff; }

.filter-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.filter-panel .filter-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 14px;
  transition: all var(--transition);
  cursor: pointer;
}

.result-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.result-card .result-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 6px;
}

.result-card h4 {
  font-size: 15px;
  margin-bottom: 6px;
  line-height: 1.35;
}

.result-card .excerpt {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.result-meta span { display: inline-flex; align-items: center; gap: 4px; }
.result-meta svg { width: 14px; height: 14px; }

/* --------------------------------------------------------------------------
   AI Assistant
   -------------------------------------------------------------------------- */
.ai-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  height: calc(100vh - var(--topbar-h) - 120px);
  min-height: 560px;
}

.ai-sidebar-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-sidebar-panel .ai-panel-head {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.ai-tool-list { padding: 12px; flex: 1; overflow-y: auto; }

.ai-tool-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  margin-bottom: 2px;
}

.ai-tool-btn:hover,
.ai-tool-btn.active {
  background: var(--primary-light);
  color: var(--primary);
}

.ai-tool-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.ai-chat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ai-msg {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: fadeSlideUp 0.35s ease both;
}

.ai-msg.user { align-self: flex-end; flex-direction: row-reverse; }

.ai-msg .avatar-ai {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-msg .avatar-ai svg { width: 18px; height: 18px; }

.ai-msg .bubble {
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
}

.ai-msg.bot .bubble {
  background: var(--bg);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.ai-msg.user .bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.ai-chat-input {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.ai-chat-input textarea {
  flex: 1;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  font-family: var(--font);
  font-size: 14px;
  resize: none;
  min-height: 52px;
  max-height: 140px;
  outline: none;
  transition: border-color var(--transition);
}

.ai-chat-input textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(11, 60, 116, 0.1);
}

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #071e3d;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(28, 93, 153, 0.45) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(11, 60, 116, 0.6) 0%, transparent 45%),
    linear-gradient(160deg, #071e3d 0%, #0B3C74 50%, #0a2a52 100%);
}

.login-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-particles span {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  animation: floatParticle 18s linear infinite;
}

.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 24px;
  padding: 40px 40px 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: fadeSlideUp 0.6s ease both;
  margin: 24px;
}

.login-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 28px;
}

.login-logo {
  height: 58px;
  width: auto;
  max-width: 84px;
  object-fit: contain;
  display: block;
}

.login-card h1 {
  text-align: center;
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 6px;
}

.login-card .login-sub {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

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

.login-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  font-size: 13px;
}

.login-meta a { font-weight: 500; }

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-footer-note {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 24px;
  line-height: 1.5;
}

.login-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--success);
  font-weight: 500;
  margin-top: 16px;
}

/* --------------------------------------------------------------------------
   Landing Page
   -------------------------------------------------------------------------- */
.landing-body { background: #fff; overflow-x: hidden; }

.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition);
}

.landing-nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(15, 23, 42, 0.08);
  padding: 10px 0;
}

.landing-nav .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.landing-nav .nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}

.landing-nav.scrolled .nav-brand { color: var(--primary); }

.landing-nav .nav-brand .mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(145deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(11, 60, 116, 0.3);
}

.landing-nav .nav-brand .mark svg { color: #fff; width: 20px; height: 20px; }

.landing-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.landing-nav .nav-links a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-weight: 500;
  transition: color var(--transition);
}

.landing-nav.scrolled .nav-links a { color: var(--text-muted); }
.landing-nav .nav-links a:hover { color: var(--accent-gold); }
.landing-nav.scrolled .nav-links a:hover { color: var(--primary); }

.landing-hero {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(28, 93, 153, 0.4) 0%, transparent 50%),
    linear-gradient(155deg, #071e3d 0%, #0B3C74 45%, #154D91 100%);
  color: #fff;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 32px 80px;
  overflow: hidden;
}

.landing-hero .hero-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
  width: 100%;
}

.landing-hero .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 20px;
}

.landing-hero .hero-seals {
  display: inline-flex;
  align-items: center;
}

.landing-hero .hero-seals img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}

.landing-hero .hero-seals img + img { margin-left: -9px; }

.landing-hero h1 {
  font-size: clamp(36px, 5vw, 52px);
  color: #fff;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.landing-hero h1 span { color: var(--accent-gold); }

.landing-hero .hero-lead {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.78);
  max-width: 480px;
  margin-bottom: 32px;
  line-height: 1.65;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  min-height: 420px;
}

.hero-doc-stack {
  position: relative;
  height: 100%;
}

.hero-doc {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  color: var(--text);
  width: 280px;
  animation: floatDoc 6s ease-in-out infinite;
}

.hero-doc.doc-1 { top: 40px; left: 40px; z-index: 3; }
.hero-doc.doc-2 { top: 100px; right: 20px; z-index: 2; animation-delay: -2s; width: 240px; opacity: 0.92; }
.hero-doc.doc-3 { bottom: 40px; left: 80px; z-index: 1; animation-delay: -4s; width: 220px; opacity: 0.85; }

.hero-doc .doc-bar {
  height: 8px;
  background: var(--primary-light);
  border-radius: 4px;
  margin-bottom: 10px;
}

.hero-doc .doc-bar.short { width: 60%; }
.hero-doc .doc-bar.gold { background: rgba(226, 185, 59, 0.35); width: 40%; }
.hero-doc .doc-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.hero-ai-preview {
  position: absolute;
  bottom: 20px;
  right: 0;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 16px 18px;
  width: 260px;
  z-index: 5;
  animation: fadeSlideUp 0.8s ease 0.4s both;
}

.hero-ai-preview .ai-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.hero-ai-preview .ai-bubble {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
}

.landing-section {
  padding: 100px 32px;
}

.landing-section .section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 3.5vw, 36px);
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}

.section-lead {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 48px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: -60px;
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 32px;
}

.stat-card-landing {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border);
  text-align: center;
}

.stat-card-landing .num {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.03em;
}

.stat-card-landing .lbl {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  transition: all var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: transparent;
}

.feature-card .feat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-card .feat-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 17px; margin-bottom: 10px; }
.feature-card p { font-size: 14px; color: var(--text-muted); margin: 0; line-height: 1.6; }

.partners-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 36px 52px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.partner-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 170px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
  color: var(--text-muted);
}

.partner-badge .pb-mark {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(11, 60, 116, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.partner-badge:hover .pb-mark {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(11, 60, 116, 0.16);
}

.partner-badge .pb-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* The Bagong Pilipinas mark carries its own wordmark, so it needs no seal ring. */
.partner-badge .pb-mark-plain {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  padding: 2px;
}

.partner-badge:hover .pb-mark-plain { box-shadow: none; }

.landing-footer {
  background: #071e3d;
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 32px 32px;
}

.landing-footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.landing-footer h4 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 16px;
}

.landing-footer a {
  display: block;
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  margin-bottom: 10px;
}

.landing-footer a:hover { color: var(--accent-gold); }

.landing-footer .footer-brand {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.landing-footer .footer-seals {
  max-width: 1200px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.landing-footer .footer-seals img {
  height: 42px;
  width: 42px;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.landing-footer .footer-seals img:hover { opacity: 1; }
.landing-footer .footer-seals .footer-seal-wide { width: auto; max-width: 96px; }

.landing-footer .footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Document Viewer
   -------------------------------------------------------------------------- */
.viewer-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  min-height: calc(100vh - var(--topbar-h) - 100px);
}

.viewer-pdf {
  position: relative;
  background: #e8ecf1;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.viewer-toolbar {
  position: relative;
  z-index: 3;
  background: var(--card);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.viewer-canvas {
  flex: 1;
  padding: 32px;
  overflow: auto;
  display: flex;
  justify-content: center;
}

.pdf-page {
  background: #fff;
  width: 100%;
  max-width: 720px;
  min-height: 900px;
  box-shadow: 0 8px 40px rgba(15, 23, 42, 0.12);
  border-radius: 4px;
  padding: 48px 56px;
}

.pdf-page .ordinance-header {
  text-align: center;
  margin-bottom: 32px;
}

.pdf-page .ordinance-header .gov {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.pdf-page .ordinance-header h2 {
  font-size: 18px;
  margin: 8px 0;
}

.pdf-page .body-text {
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text);
  text-align: justify;
}

/* Agency seals tiled across every printed sheet so a reproduction cannot be
   retouched without disturbing the pattern. Print-only: it would only add
   noise while staff read the record on screen. */
.doc-watermark { display: none; }

.viewer-embed {
  width: 100%;
  min-height: 900px;
  border: 0;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 40px rgba(15, 23, 42, 0.12);
}

.citation-text {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  padding: 11px 13px;
  margin-bottom: 12px;
}

@media print {
  .app-sidebar,
  .app-topbar,
  .app-footer,
  .page-actions,
  .print-hide,
  .viewer-toolbar,
  .sidebar-overlay,
  .ai-dock,
  .viewer-layout aside { display: none !important; }
  .app-shell, .app-main, .app-content { display: block; margin: 0; padding: 0; }
  .viewer-layout { display: block; }
  .viewer-pdf { border: 0; background: #fff; }
  .viewer-canvas { padding: 0; overflow: visible; }
  .pdf-page {
    box-shadow: none;
    max-width: 100%;
    min-height: 0;
    padding: 0;
    transform: none !important;
  }

  /* Fixed positioning makes the seal pattern repeat on every printed sheet.
     The layer is oversized so the rotated grid still reaches each corner. */
  .doc-watermark {
    display: grid;
    position: fixed;
    inset: -14% -28%;
    z-index: 2;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    grid-auto-rows: 122px;
    align-content: start;
    justify-items: center;
    align-items: center;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.12;
    transform: rotate(-28deg);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .doc-watermark span {
    display: inline-flex;
    align-items: center;
    gap: 9px;
  }

  .doc-watermark img {
    width: 46px;
    height: 46px;
    object-fit: contain;
  }
}

.meta-panel .meta-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  gap: 12px;
}

.meta-panel .meta-row .label { color: var(--text-muted); flex-shrink: 0; }
.meta-panel .meta-row .value { font-weight: 600; text-align: right; }

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes floatDoc {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes floatParticle {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1); opacity: 0; }
}

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.animate-in { animation: fadeSlideUp 0.5s ease both; }
.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }
.delay-3 { animation-delay: 0.24s; }
.delay-4 { animation-delay: 0.32s; }

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg) 25%, #eef1f6 50%, var(--bg) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease infinite;
  border-radius: 8px;
}

@keyframes skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --------------------------------------------------------------------------
   Empty / Misc
   -------------------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.chart-wrap { position: relative; height: 280px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }
.grid-sidebar { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }

.section-gap { margin-bottom: 24px; }

.ai-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.ai-ref-link {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.ai-ref-link:hover { background: var(--primary); color: #fff; }

.ai-md-heading {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;
  margin: 10px 0 4px;
}
.ai-md-heading:first-child { margin-top: 0; }
.ai-md-list {
  margin: 4px 0 8px;
  padding-left: 20px;
}
.ai-md-list li { margin-bottom: 3px; }
.ai-md-gap { height: 8px; }
.ai-engine-note {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 11px;
  color: var(--text-muted);
}

.ai-draft-action {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.ai-draft-saved {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}

.ai-draft-saved svg { width: 15px; height: 15px; }
.ai-save-draft-form { margin: 0; }

.ai-draft-status {
  font-size: 12px;
  font-weight: 600;
}

.ai-draft-status.is-saving { color: var(--text-muted); }
.ai-draft-status.is-error { color: var(--danger); }

/* --------------------------------------------------------------------------
   Docked Assistant (record pages)
   -------------------------------------------------------------------------- */
.ai-dock {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1039;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.ai-dock-fab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 12px 14px;
  border: none;
  border-radius: 30px;
  background: linear-gradient(145deg, var(--primary), var(--secondary));
  color: #fff;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(11, 60, 116, 0.32);
  transition: transform var(--transition), box-shadow var(--transition);
}

.ai-dock-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(11, 60, 116, 0.38);
}

.ai-dock-fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.ai-dock-fab-icon svg { width: 16px; height: 16px; }

.ai-dock-panel {
  display: none;
  flex-direction: column;
  width: 420px;
  max-width: calc(100vw - 32px);
  height: min(620px, calc(100vh - var(--topbar-h) - 48px));
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hover);
  overflow: hidden;
  animation: fadeSlideUp 0.28s ease both;
}

.ai-dock.is-open .ai-dock-fab { display: none; }
.ai-dock.is-open .ai-dock-panel { display: flex; }

.ai-dock-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(145deg, var(--primary), var(--secondary));
  color: #fff;
}

.ai-dock-head-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.ai-dock-head-icon svg { width: 17px; height: 17px; }

.ai-dock-head-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-right: auto;
  font-size: 13.5px;
  line-height: 1.35;
}

.ai-dock-head-doc {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.75);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-dock-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  padding: 0;
  border: none;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  transition: background var(--transition);
}

.ai-dock-icon-btn:hover { background: rgba(255, 255, 255, 0.3); color: #fff; }
.ai-dock-icon-btn svg { width: 15px; height: 15px; }

.ai-dock-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 16px;
  background: rgba(244, 183, 64, 0.14);
  border-bottom: 1px solid var(--border);
  font-size: 11.5px;
  color: #8a5b00;
}

.ai-dock-notice svg { width: 14px; height: 14px; flex-shrink: 0; }

.ai-dock-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg);
}

/* Keeps a short conversation anchored to the composer without breaking scroll. */
.ai-dock-messages .ai-msg:first-child { margin-top: auto; }

.ai-dock-messages .ai-msg { max-width: 94%; }
.ai-dock-messages .ai-msg .avatar-ai { width: 28px; height: 28px; border-radius: 9px; }
.ai-dock-messages .ai-msg .avatar-ai svg { width: 14px; height: 14px; }

.ai-dock-messages .ai-msg .bubble {
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.ai-dock-messages .ai-msg.bot .bubble { background: var(--card); border: 1px solid var(--border); }

.ai-dock-prompts {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.ai-dock-prompts::-webkit-scrollbar { display: none; }

.ai-dock-prompt {
  flex-shrink: 0;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
}

.ai-dock-prompt:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.ai-dock-input {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 16px 16px;
}

.ai-dock-input textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: var(--font);
  font-size: 13px;
  resize: none;
  outline: none;
  transition: border-color var(--transition);
}

.ai-dock-input textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(11, 60, 116, 0.1);
}

.ai-dock-input button { flex-shrink: 0; height: 44px; }

@media (max-width: 576px) {
  .ai-dock { right: 12px; bottom: 12px; left: 12px; align-items: stretch; }
  .ai-dock-fab { justify-content: center; }
  .ai-dock-panel { width: 100%; height: min(560px, calc(100vh - 96px)); }
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.permission-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
}
.permission-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}
.permission-option input { margin-top: 3px; accent-color: var(--primary); }
.permission-option span { display: flex; flex-direction: column; gap: 2px; }
.permission-option strong { font-size: 13px; }
.permission-option small { color: var(--text-muted); font-size: 11px; line-height: 1.35; }

.committee-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}
.committee-card {
  display: block;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  transition: 0.2s ease;
  background: var(--surface);
}
.committee-card:hover, .committee-card.active {
  border-color: var(--primary);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.committee-card.active { background: var(--primary-light); }
.committee-card h3 { margin: 12px 0 5px; font-size: 15px; }
.committee-card p { color: var(--text-muted); font-size: 12px; min-height: 36px; margin-bottom: 12px; }
.committee-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.committee-stats span { display: flex; flex-direction: column; font-size: 10px; color: var(--text-muted); }
.committee-stats strong { color: var(--text); font-size: 13px; }
.committee-list { max-height: 520px; overflow: auto; }
.hearing-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.hearing-item:last-child { border-bottom: 0; }
.hearing-date {
  width: 46px;
  height: 48px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.hearing-date strong { font-size: 17px; line-height: 1; }
.hearing-date span { font-size: 10px; text-transform: uppercase; }

@media (max-width: 768px) {
  .permission-grid { grid-template-columns: 1fr; }
  .committee-card-grid { grid-template-columns: 1fr; }
}

#knowledgeGraph { width: 100%; }
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .landing-hero .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .stats-row { grid-template-columns: repeat(2, 1fr); margin-top: -40px; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .landing-footer .footer-inner { grid-template-columns: 1fr 1fr; }
  .ai-layout { grid-template-columns: 1fr; height: auto; }
  .viewer-layout { grid-template-columns: 1fr; }
}

@media (max-width: 992px) {
  .app-sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-w) !important;
  }
  .app-sidebar.mobile-open { transform: translateX(0); }
  .app-main { margin-left: 0 !important; }
  .app-shell.sidebar-collapsed .app-main { margin-left: 0 !important; }
  .topbar-search { display: none; }
  .topbar-profile .meta { display: none; }
  .grid-2, .grid-3, .grid-sidebar { grid-template-columns: 1fr; }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1035;
  }
  .sidebar-overlay.show { display: block; }
}

@media (max-width: 768px) {
  .app-content { padding: 20px 16px 32px; }
  .kpi-grid { grid-template-columns: 1fr; }
  .welcome-banner { padding: 28px 24px; }
  .welcome-banner h1 { font-size: 22px; }
  .banner-search { flex-direction: column; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .features-grid { grid-template-columns: 1fr; }
  .landing-nav .nav-links { display: none; }
  .quick-action-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
  .login-card { padding: 32px 24px; }
}

/* Mobile table → cards hint */
@media (max-width: 640px) {
  .table-el-wrap { overflow-x: auto; }
  .landing-footer .footer-inner { grid-template-columns: 1fr; }
}

/* Drafting workspace */
.draft-title-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}
.draft-title-input {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  width: 100%;
  padding: 8px 38px 8px 12px;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.draft-title-input::placeholder {
  font-weight: 500;
  color: var(--text-muted);
}
.draft-title-input:hover { border-color: rgba(11, 60, 116, 0.35); }
.draft-title-input:focus {
  border-style: solid;
  border-color: rgba(11, 60, 116, 0.55);
  box-shadow: 0 0 0 3px rgba(11, 60, 116, 0.08);
}
.draft-title-pencil {
  position: absolute;
  right: 12px;
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}
.draft-title-input:focus + .draft-title-pencil { color: var(--primary); }
.draft-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: var(--bg-subtle, #F8FAFC);
}
.draft-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.draft-tool:hover {
  color: var(--primary);
  border-color: rgba(11, 60, 116, 0.28);
}
.draft-tool i { width: 15px; height: 15px; }
.draft-tool-sep {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--border);
}
.draft-word-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}
.draft-editor {
  min-height: 420px;
  max-height: 640px;
  overflow-y: auto;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  background: #fff;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}
.draft-editor:focus {
  outline: none;
  border-color: rgba(11, 60, 116, 0.35);
  box-shadow: 0 0 0 3px rgba(11, 60, 116, 0.08);
}
.draft-editor h2 { font-size: 18px; font-weight: 700; margin: 18px 0 8px; }
.draft-editor h3 { font-size: 15px; font-weight: 700; margin: 16px 0 6px; }
.draft-editor p { margin: 0 0 12px; }
.draft-editor ul, .draft-editor ol { margin: 0 0 12px; padding-left: 24px; }
.draft-editor blockquote {
  margin: 0 0 12px;
  padding: 8px 14px;
  border-left: 3px solid var(--primary);
  color: var(--text-muted);
}
.draft-list-item {
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 10px;
  padding-right: 8px;
}
.draft-list-item.active { background: var(--primary-light); }
.draft-list-item > .activity-item {
  flex: 1;
  min-width: 0;
  color: inherit;
}
.draft-delete-form { margin: 0; }

.draft-editor-readonly {
  background: #FBFCFE;
  color: var(--text);
  cursor: default;
}
.draft-readonly-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #F8FAFC;
  font-size: 13px;
  color: var(--text-muted);
}
.draft-readonly-note i { width: 16px; height: 16px; flex-shrink: 0; }
.form-static {
  padding: 9px 0;
  font-size: 14px;
  color: var(--text);
}
.btn-icon-sm {
  width: 26px;
  height: 26px;
  min-width: 26px;
}
.btn-icon-sm i { width: 13px; height: 13px; }

/* Collaborators */
.draft-collaborator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.draft-collaborator + .draft-collaborator { border-top: 1px solid var(--border); }
.draft-collaborator .avatar,
.draft-comment .avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}
.draft-collaborator-body {
  flex: 1;
  min-width: 0;
}
.draft-collaborator-body .title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.draft-collaborator-body .meta {
  font-size: 12px;
  color: var(--text-muted);
}
.draft-access-form {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 6px 0 0;
}
.form-control-xs {
  height: 30px;
  padding: 4px 8px;
  font-size: 12px;
  max-width: 130px;
}

/* Version history */
.draft-version {
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.draft-version.current {
  border-color: rgba(11, 60, 116, 0.3);
  background: var(--primary-light);
}
.draft-version-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.draft-version-head a {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.draft-version .meta {
  font-size: 12px;
  color: var(--text-muted);
}
.draft-version .summary {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text);
}
.draft-version form { margin: 8px 0 0; }

/* Comments */
.draft-comment {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.draft-comment-body { flex: 1; min-width: 0; }
.draft-comment-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}
.draft-comment-meta {
  font-size: 12px;
  color: var(--text-muted);
}
.draft-comment-body p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
}
.draft-comment-form { margin-top: 16px; }

/* Report generator catalog */
.report-catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.report-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.report-card:hover {
  border-color: rgba(11, 60, 116, 0.35);
  box-shadow: var(--shadow-sm, 0 4px 12px rgba(15, 23, 42, 0.06));
}
.report-card.active {
  border-color: rgba(11, 60, 116, 0.45);
  background: var(--primary-light);
}
.report-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
}
.report-card-icon i { width: 18px; height: 18px; }
.report-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.report-card-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}
.report-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.report-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.kpi-card.compact {
  padding: 16px 18px;
}
.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.insight-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}
.insight-card-link {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.insight-card-link:hover {
  color: inherit;
  border-color: rgba(11, 60, 116, 0.28);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}
.insight-card-body {
  flex: 1;
  min-width: 0;
}
.insight-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
}
.insight-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
}
.insight-icon i { width: 18px; height: 18px; }
.insight-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.insight-detail {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
}
.insight-card.tone-warning .insight-icon { background: #FEF3C7; color: #B45309; }
.insight-card.tone-info .insight-icon { background: var(--primary-light); color: var(--primary); }
.insight-card.tone-success .insight-icon { background: #DCFCE7; color: #15803D; }
.insight-icon.tone-warning { background: #FEF3C7; color: #B45309; }
.insight-icon.tone-info { background: var(--primary-light); color: var(--primary); }
.insight-icon.tone-success { background: #DCFCE7; color: #15803D; }
.insight-detail-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.insight-detail-heading .insight-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
}
.insight-detail-heading h1 { margin-bottom: 4px; }
.insight-record-list {
  display: grid;
  gap: 10px;
}
.insight-record {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.insight-record-main {
  flex: 1;
  min-width: 0;
}
.insight-record-label {
  margin-bottom: 3px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.insight-record-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}
.insight-record-meta {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}
.insight-empty {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 36px;
  color: var(--text-muted);
  text-align: center;
}
.insight-empty i {
  width: 30px;
  height: 30px;
  color: #15803D;
}
.insight-empty strong { color: var(--text); }

@media (max-width: 1100px) {
  .report-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .report-catalog,
  .insight-grid,
  .report-filters { grid-template-columns: 1fr; }
  .insight-record {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Upload workspace and live preview */
.upload-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 20px;
  align-items: start;
}
.upload-dropzone {
  padding: 42px 24px;
  border: 2px dashed var(--border);
  border-radius: 16px;
  background: var(--bg);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.upload-dropzone:hover,
.upload-dropzone:focus,
.upload-dropzone.drag-over {
  outline: none;
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-dropzone.drag-over { transform: scale(1.01); }
.upload-dropzone.has-file {
  padding: 24px;
  border-color: rgba(21, 128, 61, 0.4);
  background: #F0FDF4;
}
.upload-preview-card {
  position: sticky;
  top: 86px;
  overflow: hidden;
}
.upload-preview-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 340px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: #F3F6FA;
}
.upload-preview-empty,
.upload-preview-unsupported {
  display: grid;
  justify-items: center;
  gap: 7px;
  max-width: 310px;
  padding: 28px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.upload-preview-empty[hidden],
.upload-preview-unsupported[hidden] { display: none; }
.upload-preview-empty i,
.upload-preview-unsupported i {
  width: 38px;
  height: 38px;
  margin-bottom: 4px;
  color: var(--primary);
}
.upload-preview-empty strong,
.upload-preview-unsupported strong {
  color: var(--text);
  font-size: 14px;
}
.upload-preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}
.upload-preview-frame[hidden],
.upload-preview-image[hidden] { display: none; }
.upload-preview-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.upload-file-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.upload-file-summary[hidden] { display: none; }
.upload-file-summary > i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--primary);
}
.upload-file-summary > div {
  display: grid;
  flex: 1;
  min-width: 0;
}
.upload-file-summary strong,
.upload-file-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-file-summary strong { color: var(--text); font-size: 12px; }
.upload-file-summary span { color: var(--text-muted); font-size: 11px; }
.upload-preview-meta { padding: 18px 20px 20px; }
.upload-preview-government {
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.upload-preview-number {
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.upload-preview-meta h3 {
  margin: 5px 0 7px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
}
.upload-preview-meta p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.upload-preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.upload-preview-tags > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 11px;
}
.upload-preview-tags i { width: 13px; height: 13px; }
.upload-preview-author {
  margin-top: 10px;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}
.upload-progress-panel {
  padding: 14px 18px 16px;
  border-top: 1px solid var(--border);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
}
.upload-progress-panel[hidden] { display: none; }
.upload-progress-panel strong { font-size: 12px; }
.upload-progress-track {
  height: 7px;
  margin: 9px 0 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(11, 60, 116, 0.14);
}
.upload-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.18s ease;
}

@media (max-width: 1100px) {
  .upload-workspace { grid-template-columns: 1fr; }
  .upload-preview-card { position: static; }
}

/* Search result actions and saved searches */
.result-title-link {
  color: inherit;
  text-decoration: none;
}
.result-title-link:hover { color: var(--primary); }
.result-action-form { display: inline-flex; margin: 0; }
.btn-icon.active {
  color: var(--primary);
  border-color: rgba(11, 60, 116, 0.28);
  background: rgba(11, 60, 116, 0.08);
}
.btn-icon:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}
.search-results-list .result-card {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 8px;
}
.search-results-list .result-card .excerpt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 760px;
}
.saved-search-list {
  display: grid;
  gap: 8px;
}
.saved-search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.saved-search-item > a {
  color: var(--text);
  display: grid;
  flex: 1;
  min-width: 0;
  text-decoration: none;
}
.saved-search-item small {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Public Legislative Library
   -------------------------------------------------------------------------- */
.landing-public-search {
  position: relative;
  z-index: 12;
  max-width: 1200px;
  margin: -72px auto 0;
  padding: 0 32px;
}

.landing-hero-with-search {
  min-height: 760px;
  padding-bottom: 120px;
}

@media (min-width: 1201px) {
  .landing-hero-with-search .hero-visual { margin-top: 72px; }
}

.landing-public-search-inner {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hover);
}

.public-search-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.public-search-heading .section-eyebrow { margin-bottom: 3px; }
.public-search-heading h2 { margin: 0; font-size: 20px; }

.public-view-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 7px 11px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.public-view-badge svg { width: 14px; height: 14px; }

.public-search-form {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 170px 190px auto;
  gap: 10px;
  align-items: stretch;
}

.public-search-query {
  position: relative;
  min-width: 0;
}

.public-search-query svg {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 19px;
  height: 19px;
  color: var(--primary);
  transform: translateY(-50%);
}

.public-search-query input,
.public-search-form select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.public-search-query input { padding: 0 16px 0 46px; }
.public-search-form select { padding: 0 34px 0 13px; }
.public-search-form .btn-el { min-height: 48px; }

.public-search-query input:focus,
.public-search-form select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(11, 60, 116, 0.1);
}

.public-popular-searches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  font-size: 11px;
  color: var(--text-muted);
}

.public-popular-searches strong { color: var(--primary); }

.public-popular-searches a {
  padding: 5px 10px;
  border-radius: 16px;
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 600;
}

.public-popular-searches a:hover { background: var(--primary-light); color: var(--primary); }
.landing-public-search + .stats-row { margin-top: 24px; }

.public-library-body,
.public-document-body { min-height: 100vh; background: var(--bg); }

.public-page-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.public-page-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1200px;
  min-height: 68px;
  margin: 0 auto;
  padding: 0 32px;
}

.public-page-nav .nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}

.public-page-nav .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--primary), var(--secondary));
  color: #fff;
}

.public-page-nav .mark svg { width: 18px; height: 18px; }

.public-library-main,
.public-document-main {
  max-width: 1200px;
  min-height: calc(100vh - 150px);
  margin: 0 auto;
  padding: 44px 32px 72px;
}

.public-library-header { margin-bottom: 24px; }
.public-library-header h1 { margin: 10px 0 4px; font-size: 30px; }
.public-library-header p { margin: 0; color: var(--text-muted); }

.public-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.public-back-link svg { width: 15px; height: 15px; }

.public-search-form-page {
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.public-results-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 2px 14px;
  color: var(--text-muted);
  font-size: 13px;
}

.public-results-summary strong { color: var(--text); }
.public-results-summary a { font-weight: 600; }

.public-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.public-result-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.public-result-card:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 60, 116, 0.24);
  box-shadow: var(--shadow-hover);
}

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

.public-result-year { color: var(--text-muted); font-size: 12px; font-weight: 600; }
.public-result-card h2 { margin-bottom: 7px; font-size: 16px; }
.public-result-card h2 a { color: var(--text); }
.public-result-card h2 a:hover { color: var(--primary); }

.public-result-title {
  min-height: 42px;
  margin: 0 0 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.public-result-summary {
  display: -webkit-box;
  min-height: 60px;
  margin: 0 0 16px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.public-result-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
}

.public-result-meta span { display: flex; align-items: center; gap: 7px; }
.public-result-meta svg { width: 13px; height: 13px; color: var(--primary); }
.public-view-link { align-self: flex-start; margin-top: 16px; }

.public-empty-state {
  padding: 64px 24px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.public-empty-state > svg { width: 42px; height: 42px; color: var(--disabled); }
.public-empty-state h2 { margin: 14px 0 5px; font-size: 18px; }
.public-empty-state p { margin: 0; color: var(--text-muted); font-size: 13px; }

.public-pagination {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 28px;
}

.public-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.public-pagination a:hover,
.public-pagination a.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.public-mini-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 32px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
}

.public-document-header { margin-bottom: 24px; }
.public-document-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-top: 12px;
}

.public-document-title-row h1 { margin: 10px 0 3px; font-size: 27px; }
.public-document-title-row p { max-width: 760px; margin: 0; color: var(--text-muted); }

.public-document-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 270px;
  padding: 11px 13px;
  border: 1px solid rgba(244, 183, 64, 0.45);
  border-radius: 12px;
  background: rgba(244, 183, 64, 0.12);
  color: #795500;
  font-size: 11px;
  line-height: 1.4;
}

.public-document-notice svg { width: 18px; height: 18px; flex-shrink: 0; }
.public-document-notice span { display: flex; flex-direction: column; }

.public-document-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: start;
}

.public-document-paper {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  user-select: none;
  -webkit-user-select: none;
}

.public-watermark-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-content: space-around;
  justify-items: center;
  gap: 72px 4px;
  overflow: hidden;
  pointer-events: none;
  transform: rotate(-28deg) scale(1.16);
}

.public-watermark-layer span {
  color: rgba(11, 60, 116, 0.105);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.public-document-content {
  position: relative;
  z-index: 1;
  padding: 58px 68px 42px;
}

.public-document-paper-head {
  margin-bottom: 38px;
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 13px;
  line-height: 1.45;
}

.public-document-paper-head h2 { margin: 28px 0 10px; font-family: inherit; font-size: 18px; }
.public-document-paper-head p { margin: 0; font-size: 12px; font-weight: 700; line-height: 1.5; }

.public-document-text {
  color: #202020;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  line-height: 1.9;
  text-align: justify;
  white-space: normal;
}

.public-document-paper-foot {
  margin-top: 54px;
  padding-top: 14px;
  border-top: 1px solid #d7dce3;
  color: #7b8491;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-align: center;
}

.public-preview-unavailable {
  padding: 70px 20px;
  color: var(--text-muted);
  text-align: center;
}

.public-preview-unavailable svg { width: 40px; height: 40px; color: var(--disabled); }
.public-preview-unavailable h3 { margin: 12px 0 5px; font-size: 16px; }
.public-preview-unavailable p { margin: 0; font-size: 12px; }

.public-document-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 16px;
}

.public-document-sidebar .meta-panel .meta-row { gap: 18px; }
.public-document-sidebar .meta-panel .value { max-width: 170px; text-align: right; overflow-wrap: anywhere; }

.public-use-note {
  display: flex;
  gap: 11px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
}

.public-use-note > svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.public-use-note p { margin: 3px 0 0; color: var(--text-muted); line-height: 1.5; }

@media (max-width: 992px) {
  .public-search-form { grid-template-columns: 1fr 1fr; }
  .public-search-query { grid-column: 1 / -1; }
  .public-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .public-document-layout { grid-template-columns: 1fr; }
  .public-document-sidebar { position: static; }
}

@media (max-width: 640px) {
  .landing-hero-with-search { min-height: 680px; padding-bottom: 96px; }
  .landing-public-search { margin-top: -48px; padding: 0 16px; }
  .landing-public-search-inner { padding: 18px; }
  .public-search-heading { align-items: flex-start; flex-direction: column; }
  .public-search-form { grid-template-columns: 1fr; }
  .public-search-query { grid-column: auto; }
  .public-popular-searches a:nth-of-type(n+4) { display: none; }
  .landing-public-search + .stats-row { margin-top: 18px; }
  .public-page-nav-inner { padding: 0 16px; }
  .public-page-nav .nav-brand > span:last-child { display: none; }
  .public-library-main,
  .public-document-main { padding: 30px 16px 52px; }
  .public-library-header h1 { font-size: 25px; }
  .public-result-grid { grid-template-columns: 1fr; }
  .public-document-title-row { align-items: flex-start; flex-direction: column; }
  .public-document-notice { max-width: none; }
  .public-document-content { padding: 42px 28px 32px; }
  .public-watermark-layer { grid-template-columns: repeat(2, 1fr); }
  .public-watermark-layer span { font-size: 13px; }
  .public-mini-footer { flex-direction: column; padding: 20px 16px; }
}

@media print {
  .public-document-body { display: none !important; }
}

/* --------------------------------------------------------------------------
   Forms — shared field scaffolding
   -------------------------------------------------------------------------- */
.form-group-el { margin-bottom: 18px; }

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

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

/* --------------------------------------------------------------------------
   Theme switch
   -------------------------------------------------------------------------- */
.theme-toggle .theme-icon-dark { display: none; }

[data-theme="dark"] .theme-toggle .theme-icon-light { display: none; }
[data-theme="dark"] .theme-toggle .theme-icon-dark { display: inline-flex; }

.badge-nav-count {
  background: var(--danger);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Executive Command Center
   -------------------------------------------------------------------------- */
.exec-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding: 30px 34px;
  margin-bottom: 4px;
  border-radius: var(--radius-card);
  background: linear-gradient(120deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  box-shadow: var(--shadow-card);
}

.exec-hero-copy { min-width: 0; flex: 1 1 280px; }

.exec-hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.exec-hero-copy h1 {
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 14px 0 6px;
  line-height: 1.2;
}

.exec-hero-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.55;
  max-width: 62ch;
}

.exec-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 36px;
  flex: 0 1 auto;
}

.exec-hero-stats > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 88px;
}

.exec-hero-stats .value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
}

.exec-hero-stats .label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.72);
}

.exec-insight-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }

.exec-insight-list li {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.exec-insight-list li:has(.exec-insight-link):hover {
  border-color: rgba(11, 60, 116, 0.28);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.exec-insight-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
}

.exec-insight-link:hover,
.exec-insight-link:focus-visible {
  color: inherit;
  text-decoration: none;
}

.exec-insight-list li:not(:has(.exec-insight-link)) {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
}

.exec-insight-list .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
  background: var(--info);
}

.exec-insight-copy { flex: 1; min-width: 0; }

.exec-insight-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.exec-insight-action i {
  width: 14px;
  height: 14px;
}

.exec-insight-list .tone-positive .dot { background: var(--success); }
.exec-insight-list .tone-warning .dot { background: var(--warning); }
.exec-insight-list p { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); }
.exec-insight-list .evidence { display: block; margin-top: 4px; font-size: 12px; color: var(--text-muted); }

@media (max-width: 720px) {
  .exec-insight-link { flex-wrap: wrap; }
  .exec-insight-action { margin-left: 21px; }
}

.exec-pipeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
}

.exec-pipeline-stage {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
}

a.exec-pipeline-stage {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

a.exec-pipeline-stage:hover,
a.exec-pipeline-stage:focus-visible {
  color: inherit;
  text-decoration: none;
  border-color: rgba(11, 60, 116, 0.28);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

a.exec-pipeline-stage:hover .stage-arrow,
a.exec-pipeline-stage:focus-visible .stage-arrow { opacity: 1; }

.exec-pipeline-stage .stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.exec-pipeline-stage .stage-arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.exec-pipeline-stage .stage-name {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.exec-pipeline-stage .stage-value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  margin: 8px 0 12px;
}

.stage-bar,
.exec-share-bar,
.exec-gauge-bar {
  display: block;
  width: 100%;
  height: 7px;
  min-height: 7px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.stage-bar > span,
.exec-share-bar > span,
.exec-gauge-bar > span {
  display: block;
  height: 100%;
  min-height: 7px;
  border-radius: 999px;
  background: var(--primary);
}

.exec-pipeline-stage .stage-share {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.exec-share { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.exec-share-bar { flex: 1; }
.exec-share-value { font-size: 12px; font-weight: 600; color: var(--text-muted); min-width: 40px; text-align: right; }

.exec-gauge { text-align: center; padding-bottom: 6px; }
.exec-gauge-value { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; color: var(--primary); }
.exec-gauge-label { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }

.exec-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.exec-mini-stats > div {
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
  background: var(--bg);
}

.exec-mini-stats .value { display: block; font-size: 18px; font-weight: 700; color: var(--text); }
.exec-mini-stats .label { display: block; font-size: 11px; color: var(--text-muted); }

/* --------------------------------------------------------------------------
   News & Announcements
   -------------------------------------------------------------------------- */

/* Shared building blocks ------------------------------------------------- */
.news-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--primary-light);
  color: var(--primary);
}

.news-tile svg { width: 20px; height: 20px; }
.news-tile.tone-primary { background: var(--primary-light); color: var(--primary); }
.news-tile.tone-info { background: rgba(52, 152, 219, 0.12); color: #24779F; }
.news-tile.tone-warning { background: rgba(244, 183, 64, 0.18); color: #8A6008; }
.news-tile.tone-success { background: rgba(23, 166, 115, 0.13); color: #0F7A55; }
.news-tile.tone-neutral { background: var(--bg); color: var(--text-muted); }

.news-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--primary-light);
  color: var(--primary);
  white-space: nowrap;
}

.news-tag.tone-info { background: rgba(52, 152, 219, 0.12); color: #24779F; }
.news-tag.tone-warning { background: rgba(244, 183, 64, 0.18); color: #8A6008; }
.news-tag.tone-success { background: rgba(23, 166, 115, 0.13); color: #0F7A55; }
.news-tag.tone-neutral { background: var(--bg); color: var(--text-muted); }

.news-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.news-flag svg { width: 13px; height: 13px; }
.news-flag.is-pinned { color: #8A6008; }

.news-flag.is-new {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.news-byline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.news-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.news-byline-name { font-weight: 600; color: var(--text); }

/* Toolbar / category filters -------------------------------------------- */
.news-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.news-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.news-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.news-chip:hover { border-color: var(--primary); color: var(--primary); }

.news-chip .count {
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 700;
}

.news-chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.news-chip.is-active .count { background: rgba(255, 255, 255, 0.22); color: #fff; }

.news-result-note { font-size: 12px; color: var(--text-muted); }

/* Featured (pinned or latest) notice ------------------------------------ */
.news-featured {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  overflow: hidden;
  padding: 30px 32px 30px 36px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}

.news-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
}

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

.news-featured .news-tile { width: 52px; height: 52px; border-radius: 16px; }
.news-featured .news-tile svg { width: 24px; height: 24px; }

.news-featured-body { min-width: 0; }

.news-featured-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.news-featured-body h2 {
  font-size: 23px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}

.news-featured-body h2 a { color: var(--text); }
.news-featured-body h2 a:hover { color: var(--primary); }

.news-featured-summary {
  margin: 0 0 20px;
  max-width: 76ch;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.news-featured-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.news-featured-meta {
  display: flex;
  align-items: center;
  gap: 8px 18px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.news-featured-meta .sep { color: var(--disabled); }

/* Card grid -------------------------------------------------------------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}

.news-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.news-card.is-unread { border-color: rgba(11, 60, 116, 0.28); }

.news-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.news-card-flags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.news-card h3 {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 9px;
}

.news-card h3 a { color: var(--text); }
.news-card h3 a:hover { color: var(--primary); }

.news-card-summary {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.news-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}

.news-card-foot time { white-space: nowrap; }

/* Empty state ------------------------------------------------------------ */
.news-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 64px 24px;
  text-align: center;
}

.news-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-bottom: 6px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary);
}

.news-empty-icon svg { width: 27px; height: 27px; }
.news-empty strong { font-size: 16px; color: var(--text); }
.news-empty span { font-size: 13.5px; color: var(--text-muted); max-width: 44ch; }

/* Single announcement (article view) ------------------------------------- */
.news-article-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.news-article-head-body { min-width: 0; flex: 1; }

.news-article-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.news-article-head h1 {
  font-size: 27px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 14px;
}

.news-article-meta {
  display: flex;
  align-items: center;
  gap: 10px 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-muted);
}

.news-article-meta .sep { color: var(--disabled); }

.news-lead {
  padding: 18px 20px;
  margin: 0 0 24px;
  border-left: 3px solid var(--primary);
  border-radius: 0 12px 12px 0;
  background: var(--primary-light);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--text);
}

.news-article { font-size: 15px; line-height: 1.8; color: var(--text); max-width: 78ch; }

.news-article-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 28px 0 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  font-size: 13px;
  color: var(--text-muted);
}

.news-article-note svg { width: 16px; height: 16px; flex-shrink: 0; }

@media (max-width: 640px) {
  .news-featured { grid-template-columns: 1fr; gap: 16px; padding: 24px 22px 24px 26px; }
  .news-featured-body h2 { font-size: 20px; }
  .news-grid { grid-template-columns: 1fr; }
  .news-article-head { flex-direction: column; gap: 14px; }
  .news-article-head h1 { font-size: 22px; }
}

/* --------------------------------------------------------------------------
   QR verification panel (document viewer)
   -------------------------------------------------------------------------- */
.qr-panel { display: flex; gap: 16px; align-items: flex-start; }

.qr-panel-code {
  flex-shrink: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  line-height: 0;
}

.qr-panel-code svg { width: 104px; height: 104px; display: block; }

.qr-panel-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }

.qr-panel-meta .label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
}

.qr-panel-meta .label:first-child { margin-top: 0; }

.qr-panel-meta code {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}

.qr-panel-meta code.truncate { color: var(--text-muted); font-weight: 500; }
.qr-panel-scans { margin-top: 10px; font-size: 12px; color: var(--text-muted); }

.qr-panel-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.landing-verify-callout {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--primary-light);
  color: var(--text);
  transition: border-color var(--transition), transform var(--transition);
}

.landing-verify-callout:hover { border-color: var(--primary); transform: translateY(-2px); color: var(--text); }

.lvc-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  flex-shrink: 0;
}

.lvc-mark svg { width: 20px; height: 20px; }
.lvc-copy { flex: 1; font-size: 13px; color: var(--text-muted); line-height: 1.55; }
.lvc-copy strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 2px; }

.lvc-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.lvc-action svg { width: 15px; height: 15px; }

/* --------------------------------------------------------------------------
   Public verification portal
   -------------------------------------------------------------------------- */
.verify-body { background: var(--bg); }
.verify-main { max-width: 1000px; margin: 0 auto; padding: 54px 24px 72px; }
.verify-result-main { max-width: 1080px; }

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

.verify-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.verify-eyebrow svg { width: 14px; height: 14px; }
.verify-hero h1 { font-size: 34px; margin: 18px 0 10px; }
.verify-hero > p { color: var(--text-muted); font-size: 15px; max-width: 60ch; margin: 0 auto; }

.verify-form { margin: 32px auto 0; max-width: 620px; }

.verify-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 18px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.verify-input-row:focus-within { border-color: var(--primary); }
.verify-input-icon { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }

.verify-input-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text);
  text-transform: uppercase;
}

.verify-input-row input::placeholder { color: var(--disabled); font-weight: 500; letter-spacing: 0.04em; }

.verify-inline-error {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 18px auto 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(214, 69, 69, 0.1);
  color: #b03030;
  font-size: 13px;
  font-weight: 500;
}

.verify-inline-error svg { width: 16px; height: 16px; flex-shrink: 0; }

.verify-explainer {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.verify-explainer article {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
}

.verify-explainer .step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 800;
  font-size: 14px;
}

.verify-explainer h2 { font-size: 16px; margin: 14px 0 8px; }
.verify-explainer p { margin: 0; font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.verify-explainer code { font-size: 12px; color: var(--primary); }

.verify-verdict {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 30px 34px;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  color: #fff;
}

.verify-verdict.is-verified { background: linear-gradient(120deg, #0f7a54 0%, #17A673 100%); }
.verify-verdict.is-pending { background: linear-gradient(120deg, #9a6b00 0%, #F4B740 100%); }
.verify-verdict.is-failed { background: linear-gradient(120deg, #8f2b2b 0%, #D64545 100%); }

.verdict-mark {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.verdict-mark svg { width: 34px; height: 34px; }
.verify-verdict h1 { color: #fff; font-size: 28px; margin: 0 0 6px; }
.verify-verdict p { margin: 0 0 12px; color: rgba(255, 255, 255, 0.88); font-size: 14px; max-width: 70ch; }

.verdict-code {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.verify-detail-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.verify-side { display: grid; gap: 18px; }
.verify-qr-card .el-card-body { text-align: center; }

.verify-qr {
  display: inline-block;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  line-height: 0;
}

.verify-hash-label {
  margin: 18px 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.verify-hash {
  display: block;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-muted);
  word-break: break-all;
}

.verify-scan-note { margin: 14px 0 0; font-size: 12px; color: var(--text-muted); }
.verify-actions { display: grid; gap: 10px; }

.verify-empty {
  margin-top: 32px;
  padding: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
  text-align: center;
}

.verify-empty p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }

/* Print-ready verification slip */
.verify-slip-body { background: #eef1f6; margin: 0; padding: 28px 16px 56px; font-family: var(--font); }

.verify-slip-toolbar {
  max-width: 760px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.verify-slip-toolbar a { font-size: 13px; font-weight: 600; }

.verify-slip-toolbar button {
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.verify-slip {
  max-width: 760px;
  margin: 0 auto;
  padding: 46px 52px 38px;
  background: #fff;
  border: 1px solid #d7dce3;
  border-radius: 6px;
  color: #223042;
}

.verify-slip header { text-align: center; border-bottom: 2px solid #223042; padding-bottom: 18px; }
.verify-slip .republic { margin: 0; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.verify-slip .agency { margin: 4px 0 0; font-size: 13px; font-weight: 700; }
.verify-slip h1 { font-size: 21px; margin: 16px 0 4px; letter-spacing: 0.02em; }
.verify-slip .issued { margin: 0; font-size: 12px; color: #6B7280; }

.verify-slip-verdict {
  margin: 26px 0;
  padding: 16px 20px;
  border: 2px solid #17A673;
  border-radius: 6px;
  text-align: center;
}

.verify-slip-verdict strong { display: block; font-size: 20px; letter-spacing: 0.18em; color: #0f7a54; }
.verify-slip-verdict span { display: block; margin-top: 6px; font-size: 12px; color: #6B7280; }

.verify-slip-grid { display: grid; grid-template-columns: 1fr 210px; gap: 34px; align-items: start; }
.verify-slip dl { display: grid; grid-template-columns: 128px 1fr; gap: 9px 14px; margin: 0; font-size: 13px; }
.verify-slip dt { font-weight: 700; color: #6B7280; }
.verify-slip dd { margin: 0; }
.verify-slip dd.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.verify-slip dd.wrap { word-break: break-all; line-height: 1.5; }
.verify-slip figure { margin: 0; text-align: center; }
.verify-slip figure svg { width: 180px; height: 180px; }
.verify-slip figcaption { margin-top: 8px; font-size: 10px; color: #6B7280; word-break: break-all; }

.verify-slip footer { margin-top: 34px; padding-top: 16px; border-top: 1px solid #d7dce3; }
.verify-slip footer p { margin: 0; font-size: 11px; line-height: 1.6; color: #6B7280; }

@media print {
  .verify-slip-body { background: #fff; padding: 0; }
  .verify-slip-toolbar { display: none; }
  .verify-slip { border: 0; max-width: none; padding: 0; }
}

@media (max-width: 992px) {
  .exec-hero { flex-direction: column; align-items: flex-start; }
  .exec-hero-stats { gap: 24px; }
  .verify-detail-layout { grid-template-columns: 1fr; }
  .verify-explainer { grid-template-columns: 1fr; }
  .verify-slip-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .form-grid-2 { grid-template-columns: 1fr; }
  .landing-verify-callout { flex-direction: column; align-items: flex-start; }
  .exec-hero { padding: 24px; }
  .exec-hero-copy h1 { font-size: 24px; }
  .exec-mini-stats { grid-template-columns: 1fr; }
  .news-item { flex-direction: column; gap: 14px; }
  .qr-panel { flex-direction: column; }
  .verify-main { padding: 34px 16px 52px; }
  .verify-hero h1 { font-size: 26px; }
  .verify-input-row { flex-direction: column; align-items: stretch; padding: 14px; }
  .verify-input-row input { text-align: center; }
  .verify-verdict { flex-direction: column; align-items: flex-start; padding: 24px; }
  .verify-slip { padding: 28px 22px; }
}
