/* ============================================================
   Global reset (shared by every page)
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ============================================================
   Welcome page  (scope: body.page-welcome)
   ============================================================ */

body.page-welcome {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #e8edf2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: #1a1a1a;
}

body.page-welcome .navbar {
  background: linear-gradient(135deg, #1b3a6b 0%, #2a5298 100%);
  border-bottom: 3px solid #60a5fa;
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

body.page-welcome .navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

body.page-welcome .navbar-logo .logo-icon {
  font-size: 22px;
}

body.page-welcome .navbar-logo small {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 2px;
}

body.page-welcome .navbar-actions {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

body.page-welcome .nav-btn {
  padding: 7px 22px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
  border: none;
}

body.page-welcome .nav-btn:hover {
  opacity: 0.85;
}

body.page-welcome .nav-btn-signin {
  background: linear-gradient(135deg, #3b6fd4 0%, #2a5298 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

body.page-welcome .nav-btn-register {
  background: linear-gradient(180deg, #f5c842 0%, #e6a800 100%);
  color: #5a3e00;
  border: 1px solid #c8900a;
  font-weight: 600;
}

body.page-welcome .searchbar {
  background: #dde6f0;
  border-bottom: 1px solid #c8d3e0;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

body.page-welcome .search-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 560px;
  background: #fff;
  border: 1px solid #b0bec5;
  border-radius: 3px;
  overflow: hidden;
}

body.page-welcome .search-wrap .search-icon {
  padding: 0 10px;
  color: #6b7280;
  font-size: 14px;
  flex-shrink: 0;
}

body.page-welcome .search-wrap input {
  flex: 1;
  padding: 8px 8px 8px 0;
  border: none;
  outline: none;
  font-size: 13px;
  color: #1a1a1a;
  background: transparent;
}

body.page-welcome .search-wrap input::placeholder {
  color: #9ca3af;
}

body.page-welcome .search-wrap .search-btn {
  padding: 8px 20px;
  background: #2a5298;
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

body.page-welcome .search-wrap .search-btn:hover {
  background: #1b3a6b;
}

body.page-welcome .search-filter {
  display: flex;
  align-items: center;
  gap: 6px;
}

body.page-welcome .search-filter label {
  font-size: 11px;
  color: #4a6080;
  font-weight: 500;
}

body.page-welcome .search-filter select {
  padding: 7px 10px;
  border: 1px solid #b0bec5;
  border-radius: 3px;
  font-size: 12px;
  color: #1a1a1a;
  background: #fff;
  outline: none;
  cursor: pointer;
}

body.page-welcome .search-filter select:focus {
  border-color: #2a5298;
}

body.page-welcome .no-results {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px;
  color: #6b7280;
  font-size: 13px;
}

body.page-welcome .page-wrapper {
  flex: 1;
  padding: 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body.page-welcome .main-section {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

body.page-welcome .category-sidebar {
  width: 260px;
  min-width: 260px;
  background: #dde6f0;
  border: 1px solid #c8d3e0;
  border-radius: 10px;
  overflow: visible;
  position: relative;
  align-self: flex-start;
}

body.page-welcome .category-header {
  background: #2a5298;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  border-radius: 10px 10px 0 0;
}

body.page-welcome .category-list {
  padding: 8px 0;
}

body.page-welcome .category-row {
  position: relative;
}

body.page-welcome .category-item {
  padding: 8px 16px;
  font-size: 13px;
  color: #1b3a6b;
  cursor: pointer;
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition:
    background 0.15s,
    border-color 0.15s;
  user-select: none;
}

body.page-welcome .category-item:hover {
  background: #c8d8ec;
  border-left-color: #2a5298;
}

body.page-welcome .category-item.active {
  background: rgba(42, 82, 152, 0.12);
  border-left-color: #60a5fa;
  font-weight: 600;
  color: #1b3a6b;
}

body.page-welcome .cat-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.page-welcome .cat-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

body.page-welcome .category-item .cat-arrow {
  font-size: 10px;
  color: #6b7280;
  transition: transform 0.15s;
}

body.page-welcome .category-row:hover .cat-arrow {
  transform: rotate(90deg);
  color: #2a5298;
}

body.page-welcome .subcategory-flyout {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 190px;
  background: #fff;
  border: 1px solid #c8d3e0;
  border-radius: 6px;
  box-shadow: 4px 4px 16px rgba(42, 82, 152, 0.13);
  z-index: 100;
  padding: 6px 0;
}

body.page-welcome .category-row:hover .subcategory-flyout {
  display: block;
}

body.page-welcome .flyout-header {
  padding: 6px 14px 4px;
  font-size: 10px;
  font-weight: 700;
  color: #2a5298;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e8edf2;
  margin-bottom: 4px;
}

body.page-welcome .flyout-item {
  padding: 7px 14px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
  transition:
    background 0.12s,
    color 0.12s;
  display: flex;
  align-items: center;
  gap: 6px;
}

body.page-welcome .flyout-item::before {
  content: '›';
  color: #2a5298;
  font-size: 14px;
  font-weight: 700;
}

body.page-welcome .flyout-item:hover {
  background: #eff6ff;
  color: #1b3a6b;
}

body.page-welcome .category-divider {
  height: 1px;
  background: #c8d3e0;
  margin: 4px 0;
}

body.page-welcome .product-area {
  flex: 1;
  background: #dde6f0;
  border: 1px solid #c8d3e0;
  border-radius: 8px;
  padding: 14px;
}

body.page-welcome .product-area-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

body.page-welcome .product-area-header h2 {
  font-size: 13px;
  font-weight: 600;
  color: #1b3a6b;
}

body.page-welcome .product-area-header span {
  font-size: 11px;
  color: #6b7280;
}

body.page-welcome .product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

body.page-welcome .product-card {
  background: #fff;
  border: 1px solid #c8d3e0;
  border-radius: 16px;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
  text-align: center;
}

body.page-welcome .product-card:hover {
  border-color: #2a5298;
  box-shadow: 0 2px 8px rgba(42, 82, 152, 0.12);
}

body.page-welcome .product-card .card-icon {
  font-size: 26px;
}

body.page-welcome .product-card .card-title {
  font-size: 12px;
  font-weight: 600;
  color: #1b3a6b;
}

body.page-welcome .product-card .card-sub {
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.4;
}

body.page-welcome .product-card .card-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  background: #dbeafe;
  color: #1e40af;
  margin-top: 2px;
}

body.page-welcome .footer {
  background: linear-gradient(135deg, #1b3a6b 0%, #15305c 100%);
  border-top: 3px solid #2a5298;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.page-welcome .footer span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

body.page-welcome .footer a {
  color: #60a5fa;
  text-decoration: none;
  margin: 0 12px;
  font-size: 12px;
}

body.page-welcome .footer a:hover {
  text-decoration: underline;
}

/* ============================================================
   Dashboard page  (scope: body.page-dashboard)
   ============================================================ */

body.page-dashboard {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #e8edf2;
  display: flex;
  min-height: 100vh;
  font-size: 13px;
  color: #1a1a1a;
}

body.page-dashboard .sidebar {
  width: 180px;
  min-width: 180px;
  background: linear-gradient(180deg, #1b3a6b 0%, #15305c 60%, #0f2347 100%);
  display: flex;
  flex-direction: column;
  position: relative;
}

body.page-dashboard .sidebar-toggle {
  position: absolute;
  top: 10px;
  right: -12px;
  width: 24px;
  height: 24px;
  background: #2a5298;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 10px;
  border: 2px solid #1b3a6b;
  z-index: 10;
}

body.page-dashboard .sidebar-logo {
  padding: 20px 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.page-dashboard .sidebar-logo span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.3px;
}

body.page-dashboard .sidebar-logo small {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

body.page-dashboard .nav-section {
  padding: 16px 0;
  flex: 1;
}

body.page-dashboard .nav-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0 16px 8px;
}

body.page-dashboard .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 13px;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
  border-left: 3px solid transparent;
}

body.page-dashboard .nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

body.page-dashboard .nav-item.active {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  border-left-color: #60a5fa;
  font-weight: 500;
}

body.page-dashboard .nav-item .icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  opacity: 0.85;
}

body.page-dashboard .sidebar-tree {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 0 20px;
  background: rgba(0, 0, 0, 0.15);
}

body.page-dashboard .tree-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0 16px 8px;
}

body.page-dashboard .tree-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 16px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  cursor: pointer;
}

body.page-dashboard .tree-item:hover {
  color: rgba(255, 255, 255, 0.85);
}

body.page-dashboard .tree-item .tree-icon {
  font-size: 11px;
}

body.page-dashboard .tree-item.child {
  padding-left: 30px;
}

body.page-dashboard .main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.page-dashboard .topbar {
  background: #2a5298;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  flex-shrink: 0;
}

body.page-dashboard .topbar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #3b6fd4 0%, #2a5298 100%);
  padding: 5px 20px;
  border-radius: 2px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  flex: 1;
  max-width: 220px;
}

body.page-dashboard .topbar-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  padding: 5px 16px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  border-radius: 2px;
  cursor: pointer;
}

body.page-dashboard .topbar-tab:hover {
  background: rgba(255, 255, 255, 0.2);
}

body.page-dashboard .topbar-signout {
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

body.page-dashboard .topbar-signout:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

body.page-dashboard .searchbar {
  background: #dde6f0;
  border-bottom: 1px solid #c8d3e0;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

body.page-dashboard .searchbar .search-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 480px;
  background: #fff;
  border: 1px solid #b0bec5;
  border-radius: 3px;
  overflow: hidden;
}

body.page-dashboard .searchbar .search-wrap .search-icon {
  padding: 0 10px;
  color: #6b7280;
  font-size: 14px;
  flex-shrink: 0;
}

body.page-dashboard .searchbar .search-wrap input {
  flex: 1;
  padding: 7px 8px 7px 0;
  border: none;
  outline: none;
  font-size: 12px;
  color: #1a1a1a;
  background: transparent;
}

body.page-dashboard .searchbar .search-wrap input::placeholder {
  color: #9ca3af;
}

body.page-dashboard .searchbar .search-btn {
  padding: 7px 18px;
  background: #2a5298;
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

body.page-dashboard .searchbar .search-btn:hover {
  background: #1b3a6b;
}

body.page-dashboard .searchbar .search-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
}

body.page-dashboard .searchbar .search-filter label {
  font-size: 11px;
  color: #4a6080;
  font-weight: 500;
}

body.page-dashboard .searchbar .search-filter select {
  padding: 6px 10px;
  border: 1px solid #b0bec5;
  border-radius: 3px;
  font-size: 12px;
  color: #1a1a1a;
  background: #fff;
  outline: none;
  cursor: pointer;
}

body.page-dashboard .searchbar .search-filter select:focus {
  border-color: #2a5298;
}

body.page-dashboard .content {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

body.page-dashboard .quick-bar {
  background: #fff;
  border: 1px solid #c8d3e0;
  border-radius: 4px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

body.page-dashboard .quick-bar input[type='text'] {
  padding: 5px 10px;
  border: 1px solid #b0bec5;
  border-radius: 3px;
  font-size: 12px;
  width: 200px;
  outline: none;
  color: #333;
}

body.page-dashboard .quick-bar input[type='text']:focus {
  border-color: #2a5298;
}

body.page-dashboard .quick-bar .qbtn {
  padding: 5px 18px;
  background: linear-gradient(180deg, #f5c842 0%, #e6a800 100%);
  border: 1px solid #c8900a;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  color: #5a3e00;
  cursor: pointer;
  transition: opacity 0.15s;
}

body.page-dashboard .quick-bar .qbtn:hover {
  opacity: 0.88;
}

body.page-dashboard .quick-bar .qlabel {
  font-size: 12px;
  color: #444;
  font-weight: 500;
}

body.page-dashboard .quick-bar .sample-text {
  font-size: 12px;
  color: #888;
}

body.page-dashboard .quick-bar .qinfo {
  margin-left: auto;
  padding: 5px 14px;
  background: #f0f4f8;
  border: 1px solid #c8d3e0;
  border-radius: 3px;
  font-size: 12px;
  color: #2a5298;
  font-weight: 500;
}

body.page-dashboard .stats-row {
  display: flex;
  gap: 12px;
}

body.page-dashboard .stat-card {
  flex: 1;
  background: linear-gradient(135deg, #2a5298 0%, #1b3a6b 100%);
  border-radius: 4px;
  padding: 14px 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.page-dashboard .stat-card .stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

body.page-dashboard .stat-card .stat-value {
  font-size: 26px;
  font-weight: 700;
}

body.page-dashboard .stat-card .stat-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}

body.page-dashboard .tabs-section {
  background: #fff;
  border: 1px solid #c8d3e0;
  border-radius: 4px;
  overflow: hidden;
}

body.page-dashboard .tabs-header {
  display: flex;
  align-items: stretch;
  background: #dde6f0;
  border-bottom: 1px solid #b8c8d8;
}

body.page-dashboard .tab-btn {
  padding: 8px 22px;
  font-size: 12px;
  font-weight: 500;
  color: #4a6080;
  cursor: pointer;
  border-right: 1px solid #b8c8d8;
  background: transparent;
  border: none;
  border-right: 1px solid #b8c8d8;
  transition: background 0.15s;
}

body.page-dashboard .tab-btn:hover {
  background: rgba(42, 82, 152, 0.08);
}

body.page-dashboard .tab-btn.active {
  background: #fff;
  color: #1b3a6b;
  font-weight: 600;
  border-bottom: 2px solid #2a5298;
  margin-bottom: -1px;
}

body.page-dashboard .tabs-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 8px;
}

body.page-dashboard .tabs-nav button {
  width: 22px;
  height: 22px;
  background: #c8d3e0;
  border: 1px solid #b0bec5;
  border-radius: 2px;
  cursor: pointer;
  font-size: 11px;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.page-dashboard .tabs-nav button:hover {
  background: #b8c8d8;
}

body.page-dashboard .tab-content {
  padding: 16px;
}

body.page-dashboard .tab-pane {
  display: none;
}

body.page-dashboard .tab-pane.active {
  display: block;
}

body.page-dashboard .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

body.page-dashboard .data-table th {
  background: #f0f4f8;
  border: 1px solid #d0dae4;
  padding: 7px 12px;
  text-align: left;
  font-weight: 600;
  color: #2a5298;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

body.page-dashboard .data-table td {
  border: 1px solid #e0e8f0;
  padding: 8px 12px;
  color: #333;
}

body.page-dashboard .data-table tr:nth-child(even) td {
  background: #f7f9fc;
}

body.page-dashboard .data-table tr:hover td {
  background: #eef3f9;
}

body.page-dashboard .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

body.page-dashboard .badge-pending {
  background: #fef3c7;
  color: #92400e;
}

body.page-dashboard .badge-done {
  background: #d1fae5;
  color: #065f46;
}

body.page-dashboard .badge-progress {
  background: #dbeafe;
  color: #1e40af;
}

body.page-dashboard .info-panel {
  background: #fff;
  border: 1px solid #c8d3e0;
  border-radius: 4px;
  overflow: hidden;
}

body.page-dashboard .info-panel-header {
  background: #dde6f0;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #c8d3e0;
}

body.page-dashboard .info-panel-header .panel-icon {
  font-size: 13px;
}

body.page-dashboard .info-panel-header span {
  font-size: 12px;
  font-weight: 600;
  color: #1b3a6b;
}

body.page-dashboard .info-panel-inner {
  background: #2a5298;
  padding: 5px 14px;
  display: flex;
  align-items: center;
}

body.page-dashboard .info-panel-inner span {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

body.page-dashboard .info-panel-body {
  padding: 16px 14px;
  display: flex;
  gap: 20px;
}

body.page-dashboard .info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

body.page-dashboard .info-item .info-key {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

body.page-dashboard .info-item .info-val {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
}

body.page-dashboard .bottom-label {
  font-size: 12px;
  color: #6b7280;
  padding: 4px 0;
}

body.page-dashboard .content::-webkit-scrollbar {
  width: 6px;
}

body.page-dashboard .content::-webkit-scrollbar-track {
  background: #e0e8f0;
}

body.page-dashboard .content::-webkit-scrollbar-thumb {
  background: #b0bec5;
  border-radius: 3px;
}

/* ============================================================
   Profile page  (scope: body.page-profile)
   ============================================================ */

body.page-profile {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #e8edf2;
  display: flex;
  min-height: 100vh;
  font-size: 13px;
  color: #1a1a1a;
}

body.page-profile .sidebar {
  width: 180px;
  min-width: 180px;
  background: linear-gradient(180deg, #1b3a6b 0%, #15305c 60%, #0f2347 100%);
  display: flex;
  flex-direction: column;
  position: relative;
}

body.page-profile .sidebar-logo {
  padding: 20px 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.page-profile .sidebar-logo span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

body.page-profile .sidebar-logo small {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

body.page-profile .nav-section {
  padding: 16px 0;
  flex: 1;
}

body.page-profile .nav-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0 16px 8px;
}

body.page-profile .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-size: 13px;
  border-left: 3px solid transparent;
  transition:
    background 0.15s,
    color 0.15s;
}

body.page-profile .nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

body.page-profile .nav-item.active {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  border-left-color: #60a5fa;
  font-weight: 500;
}

body.page-profile .nav-item .icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
}

body.page-profile .main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.page-profile .topbar {
  background: #2a5298;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  flex-shrink: 0;
}

body.page-profile .topbar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #3b6fd4 0%, #2a5298 100%);
  padding: 5px 20px;
  border-radius: 2px;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  flex: 1;
  max-width: 220px;
}

body.page-profile .topbar-signout {
  margin-left: auto;
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

body.page-profile .topbar-signout:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

body.page-profile .content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

body.page-profile .page-title {
  font-size: 15px;
  font-weight: 600;
  color: #1b3a6b;
  border-bottom: 2px solid #c8d3e0;
  padding-bottom: 10px;
}

body.page-profile .profile-card {
  background: #fff;
  border: 1px solid #c8d3e0;
  border-radius: 4px;
  overflow: hidden;
}

body.page-profile .profile-card-header {
  background: linear-gradient(135deg, #1b3a6b 0%, #2a5298 100%);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

body.page-profile .profile-card-header span {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

body.page-profile .profile-card-inner {
  background: #dde6f0;
  border-bottom: 1px solid #c8d3e0;
  padding: 6px 20px;
  font-size: 12px;
  font-weight: 600;
  color: #1b3a6b;
}

body.page-profile .profile-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 20px;
  border-bottom: 1px solid #e8edf2;
}

body.page-profile .avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2a5298 0%, #1b3a6b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
  border: 3px solid #c8d3e0;
}

body.page-profile .hero-info .hero-name {
  font-size: 17px;
  font-weight: 700;
  color: #1b3a6b;
}

body.page-profile .hero-info .hero-email {
  font-size: 12px;
  color: #6b7280;
  margin-top: 3px;
}

body.page-profile .hero-info .hero-role {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

body.page-profile .info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

body.page-profile .info-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f4f8;
  border-right: 1px solid #f0f4f8;
}

body.page-profile .info-row:nth-child(even) {
  border-right: none;
}

body.page-profile .info-row .info-key {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9ca3af;
  font-weight: 600;
}

body.page-profile .info-row .info-val {
  font-size: 13px;
  color: #1a1a1a;
  font-weight: 500;
}

body.page-profile .info-row .info-val.verified {
  color: #065f46;
  display: flex;
  align-items: center;
  gap: 5px;
}

body.page-profile .info-row .info-val.unverified {
  color: #92400e;
}

body.page-profile .status-section {
  background: #fff;
  border: 1px solid #c8d3e0;
  border-radius: 4px;
  overflow: hidden;
}

body.page-profile .status-header {
  background: #dde6f0;
  border-bottom: 1px solid #c8d3e0;
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 600;
  color: #1b3a6b;
}

body.page-profile .status-body {
  padding: 16px 20px;
  display: flex;
  gap: 16px;
}

body.page-profile .status-item {
  flex: 1;
  background: #f0f4f8;
  border: 1px solid #c8d3e0;
  border-radius: 3px;
  padding: 14px;
  text-align: center;
}

body.page-profile .status-item .s-value {
  font-size: 24px;
  font-weight: 700;
  color: #2a5298;
}

body.page-profile .status-item .s-label {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
}

body.page-profile .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #2a5298;
  text-decoration: none;
}

body.page-profile .back-link:hover {
  text-decoration: underline;
}

body.page-profile .content::-webkit-scrollbar {
  width: 6px;
}

body.page-profile .content::-webkit-scrollbar-track {
  background: #e0e8f0;
}

body.page-profile .content::-webkit-scrollbar-thumb {
  background: #b0bec5;
  border-radius: 3px;
}

/* ============================================================
   Login page  (scope: body.page-login)
   ============================================================ */

body.page-login {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #e8edf2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-size: 13px;
  color: #1a1a1a;
}

body.page-login .card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border: 1px solid #c8d3e0;
  border-radius: 4px;
  overflow: hidden;
}

body.page-login .card-header {
  background: linear-gradient(135deg, #1b3a6b 0%, #2a5298 100%);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

body.page-login .card-header .brand-icon {
  font-size: 20px;
}

body.page-login .card-header .brand-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

body.page-login .card-header small {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 1px;
}

body.page-login .card-label {
  background: #dde6f0;
  border-bottom: 1px solid #c8d3e0;
  padding: 6px 24px;
  font-size: 12px;
  font-weight: 600;
  color: #1b3a6b;
}

body.page-login .card-body {
  padding: 24px;
}

body.page-login .errors {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 3px;
  padding: 8px 12px;
  margin-bottom: 16px;
}

body.page-login .errors li {
  font-size: 12px;
  color: #dc2626;
  list-style: none;
}

body.page-login .field {
  margin-bottom: 16px;
}

body.page-login .field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #4a6080;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

body.page-login .field input {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  border: 1px solid #b0bec5;
  border-radius: 3px;
  outline: none;
  background: #fff;
  color: #1a1a1a;
  transition: border-color 0.15s;
}

body.page-login .field input:focus {
  border-color: #2a5298;
}

body.page-login .field.password input {
  background: #dde6f0;
  border-color: #c8d3e0;
}

body.page-login .field.password input:focus {
  border-color: #2a5298;
}

body.page-login .forgot {
  text-align: right;
  margin-top: -8px;
  margin-bottom: 20px;
}

body.page-login .forgot a {
  font-size: 12px;
  color: #2a5298;
  text-decoration: none;
}

body.page-login .forgot a:hover {
  text-decoration: underline;
}

body.page-login .btn-signin {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #3b6fd4 0%, #2a5298 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: opacity 0.15s;
}

body.page-login .btn-signin:hover {
  opacity: 0.88;
}

body.page-login .card-footer {
  background: #f0f4f8;
  border-top: 1px solid #c8d3e0;
  padding: 10px 24px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
}

body.page-login .card-footer a {
  color: #2a5298;
  text-decoration: none;
  font-weight: 500;
}

body.page-login .card-footer a:hover {
  text-decoration: underline;
}

body.page-login .back-link {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.15s;
}

body.page-login .back-link:hover {
  opacity: 0.8;
}

/* ============================================================
   Register page  (scope: body.page-register)
   ============================================================ */

body.page-register {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #e8edf2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
  font-size: 13px;
  color: #1a1a1a;
}

body.page-register .card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border: 1px solid #c8d3e0;
  border-radius: 4px;
  overflow: hidden;
}

body.page-register .card-header {
  background: linear-gradient(135deg, #1b3a6b 0%, #2a5298 100%);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

body.page-register .card-header .brand-icon {
  font-size: 20px;
}

body.page-register .card-header .brand-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

body.page-register .card-header small {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 1px;
}

body.page-register .card-label {
  background: #dde6f0;
  border-bottom: 1px solid #c8d3e0;
  padding: 6px 24px;
  font-size: 12px;
  font-weight: 600;
  color: #1b3a6b;
}

body.page-register .card-body {
  padding: 24px;
}

body.page-register .errors {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 3px;
  padding: 8px 12px;
  margin-bottom: 16px;
}

body.page-register .errors li {
  font-size: 12px;
  color: #dc2626;
  list-style: none;
}

body.page-register .field {
  margin-bottom: 14px;
}

body.page-register .field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #4a6080;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

body.page-register .field input {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  border: 1px solid #b0bec5;
  border-radius: 3px;
  outline: none;
  background: #fff;
  color: #1a1a1a;
  transition: border-color 0.15s;
}

body.page-register .field input:focus {
  border-color: #2a5298;
}

body.page-register .field.password input {
  background: #dde6f0;
  border-color: #c8d3e0;
}

body.page-register .field.password input:focus {
  border-color: #2a5298;
}

body.page-register .field-errors {
  margin-top: 4px;
}

body.page-register .field-errors li {
  font-size: 11px;
  color: #dc2626;
  list-style: none;
}

body.page-register .btn-register {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #3b6fd4 0%, #2a5298 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 4px;
}

body.page-register .btn-register:hover {
  opacity: 0.88;
}

body.page-register .card-footer {
  background: #f0f4f8;
  border-top: 1px solid #c8d3e0;
  padding: 10px 24px;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
}

body.page-register .card-footer a {
  color: #2a5298;
  text-decoration: none;
  font-weight: 500;
}

body.page-register .card-footer a:hover {
  text-decoration: underline;
}

body.page-register .back-link {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.15s;
}

body.page-register .back-link:hover {
  opacity: 0.8;
}

/* ============================================================
   Chatbot (shared component)
   ============================================================ */
.chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b6fd4 0%, #2a5298 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  box-shadow: 0 4px 16px rgba(42, 82, 152, 0.45);
  z-index: 1000;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(42, 82, 152, 0.55);
}

.chat-fab img {
  width: 24px;
  height: 24px;
}

.chat-header .bot-avatar img {
  width: 22px;
  height: 22px;
}

.msg-row .msg-avatar img {
  width: 14px;
  height: 14px;
}

.chat-fab .chat-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 11px;
  height: 11px;
  background: #22c55e;
  border-radius: 50%;
  border: 2px solid #fff;
}

.chat-window {
  position: fixed;
  bottom: 92px;
  right: 28px;
  width: 340px;
  height: 480px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  z-index: 999;
  overflow: hidden;
  border: 1px solid #c8d3e0;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.22s ease,
    opacity 0.22s ease;
}

.chat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Header */
.chat-header {
  background: #fff;
  padding: 14px 16px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e8edf2;
  flex-shrink: 0;
}

.chat-header .bot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b6fd4 0%, #2a5298 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.chat-header .bot-info .bot-name {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
}

.chat-header .bot-info .bot-status {
  font-size: 11px;
  color: #22c55e;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
}

.chat-header .bot-info .bot-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}

.chat-header .close-btn {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 18px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}

.chat-header .close-btn:hover {
  background: #f0f4f8;
  color: #4a6080;
}

/* Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f8fafc;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}
.chat-messages::-webkit-scrollbar-thumb {
  background: #c8d3e0;
  border-radius: 2px;
}

.msg-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.msg-row.bot {
  justify-content: flex-start;
}
.msg-row.user {
  justify-content: flex-end;
}

.msg-row .msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b6fd4 0%, #2a5298 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.msg-bubble {
  max-width: 72%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.msg-row.bot .msg-bubble {
  background: #e8edf2;
  color: #1a1a1a;
  border-bottom-left-radius: 4px;
}

.msg-row.user .msg-bubble {
  background: linear-gradient(135deg, #3b6fd4 0%, #2a5298 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Input */
.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e8edf2;
  background: #fff;
  flex-shrink: 0;
}

.chat-input-row input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid #c8d3e0;
  border-radius: 24px;
  font-size: 13px;
  outline: none;
  color: #1a1a1a;
  background: #f8fafc;
  transition: border-color 0.15s;
}

.chat-input-row input::placeholder {
  color: #9ca3af;
}
.chat-input-row input:focus {
  border-color: #2a5298;
  background: #fff;
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b6fd4 0%, #2a5298 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.chat-send-btn:hover {
  opacity: 0.85;
}
