/* =========================================================
   portal.css — Cổng nhân viên. Toàn bộ CSS bên dưới được lấy gần như
   nguyên văn từ file mockup mobile.html do người dùng cung cấp (giữ
   đúng tên class/màu sắc/bố cục để giao diện giống 100%), chỉ khác:
   - Rule `body { ... }` gốc (nền gradient + canh giữa) được chuyển
     thành `#employeePortalRoot { ... }` vì trang này dùng chung 1
     index.html với giao diện Quản lý (không thể ghi đè thẳng <body>
     — sẽ ảnh hưởng qua cả các trang khác).
   - Bỏ khối `* { ... }` và `html, body { ... }` gốc (reset toàn trang)
     vì đã có sẵn reset tương đương ở style.css, áp dụng lại sẽ ảnh
     hưởng ngoài ý muốn tới các trang Quản lý khác.
   - Bỏ toàn bộ CSS của `.toast`/`#toast` — Cổng nhân viên dùng lại
     đúng hệ thống thông báo (showToast) đã có sẵn của ứng dụng thay vì
     làm 1 hệ thống toast riêng (tránh trùng tên class `.toast` với
     style.css, và đỡ phải bảo trì 2 hệ thống thông báo song song).
   Xem employeePortal.js để biết phần JS tương ứng.
   ========================================================= */

#employeePortalRoot {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: linear-gradient(145deg, #e8f0fe 0%, #d9e6f7 100%);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
#employeePortalRoot * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* Nút nổi "← Cổng nhân viên" khi đang mượn #leaveRequestView (xem
   style.css: body.portal-embed-mode) — không có trong mockup gốc vì
   mockup không có mục nào cần "mượn" giao diện khác. */
.portal-embed-back {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 999px;
  padding: 8px 14px 8px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #10344e;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,20,40,0.15);
}

.menu-container {
            width: 100%;
            max-width: 820px;
            background: rgba(255, 255, 255, 0.7);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            border-radius: 28px;
            box-shadow: 
                0 20px 45px rgba(0, 30, 60, 0.12),
                0 8px 20px rgba(0, 0, 0, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
            border: 1px solid rgba(255, 255, 255, 0.6);
            position: relative;
            display: flex;
            flex-direction: column;
            padding: 14px 12px 14px;
            gap: 10px;
        }

.company-header {
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            padding: 2px 8px 0;
            flex-shrink: 0;
        }

.company-header h1 {
            font-size: 13px;
            font-weight: 800;
            letter-spacing: 0.4px;
            text-transform: uppercase;
            line-height: 1.3;
            text-align: center;
            background: linear-gradient(135deg, #1e4a7a, #2e86de);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

.company-header .divider {
            width: 50px;
            height: 2px;
            background: linear-gradient(90deg, transparent, #2e86de, transparent);
            border-radius: 2px;
        }

.employee-bar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            padding: 6px 10px 6px 6px;
            border-radius: 16px;
            box-shadow: 
                0 4px 12px rgba(0, 30, 60, 0.07),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
            border: 1px solid rgba(255, 255, 255, 0.8);
            flex-shrink: 0;
        }

.employee-info {
            display: flex;
            align-items: center;
            gap: 9px;
            flex: 1;
            min-width: 0;
            cursor: pointer;
            border-radius: 12px;
            padding: 2px 4px 2px 2px;
            transition: 0.15s;
        }

.employee-info:active {
            background: #f0f6fc;
            transform: scale(0.98);
        }

.employee-avatar {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: linear-gradient(145deg, #54a0ff, #2e86de);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 13.5px;
            font-weight: 700;
            flex-shrink: 0;
            box-shadow: 0 3px 8px rgba(46, 134, 222, 0.3);
            border: 2px solid white;
            overflow: hidden;
            letter-spacing: -0.3px;
        }

.employee-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

.employee-details {
            display: flex;
            flex-direction: column;
            gap: 1px;
            min-width: 0;
            flex: 1;
        }

.employee-name-row {
            display: flex;
            align-items: center;
            gap: 6px;
            min-width: 0;
        }

.employee-name {
            font-size: 12.5px;
            font-weight: 700;
            color: #10344e;
            letter-spacing: -0.3px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            min-width: 0;
        }

.employee-code {
            font-size: 9.5px;
            font-weight: 600;
            color: #2e6a9e;
            background: #e8f0fe;
            padding: 1.5px 6px;
            border-radius: 20px;
            letter-spacing: 0.2px;
            white-space: nowrap;
            border: 1px solid #d0e0ee;
            flex-shrink: 0;
        }

.employee-dept {
            font-size: 10.5px;
            color: #5b7390;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

.employee-dept i {
            font-size: 9px;
            color: #8499ad;
        }

.icon-btn-settings {
            width: 34px;
            height: 34px;
            border-radius: 11px;
            background: #f0f6fc;
            border: 1px solid #e0eaf4;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #2e6a9e;
            font-size: 14px;
            cursor: pointer;
            transition: 0.15s;
            flex-shrink: 0;
        }

.icon-btn-settings:active {
            transform: scale(0.92);
            background: #e2edf8;
        }

.icon-btn-lang {
            height: 34px;
            padding: 0 10px;
            border-radius: 11px;
            background: #f0f6fc;
            border: 1px solid #e0eaf4;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #2e6a9e;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: 0.15s;
            flex-shrink: 0;
            white-space: nowrap;
        }

.icon-btn-lang:active {
            transform: scale(0.92);
            background: #e2edf8;
        }

.menu-area {
            flex-shrink: 0;
            padding: 2px 2px 0;
        }

.menu-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 14px 10px;
            width: 100%;
        }

.menu-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            gap: 8px;
            cursor: pointer;
            border: none;
            background: transparent;
            padding: 6px 2px 4px;
            border-radius: 18px;
            transition: transform 0.15s, background 0.2s;
            font-family: inherit;
            position: relative;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }

.menu-item:active {
            transform: scale(0.92);
            background: rgba(255, 255, 255, 0.9);
        }

.icon-box {
            width: 60px;
            height: 60px;
            border-radius: 19px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 25px;
            color: white;
            box-shadow: 
                0 6px 14px rgba(0, 0, 0, 0.12),
                0 2px 4px rgba(0, 0, 0, 0.06),
                inset 0 -2px 0 rgba(0, 0, 0, 0.08);
            transition: 0.2s;
            position: relative;
            flex-shrink: 0;
        }

.icon-box::after {
            content: '';
            position: absolute;
            top: 5px;
            left: 12%;
            width: 76%;
            height: 30%;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
            border-radius: 50% 50% 30% 30%;
            pointer-events: none;
        }

.icon-box i {
            filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
            z-index: 1;
            font-size: 25px;
        }

.menu-label {
            font-size: 11.5px;
            font-weight: 600;
            color: #10344e;
            line-height: 1.25;
            max-width: 100%;
            word-break: break-word;
            letter-spacing: -0.2px;
        }

.icon-notify { background: linear-gradient(145deg, #ff9f43, #ff6b6b); }

.icon-leave { background: linear-gradient(145deg, #54a0ff, #2e86de); }

.icon-annual { background: linear-gradient(145deg, #48dbfb, #0abde3); }

.icon-contract { background: linear-gradient(145deg, #a29bfe, #6c5ce7); }

.icon-worklog { background: linear-gradient(145deg, #1dd1a1, #10ac84); }

.icon-payslip { background: linear-gradient(145deg, #feca57, #f39c12); }
.icon-bucong { background: linear-gradient(145deg, #fd79a8, #e84393); }
.icon-noiquy { background: linear-gradient(145deg, #6ea8fe, #3867d6); }
.icon-tintuc { background: linear-gradient(145deg, #74b9ff, #1877f2); }

.badge {
            position: absolute;
            top: -4px;
            right: -4px;
            background: #ff4757;
            color: white;
            font-size: 10px;
            font-weight: 700;
            min-width: 20px;
            height: 20px;
            border-radius: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 5px;
            border: 2px solid white;
            box-shadow: 0 3px 6px rgba(255, 71, 87, 0.4);
            z-index: 3;
        }

.widget-area {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 4px 2px 0;
            min-height: 0;
        }

.clock-widget {
            background: linear-gradient(135deg, #1e4a7a 0%, #2e86de 60%, #48dbfb 100%);
            border-radius: 22px;
            padding: 16px 18px;
            color: white;
            position: relative;
            overflow: hidden;
            box-shadow: 
                0 10px 24px rgba(30, 74, 122, 0.28),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
        }

.clock-widget::before {
            content: '';
            position: absolute;
            inset: 0;
            background-image: 
                radial-gradient(circle at 15% 20%, rgba(255,255,255,0.18) 0%, transparent 45%),
                radial-gradient(circle at 85% 80%, rgba(255,255,255,0.12) 0%, transparent 40%);
            pointer-events: none;
        }

.clock-left {
            display: flex;
            flex-direction: column;
            gap: 4px;
            position: relative;
            z-index: 1;
            min-width: 0;
        }

.clock-time {
            font-size: 28px;
            font-weight: 800;
            letter-spacing: -0.5px;
            line-height: 1.1;
            font-variant-numeric: tabular-nums;
        }

.clock-date {
            font-size: 11.5px;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.9);
            letter-spacing: 0.2px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

.clock-date i {
            font-size: 11px;
            color: rgba(255, 255, 255, 0.75);
        }

.clock-right {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 6px;
            position: relative;
            z-index: 1;
            flex-shrink: 0;
            text-align: right;
        }

.clock-greeting {
            font-size: 11.5px;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.95);
            letter-spacing: 0.2px;
            white-space: nowrap;
        }

.clock-sub {
            font-size: 10px;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.7);
            white-space: nowrap;
        }

.feedback-widget {
            background: #ffffff;
            border-radius: 22px;
            padding: 14px 16px;
            box-shadow: 
                0 6px 18px rgba(0, 30, 60, 0.08),
                0 2px 4px rgba(0, 0, 0, 0.03);
            border: 1px solid #e8eff7;
            display: flex;
            align-items: center;
            gap: 13px;
            cursor: pointer;
            transition: 0.18s;
            position: relative;
            overflow: hidden;
        }

.feedback-widget:active {
            transform: scale(0.98);
            background: #f9fbfe;
        }

.feedback-icon {
            width: 46px;
            height: 46px;
            border-radius: 15px;
            background: linear-gradient(145deg, #54a0ff, #2e86de);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 20px;
            flex-shrink: 0;
            box-shadow: 0 4px 10px rgba(46, 134, 222, 0.3);
            position: relative;
        }

.feedback-icon::after {
            content: '';
            position: absolute;
            top: 4px;
            left: 12%;
            width: 76%;
            height: 30%;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
            border-radius: 50% 50% 30% 30%;
            pointer-events: none;
        }

.feedback-content {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 3px;
        }

.feedback-title {
            font-size: 13px;
            font-weight: 700;
            color: #16324f;
            letter-spacing: -0.2px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

.feedback-title .new-badge {
            font-size: 9px;
            font-weight: 700;
            color: white;
            background: #ff4757;
            padding: 2px 6px;
            border-radius: 10px;
            letter-spacing: 0.3px;
            animation: badgePulse 2s infinite;
        }

@keyframes badgePulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.65; }
        }

.feedback-desc {
            font-size: 11px;
            color: #6b7f95;
            font-weight: 500;
            line-height: 1.3;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

.feedback-arrow {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background: #f0f6fc;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #2e6a9e;
            font-size: 12px;
            flex-shrink: 0;
            transition: 0.15s;
        }

.feedback-widget:active .feedback-arrow {
            background: #e2edf8;
        }

.stats-widget {
            background: #ffffff;
            border-radius: 22px;
            padding: 14px 14px 12px;
            box-shadow: 
                0 6px 18px rgba(0, 30, 60, 0.08),
                0 2px 4px rgba(0, 0, 0, 0.03);
            border: 1px solid #e8eff7;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

.stats-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
        }

.stats-title {
            font-size: 12px;
            font-weight: 700;
            color: #16324f;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

.stats-title i {
            color: #2e6a9e;
            font-size: 12px;
        }

.stats-period {
            font-size: 10.5px;
            font-weight: 600;
            color: #2e6a9e;
            background: #e8f0fe;
            padding: 3px 9px;
            border-radius: 20px;
            border: 1px solid #d0e0ee;
        }

.stats-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
        }

.stat-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            padding: 11px 8px;
            border-radius: 14px;
            background: #f7fafd;
            border: 1px solid #eaf1f8;
            text-align: center;
            min-width: 0;
        }

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

.stat-icon.phep { background: linear-gradient(145deg, #48dbfb, #0abde3); }

.stat-icon.cong { background: linear-gradient(145deg, #1dd1a1, #10ac84); }

.stat-value {
            font-size: 16px;
            font-weight: 800;
            color: #10344e;
            letter-spacing: -0.3px;
            line-height: 1;
            font-variant-numeric: tabular-nums;
        }

.stat-value small {
            font-size: 10px;
            font-weight: 600;
            color: #6b7f95;
            margin-left: 1px;
        }

.stat-label {
            font-size: 10px;
            font-weight: 600;
            color: #6b7f95;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
        }

.footer-slogan {
            text-align: center;
            padding: 10px 12px 4px;
            margin-top: 2px;
            border-top: 1px solid rgba(180, 200, 220, 0.35);
            flex-shrink: 0;
        }

.footer-slogan p {
            font-size: 11.5px;
            font-weight: 600;
            font-style: italic;
            color: #2e6a9e;
            letter-spacing: 0.2px;
            line-height: 1.4;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            flex-wrap: wrap;
        }

.footer-slogan p i {
            font-size: 10px;
            color: #48dbfb;
            opacity: 0.8;
        }

.profile-overlay {
            position: fixed;
            inset: 0;
            background: rgba(10, 30, 50, 0.55);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 200;
            display: flex;
            justify-content: center;
            align-items: flex-end;
            padding: 0;
            overflow-y: auto;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }

.profile-overlay.open {
            opacity: 1;
            visibility: visible;
        }

.profile-modal {
            width: 100%;
            max-width: 480px;
            background: #ffffff;
            border-radius: 28px 28px 0 0;
            box-shadow: 0 -20px 50px rgba(0, 20, 40, 0.3);
            overflow: hidden;
            transform: translateY(100%);
            transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.1);
            padding-bottom: env(safe-area-inset-bottom);
            max-height: 92vh;
            max-height: 92dvh;
            overflow-y: auto;
        }

.profile-overlay.open .profile-modal {
            transform: translateY(0);
        }

.profile-modal::before {
            content: '';
            display: block;
            width: 40px;
            height: 4px;
            background: rgba(200, 215, 230, 0.7);
            border-radius: 4px;
            margin: 10px auto 0;
        }

.profile-banner {
            height: 100px;
            background: linear-gradient(135deg, #1e4a7a 0%, #2e86de 50%, #48dbfb 100%);
            position: relative;
            margin-top: -14px;
        }

.profile-banner::after {
            content: '';
            position: absolute;
            inset: 0;
            background-image: 
                radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(255,255,255,0.12) 0%, transparent 35%);
        }

.profile-close {
            position: absolute;
            top: 12px;
            right: 12px;
            width: 34px;
            height: 34px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.9);
            border: none;
            color: #16324f;
            font-size: 15px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            transition: 0.15s;
            z-index: 5;
        }

.profile-close:active {
            transform: scale(0.9);
            background: white;
        }

.profile-avatar-wrapper {
            display: flex;
            justify-content: center;
            margin-top: -50px;
            position: relative;
            z-index: 2;
        }

.profile-avatar {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background: linear-gradient(145deg, #54a0ff, #2e86de);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 38px;
            font-weight: 700;
            border: 4px solid #ffffff;
            box-shadow: 0 10px 24px rgba(0, 30, 60, 0.2);
            overflow: hidden;
            letter-spacing: -1px;
            position: relative;
        }

.profile-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

.avatar-edit-btn {
            position: absolute;
            bottom: 0px;
            right: 0px;
            width: 34px;
            height: 34px;
            border-radius: 50%;
            background: #ffffff;
            border: 2.5px solid #ffffff;
            color: #2e6a9e;
            font-size: 13px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 10px rgba(0, 30, 60, 0.18);
            transition: 0.15s;
            z-index: 3;
        }

.avatar-edit-btn:active {
            transform: scale(0.9);
            background: #e8f0fe;
        }

.profile-body {
            padding: 14px 20px 24px;
            text-align: center;
        }

.profile-name {
            font-size: 19px;
            font-weight: 700;
            color: #10344e;
            letter-spacing: -0.4px;
            margin-bottom: 4px;
        }

.profile-code-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 11.5px;
            font-weight: 600;
            color: #2e6a9e;
            background: #e8f0fe;
            padding: 3px 11px;
            border-radius: 20px;
            margin-bottom: 6px;
            border: 1px solid #d0e0ee;
        }

.profile-role {
            font-size: 13px;
            color: #5b7390;
            font-weight: 500;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            margin-bottom: 20px;
        }

.profile-role i {
            font-size: 11px;
            color: #8499ad;
        }

.profile-edit-section {
            background: #f7fafd;
            border-radius: 18px;
            padding: 16px 14px;
            border: 1px solid #e5eef7;
            text-align: left;
        }

.edit-section-title {
            font-size: 12px;
            font-weight: 700;
            color: #16324f;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 7px;
        }

.edit-section-title i {
            color: #2e6a9e;
            font-size: 12px;
        }

.edit-field {
            margin-bottom: 12px;
        }

.edit-field:last-of-type {
            margin-bottom: 0;
        }

.edit-field label {
            display: block;
            font-size: 11.5px;
            font-weight: 600;
            color: #5b7390;
            margin-bottom: 5px;
            letter-spacing: 0.1px;
        }

.edit-field label i {
            color: #2e6a9e;
            margin-right: 5px;
            width: 13px;
            font-size: 11px;
        }

.edit-field input {
            width: 100%;
            padding: 12px 13px;
            border-radius: 12px;
            border: 1.5px solid #d7e2ee;
            font-size: 15px;
            background: #ffffff;
            font-family: inherit;
            color: #10344e;
            outline: none;
            transition: 0.15s;
            -webkit-appearance: none;
            appearance: none;
        }

.edit-field input:focus {
            border-color: #2e6a9e;
            box-shadow: 0 0 0 4px rgba(46, 106, 158, 0.12);
        }

.edit-field input::placeholder {
            color: #a3b8ce;
        }

.profile-save-btn {
            width: 100%;
            margin-top: 16px;
            padding: 14px;
            border: none;
            border-radius: 14px;
            background: linear-gradient(135deg, #1e4a7a, #2e86de);
            color: white;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 8px 20px rgba(46, 134, 222, 0.3);
            transition: 0.18s;
            font-family: inherit;
            letter-spacing: 0.2px;
            touch-action: manipulation;
        }

.profile-save-btn:active {
            transform: scale(0.97);
        }

.profile-save-btn i {
            font-size: 14px;
        }

.feedback-overlay {
            position: fixed;
            inset: 0;
            background: rgba(10, 30, 50, 0.55);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 210;
            display: flex;
            justify-content: center;
            align-items: flex-end;
            padding: 0;
            overflow-y: auto;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
        }

.feedback-overlay.open {
            opacity: 1;
            visibility: visible;
        }

.feedback-modal {
            width: 100%;
            max-width: 480px;
            background: #ffffff;
            border-radius: 28px 28px 0 0;
            box-shadow: 0 -20px 50px rgba(0, 20, 40, 0.3);
            overflow: hidden;
            transform: translateY(100%);
            transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.1);
            padding-bottom: env(safe-area-inset-bottom);
            max-height: 92vh;
            max-height: 92dvh;
            overflow-y: auto;
        }

.feedback-overlay.open .feedback-modal {
            transform: translateY(0);
        }

.feedback-modal::before {
            content: '';
            display: block;
            width: 40px;
            height: 4px;
            background: rgba(200, 215, 230, 0.7);
            border-radius: 4px;
            margin: 10px auto 0;
        }

/* Biến thể "toàn màn hình" — dùng cho Nội quy/Tin tức: hiện đầy hết
   chiều dọc màn hình thay vì kiểu bottom-sheet (bo góc trên, chừa
   khoảng trống phía trên) như các overlay khác. */
.feedback-overlay--fullscreen {
            align-items: stretch;
        }
.feedback-overlay--fullscreen .feedback-modal {
            max-height: 100vh;
            max-height: 100dvh;
            height: 100%;
            border-radius: 0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
.feedback-overlay--fullscreen .feedback-modal::before {
            display: none;
        }
.feedback-overlay--fullscreen .feedback-modal-header {
            margin-top: 0;
            flex-shrink: 0;
        }
.feedback-overlay--fullscreen .feedback-modal-body {
            flex: 1 1 auto;
            overflow-y: auto;
        }

.feedback-modal-header {
            padding: 16px 20px 14px;
            background: linear-gradient(135deg, #1e4a7a 0%, #2e86de 60%, #48dbfb 100%);
            color: white;
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: -14px;
            position: relative;
        }

.feedback-modal-header::after {
            content: '';
            position: absolute;
            inset: 0;
            background-image: 
                radial-gradient(circle at 15% 30%, rgba(255,255,255,0.18) 0%, transparent 45%),
                radial-gradient(circle at 85% 70%, rgba(255,255,255,0.12) 0%, transparent 40%);
            pointer-events: none;
        }

.feedback-modal-icon {
            width: 44px;
            height: 44px;
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.22);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            flex-shrink: 0;
            position: relative;
            z-index: 1;
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

.feedback-modal-title {
            position: relative;
            z-index: 1;
            flex: 1;
        }

.feedback-modal-title h3 {
            font-size: 16px;
            font-weight: 700;
            letter-spacing: -0.2px;
            margin-bottom: 2px;
        }

.feedback-modal-title p {
            font-size: 11.5px;
            color: rgba(255, 255, 255, 0.85);
            font-weight: 500;
        }

.feedback-modal-close {
            position: absolute;
            top: 14px;
            right: 14px;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.9);
            border: none;
            color: #1e4a7a;
            font-size: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            transition: 0.15s;
            z-index: 5;
        }

.feedback-modal-close:active {
            transform: scale(0.9);
            background: white;
        }

.feedback-modal-body {
            padding: 18px 20px 24px;
        }

.feedback-type-selector {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
            margin-bottom: 16px;
        }

.feedback-type-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 7px;
            padding: 12px 8px;
            border-radius: 14px;
            border: 1.5px solid #e5eef7;
            background: #f7fafd;
            cursor: pointer;
            transition: 0.15s;
            font-family: inherit;
            color: #5b7390;
            font-size: 12.5px;
            font-weight: 600;
        }

.feedback-type-btn i {
            font-size: 15px;
        }

.feedback-type-btn.active {
            background: #e8f0fe;
            border-color: #2e86de;
            color: #1e4a7a;
        }

.feedback-type-btn.active i {
            color: #2e86de;
        }

.feedback-type-btn:active {
            transform: scale(0.96);
        }

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

.feedback-field label {
            display: block;
            font-size: 12px;
            font-weight: 600;
            color: #5b7390;
            margin-bottom: 6px;
            letter-spacing: 0.1px;
        }

.feedback-field label i {
            color: #2e86de;
            margin-right: 6px;
            width: 14px;
            font-size: 12px;
        }

.feedback-field label .required {
            color: #ff4757;
            margin-left: 2px;
        }

.feedback-field input,
        .feedback-field select,
        .feedback-field textarea {
            width: 100%;
            padding: 12px 14px;
            border-radius: 12px;
            border: 1.5px solid #d7e2ee;
            font-size: 14.5px;
            background: #ffffff;
            font-family: inherit;
            color: #10344e;
            outline: none;
            transition: 0.15s;
            -webkit-appearance: none;
            appearance: none;
        }

.feedback-field select {
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e86de' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 12px center;
            background-size: 16px;
            padding-right: 38px;
        }

.feedback-field textarea {
            resize: vertical;
            min-height: 90px;
            line-height: 1.5;
        }

.feedback-field input:focus,
        .feedback-field select:focus,
        .feedback-field textarea:focus {
            border-color: #2e86de;
            box-shadow: 0 0 0 4px rgba(46, 134, 222, 0.12);
        }

.feedback-field input::placeholder,
        .feedback-field textarea::placeholder {
            color: #a3b8ce;
        }

.feedback-submit-btn {
            width: 100%;
            margin-top: 6px;
            padding: 14px;
            border: none;
            border-radius: 14px;
            background: linear-gradient(135deg, #1e4a7a, #2e86de);
            color: white;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 8px 20px rgba(46, 134, 222, 0.3);
            transition: 0.18s;
            font-family: inherit;
            letter-spacing: 0.2px;
            touch-action: manipulation;
        }

.feedback-submit-btn:active {
            transform: scale(0.97);
        }

.feedback-submit-btn i {
            font-size: 14px;
        }

#avatarFileInput {
            display: none;
        }

@media (min-width: 500px) {
.menu-container {
                padding: 18px 18px 20px;
                border-radius: 32px;
                gap: 12px;
            }
.company-header h1 {
                font-size: 14.5px;
            }
.employee-avatar {
                width: 42px;
                height: 42px;
                font-size: 15px;
            }
.employee-name {
                font-size: 13.5px;
            }
.employee-code {
                font-size: 10px;
            }
.employee-dept {
                font-size: 11.5px;
            }
.icon-btn-settings {
                width: 38px;
                height: 38px;
                font-size: 15px;
            }
.icon-btn-lang {
                height: 38px;
                font-size: 13px;
            }
.icon-box {
                width: 68px;
                height: 68px;
                font-size: 28px;
                border-radius: 21px;
            }
.icon-box i {
                font-size: 28px;
            }
.menu-label {
                font-size: 12.5px;
            }
.menu-grid {
                gap: 16px 12px;
            }
.clock-time {
                font-size: 32px;
            }
.clock-date {
                font-size: 12.5px;
            }
.feedback-icon {
                width: 52px;
                height: 52px;
                font-size: 22px;
            }
.feedback-title {
                font-size: 14px;
            }
.feedback-desc {
                font-size: 11.5px;
            }
.stat-value {
                font-size: 18px;
            }
.stat-icon {
                width: 34px;
                height: 34px;
                font-size: 15px;
            }
.stat-label {
                font-size: 10.5px;
            }
.footer-slogan p {
                font-size: 12.5px;
            }
}

@media (max-width: 420px) {
.menu-container {
                padding: 12px 10px 12px;
                border-radius: 22px;
                gap: 8px;
            }
.company-header h1 {
                font-size: 11.5px;
            }
.company-header .divider {
                width: 40px;
                height: 1.5px;
            }
.employee-bar {
                padding: 5px 8px 5px 5px;
                border-radius: 14px;
            }
.employee-info {
                gap: 8px;
            }
.employee-avatar {
                width: 34px;
                height: 34px;
                font-size: 12px;
            }
.employee-name {
                font-size: 11.5px;
            }
.employee-code {
                font-size: 9px;
                padding: 1px 5px;
            }
.employee-dept {
                font-size: 10px;
            }
.icon-btn-settings {
                width: 32px;
                height: 32px;
                font-size: 13px;
                border-radius: 10px;
            }
.icon-btn-lang {
                height: 32px;
                font-size: 11px;
                border-radius: 10px;
            }
.icon-box {
                width: 54px;
                height: 54px;
                font-size: 22px;
                border-radius: 17px;
            }
.icon-box i {
                font-size: 22px;
            }
.menu-label {
                font-size: 10.5px;
            }
.menu-grid {
                gap: 10px 6px;
            }
.clock-widget {
                padding: 13px 15px;
                border-radius: 18px;
            }
.clock-time {
                font-size: 22px;
            }
.clock-date {
                font-size: 10.5px;
            }
.clock-greeting {
                font-size: 10.5px;
            }
.clock-sub {
                font-size: 9.5px;
            }
.feedback-widget {
                padding: 12px 13px;
                border-radius: 18px;
                gap: 11px;
            }
.feedback-icon {
                width: 42px;
                height: 42px;
                font-size: 18px;
                border-radius: 13px;
            }
.feedback-title {
                font-size: 12px;
            }
.feedback-desc {
                font-size: 10.5px;
            }
.feedback-arrow {
                width: 26px;
                height: 26px;
                font-size: 11px;
            }
.stats-widget {
                padding: 12px 11px 10px;
                border-radius: 18px;
                gap: 8px;
            }
.stats-title {
                font-size: 11px;
            }
.stats-period {
                font-size: 9.5px;
                padding: 2px 7px;
            }
.stat-item {
                padding: 9px 6px;
                border-radius: 12px;
                gap: 3px;
            }
.stat-icon {
                width: 28px;
                height: 28px;
                font-size: 13px;
                border-radius: 9px;
            }
.stat-value {
                font-size: 14.5px;
            }
.stat-value small {
                font-size: 9px;
            }
.stat-label {
                font-size: 9.5px;
            }
.footer-slogan p {
                font-size: 10.5px;
            }
}

@media (max-width: 360px) {
.menu-container {
                padding: 10px 9px 10px;
                border-radius: 20px;
                gap: 7px;
            }
.company-header h1 {
                font-size: 10.5px;
            }
.employee-bar {
                padding: 4px 7px 4px 4px;
            }
.employee-avatar {
                width: 32px;
                height: 32px;
                font-size: 11px;
            }
.employee-name {
                font-size: 11px;
            }
.employee-code {
                font-size: 8.5px;
                padding: 1px 4px;
            }
.employee-dept {
                font-size: 9.5px;
            }
.icon-btn-settings {
                width: 30px;
                height: 30px;
                font-size: 12px;
            }
.icon-btn-lang {
                height: 30px;
                font-size: 10.5px;
                padding: 0 7px;
            }
.icon-box {
                width: 50px;
                height: 50px;
                font-size: 20px;
                border-radius: 15px;
            }
.icon-box i {
                font-size: 20px;
            }
.menu-label {
                font-size: 10px;
            }
.menu-grid {
                gap: 8px 5px;
            }
.clock-widget {
                padding: 11px 13px;
                border-radius: 16px;
            }
.clock-time {
                font-size: 20px;
            }
.clock-date {
                font-size: 10px;
            }
.feedback-widget {
                padding: 10px 12px;
                border-radius: 16px;
                gap: 10px;
            }
.feedback-icon {
                width: 38px;
                height: 38px;
                font-size: 16px;
                border-radius: 12px;
            }
.feedback-title {
                font-size: 11.5px;
            }
.feedback-desc {
                font-size: 10px;
            }
.stats-widget {
                padding: 10px 9px 9px;
                border-radius: 16px;
            }
.stats-title {
                font-size: 10.5px;
            }
.stat-value {
                font-size: 13.5px;
            }
.stat-icon {
                width: 26px;
                height: 26px;
                font-size: 12px;
            }
.stat-label {
                font-size: 9px;
            }
.footer-slogan p {
                font-size: 10px;
            }
}

@media (max-width: 330px) {
.employee-code {
                display: none;
            }
.icon-box {
                width: 46px;
                height: 46px;
                font-size: 18px;
                border-radius: 14px;
            }
.icon-box i {
                font-size: 18px;
            }
.menu-label {
                font-size: 9.5px;
            }
.clock-time {
                font-size: 18px;
            }
.feedback-title {
                font-size: 11px;
            }
.feedback-desc {
                font-size: 9.5px;
            }
.stat-value {
                font-size: 12.5px;
            }
.footer-slogan p {
                font-size: 9.5px;
            }
}

@media (max-height: 620px) and (orientation: landscape) {
#employeePortalRoot {
                padding-top: 6px;
                padding-bottom: 6px;
            }
.menu-container {
                padding: 10px 12px 10px;
                gap: 6px;
            }
.company-header h1 {
                font-size: 11px;
            }
.employee-bar {
                padding: 4px 8px 4px 4px;
            }
.icon-box {
                width: 46px;
                height: 46px;
                font-size: 18px;
                border-radius: 14px;
            }
.icon-box i {
                font-size: 18px;
            }
.menu-label {
                font-size: 9.5px;
            }
.menu-grid {
                gap: 6px 8px;
            }
.clock-time {
                font-size: 20px;
            }
.stats-grid {
                gap: 5px;
            }
.stat-item {
                padding: 6px 3px;
            }
.footer-slogan {
                padding: 6px 8px 2px;
            }
.profile-modal,
            .feedback-modal {
                max-height: 96vh;
            }
}

@media (hover: none) {
.menu-item:hover {
                background: transparent;
                transform: none;
            }
}
/* =========================================================
   Màn hình con cho các mục CÓ chức năng thật (Phép năm, Hợp đồng, Dữ
   liệu công, Phiếu lương) — mockup gốc không có màn cho các mục này
   (chỉ hiện toast giả lập), nên style dưới đây tự thêm cho khớp cùng
   tông màu/bo góc/font với phần còn lại của Cổng nhân viên.
   ========================================================= */
.portal-subscreen {
  width: 100%;
  max-width: 820px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 28px;
  box-shadow: 0 20px 45px rgba(0, 30, 60, 0.12), 0 8px 20px rgba(0,0,0,0.05);
  border: 1px solid rgba(255,255,255,0.6);
  padding: 16px 14px 20px;
  color: #10344e;
}
.portal-subscreen__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.portal-back-btn {
  border: none;
  background: #ecf3fa;
  color: #1e4a7a;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 15px;
}
.portal-subscreen__title { font-weight: 800; font-size: 15.5px; color: #10344e; }

.portal-info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,30,60,0.08);
  font-size: 13px;
}
.portal-info-row:last-child { border-bottom: none; }
.portal-info-row__label { color: #6b7f95; flex-shrink: 0; }
.portal-info-row__value { text-align: right; font-weight: 600; }

.portal-card-list { display: flex; flex-direction: column; gap: 10px; }
.portal-card {
  border: 1px solid rgba(0,30,60,0.08);
  background: rgba(255,255,255,0.6);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 13px;
}
.portal-card__title { font-weight: 700; margin-bottom: 4px; color: #10344e; }
.portal-card__meta { color: #6b7f95; font-size: 12px; }
.portal-avatar-sm {
  width: 48px; height: 48px; border-radius: 999px;
  background: #e8f0fe; color: #1e4a7a;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; flex-shrink: 0;
}

/* ========== NỘI QUY — accordion (kiểu mẫu noiquy.html người dùng cung
   cấp, chuyển sang CSS thuần thay vì Tailwind) ========== */
.noiquy-search-wrap {
  position: relative;
  margin-bottom: 14px;
}
.noiquy-search-wrap i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: #94a3b8; font-size: 13px;
}
.noiquy-search-wrap input {
  width: 100%; box-sizing: border-box;
  background: #f1f5f9; border: none; border-radius: 12px;
  padding: 10px 14px 10px 34px; font-size: 13.5px; color: #1b2b3a;
}
.noiquy-search-wrap input:focus { outline: 2px solid #93c5fd; }

.noiquy-chapter {
  background: #fff; border: 1px solid #eef1f5; border-radius: 16px;
  margin-bottom: 10px; overflow: hidden;
}
.noiquy-chapter-header {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 13px 14px; background: none; border: none;
  cursor: pointer; text-align: left;
}
.noiquy-chapter-header-left { display: flex; align-items: center; gap: 10px; }
.noiquy-chapter-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: #dbeafe; color: #2563eb;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.noiquy-chapter-title { font-weight: 600; color: #1b2b3a; font-size: 13.5px; }
.noiquy-chapter-new-badge {
  background: #ef4444; color: #fff; font-size: 9.5px; font-weight: 800;
  padding: 2px 6px; border-radius: 999px; margin-right: 8px;
}
.noiquy-chapter-chevron { color: #94a3b8; transition: transform 0.25s ease; }
.noiquy-chapter.open .noiquy-chapter-chevron { transform: rotate(180deg); }
.noiquy-chapter-content {
  max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out;
  padding: 0 14px;
}
.noiquy-chapter.open .noiquy-chapter-content { max-height: 2000px; padding: 0 14px 14px; }
.noiquy-chapter-content-inner {
  border-top: 1px solid #f1f5f9; padding-top: 10px;
  font-size: 12.5px; color: #475569; line-height: 1.6;
}
.noiquy-chapter-content-inner p { margin: 0 0 8px; }
.noiquy-chapter-content-inner strong { color: #1b2b3a; }

.noiquy-no-result {
  text-align: center; padding: 30px 10px; color: #94a3b8; font-size: 12.5px;
}
.noiquy-no-result i { display: block; font-size: 32px; margin-bottom: 8px; opacity: 0.5; }

.noiquy-confirmed-note {
  text-align: center; margin-top: 8px; font-size: 12px; color: #16a34a; font-weight: 600;
}
#btnConfirmNoiQuyRead.is-confirmed {
  background: linear-gradient(145deg, #4ade80, #16a34a) !important;
}
/* ========== TIN TỨC — feed dạng thẻ (kiểu mẫu tintuc.html) — bỏ hẳn
   phần tương tác xã hội (thích/bình luận/chia sẻ, đăng bài từ nhân
   viên) vì chỉ admin đăng qua Cài đặt, nhân viên chỉ xem. ========== */
.tintuc-feed { display: flex; flex-direction: column; gap: 10px; }
.tintuc-post {
  background: #fff; border-radius: 16px; border: 1px solid #eef1f5; overflow: hidden;
}
.tintuc-post-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px 8px; }
.tintuc-post-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(145deg, #74b9ff, #1877f2);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 15px; overflow: hidden;
}
.tintuc-post-author { font-weight: 700; font-size: 13px; color: #1b2b3a; }
.tintuc-post-author i { color: #1877f2; font-size: 10.5px; margin-left: 3px; }
.tintuc-post-date { font-size: 11px; color: #94a3b8; }
.tintuc-post-body { padding: 0 14px 10px; font-size: 13px; color: #1b2b3a; line-height: 1.55; white-space: pre-line; }
.tintuc-post-body.is-clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}
.tintuc-post-see-more {
  display: inline-block; margin: -4px 14px 10px; font-size: 12.5px; font-weight: 700;
  color: #1877f2; cursor: pointer;
}

.tintuc-post-images {
  display: grid; gap: 2px; margin: 0 0 4px;
  aspect-ratio: 4 / 3;
}
.tintuc-post-images > div { position: relative; overflow: hidden; height: 100%; }
.tintuc-post-images img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.tintuc-post-images.grid-1 { grid-template-columns: 1fr; }
.tintuc-post-images.grid-2 { grid-template-columns: 1fr 1fr; }
/* grid-3: 2 ảnh đầu HIỆN RÕ (ảnh đầu cao gấp đôi bên trái, ảnh 2 xếp
   trên bên phải) + ô thứ 3 (dưới bên phải) — nếu còn ảnh chưa hiện,
   ô này bị làm mờ + phủ "+N" qua .tintuc-more-overlay bên dưới. */
.tintuc-post-images.grid-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.tintuc-post-images.grid-3 > div:first-child { grid-row: span 2; }
.tintuc-post-images .tintuc-more-overlay::after {
  content: attr(data-more);
  position: absolute; inset: 0; background: rgba(0,0,0,0.55);
  color: #fff; font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
