/* ═══════════════════════════════════════════════════════════════════
   MUAÑA GROUP HRIS — Custom Stylesheet
   Brand: Blue #006CC0 | Dark Blue #004E8A | Red #F02424
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --hris-blue:      #006CC0;
  --hris-blue-dark: #004E8A;
  --hris-red:       #F02424;
  --hris-bg:        #f0f2f5;
  --hris-nav-h:     56px;
  --hris-topbar-h:  54px;
}

/* ─── Reset / Base ──────────────────────────────────────────────── */
body.hris-body {
  background: var(--hris-bg);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  color: #333;
  padding-top: calc(var(--hris-topbar-h) + var(--hris-nav-h));
}

a { color: var(--hris-blue); }
a:hover { color: var(--hris-blue-dark); text-decoration: none; }

/* ─── Topbar ────────────────────────────────────────────────────── */
.hris-topbar {
  background: linear-gradient(135deg, var(--hris-blue-dark), var(--hris-blue));
  border: none;
  min-height: var(--hris-topbar-h);
  margin-bottom: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.hris-topbar .navbar-brand { color: #fff !important; padding: 8px 16px; }
.hris-topbar .nav > li > a { color: rgba(255,255,255,0.88) !important; padding: 13px 14px; font-size: 13px; }
.hris-topbar .nav > li > a:hover { background: rgba(255,255,255,0.12) !important; color: #fff !important; }
.hris-topbar .nav > li.open > a { background: rgba(255,255,255,0.15) !important; }
.hris-topbar .dropdown-menu { border-radius: 4px; box-shadow: 0 4px 16px rgba(0,0,0,0.15); min-width: 180px; }

.hris-brand { display:flex; align-items:center; gap:10px; }
.hris-brand-icon {
  width: 32px; height: 32px; background: var(--hris-red); border-radius: 50%;
  display:inline-flex; align-items:center; justify-content:center;
  font-size: 16px; font-weight: 900; color: #fff; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(240,36,36,0.5);
}
.hris-brand-text { color: #fff; font-size: 15px; line-height: 1.2; white-space: nowrap; }
.hris-brand-text strong { font-weight: 700; }

/* ─── Module Nav Bar ────────────────────────────────────────────── */
.hris-navwrap {
  position: fixed;
  top: var(--hris-topbar-h);
  left: 0; right: 0;
  z-index: 1028;
  background: #fff;
  border-bottom: 2px solid var(--hris-blue);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  height: var(--hris-nav-h);
  overflow: visible;
}
.hris-nav {
  list-style: none; margin: 0; padding: 0; display:flex;
  height: var(--hris-nav-h); align-items: stretch;
}
.hris-nav > li > a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 14px; height: var(--hris-nav-h); color: #444; font-size: 11px;
  text-align: center; line-height: 1; white-space: nowrap;
  border-bottom: 3px solid transparent; transition: all .15s;
}
.hris-nav > li > a i { font-size: 16px; margin-bottom: 1px; color: var(--hris-blue); }
.hris-nav > li > a:hover, .hris-nav > li.open > a {
  color: var(--hris-blue); background: rgba(0,108,192,0.05);
  border-bottom-color: var(--hris-blue);
}
.hris-nav > li.active > a {
  color: var(--hris-blue); background: rgba(0,108,192,0.08);
  border-bottom-color: var(--hris-blue); font-weight: 600;
}
.hris-nav .dropdown-menu {
  border-top: 2px solid var(--hris-blue);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  min-width: 220px;
  padding: 6px 0;
}
.hris-nav .dropdown-menu > li > a {
  padding: 8px 20px; font-size: 13px; color: #444;
  display: flex; align-items: center; gap: 10px;
}
.hris-nav .dropdown-menu > li > a i { color: var(--hris-blue); width: 16px; text-align: center; }
.hris-nav .dropdown-menu > li > a:hover { background: rgba(0,108,192,0.07); color: var(--hris-blue); }
.hris-nav .dropdown-menu .dropdown-header {
  font-size: 11px; font-weight: 700; color: #888; text-transform: uppercase;
  letter-spacing: 0.5px; padding: 10px 20px 4px;
}

/* ─── Page Content ──────────────────────────────────────────────── */
.hris-page-content {
  min-height: calc(100vh - var(--hris-topbar-h) - var(--hris-nav-h) - 40px);
  padding: 20px 0 60px;
}
.hris-page-header {
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e5ee;
}
.hris-page-title {
  font-size: 20px; font-weight: 600; color: #2c3e50;
  margin: 0;
}

/* ─── Flash Alerts ──────────────────────────────────────────────── */
.hris-flash { margin-bottom: 16px; border-radius: 6px; }

/* ─── Panels ────────────────────────────────────────────────────── */
.hris-panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  margin-bottom: 20px;
  overflow: hidden;
}
.hris-panel-head {
  background: #f8faff;
  border-bottom: 1px solid #e8edf5;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 13px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hris-panel-head i { color: var(--hris-blue); }
.hris-panel-head .btn { margin-top: -2px; }
.hris-panel-body { padding: 16px 18px; }
.hris-panel-body.table-responsive { padding: 0; }

/* ─── Tables ────────────────────────────────────────────────────── */
.hris-table { margin: 0; font-size: 13px; }
.hris-table thead > tr > th {
  background: #f4f7fc; color: #555; font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.4px; border-bottom: 2px solid #e0e8f4;
  white-space: nowrap; padding: 10px 12px;
}
.hris-table tbody > tr > td { padding: 9px 12px; vertical-align: middle; border-color: #edf0f7; }
.hris-table tbody > tr:hover td { background: rgba(0,108,192,0.03); }

/* ─── KPI Cards ─────────────────────────────────────────────────── */
.hris-kpi-row { margin-bottom: 4px; }
.hris-kpi-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  padding: 18px;
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  border-left: 4px solid var(--hris-blue);
  transition: transform .15s, box-shadow .15s;
}
.hris-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.kpi-blue  { border-color: #006CC0; }
.kpi-green { border-color: #27ae60; }
.kpi-orange{ border-color: #e67e22; }
.kpi-red   { border-color: #F02424; }
.kpi-purple{ border-color: #8e44ad; }
.kpi-teal  { border-color: #16a085; }
.kpi-yellow{ border-color: #f39c12; }
.kpi-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display:flex; align-items:center; justify-content:center;
  font-size: 22px; flex-shrink: 0;
}
.kpi-blue  .kpi-icon { background: #e8f3fc; color: #006CC0; }
.kpi-green .kpi-icon { background: #eafaf1; color: #27ae60; }
.kpi-orange .kpi-icon { background: #fef9ec; color: #e67e22; }
.kpi-red   .kpi-icon { background: #ffeaea; color: #F02424; }
.kpi-purple .kpi-icon { background: #f5eeff; color: #8e44ad; }
.kpi-teal  .kpi-icon { background: #e8f8f5; color: #16a085; }
.kpi-yellow .kpi-icon { background: #fef5e7; color: #f39c12; }
.kpi-value { font-size: 26px; font-weight: 700; color: #2c3e50; line-height: 1.1; }
.kpi-label { font-size: 12px; font-weight: 600; color: #888; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 2px; }
.kpi-sub   { font-size: 12px; color: #aaa; margin-top: 4px; }
.kpi-sub a { color: var(--hris-blue); }

/* ─── Avatars ───────────────────────────────────────────────────── */
.hris-avatar {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
  border: 2px solid #e0e8f4;
}
.hris-avatar-placeholder {
  width: 36px; height: 36px; border-radius: 50%; background: var(--hris-blue);
  color: #fff; font-weight: 700; font-size: 14px;
  display:inline-flex; align-items:center; justify-content:center;
}
.hris-avatar-lg {
  width: 80px; height: 80px; border-radius: 50%; background: var(--hris-blue);
  color: #fff; font-weight: 700; font-size: 32px;
  display:inline-flex; align-items:center; justify-content:center;
  margin: 0 auto;
}
.hris-avatar-xl {
  width: 120px; height: 120px; border-radius: 50%; background: var(--hris-blue);
  color: #fff; font-weight: 700; font-size: 48px;
  display:inline-flex; align-items:center; justify-content:center;
  margin: 0 auto;
}
.hris-profile-photo {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  border: 4px solid var(--hris-blue);
}

/* ─── Profile Tabs ──────────────────────────────────────────────── */
.hris-profile-tabs { margin-bottom: 0; border-bottom: 2px solid var(--hris-blue); }
.hris-profile-tabs > li > a { color: #555; font-size: 12px; padding: 8px 12px; border-radius: 6px 6px 0 0; }
.hris-profile-tabs > li.active > a, .hris-profile-tabs > li > a:hover { color: var(--hris-blue); background: rgba(0,108,192,0.06); }
.hris-profile-tabs > li.active > a { border-color: var(--hris-blue) var(--hris-blue) #fff; }
.hris-tab-content {
  background: #fff; border: 1px solid #dde4f0; border-top: none;
  border-radius: 0 0 8px 8px; padding: 16px; margin-bottom: 20px;
}
.tab-toolbar { margin-bottom: 12px; }

/* ─── Employee Name Link ─────────────────────────────────────────── */
.hris-emp-name { font-weight: 600; color: var(--hris-blue-dark); }

/* ─── Toolbar ───────────────────────────────────────────────────── */
.hris-toolbar { margin-bottom: 16px; display:flex; gap:8px; flex-wrap:wrap; }

/* ─── Announcement Items ─────────────────────────────────────────── */
.hris-announcement-item {
  padding: 12px 0; border-bottom: 1px solid #f0f2f5;
}
.hris-announcement-item:last-child { border-bottom: none; }
.ann-title { font-weight: 600; color: #2c3e50; margin-bottom: 4px; }
.ann-body { color: #666; font-size: 12px; line-height: 1.5; }
.ann-meta { margin-top: 6px; }

/* ─── Activity Feed ─────────────────────────────────────────────── */
.hris-activity-feed { max-height: 320px; overflow-y: auto; }
.activity-item {
  padding: 8px 0; border-bottom: 1px solid #f0f2f5; font-size: 12px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon { color: var(--hris-blue); font-size: 8px; }
.activity-module { background: #eef5ff; color: var(--hris-blue); padding: 1px 6px; border-radius: 3px; font-size: 11px; }
.activity-time { margin-left: auto; white-space: nowrap; }

/* ─── Form Actions ───────────────────────────────────────────────── */
.form-actions {
  padding: 16px 0;
  margin-top: 8px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
}

/* ─── Profile Meta ────────────────────────────────────────────────── */
.profile-meta p { font-size: 13px; margin-bottom: 6px; display:flex; gap:8px; align-items:flex-start; }
.profile-meta p i { margin-top: 2px; width: 16px; }

/* ─── Org Chart ──────────────────────────────────────────────────── */
.org-dept-card {
  background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  margin-bottom: 20px; overflow: hidden;
}
.org-dept-head {
  background: linear-gradient(135deg, var(--hris-blue-dark), var(--hris-blue));
  color: #fff; padding: 12px 16px; font-weight: 600; font-size: 14px;
}
.org-emp-list { display:flex; flex-wrap:wrap; gap:12px; padding:16px; }
.org-emp-card {
  background: #f8faff; border: 1px solid #e0e8f4; border-radius: 8px;
  padding: 12px; text-align:center; width: 120px;
}
.org-emp-card .hris-avatar-lg { width:48px;height:48px;font-size:20px; }
.org-emp-name { font-size: 12px; font-weight: 600; margin-top: 6px; color: #333; }
.org-emp-pos  { font-size: 11px; color: #888; }

/* ─── Calendar ───────────────────────────────────────────────────── */
.hris-cal-grid { display:grid; grid-template-columns: repeat(7, 1fr); gap:2px; }
.hris-cal-head { text-align:center; padding:8px; font-weight:600; font-size:12px; color:#555; background:#f4f7fc; }
.hris-cal-day {
  min-height: 80px; background:#fff; border:1px solid #edf0f7;
  padding:6px; font-size:12px; border-radius:4px;
}
.hris-cal-day.today { background:#e8f3fc; border-color: var(--hris-blue); }
.hris-cal-day.other-month { opacity:0.45; }
.hris-cal-day-num { font-weight:700; font-size:13px; color:#333; }
.hris-cal-event {
  background: var(--hris-blue); color:#fff; border-radius:3px;
  padding:2px 5px; font-size:11px; margin-top:2px; cursor:pointer;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.hris-cal-event.holiday { background: var(--hris-red); }

/* ─── Status Badges ──────────────────────────────────────────────── */
.label-lg { font-size: 13px; padding: 5px 10px; }
.badge-warning { background: #f39c12; }

/* ─── Analytics Charts ─────────────────────────────────────────── */
.hris-chart-wrap { position: relative; height: 260px; }

/* ─── Footer ─────────────────────────────────────────────────────── */
.hris-footer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid #e0e8f4;
  padding: 8px 0; font-size: 12px; color: #888; z-index: 1020;
}

/* ─── Print styles ───────────────────────────────────────────────── */
@media print {
  .hris-topbar, .hris-navwrap, .hris-toolbar,
  .hris-footer, .btn, form { display: none !important; }
  body.hris-body { padding-top: 0 !important; background: #fff; }
  .hris-page-content { padding: 0; }
  .hris-panel { box-shadow: none; border: 1px solid #ddd; }
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
  body.hris-body { padding-top: 48px; }
  .hris-navwrap { display: none; }
  .hris-kpi-card { padding: 12px; }
  .kpi-value { font-size: 20px; }
}
