        :root {
            --primary: #1a73e8;
            --primary-hover: #1b66c9;
            --bg: #f8f9fa;
            --surface: #ffffff;
            --text-main: #202124;
            --text-muted: #5f6368;
            --border: #dadce0;
            --sidebar-w: 256px;
            --header-h: 64px;
            --hover-bg: #f1f3f4;
            --active-bg: #e8f0fe;
            --active-text: #1967d2;
            --danger: #d93025;
            --success: #1e8e3e;
            --card-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
        }

        :root.dark-mode {
            --primary: #8ab4f8;
            --primary-hover: #aecbfa;
            --bg: #202124;
            --surface: #2d2e30;
            --text-main: #e8eaed;
            --text-muted: #9aa0a6;
            --border: #5f6368;
            --hover-bg: #3c4043;
            --active-bg: #3c4043;
            --active-text: #8ab4f8;
            --card-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
        }

        body {
            font-family: 'Roboto', sans-serif;
            background-color: var(--surface);
            color: var(--text-main);
            margin: 0;
            padding: 0;
            display: flex;
            height: 100vh;
            overflow: hidden;
        }

        h1,
        h2,
        h3,
        .brand-text {
            font-family: 'Google Sans', sans-serif;
            margin: 0;
        }

        /* --- LOGIN SCREEN --- */
        #halamanLogin {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            width: 100vw;
            background: var(--bg);
            position: absolute;
            top: 0;
            left: 0;
            z-index: 1000;
        }

        .login-card {
            background: var(--surface);
            border-radius: 8px;
            border: 1px solid var(--border);
            padding: 40px;
            width: 100%;
            max-width: 400px;
            text-align: center;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .login-card h2 {
            font-size: 24px;
            color: var(--text-main);
            margin-bottom: 8px;
        }

        .login-card p {
            color: var(--text-muted);
            margin-bottom: 24px;
        }

        .form-group {
            margin-bottom: 20px;
            text-align: left;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            font-size: 14px;
            color: var(--text-main);
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 12px;
            border: 1px solid var(--border);
            border-radius: 4px;
            box-sizing: border-box;
            font-size: 16px;
            transition: border-color 0.2s;
            font-family: inherit;
            background-color: var(--bg);
            color: var(--text-main);
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            border-color: var(--primary);
            outline: none;
        }

        .btn-primary {
            background-color: var(--primary);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            width: 100%;
            transition: 0.2s;
            font-family: 'Google Sans', sans-serif;
        }

        .btn-primary:hover {
            background-color: var(--primary-hover);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        }

        #pesanError {
            color: var(--danger);
            font-size: 13px;
            font-weight: 500;
            margin-bottom: 16px;
            display: none;
            background: #fce8e6;
            padding: 10px;
            border-radius: 4px;
        }

        /* --- APP LAYOUT --- */
        #halamanApp {
            display: flex;
            flex-direction: column;
            width: 100vw;
            height: 100vh;
            display: none;
        }

        /* HEADER */
        .app-header {
            height: var(--header-h);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 16px;
            border-bottom: 1px solid var(--border);
            background: var(--surface);
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .header-brand {
            display: flex;
            align-items: center;
            gap: 12px;
            text-decoration: none;
            color: var(--text-main);
            padding-right: 30px;
        }

        .header-brand img {
            width: 40px;
            height: 40px;
        }

        .brand-text {
            font-size: 22px;
            color: var(--text-muted);
        }

        .header-search {
            background-color: var(--hover-bg);
            border-radius: 8px;
            height: 48px;
            display: flex;
            align-items: center;
            padding: 0 16px;
            flex: 1;
            max-width: 720px;
            transition: background-color 0.2s, box-shadow 0.2s;
        }

        .header-search.focus {
            background-color: var(--surface);
            box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
        }

        .header-search i {
            color: var(--text-muted);
            font-size: 18px;
            margin-right: 12px;
        }

        .header-search input {
            border: none;
            background: transparent;
            outline: none;
            flex: 1;
            font-size: 16px;
            color: var(--text-main);
            font-family: 'Roboto', sans-serif;
        }

        .header-right {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .icon-btn {
            background: none;
            border: none;
            color: var(--text-muted);
            font-size: 20px;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: 0.2s;
            text-decoration: none;
        }

        .icon-btn:hover {
            background-color: var(--hover-bg);
        }

        .user-profile {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background-color: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Google Sans', sans-serif;
            font-weight: 500;
            font-size: 14px;
            cursor: pointer;
            border: 4px solid transparent;
            transition: 0.2s;
            background-size: cover;
            background-position: center;
        }

        .user-profile:hover {
            border-color: var(--hover-bg);
        }

        /* BODY LAYOUT */
        .app-body {
            display: flex;
            flex: 1;
            overflow: hidden;
            background: var(--surface);
        }

        /* SIDEBAR (DRIVE STYLE) */
        .app-sidebar {
            width: var(--sidebar-w);
            min-width: var(--sidebar-w);
            padding: 8px 0;
            overflow-y: auto;
            border-right: 1px solid var(--border);
            display: flex;
            flex-direction: column;
        }

        .btn-new-container {
            padding: 8px 0 16px 12px;
        }

        .btn-new {
            display: inline-flex;
            align-items: center;
            background-color: var(--surface);
            border: 1px solid var(--border);
            border-radius: 24px;
            padding: 0 24px 0 16px;
            height: 48px;
            cursor: pointer;
            box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
            transition: all 0.2s ease;
            font-family: 'Google Sans', sans-serif;
            font-weight: 500;
            font-size: 14px;
            color: var(--text-main);
        }

        .btn-new:hover {
            background-color: var(--bg);
            box-shadow: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
        }

        .btn-new img {
            width: 28px;
            height: 28px;
            margin-right: 12px;
        }

        .nav-menu {
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        .nav-item {
            display: flex;
            align-items: center;
            padding: 0 12px 0 20px;
            height: 32px;
            color: var(--text-main);
            text-decoration: none;
            border-radius: 0 16px 16px 0;
            margin-right: 12px;
            margin-left: 0;
            cursor: pointer;
            font-size: 13px;
            font-weight: 500;
            margin-bottom: 2px;
        }

        .nav-item i {
            width: 20px;
            font-size: 16px;
            margin-right: 12px;
            color: var(--text-muted);
            text-align: center;
        }

        .nav-item:hover {
            background-color: var(--hover-bg);
        }

        .nav-item.active {
            background-color: var(--active-bg);
            color: var(--active-text);
        }

        .nav-item.active i {
            color: var(--active-text);
        }

        /* FOLDER TREE */
        .folder-tree {
            margin-top: 8px;
            padding-left: 0;
            list-style: none;
        }

        .tree-node {
            font-size: 14px;
        }

        .tree-row {
            display: flex;
            align-items: center;
            height: 32px;
            padding-left: 20px;
            cursor: pointer;
            color: var(--text-main);
            border-radius: 0 16px 16px 0;
            margin-right: 12px;
            margin-left: 0;
            font-size: 13px;
            margin-bottom: 2px;
            font-weight: 500;
        }

        .tree-row:hover {
            background-color: var(--hover-bg);
        }

        .tree-row i {
            color: var(--text-muted);
            width: 20px;
            text-align: center;
            margin-right: 12px;
            font-size: 16px;
        }

        .tree-row .caret {
            font-size: 12px;
            margin-right: 4px;
            width: 16px;
        }

        .tree-children {
            display: none;
            padding-left: 20px;
            list-style: none;
        }

        .tree-node.open>.tree-children {
            display: block;
        }

        .tree-row.active {
            background-color: var(--active-bg);
            color: var(--active-text);
        }

        .tree-row.active i {
            color: var(--active-text) !important;
        }

        /* Sidebar Category Accordion */
        .nav-category-accordion .category-content {
            display: none;
        }

        .nav-category-accordion.active .category-content {
            display: block;
        }

        .nav-category-accordion .fa-chevron-down {
            transition: transform 0.2s;
            margin-left: auto;
            margin-right: 16px;
            font-size: 10px;
        }

        .nav-category-accordion.active .fa-chevron-down {
            transform: rotate(180deg);
        }

        .category-header:hover {
            background-color: var(--hover-bg);
            border-radius: 0 16px 16px 0;
            margin-right: 12px;
        }

        /* CONTACTS / TEAMS STYLE (Google Contacts Inspired) */
        .contact-card {
            background: var(--surface);
            border-bottom: 1px solid var(--border);
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 16px;
            transition: background 0.2s;
        }

        .contact-card:hover {
            background: var(--hover-bg);
        }

        .contact-card:last-child {
            border-bottom: none;
        }

        .contact-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--active-bg);
            color: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 14px;
            flex-shrink: 0;
            border: 1px solid var(--border);
        }

        .contact-body {
            flex: 1;
            display: grid;
            grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr;
            align-items: center;
            gap: 16px;
        }

        .contact-name-box {
            min-width: 0;
        }

        .contact-name {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-main);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .contact-role {
            font-size: 12px;
            color: var(--text-muted);
        }

        .contact-text {
            font-size: 13px;
            color: var(--text-muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .contact-actions {
            display: flex;
            justify-content: flex-end;
            gap: 8px;
        }

        @media (max-width: 992px) {
            .contact-body {
                grid-template-columns: 1fr 1fr 1fr;
                gap: 8px;
            }

            .contact-text.phone {
                display: none;
            }
        }

        @media (max-width: 576px) {
            .contact-body {
                grid-template-columns: 1fr 1fr;
            }

            .contact-text {
                font-size: 12px;
            }
        }

        /* MAIN CONTENT AREA */
        .app-main {
            flex: 1;
            background-color: var(--surface);
            display: flex;
            flex-direction: column;
            border-radius: 16px;
            margin: 16px 16px 16px 0;
            padding: 24px;
            overflow-y: auto;
            position: relative;
        }

        .view-section {
            display: none;
        }

        .view-section.active {
            display: block;
        }

        /* BREADCRUMB */
        .breadcrumb {
            display: flex;
            align-items: center;
            font-family: 'Google Sans', sans-serif;
            font-size: 18px;
            color: var(--text-main);
            margin-bottom: 24px;
        }

        .breadcrumb i {
            margin: 0 8px;
            color: var(--text-muted);
            font-size: 14px;
        }

        /* FOLDER / FILE GRID */
        .section-header {
            font-family: 'Google Sans', sans-serif;
            font-weight: 500;
            font-size: 14px;
            color: var(--text-main);
            margin: 24px 0 16px;
        }

        .grid-view {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 16px;
        }

        .file-card {
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 16px;
            display: flex;
            align-items: center;
            cursor: pointer;
            transition: 0.2s;
            background: var(--surface);
        }

        .file-card:hover {
            background-color: var(--hover-bg);
        }

        .file-card i {
            font-size: 24px;
            margin-right: 16px;
        }

        .file-card .fa-folder {
            color: #5f6368;
        }

        .file-card .fa-file-pdf {
            color: #e53935;
        }

        .file-card .fa-chart-line {
            color: #fbc02d;
        }

        .file-card .fa-link {
            color: #1a73e8;
        }

        .file-card .info {
            flex: 1;
            overflow: hidden;
        }

        .file-card .title {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-main);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 4px;
        }

        .file-card .meta {
            font-size: 12px;
            color: var(--text-muted);
        }

        /* ADMIN SPECIFIC */
        .admin-form {
            background: var(--hover-bg);
            padding: 24px;
            border-radius: 8px;
            border: 1px solid var(--border);
            margin-bottom: 32px;
        }

        .admin-form .form-row {
            display: flex;
            gap: 16px;
            flex-wrap: wrap;
            margin-bottom: 16px;
        }

        .admin-form .form-group {
            flex: 1;
            min-width: 250px;
            margin-bottom: 0;
        }

        .btn-outline {
            background: transparent;
            color: var(--primary);
            border: 1px solid var(--border);
            padding: 8px 16px;
            border-radius: 4px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: 0.2s;
        }

        .btn-outline:hover {
            background: var(--active-bg);
            border-color: var(--primary);
        }

        .data-table-wrapper {
            border: 1px solid var(--border);
            border-radius: 8px;
            overflow: hidden;
            background: var(--surface);
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 14px;
        }

        .data-table th,
        .data-table td {
            padding: 12px 24px;
            text-align: left;
            border-bottom: 1px solid var(--border);
        }

        .data-table th {
            background: var(--hover-bg);
            color: var(--text-muted);
            font-weight: 500;
        }

        .data-table tbody tr:hover {
            background: var(--hover-bg);
        }

        .badge {
            padding: 4px 8px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }

        .badge.admin {
            background: var(--active-bg);
            color: #1967d2;
        }

        .badge.client {
            background: #e6f4ea;
            color: #137333;
        }

        /* PROJECT & PROGRESS BARS */
        .project-card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 16px;
            margin-bottom: 12px;
            transition: 0.2s;
        }

        .project-card:hover {
            border-color: var(--primary);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        .project-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .project-title {
            font-size: 15px;
            font-weight: 500;
            color: var(--text-main);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .project-desc {
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 12px;
        }

        .progress-bar-bg {
            background: var(--border);
            border-radius: 8px;
            height: 10px;
            width: 100%;
            overflow: hidden;
            margin-bottom: 6px;
            position: relative;
        }

        .progress-bar-fill {
            background: var(--primary);
            height: 100%;
            transition: width 0.4s ease;
            border-radius: 8px;
        }

        .progress-text {
            font-size: 13px;
            color: var(--text-muted);
            text-align: right;
            font-weight: 500;
        }

        /* Floating Dropdown Menu */
        .dropdown-menu {
            position: absolute;
            top: 60px;
            right: 20px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            padding: 8px 0;
            min-width: 200px;
            display: none;
            z-index: 100;
        }

        .dropdown-menu.active {
            display: block;
        }

        .dropdown-item {
            padding: 8px 24px;
            display: block;
            width: 100%;
            box-sizing: border-box;
            text-align: left;
            background: none;
            border: none;
            font-size: 14px;
            color: var(--text-main);
            cursor: pointer;
            text-decoration: none;
        }

        .dropdown-item:hover {
            background: var(--hover-bg);
        }

        .dropdown-item i {
            margin-right: 12px;
            color: var(--text-muted);
            width: 16px;
            text-align: center;
        }

        /* OFFCANVAS */
        .offcanvas-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.5);
            z-index: 2000;
            display: none;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .offcanvas-overlay.active {
            display: block;
            opacity: 1;
        }

        .offcanvas {
            position: fixed;
            top: 0;
            right: -600px;
            width: 100%;
            max-width: 600px;
            height: 100vh;
            background: var(--surface);
            box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
            z-index: 2001;
            transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
        }

        .offcanvas.active {
            right: 0;
        }

        .offcanvas-start {
            right: auto;
            left: -600px;
        }

        .offcanvas-start.active {
            left: 0;
        }

        .offcanvas-header {
            padding: 24px;
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .offcanvas-title {
            font-family: 'Google Sans', sans-serif;
            font-size: 18px;
            font-weight: 500;
            color: var(--text-main);
            margin: 0;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .offcanvas-body {
            padding: 24px;
            flex: 1;
            overflow-y: auto;
        }

        .offcanvas-footer {
            padding: 24px;
            border-top: 1px solid var(--border);
            display: flex;
            justify-content: flex-end;
            gap: 12px;
        }

        /* ACCORDION (FAQ) */
        .accordion {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .accordion-item {
            border: 1px solid var(--border);
            border-radius: 6px;
            overflow: hidden;
            background: var(--surface);
        }

        .accordion-header {
            padding: 12px 16px;
            font-size: 14px;
            font-weight: 500;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            user-select: none;
            background: var(--bg);
        }

        .accordion-header:hover {
            background: var(--hover-bg);
        }

        .accordion-body {
            padding: 0 16px;
            max-height: 0;
            overflow: hidden;
            font-size: 13px;
            color: var(--text-muted);
            line-height: 1.5;
            transition: max-height 0.3s ease, padding 0.3s ease;
        }

        .accordion-item.active .accordion-body {
            padding: 12px 16px;
            max-height: 1200px;
        }

        .accordion-item.active .accordion-header {
            border-bottom: 1px solid var(--border);
        }

        .accordion-item.active .accordion-header i {
            transform: rotate(180deg);
        }

        .accordion-header i {
            transition: transform 0.3s ease;
        }

        /* --- ANIMATIONS & UTILS --- */
        @keyframes progressStripes {
            from {
                background-position: 1rem 0;
            }

            to {
                background-position: 0 0;
            }
        }

        /* --- CHAT STYLES (WhatsApp style) --- */
        .chat-bubble {
            max-width: 80%;
            padding: 8px 12px;
            border-radius: 8px;
            margin-bottom: 2px;
            position: relative;
            word-wrap: break-word;
            line-height: 1.5;
            font-size: 13px;
        }

        .chat-client {
            background-color: #dcf8c6;
            color: #111;
            align-self: flex-end;
            border-bottom-right-radius: 2px;
            margin-left: auto;
        }

        .chat-admin {
            background-color: #ffffff;
            color: #111;
            align-self: flex-start;
            border-bottom-left-radius: 2px;
            border: 1px solid #e0e0e0;
        }

        .chat-meta {
            font-size: 10px;
            color: #999;
            margin-top: 3px;
            text-align: right;
            display: block;
        }

        .chat-sender-label {
            font-size: 11px;
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 2px;
        }

        .chat-input-row {
            background: var(--surface);
            border-top: 1px solid var(--border);
            padding: 10px 12px;
            display: flex;
            gap: 8px;
            align-items: center;
        }

        .chat-input-row input {
            flex: 1;
            border: 1px solid var(--border);
            padding: 10px 16px;
            border-radius: 20px;
            outline: none;
            font-size: 13px;
            font-family: inherit;
            background: var(--surface);
            color: var(--text-main);
        }

        .chat-send-btn {
            background: #25d366;
            color: white;
            border: none;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
            flex-shrink: 0;
            transition: transform 0.1s, background 0.2s;
        }

        .chat-send-btn:hover {
            background: #1da851;
            transform: scale(1.05);
        }

        /* --- NOTIFICATION BELL --- */
        .notif-badge {
            position: absolute;
            top: 2px;
            right: 2px;
            background: #ea4335;
            color: white;
            font-size: 10px;
            font-weight: 700;
            min-width: 16px;
            height: 16px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 4px;
            pointer-events: none;
            animation: notifPop 0.3s ease;
        }

        @keyframes notifPop {
            from {
                transform: scale(0);
            }

            to {
                transform: scale(1);
            }
        }

        .notif-panel {
            position: absolute;
            top: 52px;
            right: -8px;
            width: 340px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
            display: none;
            z-index: 200;
            overflow: hidden;
            max-height: 420px;
            display: none;
            flex-direction: column;
        }

        .notif-panel.active {
            display: flex;
        }

        .notif-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 16px;
            border-bottom: 1px solid var(--border);
            background: var(--hover-bg);
        }

        .notif-panel-header span {
            font-family: 'Google Sans', sans-serif;
            font-size: 14px;
            font-weight: 600;
            color: var(--text-main);
        }

        .notif-mark-read {
            background: none;
            border: none;
            color: var(--primary);
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 4px;
            transition: background 0.2s;
        }

        .notif-mark-read:hover {
            background: var(--active-bg);
        }

        .notif-list {
            overflow-y: auto;
            flex: 1;
        }

        .notif-item {
            display: flex;
            gap: 10px;
            padding: 12px 16px;
            border-bottom: 1px solid var(--border);
            cursor: pointer;
            transition: background 0.15s;
            align-items: flex-start;
        }

        .notif-item:hover {
            background: var(--hover-bg);
        }

        .notif-item.unread {
            background: rgba(26, 115, 232, 0.04);
        }

        .notif-item.unread::before {
            content: '';
            position: absolute;
            left: 0;
            width: 3px;
            height: 100%;
            background: var(--primary);
            border-radius: 0 2px 2px 0;
        }

        .notif-item {
            position: relative;
        }

        .notif-icon {
            width: 34px;
            height: 34px;
            border-radius: 50%;
            background: var(--active-bg);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            color: var(--primary);
            font-size: 14px;
        }

        .notif-content {
            flex: 1;
            min-width: 0;
        }

        .notif-title {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 2px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .notif-msg {
            font-size: 12px;
            color: var(--text-muted);
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            line-height: 1.4;
        }

        .notif-time {
            font-size: 10px;
            color: var(--text-muted);
            margin-top: 4px;
        }

        .notif-empty {
            padding: 32px 16px;
            text-align: center;
            color: var(--text-muted);
            font-size: 13px;
        }

        /* TIMELINE STYLES */
        .timeline-container {
            display: flex;
            gap: 16px;
            overflow-x: auto;
            padding-bottom: 16px;
            margin-bottom: 24px;
            scrollbar-width: none;
            /* Firefox */
        }

        .timeline-container::-webkit-scrollbar {
            display: none;
            /* Safari and Chrome */
        }

        .timeline-group {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 16px;
            min-width: 280px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
        }

        .timeline-group-header {
            font-size: 15px;
            font-weight: 700;
            color: var(--text-main);
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
            padding-bottom: 12px;
            border-bottom: 1px dashed var(--border);
        }

        .timeline-card {
            background: var(--bg);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.2s;
            position: relative;
        }

        .timeline-card:hover {
            border-color: var(--primary);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
            transform: translateY(-2px);
        }

        .timeline-card:last-child {
            margin-bottom: 0;
        }

        .timeline-week {
            font-size: 11px;
            color: var(--text-muted);
            font-weight: 600;
            margin-bottom: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .timeline-activity {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-main);
            margin-bottom: 8px;
            line-height: 1.4;
        }

        .timeline-status {
            font-size: 11px;
            font-weight: 600;
            padding: 4px 8px;
            border-radius: 4px;
            display: inline-block;
        }

        .status-plan {
            background: #e8f0fe;
            color: #1a73e8;
        }

        .status-doing {
            background: #fef7e0;
            color: #fbbc05;
        }

        .status-done {
            background: #e6f4ea;
            color: #34a853;
        }
        /* --- CALENDAR PLANNER STYLES --- */
        .modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.5); z-index: 2000; }
        .modal { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 2001; align-items: center; justify-content: center; pointer-events: none; }
        .modal.active { display: flex; pointer-events: auto; }
        #modalCalendarPlanner .modal-content {
            width: 800px;
            max-width: 95vw;
            background: var(--surface);
            padding: 24px;
        }
        .calendar-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        .calendar-nav h3 { font-size: 20px; font-weight: 700; margin: 0; color: var(--text-main); }
        .calendar-nav button {
            background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
            width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
            cursor: pointer; color: var(--text-main); transition: 0.2s;
        }
        .calendar-nav button:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
        .calendar-grid-header {
            display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 8px; text-align: center; font-weight: 600; font-size: 13px; color: var(--text-muted);
        }
        .calendar-grid {
            display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px;
        }
        .calendar-cell {
            min-height: 100px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
            padding: 8px; display: flex; flex-direction: column; cursor: pointer; transition: 0.2s; position: relative;
        }
        .calendar-cell:not(.empty-cell):hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
        .calendar-cell.today { background: var(--active-bg); border-color: var(--primary); }
        .calendar-cell.empty-cell { background: transparent; border: 1px dashed var(--border); cursor: default; }
        .cal-date-num { font-size: 14px; font-weight: 600; color: var(--text-main); margin-bottom: 6px; }
        .cal-event-indicators { display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
        .cal-badge-event { font-size: 10.5px; font-weight: 600; padding: 2px 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; line-height: 1.3; }
        .cal-dot { width: 8px; height: 8px; border-radius: 50%; }
        .cal-status-PlantoDo { background: #9e9e9e; }
        .cal-status-Doing { background: #ffca28; }
        .cal-status-Postpone { background: #ff9800; }
        .cal-status-Approved { background: #2196f3; }
        .cal-status-Published { background: #9c27b0; }
        .cal-status-Done { background: #4caf50; }
        .cal-status-Archived { background: #607d8b; }

        .cal-event-card {
            background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px;
            display: flex; flex-direction: column; gap: 8px; transition: 0.2s;
        }
        .cal-event-card:hover { border-color: var(--primary); }
        .cal-event-header { display: flex; justify-content: space-between; align-items: flex-start; }
        .cal-event-title { font-size: 15px; font-weight: 600; color: var(--text-main); }
        .cal-event-time { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
        .cal-event-desc { font-size: 13px; color: var(--text-main); white-space: pre-wrap; line-height: 1.5; }
        .cal-badge { padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; color: #fff; }

        @media print {
            body * { visibility: hidden; }
            #offcanvasCalendarDay, #offcanvasCalendarDay * { visibility: visible; }
            #offcanvasCalendarDay { position: absolute; left: 0; top: 0; width: 100% !important; border: none; box-shadow: none; padding: 20px; }
            .offcanvas-close, .btn-primary, .cal-event-actions, .cal-event-card button { display: none !important; }
            .cal-event-card { border: 1px solid #ddd; margin-bottom: 20px; box-shadow: none; break-inside: avoid; }
        }
        /* SAAS Accordion */
        .saas-main-accordion { border:1px solid var(--border); border-radius:14px; overflow:hidden; background:var(--surface); box-shadow:0 2px 6px rgba(0,0,0,0.06); margin-bottom:12px; }
        .saas-main-header { padding:16px 20px; display:flex; justify-content:space-between; align-items:center; background:var(--surface); cursor:pointer; transition:background 0.15s; }
        .saas-main-header:hover { background:var(--hover-bg); }
        .saas-main-body { display:none; border-top:1px solid var(--border); }
        .saas-main-accordion.open .saas-main-body { display:block; }
        .saas-main-accordion.open .saas-main-icon { transform:rotate(180deg); }
        .saas-accordion-section { border-top: 1px solid var(--border); }
        .saas-accordion-header { display:flex; justify-content:space-between; align-items:center; padding:12px 20px; cursor:pointer; font-size:13px; font-weight:600; color:var(--text-main); transition:background 0.15s; gap:8px; }
        .saas-accordion-header:hover { background:var(--hover-bg); }
        .saas-accordion-body { display:none; padding:0 20px 16px; }
        .saas-accordion-section.open .saas-accordion-body { display:block; }
        .saas-acc-icon { transition:transform 0.25s; font-size:11px; color:var(--text-muted); flex-shrink:0; }
        .saas-accordion-section.open .saas-acc-icon { transform:rotate(180deg); }
        /* SAAS Form Accordion */
        .saas-form-section { border-top: 1px solid var(--border); }
        .saas-form-section:first-child { border-top: none; }
        .saas-form-header { display:flex; justify-content:space-between; align-items:center; padding:14px 24px; cursor:pointer; font-size:14px; font-weight:600; color:var(--text-main); transition:background 0.15s; gap:8px; }
        .saas-form-header:hover { background:var(--hover-bg); }
        .saas-form-body { display:none; padding:0 24px 20px; display:none; flex-direction:column; gap:14px; }
        .saas-form-section.open .saas-form-body { display:flex; }
        .saas-form-section.open .saas-acc-icon { transform:rotate(180deg); }

        /* ===== COMPETITOR SECTION ===== */
        .competitor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
        .competitor-card {
            background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
            padding: 20px; display: flex; flex-direction: column; gap: 14px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.04); transition: transform 0.2s, box-shadow 0.2s;
            position: relative; overflow: hidden;
        }
        .competitor-card::before {
            content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
            background: linear-gradient(90deg, #7c3aed, #a855f7);
        }
        .competitor-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(124,58,237,0.12); }
        .competitor-brand { display: flex; align-items: center; gap: 12px; }
        .competitor-brand-icon {
            width: 44px; height: 44px; border-radius: 12px;
            background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(168,85,247,0.1));
            display: flex; align-items: center; justify-content: center;
            font-size: 18px; color: #7c3aed; flex-shrink: 0;
        }
        .competitor-brand-name { font-size: 16px; font-weight: 700; color: var(--text-main); line-height: 1.2; }
        .competitor-brand-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
        .competitor-section-label {
            font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px;
            color: var(--text-muted); margin-bottom: 6px;
        }
        .competitor-links { display: flex; flex-wrap: wrap; gap: 7px; }
        .competitor-link-chip {
            display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px;
            border-radius: 20px; font-size: 12px; font-weight: 600; text-decoration: none;
            border: 1px solid transparent; transition: opacity 0.2s, transform 0.15s; cursor: pointer;
        }
        .competitor-link-chip:hover { opacity: 0.85; transform: scale(1.03); }
        .chip-website  { background: rgba(26,115,232,0.1); color:#1a73e8; border-color:rgba(26,115,232,0.25); }
        .chip-instagram{ background: rgba(233,30,140,0.1); color:#e91e8c; border-color:rgba(233,30,140,0.25); }
        .chip-tiktok   { background: rgba(0,0,0,0.08); color:var(--text-main); border-color:var(--border); }
        .chip-facebook { background: rgba(24,119,242,0.1); color:#1877f2; border-color:rgba(24,119,242,0.25); }
        .chip-youtube  { background: rgba(255,0,0,0.1); color:#ff0000; border-color:rgba(255,0,0,0.2); }
        .chip-linkedin { background: rgba(10,102,194,0.1); color:#0a66c2; border-color:rgba(10,102,194,0.25); }
        .chip-other    { background: rgba(124,58,237,0.1); color:#7c3aed; border-color:rgba(124,58,237,0.25); }
        .competitor-tags { display: flex; flex-wrap: wrap; gap: 6px; }
        .ctag-hashtag {
            background: rgba(124,58,237,0.1); color: #7c3aed; font-size: 11.5px; font-weight: 600;
            padding: 3px 9px; border-radius: 12px; border: 1px solid rgba(124,58,237,0.2);
        }
        .ctag-keyword {
            background: rgba(26,115,232,0.1); color: #1a73e8; font-size: 11.5px; font-weight: 600;
            padding: 3px 9px; border-radius: 12px; border: 1px solid rgba(26,115,232,0.2);
        }
        .competitor-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
        /* Admin Competitor Offcanvas list item */
        .comp-admin-item {
            background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
            padding: 16px; display: flex; flex-direction: column; gap: 10px;
        }
        .comp-admin-item:hover { border-color: #7c3aed; }
        /* Competitor link row in modal form */
        .comp-link-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
        .comp-link-row select { width: 105px; flex-shrink: 0; }
        .comp-link-row .comp-url-input { flex: 1; }
        .comp-link-row .btn-del-link {
            background: none; border: 1px solid var(--border); color: var(--text-muted);
            width: 30px; height: 30px; border-radius: 6px; cursor: pointer; font-size: 14px;
            display: flex; align-items: center; justify-content: center; flex-shrink: 0;
            transition: background 0.15s, color 0.15s;
        }
        .comp-link-row .btn-del-link:hover { background: #fce4ec; color: #e53935; border-color: #e53935; }
    
