@import url("https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&display=swap");
:root {
  --bg-page: #f8fafc; 
  --header-bg: #151b29; 
  --footer-bg: #0b1320; 
  
  --sidebar-bg: #f8fafc;
  --text-sidebar-inactive: #64748b;
  --text-sidebar-active: #2563eb;
  --bg-sidebar-active: #eff6ff;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  
  --card-bg: #ffffff; 
  --card-border: #000000; 
  
  --header-height: 72px;
  --sidebar-width: 110px; 
}

* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
  font-family: 'Inter', -apple-system, sans-serif; 
}

body { 
  background-color: var(--bg-page); 
  background-image: radial-gradient(#cbd5e1 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  color: var(--text-main); 
  min-height: 100vh; 
  display: flex; 
  flex-direction: column; 
}

a { text-decoration: none; color: inherit; }

/* Header with Search */
.govt-header {
  background: var(--header-bg);
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  height: var(--header-height);
  border-bottom: 2px solid #2563eb;
}

.header-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo { display: flex; align-items: center; gap: 16px; }
.logo-icon i { font-size: 32px; color: #38bdf8; }
.brand-text h1 { font-size: 20px; font-weight: 700; color: #ffffff; line-height: 1.2; }
.brand-text p { font-size: 13px; color: #94a3b8; font-weight: 400; }

/* Modern & Professional Header Search */
.header-search { position: relative; width: 420px; }
.header-search .search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #38bdf8; font-size: 15px; transition: color 0.3s ease; }
.header-search input {
  width: 100%; height: 44px; padding: 0 18px 0 46px; border-radius: 10px;
  border: 1.5px solid #334155; background: rgba(15, 23, 42, 0.6);
  color: #ffffff; font-size: 14px; outline: none; transition: all 0.3s ease;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}
.header-search input::placeholder { color: #94a3b8; font-weight: 400; }
.header-search input:focus { 
  background: rgba(15, 23, 42, 0.9); 
  border-color: #38bdf8; 
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), inset 0 2px 4px rgba(0,0,0,0.2); 
}
.header-search input:focus + .search-icon, .header-search input:valid + .search-icon { color: #38bdf8; }

/* Highlight and Filtering Styles for Cards */
.tool-card.search-hidden { display: none !important; }
.tool-card.search-highlight {
  border: 3px solid #2563eb !important;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.4), 6px 6px 0px rgba(0,0,0,0.25) !important;
  transform: translateY(-4px);
  transition: all 0.3s ease;
}

.portal-layout { display: flex; width: 100%; margin-top: var(--header-height); min-height: calc(100vh - var(--header-height)); }

/* Sidebar */
.app-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid #e2e8f0;
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 0; gap: 12px; position: fixed;
  height: calc(100vh - var(--header-height)); top: var(--header-height); left: 0; z-index: 100; overflow-y: auto;
}
.app-sidebar::-webkit-scrollbar { width: 4px; }
.app-sidebar::-webkit-scrollbar-thumb { background: #cbd5e1; }

.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 85px; padding: 12px 6px; border-radius: 16px;
  color: var(--text-sidebar-inactive); gap: 8px; transition: all 0.2s ease; text-align: center;
}
.nav-icon-box i { font-size: 22px; }
.nav-item span { font-size: 12px; font-weight: 500; line-height: 1.2; }
.nav-item:hover { background: #f1f5f9; }
.nav-item.active { background: var(--bg-sidebar-active); color: var(--text-sidebar-active); }

/* Main Content */
.app-main { margin-left: var(--sidebar-width); flex: 1; padding: 40px 50px 80px 50px; }

.page-header { margin-bottom: 24px; }
.page-header h2 { font-family: 'Fredoka', cursive, sans-serif; font-size: 32px; font-weight: 600; color: var(--text-main); margin-bottom: 8px; letter-spacing: 0.5px; }
.comic-text { font-family: 'Comic Neue', cursive; font-size: 15px; color: var(--text-muted); }

/* Quick Stats */
.quick-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 40px; }
.stat-card { background: var(--card-bg); border: 2px solid var(--card-border); border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 16px; box-shadow: 4px 4px 0px rgba(0,0,0,0.1); }
.stat-icon { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.bg-blue { background: rgba(37, 99, 235, 0.15); color: #2563eb; }
.bg-green { background: rgba(22, 163, 74, 0.15); color: #16a34a; }
.bg-purple { background: rgba(147, 51, 234, 0.15); color: #9333ea; }
.stat-info { display: flex; flex-direction: column; font-family: 'Montserrat', sans-serif; }
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text-main); }
.text-green { color: #16a34a; }
.text-purple { color: #9333ea; font-weight: 700; font-size: 14px;}
.quick-access-text { font-size: 14px; font-weight: 700; color: var(--text-main); margin-top: 2px; }
.security-text { font-size: 11px; color: var(--text-muted); line-height: 1.4; margin-top: 4px; font-family: 'Inter', sans-serif; } 

/* TABS SYSTEM */
.portal-tabs {
  display: flex; gap: 16px; margin: 35px 0 28px 0; 
  border-bottom: 2px solid #cbd5e1; padding-bottom: 8px; overflow-x: auto;
}

.tab-btn {
  padding: 12px 24px; background: transparent; border: none; border-radius: 8px 8px 0 0;
  font-size: 16px; font-weight: bold; color: var(--text-muted); cursor: pointer;
  transition: all 0.3s ease; position: relative; display: flex; align-items: center; gap: 10px;
  font-family: 'Comic Neue', cursive;
}

.tab-btn i { font-size: 18px; font-family: "Font Awesome 6 Free"; } 

.tab-btn:hover { color: var(--text-main); background: rgba(0,0,0,0.03); }
.tab-btn.active { color: #2563eb; }
.tab-btn.active::after { content: ''; position: absolute; bottom: -10px; left: 0; width: 100%; height: 3px; background: #2563eb; border-radius: 3px 3px 0 0; }
.tab-content { display: none; animation: fadeIn 0.3s ease; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Tool Cards */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.tool-card { background: var(--card-bg); border: 2px solid var(--card-border); border-radius: 12px; padding: 24px; height: 100%; display: flex; flex-direction: column; transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 4px 4px 0px rgba(0,0,0,0.15); }
.tool-card:hover { transform: translateY(-4px); box-shadow: 6px 6px 0px rgba(0,0,0,0.25); }
.card-icon { width: 48px; height: 48px; background: #ffffff; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 16px; border: 1px solid #cbd5e1; }
.tool-card h3 { font-size: 18px; font-weight: 600; color: var(--text-main); margin-bottom: 8px; }
.tool-card p { font-size: 14px; color: var(--text-muted); line-height: 1.5; flex-grow: 1; }
.card-separator { border: none; border-top: 1px solid #cbd5e1; margin: 20px 0 16px 0; }
.card-action { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 600; color: #000000; }
.tool-card:hover .card-action i { transform: translateX(4px); transition: transform 0.2s ease; }

/* Footer */
.site-footer { background: var(--footer-bg); color: #ffffff; padding: 40px 40px; margin-left: var(--sidebar-width); border-top: 1px solid rgba(255,255,255,0.1); }
.footer-container { max-width: 100%; padding: 0 40px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.footer-column h4 { font-size: 16px; font-weight: 700; margin-bottom: 16px; color: #ffffff; }
.footer-column ul { list-style: none; }
main ul li { margin-bottom: 10px; }
.footer-column ul li a { font-size: 13px; color: #cbd5e1; transition: color 0.2s ease; display: flex; align-items: center; }
.footer-column ul li a:hover { color: #ffffff; text-decoration: underline; }

@media (max-width: 1024px) { .footer-container { grid-template-columns: repeat(2, 1fr); gap: 30px; } .header-search { width: 300px; } }
@media (max-width: 768px) { .app-sidebar { display: none; } .app-main { margin-left: 0; padding: 24px; } .site-footer { margin-left: 0; padding: 30px 24px; } .footer-container { grid-template-columns: 1fr; padding: 0;} .header-search { display: none; } }