:root {
  --word-white: #ffffff;
  --word-light-gray: #f5f5f5;
  --word-gray: #efefef;
  --word-dark-gray: #666666;
  --word-text: #333333;
  --word-blue: #2b579a;
  --word-blue-light: #0078d4;
  --word-accent: #0078d4;
  --font-heading: "Segoe UI", "Calibri", sans-serif;
  --font-body: "Segoe UI", "Calibri", sans-serif;
  --radius-sm: 6px;
  --radius-md: 8px;
  --transition: 0.2s ease;
}

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

body {
  font-family: var(--font-body);
  background: #fafafa;
  color: var(--word-text);
  min-height: 100vh;
}

svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Topbar ---------- */
.topbar {
  height: 56px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 2px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.topbar-left { display: flex; align-items: center; gap: 14px; }

.icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: var(--radius-sm);
  color: var(--word-text); cursor: pointer; position: relative;
  transition: var(--transition);
}

.icon-btn:hover { 
  background: #f0f0f0; 
  color: var(--word-blue-light); 
}

.topbar-logo { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }

.logo-text {
  font-family: "Segoe UI", sans-serif;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: var(--word-text);
  font-weight: 600;
}

.logo-accent { 
  color: var(--word-blue-light); 
  font-weight: 700;
}

.logo-tag {
  font-size: 11px;
  letter-spacing: 0.5px;
  color: #777;
  border: 1px solid #d0d0d0;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 500;
  background: #fafafa;
}

.topbar-search {
  flex: 1;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f5f5;
  border: 1px solid #d0d0d0;
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 36px;
  transition: var(--transition);
}

.topbar-search:focus-within { 
  border-color: var(--word-blue-light);
  box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
  background: #ffffff;
}

.topbar-search .search-icon { width: 16px; height: 16px; color: #999; flex-shrink: 0; }

.topbar-search input {
  background: transparent; border: none; outline: none;
  color: var(--word-text); font-family: var(--font-body); font-size: 14px;
  width: 100%;
}

.topbar-search input::placeholder { color: #999; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #e81123; border: 2px solid #ffffff;
}

.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #0078d4, #107c10);
  color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0, 120, 212, 0.2);
}

.user-avatar:hover {
  box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

/* ---------- Greeting Band ---------- */
.greet-band {
  position: relative;
  background: linear-gradient(135deg, #0078d4 0%, #106ebe 100%);
  overflow: hidden;
  padding: 40px 32px 50px;
  color: #ffffff;
}

.greet-band::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.1), transparent 70%);
  pointer-events: none;
}

.greet-grid {
  display: none;
}

.greet-content { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; }

.greet-eyebrow {
  font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9); font-weight: 500; margin-bottom: 8px;
}

.greet-title {
  font-family: "Segoe UI", sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  color: #ffffff;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  font-weight: 300;
}

.greet-title strong {
  font-weight: 600;
}

.text-accent { color: #ffffff; opacity: 0.95; }

.greet-sub { 
  color: rgba(255, 255, 255, 0.85); 
  font-size: 15px; 
  max-width: 560px; 
  line-height: 1.6;
  font-weight: 300;
}

/* ---------- Division Navigation ---------- */
.ma-division-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 2rem;
  border-bottom: 2px solid #e0e0e0;
  background: #ffffff;
  padding: 0;
  margin-left: 0;
  margin-right: 0;
}

.ma-division-nav .btn {
  border-radius: 0;
  border: none;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--word-text);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 18px;
  margin: 0;
  transition: var(--transition);
  margin-bottom: -2px;
  position: relative;
}

.ma-division-nav .btn:hover {
  background: #f5f5f5;
  color: var(--word-blue-light);
}

.ma-division-nav .btn.btn-dark {
  background: transparent;
  color: var(--word-blue-light);
  border-bottom-color: var(--word-blue-light);
  font-weight: 600;
}

.ma-division-nav .btn.btn-outline-dark {
  background: transparent;
  color: var(--word-text);
  border-color: transparent;
}

/* ---------- Division Content ---------- */
.ma-division-page {
  padding: 2.5rem 0;
  background: #ffffff;
  max-width: 1400px;
  margin: 0 auto;
}

.ma-division-head {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f0f0f0;
  max-width: 100%;
}

.ma-division-head .eyebrow {
  letter-spacing: 1px;
  font-size: 11px;
  font-weight: 700;
  color: #0078d4;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ma-division-head h2 {
  font-family: var(--font-heading);
  font-size: 28px;
  color: var(--word-text);
  font-weight: 300;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.ma-division-head p {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Module Cards ---------- */
.ma-module-card {
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  position: relative;
}

.ma-module-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0078d4, #107c10);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.ma-module-card:hover {
  transform: translateY(-6px);
  border-color: #b3d9ff;
  box-shadow: 0 8px 24px rgba(0, 120, 212, 0.15);
}

.ma-module-card:hover::before {
  transform: scaleX(1);
}

.ma-module-card .card-body {
  background: #ffffff;
  padding: 24px !important;
}

.ma-module-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 14px;
  opacity: 0.9;
}

.ma-module-card h5 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--word-text);
  letter-spacing: -0.2px;
  margin-bottom: 8px;
}

.ma-module-card .text-secondary {
  color: #777;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 14px;
}

.ma-module-card .btn {
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  padding: 8px 16px;
  text-transform: uppercase;
}

.ma-module-card .btn-dark {
  background: #0078d4;
  border-color: #0078d4;
  color: #ffffff;
  transition: var(--transition);
}

.ma-module-card .btn-dark:hover {
  background: #106ebe;
  border-color: #106ebe;
  box-shadow: 0 2px 8px rgba(0, 120, 212, 0.25);
}

.ma-module-card .btn-light {
  background: #f5f5f5;
  border-color: #d0d0d0;
  color: var(--word-text);
  transition: var(--transition);
}

.ma-module-card .btn-light:hover {
  background: #efefef;
  color: #0078d4;
  border-color: #b3d9ff;
}

.ma-status {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 3px;
  background: #fff8e1;
  color: #856404;
  display: inline-block;
  border: 1px solid #ffe082;
  font-weight: 600;
  margin-top: -8px;
}

/* ---------- Row & Grid Spacing ---------- */
.row { 
  --bs-gutter-x: 1.5rem; 
  --bs-gutter-y: 1.5rem; 
}

.container {
  max-width: 1400px;
  padding: 0 32px;
}

/* ---------- Text Colors ---------- */
.text-secondary { color: #666 !important; }
.text-accent { color: #0078d4 !important; }

/* ---------- Toast Notification ---------- */
.toast {
  position: fixed; 
  bottom: 24px; 
  right: 24px;
  background: #ffffff; 
  color: var(--word-text);
  padding: 16px 20px; 
  border-radius: var(--radius-md);
  font-size: 13px; 
  border: 1px solid #e0e0e0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0; 
  pointer-events: none;
  transition: var(--transition);
  z-index: 50;
  transform: translateX(400px);
}

.toast strong { color: #0078d4; font-weight: 600; }

.toast.show { 
  opacity: 1; 
  transform: translateX(0);
  pointer-events: auto;
}

.toast-header {
  background: transparent;
  border-bottom: 1px solid #e0e0e0;
  color: var(--word-text);
  font-size: 13px;
  font-weight: 600;
  padding: 0 0 10px 0;
  margin-bottom: 10px;
}

.toast-body {
  color: var(--word-text);
  padding: 0;
  font-size: 13px;
  line-height: 1.5;
}

.btn-close {
  width: 20px;
  height: 20px;
  opacity: 0.6;
  transition: var(--transition);
}

.btn-close:hover {
  opacity: 1;
}

/* ---------- Bootstrap Override ---------- */
:root {
  --bs-primary: #0078d4;
  --bs-primary-rgb: 0, 120, 212;
  --bs-body-bg: #fafafa;
  --bs-body-color: #333333;
  --bs-border-radius: 8px;
  --bs-border-radius-sm: 6px;
  --bs-border-radius-lg: 10px;
  --bs-border-color: #e0e0e0;
}

.btn-sm {
  font-size: 13px;
}

.card {
  border-color: #e0e0e0;
}

.shadow-sm {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .topbar { 
    gap: 12px; 
    padding: 0 16px; 
  }
  
  .topbar-search { 
    max-width: 250px;
  }

  .ma-division-page {
    padding: 2rem 0;
  }

  .container {
    padding: 0 20px;
  }
  
  .greet-band { 
    padding: 32px 20px 40px; 
  }

  .greet-title {
    font-size: 28px;
  }

  .ma-division-nav .btn {
    padding: 10px 14px;
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .topbar { 
    height: 52px;
    padding: 0 12px; 
  }
  
  .topbar-search { 
    display: none; 
  }

  .logo-tag {
    display: none;
  }

  .ma-division-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .ma-division-nav .btn {
    padding: 10px 12px;
    font-size: 11px;
    white-space: nowrap;
  }

  .greet-title {
    font-size: 24px;
  }

  .greet-sub {
    font-size: 14px;
  }

  .row { 
    --bs-gutter-x: 1rem; 
    --bs-gutter-y: 1rem; 
  }

  .container {
    padding: 0 16px;
  }

  .ma-module-card .card-body {
    padding: 18px !important;
  }
}

@media (max-width: 480px) {
  .topbar { 
    height: 48px;
    gap: 8px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .logo-text {
    font-size: 16px;
  }

  .greet-band { 
    padding: 24px 14px 32px; 
  }

  .greet-title {
    font-size: 20px;
  }

  .greet-eyebrow {
    font-size: 10px;
  }

  .greet-sub {
    font-size: 13px;
  }

  .ma-division-head h2 {
    font-size: 20px;
  }

  .container {
    padding: 0 12px;
  }

  .ma-module-card .card-body {
    padding: 16px !important;
  }

  .ma-module-icon {
    font-size: 2rem;
    margin-bottom: 10px;
  }

  .ma-module-card h5 {
    font-size: 14px;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
