@scope (.personal-profile) {

        :scope {
            --gold: #AE7C41; --gold-light: #C9973E; --gold-pale: #F3EBD9;
            --charcoal: #1A1A1A; --mid: #3D3D3D; --muted: #7A7A7A;
            --border: #E5DCCC; --ivory: #FAFAF7; --white: #FFFFFF;
            --sans: 'Plus Jakarta Sans', system-ui, sans-serif; --serif: 'Cormorant Garamond', Georgia, serif;
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }
        :scope { font-family: var(--sans); background-color: var(--white); color: var(--charcoal); display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

        /* TOP NAVBAR */
        .navbar { 
            height: 70px; background-color: var(--white); border-bottom: 1px solid var(--border);
            display: flex; align-items: center; justify-content: space-between; padding: 0 30px; flex-shrink: 0;
        }
        .navbar-left { display: flex; align-items: center; gap: 15px; }
        .navbar-left img { height: 40px; cursor: pointer; }
        .navbar-left span { font-size: 20px; font-weight: 500; color: var(--muted); padding-left: 15px; border-left: 1px solid var(--border); }
        :scope.personal-profile--embed .navbar > div:last-child { display: none !important; }
        .back-btn { display: flex; align-items: center; gap: 8px; color: var(--charcoal); text-decoration: none; font-weight: 600; font-size: 14px; background: var(--ivory); padding: 8px 16px; border-radius: 4px; border: 1px solid var(--border); transition: 0.2s; }
        .back-btn:hover { background: var(--gold-pale); color: var(--gold); border-color: var(--gold); }

        /* MAIN LAYOUT (GOOGLE CONCEPT) */
        .main-container { display: flex; flex: 1; overflow: hidden; }

        /* SIDEBAR NAVIGATION */
        .sidebar { width: 280px; border-right: 1px solid var(--border); background: var(--white); padding: 20px 10px; display: flex; flex-direction: column; gap: 5px; overflow-y: auto; }
        .nav-item { 
            display: flex; align-items: center; gap: 12px; padding: 12px 20px; 
            border-radius: 0 25px 25px 0; color: var(--mid); font-weight: 500; 
            cursor: pointer; transition: 0.2s; text-decoration: none; font-size: 15px;
        }
        .nav-item i { font-size: 22px; }
        .nav-item:hover { background: #f5f5f5; }
        .nav-item.active { background: var(--gold-pale); color: var(--gold); font-weight: 600; }
        
        .divider { height: 1px; background: var(--border); margin: 15px 20px; }

        /* CONTENT AREA */
        .content-area { flex: 1; background: var(--white); overflow-y: auto; padding: 28px 36px 44px; display: flex; justify-content: center; }
        .content-wrapper { max-width: 1480px; width: 100%; }

        #sectionWorkspace { display: none; animation: personalProfileFadeIn 0.3s; }
        .workspace-kicker {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            width: fit-content;
            padding: 6px 12px;
            border-radius: 999px;
            border: 1px solid #e9dcc7;
            background: #fffaf2;
            color: var(--gold);
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.4px;
            text-transform: uppercase;
        }
        #everConfirmOverlay {
            display: none;
            position: fixed;
            inset: 0;
            padding: 20px;
            align-items: center;
            justify-content: center;
            background: rgba(26, 26, 26, 0.55);
            backdrop-filter: blur(3px);
            z-index: 99998;
        }
        #everConfirmOverlay.open { display: flex; }
        .ever-confirm-box {
            width: 100%;
            max-width: 420px;
            padding: 28px;
            border-radius: 18px;
            background: #fff;
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
            animation: personalProfileConfirmPop 0.24s ease;
        }
        @keyframes personalProfileConfirmPop {
            from { opacity: 0; transform: scale(0.94); }
            to { opacity: 1; transform: scale(1); }
        }
        .ever-confirm-icon { font-size: 34px; margin-bottom: 10px; }
        .ever-confirm-title {
            margin-bottom: 8px;
            font-size: 18px;
            font-weight: 800;
            color: var(--charcoal);
        }
        .ever-confirm-msg {
            margin-bottom: 18px;
            font-size: 14px;
            line-height: 1.6;
            color: var(--muted);
        }
        .ever-confirm-btns { display: flex; gap: 10px; }
        .ever-confirm-btns button {
            flex: 1;
            min-height: 44px;
            border: none;
            border-radius: 12px;
            font-size: 14px;
            font-weight: 700;
            font-family: var(--sans);
            cursor: pointer;
        }
        .ever-confirm-ok { background: var(--gold); color: #fff; }
        .ever-confirm-ok.danger { background: #e53935; }
        .ever-confirm-cancel { background: #f3f3f3; color: var(--charcoal); }
        
        /* SECTION: TRANG CHỦ */
        #sectionHome { display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 8px; animation: personalProfileFadeIn 0.3s; }
        .home-avatar { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; border: 4px solid var(--ivory); box-shadow: 0 4px 15px rgba(0,0,0,0.08); margin-bottom: 20px; }
        .home-name { font-family: var(--serif); font-size: 32px; font-weight: 600; color: var(--charcoal); margin-bottom: 8px; text-transform: uppercase; }
        .home-dept { background: var(--charcoal); color: var(--gold); padding: 6px 16px; border-radius: 20px; font-size: 14px; font-weight: 600; letter-spacing: 0.5px; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 30px; }
        .home-welcome { font-size: 18px; color: var(--mid); font-weight: 500; background: var(--gold-pale); padding: 15px 30px; border-radius: 8px; border: 1px dashed var(--gold); }

        /* SECTION: THÔNG TIN CÁ NHÂN */
        #sectionInfo, #sectionAccessCode { display: none; animation: personalProfileFadeIn 0.3s; }
        .section-header { margin-bottom: 30px; display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid var(--gold-pale); padding-bottom: 15px; }
        .section-header h2 { font-family: var(--serif); font-size: 28px; color: var(--charcoal); font-weight: 600; margin: 0; }
        .section-header p { color: var(--muted); font-size: 14px; margin-top: 5px; }
        .summary-shell { display: flex; flex-direction: column; gap: 18px; }
        .summary-card {
            border: 1px solid var(--border);
            border-radius: 18px;
            background: linear-gradient(180deg, #fffdfa 0%, #fbf8f1 100%);
            padding: 24px 26px;
            box-shadow: 0 12px 30px rgba(26,26,26,0.04);
        }
        .summary-top {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 18px;
        }
        .summary-title {
            margin: 0 0 6px;
            font-family: var(--serif);
            font-size: 20px;
            font-weight: 700;
            color: var(--charcoal);
        }
        .summary-subtitle {
            margin: 0;
            color: var(--muted);
            font-size: 13px;
            line-height: 1.6;
            max-width: 760px;
        }
        .summary-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: flex-end;
            flex: 0 0 auto;
        }
        .summary-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 42px;
            padding: 0 16px;
            border-radius: 12px;
            border: 1px solid #decfb7;
            background: #fff;
            color: var(--charcoal);
            font-size: 13px;
            font-weight: 700;
            font-family: var(--sans);
            text-decoration: none;
            cursor: pointer;
            transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
        }
        .summary-btn:hover {
            background: #fff8ed;
            border-color: var(--gold);
            transform: translateY(-1px);
            box-shadow: 0 10px 20px rgba(174,124,65,0.12);
        }
        .summary-btn.primary {
            background: var(--charcoal);
            color: #fff;
            border-color: var(--charcoal);
        }
        .summary-btn.primary:hover {
            background: #2a2a2a;
            border-color: #2a2a2a;
        }
        .summary-checklist {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 12px;
        }
        .summary-item {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            min-height: 72px;
            padding: 14px 16px;
            border-radius: 14px;
            border: 1px solid #eadfcd;
            background: rgba(255,255,255,0.84);
        }
        .summary-item-icon {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #fff3df;
            color: var(--gold);
        }
        .summary-item-icon .material-icons { font-size: 18px; }
        .summary-item-copy b {
            display: block;
            font-size: 13px;
            color: var(--charcoal);
            margin-bottom: 4px;
        }
        .summary-item-copy span {
            display: block;
            font-size: 12.5px;
            line-height: 1.55;
            color: var(--muted);
        }
        .detail-panel { display: none; margin-top: 16px; }
        .detail-panel.open { display: block; animation: personalProfileFadeIn 0.25s ease; }
        .workspace-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .workspace-list-row {
            display: grid;
            grid-template-columns: minmax(0, 1.25fr) minmax(180px, 0.9fr) auto;
            gap: 14px;
            align-items: center;
            padding: 14px 16px;
            border-radius: 14px;
            border: 1px solid #eadfcd;
            background: rgba(255,255,255,0.84);
        }
        .workspace-list-main b {
            display: block;
            font-size: 14px;
            color: var(--charcoal);
            margin-bottom: 4px;
        }
        .workspace-list-main span,
        .workspace-list-meta {
            display: block;
            font-size: 12.5px;
            color: var(--muted);
            line-height: 1.55;
        }
        .workspace-empty {
            padding: 22px 18px;
            border-radius: 14px;
            border: 1px dashed #e4d7c2;
            background: rgba(255,255,255,0.76);
            text-align: center;
            color: var(--muted);
        }
        .workspace-empty strong {
            display: block;
            color: var(--charcoal);
            margin-bottom: 6px;
            font-size: 14px;
        }
        .workspace-empty .summary-btn {
            margin-top: 14px;
        }
        
        .info-card { border: 1px solid var(--border); border-radius: 8px; padding: 34px; margin-bottom: 22px; }
        
        /* Avatar Upload UI */
        .avatar-edit-box { display: flex; align-items: center; gap: 20px; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px dashed var(--border); }
        .avatar-edit-box img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
        .btn-upload { background: var(--ivory); border: 1px solid var(--border); padding: 8px 16px; border-radius: 4px; font-size: 13px; font-weight: 600; cursor: pointer; display: none; align-items: center; gap: 6px; }
        .btn-upload:hover { background: var(--gold-pale); border-color: var(--gold); color: var(--gold); }

        .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 20px; }
        .form-group { display: flex; flex-direction: column; gap: 8px; }
        .form-group label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
        .form-group input { padding: 14px 16px; border: 1px solid var(--border); border-radius: 4px; font-size: 15px; font-family: var(--sans); color: var(--charcoal); transition: 0.2s; background: var(--ivory); }
        .form-group input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-pale); background: var(--white); }
        .form-group input:disabled { background: #F9F9F9; color: #888; border-color: transparent; cursor: not-allowed; -webkit-text-fill-color: #555; opacity: 1; font-weight: 500; }
        .profile-access-code-manager {
            padding: 16px;
            border: 1px solid var(--border);
            border-radius: 16px;
            background: linear-gradient(180deg, #fffdfa 0%, #fbf6ec 100%);
            transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
        }
        .profile-access-code-manager.is-targeted {
            border-color: var(--gold);
            background: #fffaf1;
            box-shadow: 0 0 0 4px rgba(174,124,65,.14), 0 14px 32px rgba(88,61,28,.12);
        }

        .action-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
        .btn { padding: 12px 24px; font-size: 14px; font-weight: 600; border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: 0.2s; font-family: var(--sans); border: none; }
        .btn-edit { background: var(--charcoal); color: white; }
        .btn-edit:hover { background: var(--mid); }
        .btn-save { background: var(--gold); color: white; display: none; }
        .btn-save:hover { background: var(--gold-light); }
        .btn-cancel { background: var(--ivory); color: var(--charcoal); border: 1px solid var(--border); display: none; }

        /* SECTION: HỒ SƠ HÀNH CHÍNH & CHẤM CÔNG */
        #sectionHanhChinh { display: none; animation: personalProfileFadeIn 0.3s; }
        #sectionAttendance { display: none; animation: personalProfileFadeIn 0.3s; }
        
        .rec-list { display: flex; flex-direction: column; gap: 14px; }
        .rec-card { border: 1px solid var(--border); border-radius: 8px; padding: 20px 22px; transition: 0.2s; }
        .rec-card:hover { border-color: var(--gold); box-shadow: 0 4px 16px rgba(174,124,65,0.08); }
        .rec-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
        .rec-title { font-size: 16px; font-weight: 600; color: var(--charcoal); }
        .rec-meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
        .rec-dates { display: inline-flex; align-items: center; gap: 6px; background: var(--gold-pale); border: 1px solid var(--border); border-radius: 6px; padding: 5px 10px; font-size: 13px; color: var(--charcoal); margin-top: 10px; }
        .rec-sigs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
        .rec-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; white-space: nowrap; }
        .rb-processing { background: #FFF8E1; color: #F59E0B; }
        .rb-approved   { background: #E8F5E9; color: #2B8A3E; }
        .rb-rejected   { background: #FFEBEE; color: #e53935; }
        .sig-chip { display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid #A3D9A5; background: #F0FFF2; border-radius: 4px; padding: 4px 10px; font-size: 12px; color: var(--charcoal); }
        .sig-chip .sc-name { font-weight: 700; color: var(--gold); }
        .sig-chip.waiting { border-color: var(--border); background: #FAFAF7; color: var(--muted); }
        .rec-reject { margin-top: 12px; padding: 12px 14px; background: #FFF5F5; border: 1px solid #FFC9C9; border-left: 4px solid #e53935; border-radius: 8px; font-size: 13px; color: #842029; }
        .rec-reject b { color: #c92a2a; }
        .rec-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
        .rec-empty i { font-size: 48px; opacity: 0.3; display: block; margin-bottom: 12px; }
        .rec-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--gold); text-decoration: none; font-size: 14px; font-weight: 600; }
        .rec-link:hover { text-decoration: underline; }

        .contract-header-chip {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            color: var(--gold);
            font-size: 13px;
            font-weight: 800;
            padding: 9px 13px;
            border-radius: 999px;
            border: 1px solid rgba(174,124,65,0.22);
            background: rgba(255,247,236,0.78);
            white-space: nowrap;
        }
        .contract-overview-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 14px;
        }
        .contract-info-card {
            border: 1px solid rgba(174,124,65,0.18);
            border-radius: 16px;
            padding: 16px;
            background: rgba(255,255,255,0.76);
        }
        .contract-info-card small {
            display: block;
            color: var(--muted);
            font-size: 11px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            margin-bottom: 7px;
        }
        .contract-info-card b {
            display: block;
            color: var(--charcoal);
            font-size: 15px;
            line-height: 1.35;
        }
        .contract-info-card span {
            display: block;
            color: var(--muted);
            font-size: 12.5px;
            line-height: 1.5;
            margin-top: 6px;
        }
        .contract-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .contract-notice,
        .contract-update-row {
            display: grid;
            grid-template-columns: 38px minmax(0, 1fr);
            gap: 12px;
            align-items: flex-start;
            padding: 14px;
            border-radius: 14px;
            border: 1px solid rgba(174,124,65,0.16);
            background: rgba(255,255,255,0.72);
        }
        .contract-notice.warn { border-color: rgba(229,57,53,0.2); background: #fff6f4; }
        .contract-notice.good { border-color: rgba(43,138,62,0.2); background: #f4fbf5; }
        .contract-notice i,
        .contract-update-row i {
            width: 38px;
            height: 38px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 14px;
            background: var(--gold-pale);
            color: var(--gold);
        }
        .contract-notice b,
        .contract-update-row b {
            display: block;
            color: var(--charcoal);
            font-size: 14px;
            margin-bottom: 4px;
        }
        .contract-notice span,
        .contract-update-row span {
            display: block;
            color: var(--muted);
            font-size: 12.5px;
            line-height: 1.55;
        }
        .attendance-requests-card .rec-list {
            margin-top: 14px;
        }
        :scope.profile-attendance-focus .profile-hero-card {
            display: none !important;
        }
        :scope.profile-attendance-focus .content-wrapper {
            gap: 18px;
        }
        .profile-page-actions,
        .attendance-page-actions {
            display: inline-flex;
            align-items: center;
            justify-content: flex-end;
            gap: 10px;
            flex-wrap: wrap;
        }
        .attendance-title-row {
            display: flex;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }
        .attendance-title-row .summary-title {
            margin: 0;
        }
        .attendance-title-row .summary-btn {
            min-height: 40px;
            padding: 8px 14px;
        }
        .profile-modal-overlay {
            position: fixed;
            inset: 0;
            z-index: 100000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 20px;
            background: rgba(26, 26, 26, 0.48);
            backdrop-filter: blur(6px);
        }
        .profile-modal-overlay.open {
            display: flex;
        }
        .profile-modal-dialog {
            width: min(760px, calc(100vw - 34px));
            max-height: calc(100vh - 34px);
            overflow: auto;
            border-radius: 24px;
            border: 1px solid rgba(174,124,65,0.22);
            background: #fffdf8;
            box-shadow: 0 24px 70px rgba(26, 26, 26, 0.24);
        }
        .profile-modal-dialog.wide {
            width: min(1480px, calc(100vw - 30px));
            height: min(860px, calc(100vh - 30px));
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .profile-modal-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 16px;
            padding: 22px 24px 16px;
            border-bottom: 1px solid rgba(174,124,65,0.16);
        }
        .profile-modal-head h3 {
            margin: 0;
            font-family: var(--serif);
            font-size: 28px;
            color: var(--charcoal);
        }
        .profile-modal-head p {
            margin: 5px 0 0;
            color: var(--muted);
            font-size: 13px;
            line-height: 1.5;
        }
        .profile-modal-close {
            width: 42px;
            height: 42px;
            border: none;
            border-radius: 50%;
            background: rgba(174,124,65,0.10);
            color: var(--charcoal);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        .profile-modal-body {
            padding: 22px 24px 24px;
        }
        .profile-form-grid {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 14px;
        }
        .profile-form-field {
            display: flex;
            flex-direction: column;
            gap: 7px;
        }
        .profile-form-field.full {
            grid-column: 1 / -1;
        }
        .profile-form-field label {
            color: var(--muted);
            font-size: 12px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        .profile-form-field input,
        .profile-form-field select,
        .profile-form-field textarea {
            width: 100%;
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 12px 13px;
            background: #fff;
            color: var(--charcoal);
            font: inherit;
            box-sizing: border-box;
        }
        .profile-form-field textarea {
            min-height: 120px;
            resize: vertical;
        }
        .profile-file-preview {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 8px;
        }
        .profile-file-chip {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 7px 10px;
            border-radius: 999px;
            background: var(--gold-pale);
            color: var(--charcoal);
            font-size: 12px;
            font-weight: 700;
        }
        .profile-file-chip button {
            border: none;
            background: transparent;
            cursor: pointer;
            color: var(--muted);
            font-weight: 900;
        }
        .profile-modal-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            flex-wrap: wrap;
            margin-top: 20px;
        }
        .profile-attendance-frame {
            flex: 1 1 auto;
            width: 100%;
            min-height: 0;
            border: none;
            background: #fff;
        }

        /* Bảng Ma trận Chấm Công (Profile) */
        .attendance-matrix { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 13px; }
        .attendance-matrix th, .attendance-matrix td { border: 1px solid var(--border); padding: 8px 5px; text-align: center; white-space: nowrap; }
        .attendance-matrix th { background: var(--charcoal); color: var(--gold); position: sticky; top: 0; }
        .cell-0 { background: #FFEBEE; color: #C62828; font-weight: bold; }
        .cell-05 { background: #FFF3E0; color: #E65100; font-weight: bold; }
        .cell-1 { color: #2B8A3E; }

        .attendance-toolbar { display: flex; align-items: center; gap: 10px; }
        .month-picker {
            padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
            font-size: 14px; font-family: var(--sans); background: var(--white); color: var(--charcoal);
        }
        .month-picker:focus {
            outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-pale);
        }

        .att-stat-row {
            display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px;
            margin-bottom: 20px;
        }
        .att-stat-card {
            min-height: 94px; background: linear-gradient(180deg, #FFFFFF 0%, #FCFBF8 100%);
            border: 1px solid var(--border); border-radius: 10px; padding: 14px 12px; text-align: center;
            display: flex; flex-direction: column; justify-content: center;
        }
        .att-stat-card .att-num {
            font-size: 28px; line-height: 1; font-weight: 700; font-family: var(--serif); color: var(--charcoal);
        }
        .att-stat-card .att-lbl {
            margin-top: 8px; font-size: 11px; line-height: 1.45; color: var(--muted); text-transform: uppercase;
            letter-spacing: 0.4px;
        }
        .att-stat-card.green .att-num { color: #2B8A3E; }
        .att-stat-card.orange .att-num { color: #E65100; }
        .att-stat-card.red .att-num { color: #C62828; }
        .att-stat-card.blue .att-num { color: #1565C0; }
        .att-stat-card.gold .att-num { color: var(--gold); }

        .att-legend {
            display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; padding: 14px 16px;
            border: 1px solid var(--border); border-radius: 10px; background: #FCFBF8; align-items: center;
        }
        .att-legend-title {
            font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px;
            margin-right: 2px;
        }
        .att-legend-item {
            display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--mid);
            white-space: nowrap;
        }
        .att-swatch {
            width: 20px; height: 14px; border-radius: 4px; border: 1px solid transparent; display: inline-block;
            flex: 0 0 auto;
        }
        .att-swatch.full { background: #E8F5E9; border-color: #A5D6A7; }
        .att-swatch.half { background: #FFF3E0; border-color: #FFCC80; }
        .att-swatch.absent { background: #FFEBEE; border-color: #EF9A9A; }
        .att-swatch.trip { background: #E0F7FA; border-color: #80DEEA; }
        .att-swatch.leave {
            background: #E8F5E9; border-color: #A5D6A7; font-size: 9px; line-height: 14px; text-align: center;
            color: #388E3C; font-style: italic;
        }
        .att-dot-key {
            width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: 0 0 auto;
        }
        .att-dot-key.red { background: #e53935; }
        .att-dot-key.blue { background: #1565C0; }

        .attendance-shell { padding: 20px; }
        #myCalHeaders { margin-bottom: 8px; }
        .mini-cal-grid {
            display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px;
            text-align: center;
        }
        .cal-hdr {
            padding: 6px 0; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase;
        }
        .mini-cal-cell {
            min-height: 58px; padding: 8px 4px; border-radius: 10px; border: 1px solid transparent;
            position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
            gap: 4px; background: #FAFAF7; color: var(--charcoal); transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
        }
        .mini-cal-cell.is-clickable:hover {
            transform: translateY(-1px); box-shadow: 0 6px 14px rgba(26, 26, 26, 0.08); border-color: rgba(174, 124, 65, 0.35);
        }
        .mini-cal-cell.mc-full { background: #E8F5E9; color: #2E7D32; border-color: #C8E6C9; }
        .mini-cal-cell.mc-half { background: #FFF3E0; color: #E65100; border-color: #FFE0B2; }
        .mini-cal-cell.mc-absent { background: #FFEBEE; color: #C62828; border-color: #FFCDD2; }
        .mini-cal-cell.mc-trip { background: #E0F7FA; color: #00838F; border-color: #B2EBF2; }
        .mini-cal-cell.mc-leave { background: #E8F5E9; color: #388E3C; border-color: #C8E6C9; }
        .mini-cal-cell.mc-holiday { background: #F3E5F5; color: #7B1FA2; border-color: #E1BEE7; }
        .mini-cal-cell.mc-weekend {
            background: #FCFBF8; color: var(--muted); border-color: #F0E7DA;
        }
        .mini-cal-cell.mc-today { box-shadow: 0 0 0 2px var(--gold); }
        .mini-cal-cell.mc-empty {
            background: transparent; border: none; box-shadow: none; pointer-events: none;
        }
        .mc-day { font-size: 15px; font-weight: 700; line-height: 1; }
        .mc-sub { font-size: 10px; line-height: 1; font-weight: 600; letter-spacing: 0.2px; }
        .att-dot-stack {
            position: absolute; right: 6px; bottom: 6px; display: inline-flex; flex-direction: column; gap: 3px;
        }
        .att-dot-red, .att-dot-blue {
            width: 6px; height: 6px; border-radius: 50%; display: inline-block;
        }
        .att-dot-red { background: #e53935; }
        .att-dot-blue { background: #1565C0; }
        .att-dot-checkin {
            width: 10px; height: 10px; border-radius: 50%; display: inline-block;
            background: #e53935; box-shadow: 0 0 0 2px rgba(229,57,53,0.16);
        }

        .day-detail-card {
            display: none; margin-top: 14px; background: var(--gold-pale); border: 1px solid var(--border);
            border-radius: 10px; padding: 18px 20px; animation: personalProfileFadeSlideIn .25s ease;
        }
        .day-detail-head {
            display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px;
        }
        .day-detail-title {
            font-family: var(--serif); font-size: 18px; font-weight: 600; color: var(--charcoal);
        }
        .day-detail-close {
            width: 32px; height: 32px; border: none; border-radius: 50%; background: rgba(255,255,255,0.6);
            color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1;
        }
        .day-detail-close:hover { background: rgba(255,255,255,0.9); color: var(--charcoal); }
        .day-detail-body { font-size: 14px; line-height: 1.8; color: var(--charcoal); }
        .day-detail-row {
            display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px;
        }
        .day-detail-row i { font-size: 18px; margin-top: 2px; flex: 0 0 auto; }
        .day-detail-muted {
            font-size: 12px; color: var(--muted); margin-top: 10px; display: flex; align-items: center; gap: 6px;
        }

        @keyframes personalProfileFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
        @keyframes personalProfileFadeSlideIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

        /* ======= TINH CHỈNH MOBILE ======= */
        @media (max-width: 768px) {
            .navbar { height: 58px !important; padding: 0 12px !important; flex-wrap: nowrap !important; gap: 8px; }
            .navbar-left { gap: 10px !important; min-width: 0; flex: 1 1 auto; overflow: hidden; }
            .navbar-left a { flex: 0 0 auto; display: inline-flex; align-items: center; }
            .navbar-left img { height: 30px !important; width: auto !important; max-width: none !important; object-fit: contain; }
            .navbar-left span { font-size: 15px !important; padding-left: 10px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
            .navbar > div:last-child { flex: 0 0 auto; gap: 4px !important; }
            .back-btn { width: 40px !important; height: 40px !important; padding: 0 !important; gap: 0 !important; border-radius: 50% !important; justify-content: center; font-size: 0 !important; flex: 0 0 auto; }
            .back-btn .material-icons { font-size: 21px !important; }

            .main-container { flex-direction: column; }
            .sidebar { width: 100%; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 10px 12px !important; justify-content: flex-start; border-right: none; border-bottom: 1px solid var(--border); gap: 8px !important; box-shadow: 0 2px 6px rgba(0,0,0,0.03); }
            .nav-item { background: #FBF8F1; padding: 9px 16px !important; border-radius: 20px; white-space: nowrap; }
            .nav-item.active { background: var(--gold-pale); }
            .divider { display: none; }
            
            .content-area { padding: 22px 16px 90px !important; }
            #sectionHome { margin-top: 18px !important; }
            .home-avatar { width: 128px !important; height: 128px !important; border: 5px solid #fff !important; box-shadow: 0 8px 24px rgba(0,0,0,0.10) !important; }
            .home-name { font-size: 25px !important; margin: 18px 0 12px !important; }
            .home-dept { margin-bottom: 26px !important; font-size: 14px !important; }
            .home-welcome { font-size: 16px !important; padding: 18px 24px !important; line-height: 1.55; max-width: 440px; }
            
            .section-header h2 { font-size: 24px !important; }
            .summary-top { flex-direction: column; align-items: stretch; }
            .summary-actions { justify-content: flex-start; }
            .summary-btn { width: 100%; }
            .summary-checklist { grid-template-columns: 1fr; }
            .workspace-list-row { grid-template-columns: 1fr; }
            .info-card { padding: 22px 18px !important; }
            .grid-2 { grid-template-columns: 1fr; gap: 15px; }
            .attendance-matrix-wrapper { overflow-x: auto; }
            .section-header { align-items: flex-start; gap: 14px; }
            .attendance-toolbar { width: 100%; }
            .month-picker { width: 100%; }
            .att-stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
            .att-stat-card { min-height: 88px; }
            .att-legend { gap: 8px; padding: 12px; }
            .att-legend-item { font-size: 11.5px; }
            .attendance-shell { padding: 14px !important; }
            .mini-cal-grid { gap: 4px; }
            .mini-cal-cell { min-height: 52px; padding: 6px 2px; border-radius: 8px; }
            .mc-day { font-size: 14px; }
            .mc-sub { font-size: 9px; }
            .day-detail-card { padding: 16px; }
            .profile-page-actions,
            .attendance-page-actions { width: 100%; }
            .attendance-title-row { align-items: stretch; }
            .profile-modal-overlay { padding: 10px; }
            .profile-modal-dialog,
            .profile-modal-dialog.wide {
                width: calc(100vw - 20px);
                max-height: calc(100vh - 20px);
                border-radius: 18px;
            }
            .profile-modal-dialog.wide {
                height: calc(100vh - 20px);
            }
            .profile-modal-head {
                padding: 18px 18px 12px;
                align-items: center;
            }
            .profile-modal-head h3 { font-size: 22px; }
            .profile-modal-head p { display: none; }
            .profile-modal-body { padding: 16px 18px 18px; }
            .profile-form-grid { grid-template-columns: 1fr; }
            .profile-modal-actions { flex-direction: column-reverse; }
            .profile-modal-actions .summary-btn { width: 100%; }
        }
        @media (max-width: 380px) {
            .navbar-left span { display: none !important; }
            .att-stat-row { grid-template-columns: 1fr; }
            .mini-cal-cell { min-height: 48px; }
        }

        /* ===== PROFILE SOCIAL REDESIGN ===== */
        :scope.profile-social-page {
            background:
                radial-gradient(circle at 18% 8%, rgba(174,124,65,0.16), transparent 28%),
                linear-gradient(135deg, #fffdf8 0%, #f6efe3 48%, #fbfaf7 100%);
        }
        :scope.profile-social-page .navbar {
            height: 68px;
            border-bottom: 1px solid rgba(174,124,65,0.18);
            background: rgba(255,255,255,0.78);
            backdrop-filter: blur(18px);
            box-shadow: 0 14px 40px rgba(77,55,26,0.07);
        }
        :scope.profile-social-page .navbar-left span {
            font-size: 15px;
            font-weight: 800;
            letter-spacing: 0.01em;
            color: var(--charcoal);
        }
        :scope.profile-social-page .back-btn {
            border-radius: 999px;
            background: rgba(255,255,255,0.72);
            border-color: rgba(174,124,65,0.22);
            box-shadow: 0 10px 22px rgba(174,124,65,0.08);
        }
        :scope.profile-social-page .main-container {
            display: block;
            min-height: 0;
            overflow: hidden;
            background: transparent;
        }
        :scope.profile-social-page .sidebar {
            display: none !important;
        }
        :scope.profile-social-page .content-area {
            height: 100%;
            padding: 28px 34px 44px !important;
            justify-content: center;
            background: transparent;
        }
        :scope.profile-social-page .content-wrapper {
            max-width: 1260px;
            display: flex;
            flex-direction: column;
            gap: 22px;
        }
        .profile-hero-card {
            position: relative;
            overflow: hidden;
            border: 1px solid rgba(174,124,65,0.20);
            border-radius: 34px;
            background: rgba(255,255,255,0.76);
            box-shadow: 0 28px 70px rgba(77,55,26,0.13);
            backdrop-filter: blur(20px);
        }
        .profile-cover {
            position: relative;
            min-height: 212px;
            padding: 26px 30px;
            background:
                radial-gradient(circle at 82% 18%, rgba(255,255,255,0.35), transparent 24%),
                linear-gradient(130deg, #221d17 0%, #75552e 43%, #d0ad74 100%);
        }
        .profile-cover::before,
        .profile-cover::after {
            content: "";
            position: absolute;
            border-radius: 999px;
            pointer-events: none;
        }
        .profile-cover::before {
            width: 340px;
            height: 340px;
            right: -110px;
            top: -130px;
            background: rgba(255,255,255,0.14);
        }
        .profile-cover::after {
            width: 210px;
            height: 210px;
            left: 42px;
            bottom: -132px;
            border: 1px solid rgba(255,255,255,0.22);
        }
        .profile-cover-content {
            position: relative;
            z-index: 1;
            display: flex;
            justify-content: space-between;
            gap: 18px;
            color: #fffaf0;
        }
        .profile-cover-kicker {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 13px;
            border-radius: 999px;
            border: 1px solid rgba(255,255,255,0.28);
            background: rgba(255,255,255,0.12);
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }
        .profile-cover-title {
            margin-top: 16px;
            max-width: 640px;
            font-size: clamp(28px, 4vw, 48px);
            line-height: 1.02;
            font-weight: 800;
            letter-spacing: -0.04em;
        }
        .profile-cover-note {
            max-width: 520px;
            margin-top: 12px;
            color: rgba(255,250,240,0.80);
            font-size: 14px;
            line-height: 1.7;
        }
        .profile-cover-stamp {
            align-self: flex-start;
            display: grid;
            gap: 8px;
            min-width: 170px;
            padding: 14px 16px;
            border-radius: 22px;
            border: 1px solid rgba(255,255,255,0.24);
            background: rgba(255,255,255,0.13);
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.22);
        }
        .profile-cover-stamp small {
            color: rgba(255,250,240,0.70);
            font-size: 10px;
            font-weight: 800;
            letter-spacing: 0.12em;
            text-transform: uppercase;
        }
        .profile-cover-stamp strong {
            font-size: 15px;
            line-height: 1.35;
        }
        .profile-identity-row {
            position: relative;
            display: grid;
            grid-template-columns: 160px minmax(0, 1fr) auto;
            gap: 24px;
            align-items: end;
            padding: 0 30px 26px;
            margin-top: -72px;
            z-index: 2;
        }
        .profile-avatar-shell {
            width: 154px;
            height: 154px;
            padding: 7px;
            border-radius: 38px;
            background: rgba(255,255,255,0.88);
            border: 1px solid rgba(174,124,65,0.20);
            box-shadow: 0 22px 46px rgba(26,26,26,0.20);
            backdrop-filter: blur(16px);
        }
        .profile-hero-avatar {
            width: 100%;
            height: 100%;
            display: block;
            border-radius: 31px;
            object-fit: cover;
            background: #f3ebd9;
        }
        .profile-title-block {
            min-width: 0;
            padding-top: 78px;
        }
        .profile-title-block h1 {
            margin: 0;
            color: var(--charcoal);
            font-size: clamp(26px, 3vw, 42px);
            line-height: 1.04;
            font-weight: 800;
            letter-spacing: -0.045em;
        }
        .profile-role-line {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 12px;
        }
        .profile-chip {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            min-height: 34px;
            padding: 0 12px;
            border-radius: 999px;
            border: 1px solid rgba(174,124,65,0.20);
            background: rgba(255,255,255,0.76);
            color: #4d3f2f;
            font-size: 12px;
            font-weight: 800;
            white-space: nowrap;
        }
        .profile-chip.gold {
            background: rgba(243,235,217,0.86);
            color: var(--gold);
        }
        .profile-bio {
            max-width: 760px;
            margin-top: 12px;
            color: var(--muted);
            font-size: 13.5px;
            line-height: 1.65;
        }
        .profile-hero-actions {
            display: flex;
            justify-content: flex-end;
            flex-wrap: wrap;
            gap: 10px;
            padding-bottom: 4px;
        }
        .profile-action-btn {
            min-height: 42px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 0 16px;
            border-radius: 999px;
            border: 1px solid rgba(174,124,65,0.22);
            background: rgba(255,255,255,0.74);
            color: var(--charcoal);
            font-family: var(--sans);
            font-size: 13px;
            font-weight: 800;
            text-decoration: none;
            cursor: pointer;
            box-shadow: 0 12px 24px rgba(174,124,65,0.08);
            transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
        }
        .profile-action-btn:hover {
            transform: translateY(-1px);
            border-color: rgba(174,124,65,0.46);
            background: #fffaf2;
            box-shadow: 0 16px 30px rgba(174,124,65,0.14);
        }
        .profile-action-btn.primary {
            border-color: var(--charcoal);
            background: var(--charcoal);
            color: #fff;
        }
        .profile-tabbar {
            display: flex;
            gap: 8px;
            padding: 0 30px 24px;
            overflow-x: auto;
            scrollbar-width: thin;
        }
        .profile-tabbar::-webkit-scrollbar { height: 6px; }
        .profile-tabbar::-webkit-scrollbar-thumb { background: rgba(174,124,65,0.28); border-radius: 99px; }
        .profile-tab {
            flex: 0 0 auto;
            min-height: 44px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 0 16px;
            border-radius: 999px;
            border: 1px solid rgba(174,124,65,0.18);
            background: rgba(255,255,255,0.64);
            color: var(--mid);
            font-family: var(--sans);
            font-size: 13px;
            font-weight: 800;
            cursor: pointer;
            white-space: nowrap;
            transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
        }
        .profile-tab:hover {
            transform: translateY(-1px);
            border-color: rgba(174,124,65,0.42);
            background: #fffaf2;
            color: var(--gold);
        }
        .profile-tab.active {
            background: var(--charcoal);
            color: #fff;
            border-color: var(--charcoal);
            box-shadow: 0 14px 28px rgba(26,26,26,0.16);
        }
        :scope.profile-social-page #sectionHome {
            align-items: stretch !important;
            text-align: left !important;
            margin-top: 0 !important;
        }
        :scope.profile-social-page #sectionHome .home-avatar,
        :scope.profile-social-page #sectionHome .home-name,
        :scope.profile-social-page #sectionHome .home-dept {
            position: absolute !important;
            width: 1px !important;
            height: 1px !important;
            overflow: hidden !important;
            opacity: 0 !important;
            pointer-events: none !important;
        }
        :scope.profile-social-page .home-welcome,
        .profile-overview-panel,
        :scope.profile-social-page .summary-card,
        :scope.profile-social-page .info-card,
        :scope.profile-social-page .rec-card,
        :scope.profile-social-page .attendance-shell {
            border: 1px solid rgba(174,124,65,0.18);
            border-radius: 26px;
            background: rgba(255,255,255,0.76);
            box-shadow: 0 18px 44px rgba(77,55,26,0.08);
            backdrop-filter: blur(18px);
        }
        :scope.profile-social-page .home-welcome {
            width: 100%;
            max-width: none;
            margin: 0;
            padding: 20px 24px;
            color: var(--mid);
            font-size: 14px;
            line-height: 1.75;
            border-style: solid;
        }
        .profile-overview-grid {
            display: grid;
            grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr);
            gap: 18px;
            margin-top: 18px;
        }
        .profile-overview-panel {
            padding: 22px;
        }
        .profile-panel-label {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            margin-bottom: 14px;
            color: var(--gold);
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }
        .profile-info-list {
            display: grid;
            gap: 12px;
        }
        .profile-info-row {
            display: grid;
            grid-template-columns: 150px minmax(0, 1fr);
            gap: 14px;
            padding: 12px 0;
            border-bottom: 1px solid rgba(174,124,65,0.14);
        }
        .profile-info-row:last-child { border-bottom: none; }
        .profile-info-row span {
            color: var(--muted);
            font-size: 12px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .profile-info-row strong {
            color: var(--charcoal);
            font-size: 14px;
            font-weight: 800;
            line-height: 1.45;
        }
        .profile-quick-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 12px;
        }
        .profile-quick-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 16px;
        }
        .profile-quick-head .profile-panel-label {
            margin-bottom: 0;
        }
        .profile-quick-settings-btn {
            width: 42px;
            height: 42px;
            flex: 0 0 42px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 999px;
            border: 1px solid rgba(174,124,65,0.18);
            background: rgba(255,255,255,0.82);
            color: var(--gold);
            cursor: pointer;
            box-shadow: 0 12px 26px rgba(77,55,26,0.07);
            transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
        }
        .profile-quick-settings-btn:hover {
            transform: translateY(-1px);
            border-color: rgba(174,124,65,0.42);
            background: #fff8ed;
            box-shadow: 0 16px 30px rgba(174,124,65,0.12);
        }
        .profile-quick-empty {
            min-height: 92px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 18px;
            border-radius: 18px;
            border: 1px dashed rgba(174,124,65,0.30);
            color: var(--muted);
            background: rgba(255,250,242,0.62);
            font-size: 13px;
            font-weight: 700;
            text-align: center;
        }
        .profile-quick-card {
            min-height: 62px;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 14px;
            padding: 11px 14px;
            border-radius: 18px;
            border: 1px solid rgba(174,124,65,0.16);
            background: rgba(255,255,255,0.72);
            color: var(--charcoal);
            text-decoration: none;
            text-align: left;
            font: inherit;
            cursor: pointer;
            box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
            transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
        }
        .profile-quick-card:hover {
            transform: translateY(-1px);
            border-color: rgba(174,124,65,0.42);
            background: #fffaf2;
            box-shadow: 0 16px 30px rgba(174,124,65,0.12);
        }
        .profile-quick-card:focus-visible {
            outline: 3px solid rgba(174,124,65,0.22);
            outline-offset: 3px;
        }
        .profile-quick-card i {
            width: 40px;
            height: 40px;
            flex: 0 0 40px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 16px;
            background: var(--gold-pale);
            color: var(--gold);
            font-size: 20px;
        }
        .profile-quick-card b {
            display: block;
            min-width: 0;
            font-size: 14px;
            font-weight: 800;
            line-height: 1.35;
            letter-spacing: -0.01em;
        }
        .profile-quick-settings-dialog {
            max-width: 620px;
        }
        .profile-quick-settings-list {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }
        .profile-quick-option {
            display: grid;
            grid-template-columns: auto minmax(0, 1fr);
            gap: 12px;
            align-items: flex-start;
            min-height: 76px;
            padding: 14px;
            border-radius: 16px;
            border: 1px solid rgba(174,124,65,0.16);
            background: rgba(255,255,255,0.80);
            cursor: pointer;
        }
        .profile-quick-option:hover {
            border-color: rgba(174,124,65,0.36);
            background: #fffaf2;
        }
        .profile-quick-option input {
            width: 18px;
            height: 18px;
            margin-top: 2px;
            accent-color: var(--gold);
        }
        .profile-quick-option b {
            display: block;
            color: var(--charcoal);
            font-size: 13px;
            font-weight: 900;
            line-height: 1.35;
        }
        .profile-quick-option span {
            display: block;
            margin-top: 4px;
            color: var(--muted);
            font-size: 12px;
            font-weight: 700;
            line-height: 1.45;
        }
        .profile-quick-count {
            margin-top: 12px;
            color: var(--gold);
            font-size: 13px;
            font-weight: 900;
        }
        @media (max-width: 768px) {
            .profile-quick-settings-list {
                grid-template-columns: 1fr;
            }
        }
        :scope.profile-social-page .section-header {
            border-bottom: none;
            padding-bottom: 0;
            margin-bottom: 20px;
        }
        :scope.profile-social-page .section-header h2,
        :scope.profile-social-page .summary-title {
            font-family: var(--sans);
            letter-spacing: -0.03em;
        }
        :scope.profile-social-page .section-header h2 {
            font-size: 27px;
            font-weight: 800;
        }
        :scope.profile-social-page .summary-card,
        :scope.profile-social-page .info-card {
            border-radius: 26px;
            padding: 24px;
        }
        :scope.profile-social-page .info-card {
            margin-bottom: 0;
        }
        :scope.profile-social-page .form-group input {
            border-radius: 14px;
            background: rgba(250,247,242,0.76);
        }
        :scope.profile-social-page .btn,
        :scope.profile-social-page .btn-upload,
        :scope.profile-social-page .rec-link,
        :scope.profile-social-page .summary-btn {
            border-radius: 999px;
        }
        :scope.profile-social-page .rec-card {
            border-radius: 22px;
        }
        :scope.profile-social-page .att-stat-card,
        :scope.profile-social-page .mini-cal-cell,
        :scope.profile-social-page .day-detail-card {
            border-radius: 18px;
        }
        @media (max-width: 980px) {
            :scope.profile-social-page .content-area {
                padding: 18px 14px 84px !important;
            }
            .profile-cover {
                min-height: 196px;
                padding: 22px;
            }
            .profile-cover-content {
                flex-direction: column;
            }
            .profile-cover-stamp {
                width: fit-content;
            }
            .profile-identity-row {
                grid-template-columns: 112px minmax(0, 1fr);
                gap: 16px;
                padding: 0 18px 18px;
                margin-top: -54px;
            }
            .profile-avatar-shell {
                width: 112px;
                height: 112px;
                border-radius: 30px;
            }
            .profile-hero-avatar {
                border-radius: 24px;
            }
            .profile-title-block {
                padding-top: 58px;
            }
            .profile-hero-actions {
                grid-column: 1 / -1;
                justify-content: flex-start;
                padding-bottom: 0;
            }
            .profile-tabbar {
                padding: 0 18px 18px;
            }
            .profile-overview-grid {
                grid-template-columns: 1fr;
            }
            .profile-info-row {
                grid-template-columns: 1fr;
                gap: 5px;
            }
        }
        @media (max-width: 560px) {
            .profile-cover-title {
                font-size: 27px;
            }
            .profile-cover-note {
                font-size: 13px;
            }
            .profile-identity-row {
                grid-template-columns: 1fr;
                margin-top: -52px;
            }
            .profile-title-block {
                padding-top: 0;
            }
            .profile-avatar-shell {
                width: 106px;
                height: 106px;
            }
            .profile-role-line {
                gap: 6px;
            }
            .profile-chip {
                max-width: 100%;
                white-space: normal;
                line-height: 1.35;
                padding: 8px 12px;
            }
            .profile-action-btn {
                width: 100%;
            }
            .profile-quick-grid {
                grid-template-columns: 1fr;
            }
            .profile-quick-settings-list {
                grid-template-columns: 1fr;
            }
        }

        /* Profile refinement from reference layout */
        :scope.profile-social-page .content-wrapper {
            max-width: 1480px;
            gap: 26px;
        }
        .profile-cover {
            min-height: 236px;
            padding: 34px 40px;
        }
        .profile-cover-content {
            gap: 34px;
        }
        .profile-cover-kicker {
            padding: 8px 16px;
            font-size: 10.5px;
            letter-spacing: 0.1em;
        }
        .profile-cover-title {
            max-width: 820px;
            margin-top: 22px;
            font-size: clamp(31px, 3.2vw, 46px);
            line-height: 1.12;
            letter-spacing: -0.035em;
        }
        .profile-cover-note {
            max-width: 690px;
            margin-top: 16px;
            font-size: 13.5px;
            line-height: 1.9;
            letter-spacing: 0.005em;
        }
        .profile-identity-row {
            grid-template-columns: 178px minmax(0, 1fr) auto;
            gap: 34px;
            align-items: center;
            padding: 0 40px 30px;
            margin-top: -78px;
        }
        .profile-avatar-shell {
            width: 168px;
            height: 168px;
            padding: 8px;
            border-radius: 999px;
        }
        .profile-hero-avatar {
            border-radius: 999px;
        }
        .profile-title-block {
            padding-top: 70px;
        }
        .profile-title-block h1 {
            font-size: clamp(28px, 3.1vw, 44px);
            line-height: 1.08;
        }
        .profile-role-line {
            position: relative;
            margin-top: 16px;
            padding-top: 16px;
            gap: 12px;
        }
        .profile-role-line::before {
            content: "";
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            height: 1px;
            max-width: 520px;
            background: linear-gradient(90deg, rgba(174,124,65,0.32), rgba(174,124,65,0.08), transparent);
        }
        .profile-chip {
            min-height: 32px;
            padding: 0 13px;
            font-size: 11.5px;
            letter-spacing: 0.005em;
        }
        .profile-bio {
            max-width: 800px;
            margin-top: 14px;
            font-size: 13px;
            line-height: 1.85;
        }
        .profile-hero-actions {
            gap: 12px;
            padding-bottom: 0;
        }
        .profile-action-btn {
            min-height: 43px;
            padding: 0 17px;
            font-size: 12.5px;
        }
        .profile-tabbar {
            gap: 12px;
            padding: 0 40px 30px;
        }
        .profile-tab {
            min-height: 44px;
            padding: 0 17px;
            font-size: 12.5px;
            letter-spacing: 0.005em;
        }
        .profile-overview-grid {
            grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
            gap: 22px;
        }
        .profile-overview-panel {
            padding: 26px;
        }
        .profile-info-list {
            gap: 0;
        }
        .profile-info-section-title {
            display: flex;
            align-items: center;
            gap: 8px;
            margin: 18px 0 8px;
            color: var(--gold);
            font-size: 11px;
            font-weight: 900;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }
        .profile-info-section-title:first-child {
            margin-top: 0;
        }
        .profile-info-section-title::before {
            content: "";
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--gold);
            box-shadow: 0 0 0 5px rgba(174,124,65,0.12);
        }
        .profile-info-row {
            grid-template-columns: 170px minmax(0, 1fr);
            padding: 11px 0;
        }
        .profile-info-row span {
            font-size: 11px;
            letter-spacing: 0.06em;
        }
        .profile-info-row strong {
            font-size: 13.5px;
            line-height: 1.55;
        }
        .profile-education-copy {
            min-height: 52px;
            padding: 14px 16px;
            border: 1px solid rgba(174,124,65,0.14);
            border-radius: 18px;
            background: rgba(255,250,242,0.72);
            color: var(--charcoal);
            font-size: 13.5px;
            font-weight: 800;
            line-height: 1.6;
        }
        @media (max-width: 980px) {
            .profile-cover {
                min-height: 206px;
                padding: 24px;
            }
            .profile-identity-row {
                grid-template-columns: 122px minmax(0, 1fr);
                gap: 20px;
                padding: 0 22px 22px;
                margin-top: -58px;
            }
            .profile-avatar-shell {
                width: 122px;
                height: 122px;
            }
            .profile-title-block {
                padding-top: 62px;
            }
            .profile-tabbar {
                padding: 0 22px 22px;
            }
        }
        @media (max-width: 560px) {
            .profile-identity-row {
                grid-template-columns: 1fr;
                gap: 14px;
            }
            .profile-title-block {
                padding-top: 0;
            }
            .profile-avatar-shell {
                width: 112px;
                height: 112px;
            }
            .profile-role-line::before {
                max-width: 100%;
            }
            .profile-info-row {
                grid-template-columns: 1fr;
            }
        }

        /* Replace the old visible chip navigation with a clean note bar. */
        :scope.profile-social-page .profile-tabbar {
            display: block;
            padding: 0 40px 30px;
            overflow: visible;
        }
        .profile-tabbar-note {
            display: flex;
            align-items: center;
            gap: 12px;
            width: 100%;
            min-height: 64px;
            padding: 18px 24px;
            border: 1px solid rgba(174,124,65,0.16);
            border-radius: 24px;
            background: rgba(255,255,255,0.72);
            color: var(--mid);
            font-size: 14px;
            font-weight: 600;
            line-height: 1.7;
            box-shadow: 0 18px 38px rgba(77,55,26,0.07);
            backdrop-filter: blur(18px);
        }
        .profile-tabbar-note .material-icons {
            width: 36px;
            height: 36px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            border-radius: 14px;
            background: var(--gold-pale);
            color: var(--gold);
            font-size: 19px;
        }
        :scope.profile-social-page .profile-tabbar .profile-tab {
            display: none !important;
        }
        :scope.profile-social-page #sectionHome .home-welcome {
            display: none !important;
        }
        @media (max-width: 980px) {
            :scope.profile-social-page .profile-tabbar {
                padding: 0 22px 22px;
            }
        }
        @media (max-width: 560px) {
            .profile-tabbar-note {
                align-items: flex-start;
                padding: 16px;
                font-size: 13px;
            }
        }

        /* Final spacing fix: keep identity block clearly below the cover header. */
        :scope.profile-social-page .profile-hero-card {
            overflow: hidden;
        }
        :scope.profile-social-page .profile-cover {
            min-height: 230px;
        }
        :scope.profile-social-page .profile-identity-row {
            grid-template-columns: 152px minmax(0, 1fr) auto;
            align-items: center;
            gap: 30px;
            margin-top: 0 !important;
            padding: 34px 40px 26px !important;
            background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(255,255,255,0.78) 100%);
        }
        :scope.profile-social-page .profile-avatar-shell {
            width: 142px;
            height: 142px;
            box-shadow: 0 18px 38px rgba(26,26,26,0.13);
        }
        :scope.profile-social-page .profile-title-block {
            padding-top: 0 !important;
        }
        :scope.profile-social-page .profile-title-block h1 {
            margin-top: 0;
        }
        :scope.profile-social-page .profile-role-line {
            margin-top: 14px;
            padding-top: 14px;
        }
        :scope.profile-social-page .profile-bio {
            margin-top: 12px;
        }
        :scope.profile-social-page .profile-hero-actions {
            align-self: center;
            padding-bottom: 0;
        }
        :scope.profile-social-page .profile-tabbar {
            padding: 0 40px 34px;
            background: rgba(255,255,255,0.78);
        }
        :scope.profile-social-page .profile-overview-grid {
            margin-top: 0;
        }
        @media (max-width: 980px) {
            :scope.profile-social-page .profile-cover {
                min-height: 206px;
            }
            :scope.profile-social-page .profile-identity-row {
                grid-template-columns: 112px minmax(0, 1fr);
                gap: 18px;
                padding: 24px 22px 22px !important;
            }
            :scope.profile-social-page .profile-avatar-shell {
                width: 112px;
                height: 112px;
            }
            :scope.profile-social-page .profile-hero-actions {
                grid-column: 1 / -1;
                justify-content: flex-start;
            }
            :scope.profile-social-page .profile-tabbar {
                padding: 0 22px 24px;
            }
        }
        @media (max-width: 560px) {
            :scope.profile-social-page .profile-identity-row {
                grid-template-columns: 1fr;
                padding: 22px 18px 20px !important;
            }
            :scope.profile-social-page .profile-avatar-shell {
                width: 104px;
                height: 104px;
            }
        }

        /* Keep employee chips visible; replace only the navigation chip cluster. */
        :scope.profile-social-page .profile-role-line {
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
            min-height: 48px;
        }
        :scope.profile-social-page .profile-role-line .profile-chip {
            display: inline-flex !important;
            visibility: visible !important;
            opacity: 1 !important;
        }
        :scope.profile-social-page .profile-tabbar {
            display: block !important;
            padding: 0 40px 32px !important;
            background: rgba(255,255,255,0.78);
        }
        :scope.profile-social-page .profile-tabbar-note {
            display: block !important;
            width: 100%;
            min-height: auto;
            padding: 18px 22px;
            border: 1px solid rgba(174,124,65,0.16);
            border-radius: 22px;
            background: rgba(255,255,255,0.78);
            color: var(--mid);
            font-size: 14px;
            font-weight: 600;
            line-height: 1.75;
            box-shadow: 0 14px 34px rgba(77,55,26,0.06);
            backdrop-filter: blur(18px);
        }
        :scope.profile-social-page .profile-tabbar-note .material-icons {
            display: none !important;
        }
        :scope.profile-social-page .profile-tabbar .profile-tab {
            display: none !important;
        }
        @media (max-width: 980px) {
            :scope.profile-social-page .profile-tabbar {
                padding: 0 22px 24px !important;
            }
        }
        @media (max-width: 560px) {
            :scope.profile-social-page .profile-tabbar {
                padding: 0 18px 20px !important;
            }
            :scope.profile-social-page .profile-tabbar-note {
                padding: 15px 16px;
                font-size: 13px;
            }
        }

        .profile-leave-balances {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
            margin: -6px 0 16px;
        }
        .profile-leave-balance {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 0;
            padding: 11px 13px;
            border: 1px solid #E6D9C8;
            border-radius: 14px;
            background: #FFFDF9;
        }
        .profile-leave-balance > .material-icons {
            width: 36px;
            height: 36px;
            display: grid;
            place-items: center;
            flex: 0 0 36px;
            border-radius: 10px;
            background: #EAF5EF;
            color: #26734D;
        }
        .profile-leave-balance.comp > .material-icons { background:#EAF1FB; color:#315D9B; }
        .profile-leave-balance.rule > .material-icons { background:#F7EEDB; color:#95651F; }
        .profile-leave-balance span,
        .profile-leave-balance strong,
        .profile-leave-balance small { display:block; }
        .profile-leave-balance span { color:#776B5E; font-size:10px; font-weight:800; text-transform:uppercase; }
        .profile-leave-balance strong { margin-top:2px; color:#1E1A16; font-size:16px; }
        .profile-leave-balance small { margin-top:2px; color:#776B5E; font-size:10px; line-height:1.35; }
        @media (max-width: 900px) { .profile-leave-balances { grid-template-columns:1fr; } }

        /* Remove the leftover note strip completely for a cleaner profile header. */
        :scope.profile-social-page .profile-tabbar {
            display: none !important;
            height: 0 !important;
            min-height: 0 !important;
            padding: 0 !important;
            margin: 0 !important;
            border: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
            overflow: hidden !important;
        }
        :scope.profile-social-page .profile-tabbar-note {
            display: none !important;
        }

        /* Hide the old top navbar on the redesigned profile page to give the workspace more room. */
        :scope.profile-social-page .navbar {
            display: none !important;
        }
        :scope.profile-social-page .main-container {
            flex: 1 1 auto;
            min-height: 100vh;
        }
        :scope.profile-social-page .content-area {
            padding-top: 18px !important;
        }
        @media (max-width: 980px) {
            :scope.profile-social-page .content-area {
                padding-top: 14px !important;
            }
        }

        /* 2026-07-24: keep the personal header readable at browser zoom levels. */
        :scope.profile-social-page .profile-identity-row {
            display: grid !important;
            grid-template-columns: clamp(104px, 8.5vw, 142px) minmax(0, 1fr) !important;
            grid-template-areas:
                "profile-avatar profile-title"
                "profile-avatar profile-actions" !important;
            align-items: start !important;
            gap: 14px clamp(18px, 2vw, 30px) !important;
            min-height: auto !important;
            padding: clamp(24px, 2.2vw, 34px) clamp(22px, 2.6vw, 40px) clamp(28px, 2.8vw, 42px) !important;
        }
        :scope.profile-social-page .profile-avatar-shell {
            grid-area: profile-avatar;
            align-self: start;
            width: clamp(104px, 8.4vw, 142px);
            height: clamp(104px, 8.4vw, 142px);
        }
        :scope.profile-social-page .profile-title-block {
            grid-area: profile-title;
            min-width: 0;
        }
        :scope.profile-social-page .profile-title-block h1,
        :scope.profile-social-page .profile-bio {
            overflow-wrap: anywhere;
        }
        :scope.profile-social-page .profile-role-line {
            min-height: auto !important;
            align-content: flex-start;
        }
        :scope.profile-social-page .profile-chip {
            max-width: 100%;
        }
        :scope.profile-social-page .profile-chip span {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        :scope.profile-social-page .profile-bio {
            max-width: 980px;
            margin-bottom: 0;
            padding-bottom: 2px;
        }
        :scope.profile-social-page .profile-hero-actions {
            grid-area: profile-actions;
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
            align-self: start;
            justify-content: flex-start;
            max-width: 100%;
            padding-top: 0 !important;
            margin-top: 2px;
        }
        :scope.profile-social-page .profile-action-btn {
            flex: 0 1 auto;
            min-width: 0;
            max-width: 100%;
            white-space: nowrap;
        }
        @media (max-width: 980px) {
            :scope.profile-social-page .profile-identity-row {
                grid-template-columns: 112px minmax(0, 1fr) !important;
                grid-template-areas:
                    "profile-avatar profile-title"
                    "profile-actions profile-actions" !important;
            }
        }
        @media (max-width: 560px) {
            :scope.profile-social-page .profile-identity-row {
                grid-template-columns: 1fr !important;
                grid-template-areas:
                    "profile-avatar"
                    "profile-title"
                    "profile-actions" !important;
            }
            :scope.profile-social-page .profile-hero-actions {
                width: 100%;
            }
            :scope.profile-social-page .profile-action-btn {
                flex: 1 1 100%;
            }
        }

        /* 2026-07-24: final stable profile shell for 90-125% browser zoom. */
        :scope.profile-social-page .content-wrapper {
            gap: clamp(24px, 2.2vw, 34px) !important;
        }
        :scope.profile-social-page .profile-hero-card {
            display: block !important;
            height: auto !important;
            min-height: 0 !important;
            overflow: visible !important;
            border-radius: 30px !important;
            margin-bottom: 0 !important;
        }
        :scope.profile-social-page .profile-cover {
            min-height: clamp(176px, 15.5vw, 236px) !important;
            padding: clamp(24px, 2.6vw, 38px) clamp(26px, 3vw, 44px) !important;
            overflow: hidden !important;
            border-radius: 30px 30px 0 0;
        }
        :scope.profile-social-page .profile-cover-content {
            min-width: 0;
        }
        :scope.profile-social-page .profile-cover-title {
            max-width: min(820px, 100%) !important;
            font-size: clamp(31px, 3vw, 52px) !important;
            line-height: 1.08 !important;
        }
        :scope.profile-social-page .profile-cover-note {
            max-width: min(760px, 100%) !important;
            line-height: 1.65 !important;
        }
        :scope.profile-social-page .profile-identity-row {
            display: grid !important;
            grid-template-columns: clamp(96px, 7.5vw, 128px) minmax(0, 1fr) !important;
            grid-template-areas:
                "profile-avatar profile-title"
                "profile-avatar profile-actions" !important;
            align-items: start !important;
            gap: clamp(10px, 1.2vw, 16px) clamp(18px, 2vw, 30px) !important;
            width: 100% !important;
            min-height: 0 !important;
            margin: 0 !important;
            padding: clamp(22px, 2.1vw, 34px) clamp(24px, 2.6vw, 40px) clamp(24px, 2.4vw, 38px) !important;
            overflow: visible !important;
            background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.84) 100%) !important;
            border-radius: 0 0 30px 30px;
        }
        :scope.profile-social-page .profile-avatar-shell {
            grid-area: profile-avatar !important;
            width: clamp(96px, 7.4vw, 128px) !important;
            height: clamp(96px, 7.4vw, 128px) !important;
            padding: 7px !important;
            margin: 0 !important;
            align-self: start !important;
        }
        :scope.profile-social-page .profile-title-block {
            grid-area: profile-title !important;
            min-width: 0 !important;
            padding-top: 0 !important;
        }
        :scope.profile-social-page .profile-title-block h1 {
            margin: 0 !important;
            font-size: clamp(30px, 2.85vw, 50px) !important;
            line-height: 1.08 !important;
        }
        :scope.profile-social-page .profile-role-line {
            min-height: 0 !important;
            margin-top: 12px !important;
            padding-top: 12px !important;
            gap: 8px !important;
        }
        :scope.profile-social-page .profile-bio {
            max-width: 100% !important;
            margin-top: 10px !important;
            font-size: 13px !important;
            line-height: 1.58 !important;
        }
        :scope.profile-social-page .profile-hero-actions {
            grid-area: profile-actions !important;
            width: 100% !important;
            display: flex !important;
            align-items: center !important;
            justify-content: flex-start !important;
            gap: 10px !important;
            flex-wrap: wrap !important;
            margin-top: 2px !important;
            padding: 0 !important;
        }
        :scope.profile-social-page .profile-action-btn {
            min-height: 40px !important;
            padding: 0 15px !important;
            font-size: 12.5px !important;
        }
        :scope.profile-social-page #sectionHome {
            margin-top: 0 !important;
        }
        :scope.profile-social-page .profile-overview-grid {
            margin-top: 0 !important;
        }
        @media (max-width: 1180px) {
            :scope.profile-social-page .profile-cover-content {
                flex-direction: column !important;
            }
            :scope.profile-social-page .profile-cover-stamp {
                width: fit-content !important;
            }
        }
        @media (max-width: 760px) {
            :scope.profile-social-page .profile-identity-row {
                grid-template-columns: 1fr !important;
                grid-template-areas:
                    "profile-avatar"
                    "profile-title"
                    "profile-actions" !important;
            }
            :scope.profile-social-page .profile-action-btn {
                flex: 1 1 100% !important;
            }
        }

        /* 2026-07-24: hard guard for browser zoom / Windows display scale.
           The identity row must stay in normal document flow, never overlap or collapse. */
        :scope.profile-social-page .content-wrapper {
            display: flex !important;
            flex-direction: column !important;
            align-items: stretch !important;
            height: auto !important;
            min-height: 0 !important;
            gap: clamp(20px, 2vw, 30px) !important;
        }
        :scope.profile-social-page .content-area {
            align-items: flex-start !important;
        }
        :scope.profile-social-page .profile-hero-card {
            display: flex !important;
            flex-direction: column !important;
            align-items: stretch !important;
            flex: 0 0 auto !important;
            height: auto !important;
            min-height: auto !important;
            overflow: hidden !important;
            isolation: isolate !important;
        }
        :scope.profile-social-page .profile-cover {
            flex: 0 0 auto !important;
            min-height: clamp(220px, 24vh, 294px) !important;
            border-radius: 30px 30px 0 0 !important;
        }
        :scope.profile-social-page .profile-identity-row {
            flex: 0 0 auto !important;
            position: relative !important;
            inset: auto !important;
            transform: none !important;
            display: grid !important;
            visibility: visible !important;
            opacity: 1 !important;
            width: 100% !important;
            min-width: 0 !important;
            min-height: clamp(168px, 13vw, 204px) !important;
            margin: 0 !important;
            z-index: 2 !important;
            grid-template-columns: clamp(104px, 8vw, 138px) minmax(0, 1fr) !important;
            grid-template-areas:
                "profile-avatar profile-title"
                "profile-avatar profile-actions" !important;
            align-items: center !important;
            align-content: center !important;
            gap: clamp(10px, 1.2vw, 16px) clamp(18px, 2vw, 28px) !important;
            padding: clamp(24px, 2.1vw, 34px) clamp(24px, 2.6vw, 40px) !important;
            border-radius: 0 0 30px 30px !important;
            background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.88) 100%) !important;
            overflow: visible !important;
            contain: layout paint !important;
        }
        :scope.profile-social-page .profile-avatar-shell {
            grid-area: profile-avatar !important;
            width: clamp(104px, 7.6vw, 132px) !important;
            height: clamp(104px, 7.6vw, 132px) !important;
            min-width: clamp(104px, 7.6vw, 132px) !important;
            min-height: clamp(104px, 7.6vw, 132px) !important;
            margin: 0 !important;
            align-self: center !important;
        }
        :scope.profile-social-page .profile-title-block {
            grid-area: profile-title !important;
            min-width: 0 !important;
            padding: 0 !important;
            align-self: end !important;
        }
        :scope.profile-social-page .profile-title-block h1 {
            font-size: clamp(30px, 2.7vw, 48px) !important;
            line-height: 1.08 !important;
            overflow-wrap: anywhere !important;
        }
        :scope.profile-social-page .profile-hero-actions {
            grid-area: profile-actions !important;
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
            position: relative !important;
            width: 100% !important;
            min-width: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            align-self: start !important;
            justify-content: flex-start !important;
            flex-wrap: wrap !important;
        }
        :scope.profile-social-page #sectionHome,
        :scope.profile-social-page .profile-overview-grid {
            position: relative !important;
            z-index: 1 !important;
            margin-top: 0 !important;
            transform: none !important;
        }
        :scope.profile-social-page #sectionHome {
            flex: 0 0 auto !important;
        }
        @media (max-width: 1180px) {
            :scope.profile-social-page .profile-cover {
                min-height: clamp(206px, 25vh, 260px) !important;
            }
            :scope.profile-social-page .profile-identity-row {
                grid-template-columns: clamp(96px, 9vw, 116px) minmax(0, 1fr) !important;
                min-height: 168px !important;
            }
            :scope.profile-social-page .profile-avatar-shell {
                width: clamp(96px, 8.5vw, 116px) !important;
                height: clamp(96px, 8.5vw, 116px) !important;
                min-width: clamp(96px, 8.5vw, 116px) !important;
                min-height: clamp(96px, 8.5vw, 116px) !important;
            }
        }
        @media (max-width: 720px) {
            :scope.profile-social-page .profile-identity-row {
                grid-template-columns: 1fr !important;
                grid-template-areas:
                    "profile-avatar"
                    "profile-title"
                    "profile-actions" !important;
                min-height: auto !important;
            }
            :scope.profile-social-page .profile-title-block,
            :scope.profile-social-page .profile-hero-actions {
                align-self: stretch !important;
            }
            :scope.profile-social-page .profile-action-btn {
                flex: 1 1 100% !important;
            }
        }
        .my-onboarding-flow { display:grid; grid-template-columns:repeat(5,minmax(120px,1fr)); gap:8px; margin:16px 0; overflow-x:auto; }
        .my-onboarding-step { min-width:120px; padding:11px 9px; border-radius:12px; background:#F2EEE7; color:#8D8375; text-align:center; font-size:12px; font-weight:700; }
        .my-onboarding-step.done { background:#E7F5EA; color:#23713D; }
        .my-onboarding-step.active { background:#FFF0D2; color:#8A5700; box-shadow:inset 0 0 0 1px #DDAA4F; }
        .my-onboarding-library { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:10px; margin-top:12px; }
        .my-onboarding-doc { border:1px solid #E7DED0; border-radius:12px; padding:12px; background:#FCFBF8; }
        .my-onboarding-doc-head { display:flex; gap:9px; align-items:flex-start; color:#455A64; }
        .my-onboarding-doc-head a { color:#7A510D; font-weight:700; text-decoration:none; }
        .my-onboarding-doc small { display:block; color:#90A4AE; margin-top:4px; }
        .my-onboarding-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:15px; flex-wrap:wrap; }
        .my-onboarding-tabs { display:flex; gap:8px; overflow-x:auto; padding:2px 0 12px; margin-bottom:4px; }
        .my-onboarding-tab { flex:0 0 auto; border:1px solid #DDCFBB; background:#FFFDF9; color:#665A49; border-radius:999px; padding:10px 15px; font:inherit; font-size:13px; font-weight:750; cursor:pointer; display:inline-flex; align-items:center; gap:7px; }
        .my-onboarding-tab.active { background:#8A5700; border-color:#8A5700; color:#fff; box-shadow:0 5px 14px rgba(138,87,0,.18); }
        .my-onboarding-panel[hidden] { display:none !important; }
        @media (max-width:720px) { .my-onboarding-flow { grid-template-columns:repeat(5,140px); } }

        .profile-signature-card { overflow: hidden; }
        .profile-signature-card .summary-top { align-items: flex-start; }
        .profile-signature-status {
            display: inline-flex; align-items: center; gap: 6px; min-height: 30px;
            padding: 6px 10px; border: 1px solid #dfd4c5; border-radius: 999px;
            background: #fffaf2; color: #7b5a2d; font-size: 12px; font-weight: 750;
        }
        .profile-signature-status.saved { border-color: #b8ddc1; background: #f1fbf3; color: #24683a; }
        .profile-signature-pad-shell {
            position: relative; margin-top: 16px; overflow: hidden;
            border: 1.5px dashed #c9ad86; border-radius: 15px;
            background: linear-gradient(180deg, #fff 0%, #fffdf9 100%);
        }
        .profile-signature-pad-shell::after {
            content: ''; position: absolute; right: 24px; bottom: 34%; left: 24px;
            border-bottom: 1px solid rgba(174,124,65,.2); pointer-events: none;
        }
        #profileSignatureCanvas {
            position: relative; z-index: 1; display: block; width: 100%; height: auto;
            aspect-ratio: 45 / 14; max-height: 280px; cursor: crosshair; touch-action: none;
        }
        .profile-signature-guide {
            position: absolute; right: 18px; bottom: 10px; z-index: 0;
            color: #a59b8f; font-size: 11px; pointer-events: none;
        }
        .profile-signature-actions { display: flex; align-items: center; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
        .profile-signature-actions .summary-btn.primary { border-color: #9a681f; background: #9a681f; color: #fff; }
        .profile-signature-note { flex: 1 1 280px; margin: 0; color: #786f65; font-size: 12px; line-height: 1.55; }
        @media (max-width: 620px) {
            #profileSignatureCanvas { min-height: 180px; aspect-ratio: auto; }
            .profile-signature-actions .summary-btn { flex: 1 1 auto; justify-content: center; }
        }
    
/* Approved EVER personal-page mobile demo. Loaded after legacy inline styles.
   Display only: native data, controls, permissions and desktop styles stay intact. */
@media (max-width: 768px) {
    :scope.personal-profile.profile-social-page { background: #f8f6f1; height: auto !important; min-height: 100dvh; overflow-y: auto !important; }
    :scope.personal-profile.profile-social-page *, :scope.personal-profile.profile-social-page *::before, :scope.personal-profile.profile-social-page *::after { box-sizing: border-box; }
    :scope.personal-profile.profile-social-page .navbar { display: flex !important; position: sticky; top: 0; z-index: 50; height: 56px; min-height: 56px; padding: 6px 16px; background: #fff; border-bottom: 1px solid #e8e0d5; box-shadow: none; gap: 8px; }
    :scope.personal-profile.profile-social-page.personal-profile--embed .navbar { display: none !important; }
    :scope.personal-profile.profile-social-page .navbar-left { min-width: 0; gap: 10px; }
    :scope.personal-profile.profile-social-page .navbar-left img { width: 44px !important; height: 32px !important; object-fit: contain; }
    :scope.personal-profile.profile-social-page .navbar-left span { font-size: 14px !important; white-space: nowrap; }
    :scope.personal-profile.profile-social-page .navbar > div:last-child { gap: 6px !important; }
    :scope.personal-profile.profile-social-page .navbar .back-btn { flex: 0 0 44px; width: 44px !important; height: 44px !important; padding: 0 !important; display: flex; justify-content: center; font-size: 0 !important; box-shadow: none; border: 0; background: #f8f4ed; }
    :scope.personal-profile.profile-social-page .navbar .back-btn .material-icons { font-size: 22px !important; }
    :scope.personal-profile.profile-social-page #notifMount .nb-bell { width: 44px; height: 44px; min-height: 44px; }
    :scope.personal-profile.profile-social-page #notifMount .nb-panel { position: fixed; top: 56px; right: 8px; width: calc(100vw - 16px); max-height: calc(100dvh - 80px); }
    :scope.personal-profile.profile-social-page .main-container { height: auto !important; min-height: 0 !important; overflow: visible !important; }
    :scope.personal-profile.profile-social-page .content-area { height: auto !important; overflow: visible !important; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)) !important; }
    :scope.personal-profile.profile-social-page .content-wrapper { width: 100% !important; max-width: 736px !important; gap: 16px !important; }
    :scope.personal-profile.profile-social-page:not(.profile-attendance-focus) .profile-hero-card { border: 1px solid #e8e0d5; border-radius: 16px !important; background: #fff; box-shadow: none; }
    :scope.personal-profile.profile-social-page .profile-cover { order: 2; min-height: 0 !important; height: auto !important; padding: 0 16px 14px !important; background: #fff !important; border: 0; border-radius: 0 !important; }
    :scope.personal-profile.profile-social-page .profile-cover::before, :scope.personal-profile.profile-social-page .profile-cover::after, :scope.personal-profile.profile-social-page .profile-cover-content > div:first-child { display: none !important; }
    :scope.personal-profile.profile-social-page .profile-cover-content { padding: 0 !important; min-height: 0 !important; gap: 0 !important; }
    :scope.personal-profile.profile-social-page .profile-cover-stamp { padding: 0 !important; min-width: 0 !important; width: auto !important; border: 0 !important; border-radius: 0; background: transparent !important; box-shadow: none !important; text-align: left; }
    :scope.personal-profile.profile-social-page .profile-cover-stamp small { display: none; }
    :scope.personal-profile.profile-social-page #profileHeroStatus { font-size: 12px !important; font-weight: 600; line-height: 1.5; color: #28734f; }
    :scope.personal-profile.profile-social-page #profileHeroStatus::before { content: '●'; margin-right: 6px; font-size: 9px; }
    :scope.personal-profile.profile-social-page .profile-identity-row { grid-template-columns: 58px minmax(0,1fr) !important; grid-template-areas: 'profile-avatar profile-title' 'profile-actions profile-actions' !important; gap: 14px 12px !important; min-height: 0 !important; padding: 16px !important; border-radius: 0 !important; background: #fff !important; contain: none !important; }
    :scope.personal-profile.profile-social-page .profile-avatar-shell { width: 58px !important; height: 58px !important; min-width: 58px !important; min-height: 58px !important; border-radius: 50%; box-shadow: none !important; padding: 3px; border: 1px solid #e8dece; }
    :scope.personal-profile.profile-social-page .profile-hero-avatar { width: 100% !important; height: 100% !important; object-fit: cover; border-radius: 50%; }
    :scope.personal-profile.profile-social-page .profile-title-block { align-self: center !important; }
    :scope.personal-profile.profile-social-page .profile-title-block h1 { margin: 0 !important; font-family: var(--sans) !important; font-size: 18px !important; font-weight: 750; line-height: 1.35 !important; letter-spacing: -.3px; }
    :scope.personal-profile.profile-social-page .profile-role-line { display: flex; flex-wrap: wrap; gap: 4px 8px !important; padding-top: 6px !important; margin: 0 !important; }
    :scope.personal-profile.profile-social-page .profile-role-line::before { display: none; }
    :scope.personal-profile.profile-social-page .profile-chip { min-height: 0 !important; padding: 0 !important; border: 0 !important; background: transparent !important; color: #7c7164; font-size: 11px !important; line-height: 1.5; }
    :scope.personal-profile.profile-social-page .profile-chip:last-child { flex-basis: 100%; }
    :scope.personal-profile.profile-social-page .profile-chip .material-icons, :scope.personal-profile.profile-social-page .profile-bio { display: none; }
    :scope.personal-profile.profile-social-page .profile-hero-actions { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
    :scope.personal-profile.profile-social-page .profile-action-btn { flex: 1 1 0 !important; min-height: 44px !important; padding: 8px 10px !important; font-size: 12px !important; border-radius: 10px; box-shadow: none; line-height: 1.4; white-space: normal; }
    :scope.personal-profile.profile-social-page .profile-action-btn.primary { flex-basis: 100% !important; background: #fff !important; color: #94662d !important; border: 1px solid #ae7c41 !important; font-size: 14px !important; }
    :scope.personal-profile.profile-social-page .profile-hero-actions > a { display: none; } /* Same home link remains in the navbar. */
    :scope.personal-profile.profile-social-page:has(#navHome.active) .profile-hero-actions > button:not(.primary) { display: none; }
    :scope.personal-profile.profile-social-page .profile-overview-grid { display: grid !important; width: 100%; grid-template-columns: minmax(0,1fr) !important; gap: 16px !important; }
    :scope.personal-profile.profile-social-page .profile-overview-panel { min-width: 0; padding: 16px !important; border: 1px solid #e8e0d5; border-radius: 16px; background: #fff !important; box-shadow: none !important; text-align: left; }
    :scope.personal-profile.profile-social-page .profile-panel-label { margin: 0 0 12px; font-size: 16px; font-weight: 700; text-transform: none; letter-spacing: 0; line-height: 1.4; color: #292620; }
    :scope.personal-profile.profile-social-page .profile-info-list { gap: 0; }
    :scope.personal-profile.profile-social-page .profile-info-section-title { margin: 16px 0 4px; font-size: 11px; letter-spacing: .3px; }
    :scope.personal-profile.profile-social-page .profile-info-section-title:first-child { display: none; }
    :scope.personal-profile.profile-social-page .profile-info-row { grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr) !important; align-items: start; gap: 12px; padding: 12px 0; }
    :scope.personal-profile.profile-social-page .profile-info-row span { font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; line-height: 1.5; color: #81796c; }
    :scope.personal-profile.profile-social-page .profile-info-row strong { min-width: 0; font-size: 13px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
    :scope.personal-profile.profile-social-page .profile-education-copy { min-height: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 500; line-height: 1.5; }
    :scope.personal-profile.profile-social-page .profile-quick-head { gap: 8px; margin-bottom: 4px; }
    :scope.personal-profile.profile-social-page .profile-quick-settings-btn { flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; box-shadow: none; }
    :scope.personal-profile.profile-social-page .profile-quick-grid { grid-template-columns: minmax(0,1fr) !important; gap: 0; }
    :scope.personal-profile.profile-social-page .profile-quick-card { min-height: 60px; padding: 10px 0; gap: 10px; border: 0; border-bottom: 1px solid #eee6dc; border-radius: 0; box-shadow: none; background: #fff; }
    :scope.personal-profile.profile-social-page .profile-quick-card:last-child { border-bottom: 0; }
    :scope.personal-profile.profile-social-page .profile-quick-card .material-icons { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 11px; font-size: 20px; overflow: hidden; }
    :scope.personal-profile.profile-social-page .profile-quick-card b { font-size: 14px; font-weight: 600; flex: 1; overflow-wrap: anywhere; }
    :scope.personal-profile.profile-social-page .profile-quick-card::after { content: '›'; flex: 0 0 14px; color: #8d8172; font-size: 24px; }
    :scope.personal-profile.profile-social-page :is(.profile-action-btn, .profile-quick-card, .profile-quick-settings-btn):focus-visible { outline: 2px solid #93632c; outline-offset: 2px; }
}
@media (max-width: 480px) {
    :scope.personal-profile.profile-social-page .navbar { padding-inline: 12px; }
    :scope.personal-profile.profile-social-page .navbar-left { gap: 6px; }
    :scope.personal-profile.profile-social-page .navbar-left span { font-size: 13px !important; }
    :scope.personal-profile.profile-social-page .content-area { padding-inline: 16px !important; }
    :scope.personal-profile.profile-social-page .profile-title-block h1 { font-size: 17px !important; }
}

@media (max-width: 768px) {
    :scope.personal-profile.profile-social-page.personal-profile--native { min-height: 0 !important; }
}

    :scope.personal-profile--native { display:block; height:auto; min-height:0; overflow:visible; background:transparent; }
    :scope.personal-profile--native .main-container { height:auto; min-height:0; overflow:visible; }
    :scope.personal-profile--native .content-area { height:auto; min-height:0; overflow:visible; padding:0; }
    :scope.personal-profile--native .content-wrapper { width:100%; max-width:none; padding:0; }
    :scope.personal-profile.profile-social-page.personal-profile--native .navbar, :scope.personal-profile.profile-social-page.personal-profile--native .sidebar { display:none!important; }
    :scope.personal-profile--native .profile-tabbar, :scope.personal-profile--native .profile-tabbar-note { display:none!important; }
    :scope.personal-profile--native #sectionAttendance { display:none!important; }
}
