/* ================================================================
   UP@Fingertips — Shared Stylesheet
   Professional Blue & White Theme
   ================================================================ */

@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

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

:root {
  --primary:        #009edb;
  --primary-dark:   #0087bc;
  --primary-light:  #e6f7fc;
  --sidebar-bg:     #ffffff;
  --sidebar-hover:  #f1f5f9;
  --sidebar-active: #009edb;
  --sidebar-text:   #475569;
  --sidebar-width:  272px;
  --sidebar-collapsed-width: 72px;
  --topbar-height:  64px;
  --bg:             #f1f5f9;
  --card:           #ffffff;
  --text:           #1e293b;
  --text-muted:     #64748b;
  --border:         #e2e8f0;

  /* Status colors */
  --upcoming:   #009edb;
  --ongoing:    #f59e0b;
  --awaiting:   #eab308;
  --completed:  #10b981;
  --revision:   #8b5cf6;
  --draft:      #94a3b8;

  /* Semantic */
  --success:  #059669;
  --warning:  #d97706;
  --danger:   #dc2626;
  --info:     #009edb;
}

body {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

/* ================================================================
   LAYOUT
   ================================================================ */

.layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), transform 0.28s ease;
  border-right: 1px solid var(--border);
  box-shadow: none;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 18px 18px;
  flex-shrink: 0;
}

.sidebar-logo::before {
  content: 'UP';
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #009edb 0%, #00bcef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  box-shadow: 0 6px 16px rgba(0, 158, 219, 0.35);
}

.sidebar-logo h1 {
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
  line-height: 1.25;
}

.sidebar-logo p {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 3px;
  line-height: 1.35;
}

.sidebar-role {
  margin: 0 14px 10px;
  padding: 11px 14px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-shrink: 0;
}

.sidebar-role span {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 600;
}

.sidebar-role strong {
  display: block;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 4px;
  line-height: 1.35;
}

.sidebar-nav {
  padding: 6px 12px;
  flex: 1;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
  padding: 9px 12px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  border-radius: 10px;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.sidebar-nav a:hover {
  background: var(--sidebar-hover);
  color: var(--text);
}

.sidebar-nav a.active {
  background: linear-gradient(90deg, rgba(0,158,219,0.14) 0%, rgba(0,158,219,0.06) 100%);
  color: var(--sidebar-active);
  font-weight: 600;
  box-shadow: none;
}

.sidebar-nav .nav-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #f1f5f9;
  font-size: 15px;
  line-height: 1;
  flex-shrink: 0;
  color: var(--primary);
  transition: background 0.18s ease, color 0.18s ease;
}

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

.sidebar-nav a.active .nav-icon {
  background: rgba(0, 158, 219, 0.15);
  color: var(--primary);
  box-shadow: none;
}

.sidebar-footer {
  padding: 8px 12px 18px;
  margin-top: auto;
  flex-shrink: 0;
}

.sidebar-footer::before {
  content: '';
  display: block;
  height: 1px;
  margin: 4px 8px 12px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.18s ease, color 0.18s ease;
}

.sidebar-footer a:hover {
  background: #fef2f2;
  color: #dc2626;
}

.sidebar-footer .nav-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: #f1f5f9;
  font-size: 15px;
  color: var(--text-muted);
  transition: background 0.18s ease, color 0.18s ease;
}

.sidebar-footer a:hover .nav-icon {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.sidebar-nav .nav-section {
  padding: 16px 14px 6px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #94a3b8;
  font-weight: 700;
}

/* ---- Main Area ---- */
.main {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100vw - var(--sidebar-width));
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.28s ease, width 0.28s ease, max-width 0.28s ease;
}

/* Desktop sidebar collapsed — icon-only rail */
@media (min-width: 769px) {
  .layout.sidebar-closed .sidebar {
    width: var(--sidebar-collapsed-width);
    transform: none;
    overflow-x: hidden;
  }

  .layout.sidebar-closed .main {
    margin-left: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
    max-width: calc(100vw - var(--sidebar-collapsed-width));
  }

  .layout.sidebar-closed .sidebar-logo {
    padding: 20px 0 14px;
    justify-content: center;
    gap: 0;
  }

  .layout.sidebar-closed .sidebar-logo h1,
  .layout.sidebar-closed .sidebar-logo p,
  .layout.sidebar-closed .sidebar-role {
    display: none;
  }

  .layout.sidebar-closed .sidebar-logo::before {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    font-size: 11px;
  }

  .layout.sidebar-closed .sidebar-nav {
    padding: 6px 8px;
  }

  .layout.sidebar-closed .sidebar-nav a {
    justify-content: center;
    padding: 8px 0;
    gap: 0;
    font-size: 0;
    margin: 3px 0;
  }

  .layout.sidebar-closed .sidebar-nav .nav-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 17px;
    border-radius: 10px;
  }

  .layout.sidebar-closed .sidebar-nav .nav-section {
    display: none;
  }

  .layout.sidebar-closed .sidebar-footer {
    padding: 8px 8px 16px;
  }

  .layout.sidebar-closed .sidebar-footer a {
    justify-content: center;
    font-size: 0 !important;
    padding: 8px 0 !important;
    gap: 0 !important;
  }

  .layout.sidebar-closed .sidebar-footer .nav-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    font-size: 17px !important;
    border-radius: 10px;
    color: var(--text-muted) !important;
  }
}

/* ---- Topbar ---- */
.topbar {
  height: var(--topbar-height);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  min-width: 0;
  width: 100%;
}

.topbar-title {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.topbar-title small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.notif-wrap {
  position: relative;
}

.notif-btn {
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.18s ease, color 0.18s ease;
}

.notif-btn .bi {
  font-size: 18px;
  line-height: 1;
}

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

.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #fff;
}

.notif-drawer {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 24px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
  z-index: 500;
  overflow: hidden;
}

.notif-drawer.open {
  display: flex;
  flex-direction: column;
}

.notif-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.notif-drawer-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.notif-drawer-close {
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.notif-drawer-close:hover {
  background: #e2e8f0;
  color: var(--text);
}

.notif-drawer-body {
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: inherit;
  transition: background 0.15s ease;
}

.notif-item:hover {
  background: #f8fafc;
}

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

.notif-item.unread {
  background: #f0f9ff;
}

.notif-item.unread:hover {
  background: #e6f7fc;
}

.notif-item-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.notif-item-icon.warning {
  background: #fef3c7;
  color: #d97706;
}

.notif-item-icon.info {
  background: var(--primary-light);
  color: var(--primary);
}

.notif-item-icon.success {
  background: #d1fae5;
  color: #059669;
}

.notif-item-icon.alert {
  background: #fee2e2;
  color: #dc2626;
}

.notif-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-item-content strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.notif-item-content span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.notif-item-content time {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.notif-drawer-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
  text-align: center;
}

.notif-view-all {
  width: 100%;
  justify-content: center;
}

.user-menu-wrap {
  position: relative;
}

button.user-chip {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  text-align: left;
  padding: 4px 8px 4px 4px;
  border-radius: 10px;
  transition: background 0.18s ease;
}

button.user-chip:hover,
button.user-chip.active {
  background: #f1f5f9;
}

.user-menu-chevron {
  font-size: 12px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

.user-info { line-height: 1.3; }
.user-info strong { font-size: 13px; display: block; }
.user-info span   { font-size: 11px; color: var(--text-muted); }

.user-menu-drawer {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  max-width: calc(100vw - 24px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
  z-index: 500;
  overflow: hidden;
}

.user-menu-drawer.open {
  display: block;
}

.user-menu-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #f8fafc 0%, #e6f7fc 100%);
  border-bottom: 1px solid var(--border);
}

.user-menu-header .user-avatar.lg {
  width: 48px;
  height: 48px;
  font-size: 16px;
}

.user-menu-header strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.user-menu-header span {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.user-menu-body {
  padding: 8px;
}

.user-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: none;
  background: none;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, color 0.15s ease;
}

.user-menu-item .bi {
  width: 18px;
  font-size: 16px;
  color: var(--text-muted);
}

.user-menu-item:hover {
  background: #f8fafc;
}

.user-menu-item:hover .bi {
  color: var(--primary);
}

.user-menu-item.danger {
  color: #dc2626;
}

.user-menu-item.danger .bi {
  color: #dc2626;
}

.user-menu-item.danger:hover {
  background: #fef2f2;
}

.user-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 8px;
}

.profile-field {
  margin-bottom: 14px;
}

.profile-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.profile-field .profile-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.profile-field .form-control {
  width: 100%;
}

.logout-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 14px;
}

.logout-modal-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.logout-modal-text strong {
  display: block;
  color: var(--text);
  font-size: 16px;
  margin-bottom: 6px;
}

.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.hamburger:hover { background: #f1f5f9; }

/* ---- Content Area ---- */
.content {
  padding: 24px;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.page-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ================================================================
   STAT CARDS
   ================================================================ */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border-radius: 10px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.blue   { background: var(--primary-light); color: var(--primary); }
.stat-icon.orange { background: #fff7ed; color: #ea580c; }
.stat-icon.green  { background: #f0fdf4; color: var(--success); }
.stat-icon.yellow { background: #fefce8; color: #ca8a04; }
.stat-icon.red    { background: #fef2f2; color: var(--danger); }
.stat-icon.purple { background: #f5f3ff; color: #7c3aed; }
.stat-icon.slate  { background: #f8fafc; color: #475569; }

.stat-info { flex: 1; min-width: 0; }
.stat-info .stat-value { font-size: 24px; font-weight: 700; color: var(--text); }
.stat-info .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.stat-info .stat-label-bn { font-size: 11px; color: #94a3b8; }

/* ================================================================
   CARDS
   ================================================================ */

.card {
  background: var(--card);
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

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

.card-header h3 {
  font-size: 15px;
  font-weight: 600;
}

.card-header .card-header-bn {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

.card-body { padding: 20px; }

/* ================================================================
   TABLES
   ================================================================ */

.table-wrap { overflow-x: auto; max-width: 100%; }
.table-wrap table { min-width: 960px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  background: #f8fafc;
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover { background: #f8fafc; }

.td-bn { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* ================================================================
   BADGES / STATUS
   ================================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  gap: 4px;
}

.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-upcoming  { background: var(--primary-light); color: var(--primary); }
.badge-ongoing   { background: #fff7ed; color: #c2410c; }
.badge-awaiting  { background: #fefce8; color: #a16207; }
.badge-completed { background: #f0fdf4; color: #166534; }
.badge-revision  { background: #f5f3ff; color: #6d28d9; }
.badge-draft     { background: #f8fafc; color: #475569; }
.badge-alert     { background: #fef2f2; color: #991b1b; }

/* ================================================================
   BUTTONS
   ================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { background: #047857; }

.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }

.btn-warning   { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #b45309; }

.btn-outline   { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }

.btn-ghost     { background: transparent; color: var(--text-muted); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: #f8fafc; }

.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-lg { padding: 11px 24px; font-size: 15px; }

/* ================================================================
   FORMS
   ================================================================ */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-full { grid-column: 1 / -1; }

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

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.form-group .label-bn {
  font-size: 11px;
  color: var(--text-muted);
}

.form-control {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s;
  width: 100%;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,158,219,0.08);
}

.form-control:read-only {
  background: #f8fafc;
  color: var(--text-muted);
  cursor: not-allowed;
}

textarea.form-control { resize: vertical; min-height: 90px; }

select.form-control { cursor: pointer; }

.form-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.form-section {
  margin-bottom: 28px;
}

.form-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section-title .title-bn {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}

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

/* File upload */
.file-upload-box {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafafa;
}

.file-upload-box:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-upload-box .upload-icon { font-size: 28px; color: var(--text-muted); }
.file-upload-box p { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.file-upload-box small { font-size: 11px; color: #94a3b8; }

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
}

.checkbox-group input[type="checkbox"] {
  width: 16px; height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-group label { font-size: 13px; cursor: pointer; }

/* ================================================================
   FILTER BAR
   ================================================================ */

.filter-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 20px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  max-width: 100%;
  min-width: 0;
}

.filter-group { display: flex; flex-direction: column; gap: 4px; min-width: 130px; }

.filter-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.filter-actions { display: flex; gap: 8px; align-items: flex-end; }

/* ================================================================
   DETAIL VIEW — INFO GRID
   ================================================================ */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

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

.info-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-label .label-bn {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}

.info-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.info-value .value-bn {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Hierarchy breadcrumb */
.hierarchy-trail {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 13px;
}

.hierarchy-trail .sep { color: var(--text-muted); }

.hierarchy-trail .h-item {
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

/* ================================================================
   PHOTO GALLERY
   ================================================================ */

.photo-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.photo-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  transition: all 0.2s;
}

.photo-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.photo-item {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.photo-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-muted);
}

.photo-meta {
  padding: 6px 8px;
  background: #f8fafc;
  font-size: 10px;
  color: var(--text-muted);
}

/* ================================================================
   MAP PLACEHOLDER
   ================================================================ */

.map-placeholder {
  background: #e8f0fe;
  border-radius: 10px;
  height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 14px;
  gap: 10px;
  border: 1px solid #b3e8f7;
  position: relative;
  overflow: hidden;
}

.map-placeholder .map-icon { font-size: 48px; opacity: 0.4; }

.map-placeholder .map-pin {
  position: absolute;
  font-size: 22px;
}

.map-full { height: 480px; }

/* ================================================================
   ALERT CARD
   ================================================================ */

.alert-card {
  border: 1.5px solid #fca5a5;
  background: #fef2f2;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.alert-icon { font-size: 22px; flex-shrink: 0; }
.alert-body { flex: 1; }
.alert-title { font-weight: 700; color: #991b1b; font-size: 14px; }
.alert-desc  { font-size: 13px; color: #7f1d1d; margin-top: 4px; }
.alert-meta  { font-size: 11px; color: #9f1239; margin-top: 6px; }
.alert-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* Info alert (blue) */
.info-box {
  background: var(--primary-light);
  border: 1px solid #b3e8f7;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #0087bc;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* ================================================================
   ACTION REQUIRED WIDGET
   ================================================================ */

.action-list { display: flex; flex-direction: column; gap: 10px; }

.action-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: 8px;
  gap: 12px;
  flex-wrap: wrap;
}

.action-item-info { flex: 1; }
.action-item-title { font-weight: 600; font-size: 13px; }
.action-item-sub   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ================================================================
   TIMELINE / COMMENTS
   ================================================================ */

.timeline { display: flex; flex-direction: column; gap: 16px; }

.timeline-item {
  display: flex;
  gap: 12px;
}

.timeline-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  font-weight: 700;
}

.timeline-body { flex: 1; }
.timeline-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px; }
.timeline-name { font-weight: 600; font-size: 13px; }
.timeline-role { font-size: 11px; color: var(--text-muted); }
.timeline-time { font-size: 11px; color: var(--text-muted); }
.timeline-text { font-size: 13px; color: var(--text); margin-top: 6px; line-height: 1.6; }
.timeline-bubble {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 0 8px 8px 8px;
  padding: 10px 14px;
  margin-top: 6px;
  font-size: 13px;
}

/* ================================================================
   MODAL
   ================================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--card);
  border-radius: 12px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 { font-size: 16px; font-weight: 700; }

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* modal-backdrop — used by submit success modals */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop.show { display: flex; }

.modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 36px 32px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,0.22);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.93) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ================================================================
   PAGINATION
   ================================================================ */

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  padding: 16px 0 0;
  flex-wrap: wrap;
}

.page-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  transition: all 0.2s;
}

.page-btn:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ================================================================
   LOGIN PAGE
   ================================================================ */

.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #006699 0%, #009edb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo .logo-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  background: var(--primary);
  color: #fff;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.login-logo h1 { font-size: 22px; font-weight: 800; color: var(--text); }
.login-logo h1 span { color: var(--primary); }
.login-logo p { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

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

.input-wrapper {
  position: relative;
}

.input-wrapper .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.input-wrapper .form-control { padding-left: 38px; }

.login-btn {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}

.login-btn:hover { background: var(--primary-dark); }

.login-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.login-footer a { color: var(--primary); font-weight: 600; }

/* ================================================================
   PROGRESS BAR
   ================================================================ */

.progress-track {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 8px 0 20px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.progress-step::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 100%;
  height: 3px;
  background: var(--border);
  z-index: 0;
}

.progress-step:last-child::after { display: none; }

.progress-step.done::after { background: var(--success); }
.progress-step.active::after { background: var(--primary); }

.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  z-index: 1;
  color: var(--text-muted);
}

.progress-step.done .step-dot   { background: var(--success); border-color: var(--success); color: #fff; }
.progress-step.active .step-dot { background: var(--primary); border-color: var(--primary); color: #fff; }

.step-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
}

.progress-step.done .step-label   { color: var(--success); font-weight: 600; }
.progress-step.active .step-label { color: var(--primary); font-weight: 600; }

/* ================================================================
   UTILITY
   ================================================================ */

.text-muted   { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }

.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fs-12  { font-size: 12px; }
.fs-13  { font-size: 13px; }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }

.d-flex         { display: flex; }
.align-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.gap-8          { gap: 8px; }
.gap-12         { gap: 12px; }
.gap-16         { gap: 16px; }
.flex-wrap      { flex-wrap: wrap; }

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ================================================================
   NOTIFICATIONS PAGE
   ================================================================ */

.notif-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.notif-filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.notif-filter-tabs button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.notif-filter-tabs button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.notif-filter-tabs button.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.notif-page-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notif-page-item {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.notif-page-item:hover {
  border-color: #b3e8f7;
  box-shadow: 0 4px 14px rgba(0, 158, 219, 0.08);
}

.notif-page-item.unread {
  background: #f8fcff;
  border-color: #b3e8f7;
}

.notif-page-item .notif-item-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  font-size: 18px;
}

.notif-page-item .notif-item-content strong {
  font-size: 14px;
}

.notif-page-item .notif-item-content span {
  font-size: 13px;
  margin-top: 2px;
}

.notif-page-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.notif-page-meta time {
  font-size: 11px;
  color: #94a3b8;
}

.notif-page-meta .notif-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 8px;
  border-radius: 4px;
}

.notif-tag.action { background: #fef3c7; color: #92400e; }
.notif-tag.info { background: var(--primary-light); color: var(--primary); }
.notif-tag.alert { background: #fee2e2; color: #dc2626; }
.notif-tag.success { background: #d1fae5; color: #059669; }

.notif-page-item .notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 6px;
}

.notif-page-item.read .notif-unread-dot {
  visibility: hidden;
}

/* ================================================================
   RESPONSIVE — MOBILE
   ================================================================ */

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
    width: 100%;
    max-width: 100vw;
  }

  .content { padding: 16px; }

  .form-grid,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .form-full { grid-column: auto; }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group { min-width: 100%; }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions .user-info { display: none; }

  table { font-size: 12px; }
  thead th, tbody td { padding: 8px 10px; }
}

@media (max-width: 480px) {
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .login-card {
    padding: 28px 20px;
  }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 150;
}

.sidebar-overlay.show { display: block; }

