:root {
    --color-white: #ffffff;
    --color-blue: #2B6CB0;
    --color-light-blue: #4DA8DA;
    --color-bg-light: #F0F7FF;
    --color-text: #2D3748;
    --color-text-muted: #718096;
    --color-border: #E2E8F0;
    --gradient-primary: linear-gradient(135deg, var(--color-blue), var(--color-light-blue));
    --shadow-card: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 16px;
    --radius-sm: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg-light);
    min-height: 100vh;
}

/* Navbar */
.navbar {
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1rem;
    color: var(--color-blue) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text-muted) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-blue) !important;
    background-color: var(--color-bg-light);
}

/* Welcome Screen */
.welcome-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.welcome-screen::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -200px;
    right: -200px;
}

.welcome-screen::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    bottom: -100px;
    left: -100px;
}

.welcome-content {
    text-align: center;
    color: var(--color-white);
    z-index: 1;
    padding: 2rem;
    animation: fadeInUp 0.8s ease;
}

.welcome-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.welcome-content p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    animation: pulse 2s infinite;
}

.btn-welcome {
    background: var(--color-white);
    color: var(--color-blue);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-welcome:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: var(--color-blue);
}

/* Cards */
.card-custom {
    background: var(--color-white);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    overflow: hidden;
}

.card-custom:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
}

.card-custom .card-body {
    padding: 1.5rem;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-white);
    background: var(--gradient-primary);
    margin-bottom: 1rem;
}

.card-custom h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-custom p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Dashboard Stage Cards */
.stage-card {
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
}

.stage-card:hover {
    color: inherit;
}

.stage-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.stage-card.locked .card-custom {
    background: #f8f9fa;
}

.stage-card.locked:hover .card-custom {
    transform: none;
    box-shadow: var(--shadow-card);
}

.stage-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    background: var(--gradient-primary);
    color: var(--color-white);
    flex-shrink: 0;
}

.stage-card.locked .stage-number {
    background: #CBD5E0;
}

.lock-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #CBD5E0;
    font-size: 1rem;
}

.stage-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-weight: 500;
    white-space: nowrap;
}

.stage-badge.available {
    background-color: #E6FFFA;
    color: #2C7A7B;
}

.stage-badge.locked {
    background-color: #EDF2F7;
    color: #A0AEC0;
}

.stage-badge.completed {
    background-color: #F0FFF4;
    color: #276749;
}

/* Section Grid Cards (Dashboard) */
.section-grid-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
}

.section-grid-card:hover {
    color: inherit;
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);

}

.section-grid-card.empty {
    opacity: 0.55;
    cursor: default;
}

.section-grid-card.empty:hover {
    transform: none;
    box-shadow: var(--shadow-card);
    border-color: transparent;
}

.section-grid-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.section-grid-card h5 {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.section-grid-meta {
    font-size: 0.8rem;
}

.section-grid-arrow {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.section-grid-card:not(.empty):not(.user-locked):hover .section-grid-arrow {
    color: var(--color-blue);
}

.section-grid-card.user-locked {
    opacity: 0.55;
    cursor: not-allowed;
}

.section-grid-card.user-locked:hover {
    transform: none;
    box-shadow: var(--shadow-card);
}

.section-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--color-white);
    background: var(--gradient-primary);
    flex-shrink: 0;
}

/* Page Grid Cards (Section detail) */
.page-grid-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border: 2px solid transparent;
}

.page-grid-card:hover {
    color: inherit;
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-4px);
    border-color: var(--color-light-blue);
}

.page-grid-card.locked {
    opacity: 0.55;
    cursor: not-allowed;
}

.page-grid-card.locked:hover {
    transform: none;
    box-shadow: var(--shadow-card);
    border-color: transparent;
}


.page-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--color-white);
    background: var(--gradient-primary);
    margin-bottom: 1rem;
}

.page-grid-card.locked .page-card-icon {
    background: #CBD5E0;
}


.page-grid-card h6 {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.page-grid-card p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* Section empty state */
.section-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-text-muted);
}

.section-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.4;
}

.section-empty p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Section Header */
.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--color-text-muted);
    font-size: 1rem;
}

/* Breadcrumb */
.breadcrumb-custom {
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-custom .breadcrumb-item a {
    color: var(--color-light-blue);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-custom .breadcrumb-item.active {
    color: var(--color-text-muted);
}

/* Buttons */
.btn-primary-custom {
    background: var(--gradient-primary);
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    color: var(--color-white);
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(43, 108, 176, 0.35);
    color: var(--color-white);
}

.btn-outline-custom {
    border: 2px solid var(--color-blue);
    color: var(--color-blue);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    background: transparent;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-outline-custom:hover {
    background: var(--color-blue);
    color: var(--color-white);
}

/* Profile */
.profile-card {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.profile-header {
    background: var(--gradient-primary);
    padding: 2rem;
    text-align: center;
    color: var(--color-white);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1rem;
    border: 3px solid rgba(255, 255, 255, 0.4);
}

.profile-body {
    padding: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item i {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-light);
    color: var(--color-blue);
    margin-right: 1rem;
    flex-shrink: 0;
}

.info-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: block;
}

.info-value {
    font-weight: 500;
    font-size: 0.95rem;
}

/* HR Contact Cards */
.hr-contact-card {
    padding: 1rem 1.25rem;
    background: var(--color-bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

.hr-contact-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.hr-contact-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--color-white);
    background: var(--gradient-primary);
    flex-shrink: 0;
}

.hr-contact-role {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    line-height: 1.3;
}

.hr-contact-name {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.hr-contact-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-left: 3.25rem;
}

.hr-contact-detail {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.85rem;
    color: var(--color-blue);
    text-decoration: none;
    transition: var(--transition);
}

.hr-contact-detail:hover {
    color: var(--color-light-blue);
}

.hr-contact-detail i {
    font-size: 0.8rem;
}

/* Company page cards */
.company-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.company-card:hover {
    color: inherit;
}

.company-card .card-icon {
    transition: var(--transition);
}

.company-card:hover .card-icon {
    transform: scale(1.1);
}

/* Content sections */
.content-section {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.content-section h3 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-blue);
}

.content-section h4 {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.content-section p,
.content-section li {
    color: var(--color-text);
    line-height: 1.7;
}

.content-section ul {
    padding-left: 1.25rem;
}

.content-section ul li {
    margin-bottom: 0.5rem;
}

/* Team cards */
.team-card {
    text-align: center;
}

.team-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--color-white);
    margin: 0 auto 1rem;
}

.team-card h6 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.team-card .text-muted {
    font-size: 0.85rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    background: var(--color-blue);
    border-radius: 50%;
    border: 3px solid var(--color-bg-light);
    transform: translateX(-4.5px);
}

.timeline-item h5 {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.timeline-item p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Progress Bar */
.progress-custom {
    height: 8px;
    border-radius: 4px;
    background: #EDF2F7;
}

.progress-custom .progress-bar {
    background: var(--gradient-primary);
    border-radius: 4px;
}

/* Page container */
.page-container {
    padding: 2rem 0 3rem;
}

/* Admin Panel */
.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.5rem;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.admin-save-status {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.admin-save-status.success {
    color: #38A169;
    font-weight: 500;
}

.admin-save-status.error {
    color: #E53E3E;
    font-weight: 500;
}

.admin-sections {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-section {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--color-bg-light);
    border-bottom: 1px solid var(--color-border);
}

.admin-section-header .d-flex {
    gap: 0.75rem;
}

.admin-section-title-input {
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid transparent;
    background: transparent;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    color: var(--color-text);
    transition: var(--transition);
    width: 100%;
    max-width: 320px;
}

.admin-section-title-input:hover {
    border-color: var(--color-border);
    background: var(--color-white);
}

.admin-section-title-input:focus {
    outline: none;
    border-color: var(--color-light-blue);
    background: var(--color-white);
    box-shadow: 0 0 0 3px rgba(77, 168, 218, 0.15);
}

.admin-section-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.admin-section-drag {
    color: var(--color-text-muted);
    cursor: grab;
    padding: 0.25rem;
    font-size: 1rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.admin-section-drag:hover {
    color: var(--color-blue);
}

.sortable-section-ghost {
    opacity: 0.35;
}

.sortable-section-chosen {
    box-shadow: 0 8px 30px rgba(43, 108, 176, 0.2);
}

.btn-admin-delete {
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.375rem;
    border-radius: 6px;
    transition: var(--transition);
    font-size: 0.9rem;
    line-height: 1;
}

.btn-admin-delete:hover {
    color: #E53E3E;
    background: #FFF5F5;
}

.admin-page-count {
    font-size: 0.8rem;
}

.admin-pages-list {
    min-height: 50px;
    padding: 0.75rem;
}

.admin-page-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: var(--color-bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    cursor: grab;
    transition: var(--transition);
}

.admin-page-item:last-child {
    margin-bottom: 0;
}

.admin-page-item:hover {
    border-color: var(--color-light-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.admin-page-item.sortable-ghost {
    opacity: 0.4;
    background: #dbeafe;
}

.admin-page-item.sortable-chosen {
    box-shadow: 0 4px 16px rgba(43, 108, 176, 0.25);
    cursor: grabbing;
}

.admin-page-drag {
    color: var(--color-text-muted);
    cursor: grab;
    flex-shrink: 0;
}

.admin-page-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--color-white);
    background: var(--gradient-primary);
    flex-shrink: 0;
}

.admin-page-info {
    flex: 1;
    min-width: 0;
}

.admin-page-info strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
}

.admin-page-info small {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.admin-page-link {
    flex-shrink: 0;
}

.admin-page-link code {
    font-size: 0.75rem;
    color: var(--color-blue);
    background: rgba(43, 108, 176, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.admin-pages-empty {
    text-align: center;
    padding: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-sm);
    margin: 0.25rem;
}

.admin-pages-empty i {
    margin-right: 0.25rem;
}

.btn-admin-add-section {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background: var(--color-white);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-admin-add-section:hover {
    border-color: var(--color-light-blue);
    color: var(--color-blue);
    background: var(--color-bg-light);
}

/* Select2 overrides */
.select2-container--bootstrap-5 .select2-selection {
    border-radius: 10px !important;
    min-height: 38px;
    border-color: var(--color-border);
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    padding-left: 0.75rem;
    color: var(--color-text);
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-radius: 10px;
    border-color: var(--color-border);
    box-shadow: var(--shadow-card);
}

.select2-container--bootstrap-5 .select2-results__option--highlighted[aria-selected] {
    background: var(--gradient-primary);
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
    border-radius: 8px;
    border-color: var(--color-border);
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--color-light-blue);
    box-shadow: 0 0 0 3px rgba(77, 168, 218, 0.15);
}

/* Contact Cards (team page) */
.contact-card-custom {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--color-bg-light);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.contact-card-custom:hover {
    border-color: var(--color-light-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.contact-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--color-white);
    background: var(--gradient-primary);
    flex-shrink: 0;
}

.contact-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.contact-card-role {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 500;
}

.contact-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.contact-card-position {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.contact-card-dept {
    font-size: 0.8rem;
    color: var(--color-blue);
}

/* Company Tree (public view) */
.company-tree-list {
    list-style: none;
    padding-left: 1.5rem;
    margin: 0;
}

.company-tree-list.company-tree-root {
    padding-left: 0;
}

.company-tree-item {
    position: relative;
    padding: 0.15rem 0;
}

.company-tree-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    cursor: default;
    transition: background 0.15s ease;
    font-size: 0.9rem;
}

.company-tree-label:hover {
    background: rgba(43, 108, 176, 0.05);
}

.company-tree-item.has-children > .company-tree-label {
    cursor: pointer;
    font-weight: 500;
}

.company-tree-arrow {
    font-size: 0.55rem;
    color: var(--color-blue);
    transition: transform 0.2s ease;
    width: 12px;
    text-align: center;
}

.company-tree-item.has-children.open > .company-tree-label .company-tree-arrow {
    transform: rotate(90deg);
}

.company-tree-bullet {
    font-size: 0.25rem;
    color: var(--color-text-muted);
    width: 12px;
    text-align: center;
}

.company-tree-item.has-children > .company-tree-list {
    display: none;
}

.company-tree-item.has-children.open > .company-tree-list {
    display: block;
}

/* Show first two levels by default */
.company-tree-root > .company-tree-item.has-children {
    /* Root items start open */
}

/* Department Tree (admin) */
.dept-tree {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.dept-tree-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--color-border);
    transition: background 0.15s ease;
    cursor: default;
    min-height: 44px;
}

.dept-tree-node:last-child > .dept-tree-item {
    border-bottom: none;
}

.dept-tree-item:hover {
    background: var(--color-bg-light);
}

.dept-tree-item.dept-tree-root {
    background: linear-gradient(135deg, rgba(43, 108, 176, 0.04), rgba(77, 168, 218, 0.04));
    font-weight: 600;
}

.dept-tree-toggle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
}

.dept-tree-toggle:not(.dept-tree-no-toggle):hover {
    background: rgba(43, 108, 176, 0.1);
}

.dept-tree-arrow {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    transition: transform 0.2s ease;
}

.dept-tree-node.collapsed > .dept-tree-item .dept-tree-arrow {
    transform: rotate(-90deg);
}

.dept-tree-dot {
    font-size: 0.3rem;
    color: var(--color-border);
}

.dept-tree-no-toggle {
    cursor: default;
}

.dept-tree-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--color-white);
    background: var(--gradient-primary);
    flex-shrink: 0;
}

.dept-tree-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.dept-tree-name {
    font-size: 0.9rem;
    line-height: 1.3;
    word-break: break-word;
}

.dept-tree-short {
    font-size: 0.7rem;
    font-weight: 500;
}

.dept-tree-count {
    font-size: 0.7rem;
    font-weight: 600;
}

.dept-tree-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.dept-tree-item:hover .dept-tree-actions {
    opacity: 1;
}

.dept-tree-actions .btn {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1;
}

.dept-tree-children {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.dept-tree-node.collapsed > .dept-tree-children {
    display: none;
}

/* Indentation guide lines */
.dept-tree-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
}

.dept-tree-node {
    position: relative;
}

/* Vehicle Gallery */
.vehicle-gallery {
    margin-bottom: 1.5rem;
}

.vehicle-slide {
    display: flex;
    gap: 2rem;
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 1rem;
}

.vehicle-slide-image {
    flex: 0 0 72%;
    max-width: 72%;
    background: #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 350px;
}

.vehicle-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.vehicle-slide-info {
    flex: 1;
    padding: 2rem 2rem 2rem 0;
    display: flex;
    flex-direction: column;
}

.vehicle-type {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-blue);
    background: rgba(43, 108, 176, 0.08);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    margin-bottom: 0.75rem;
    align-self: flex-start;
}

.vehicle-slide-info h3 {
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.vehicle-slide-info p {
    color: var(--color-text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
    flex: 1;
}

.vehicle-counter {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.vehicle-counter .js-vehicle-current {
    color: var(--color-blue);
    font-size: 1.1rem;
}

.vehicle-nav {
    display: flex;
    gap: 0.5rem;
}

.vehicle-nav-btn {
    width: 44px;
    height: 44px;
    border: 2px solid var(--color-border);
    background: var(--color-white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.vehicle-nav-btn:hover {
    border-color: var(--color-blue);
    color: var(--color-blue);
    background: var(--color-bg-light);
}

.vehicle-thumbs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--color-border) transparent;
}

.vehicle-thumbs::-webkit-scrollbar {
    height: 6px;
}

.vehicle-thumbs::-webkit-scrollbar-track {
    background: transparent;
}

.vehicle-thumbs::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.vehicle-thumb {
    flex: 0 0 100px;
    height: 64px;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #f0f4f8;
    padding: 0;
    transition: var(--transition);
}

.vehicle-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-thumb:hover {
    border-color: var(--color-light-blue);
}

.vehicle-thumb.active {
    border-color: var(--color-blue);
    box-shadow: 0 0 0 2px rgba(43, 108, 176, 0.2);
}

/* Activity Log Badges */
.log-action-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
    border-radius: 50px;
    font-weight: 500;
    white-space: nowrap;
}

#logsTable td {
    vertical-align: middle;
    font-size: 0.9rem;
}

#logsTable thead th {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    border-bottom-width: 2px;
    white-space: nowrap;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }
.animate-delay-6 { animation-delay: 0.6s; }

/* Responsive */
@media (max-width: 768px) {
    .welcome-content h1 {
        font-size: 2rem;
    }

    .welcome-content p {
        font-size: 1rem;
    }

    .welcome-icon {
        font-size: 3rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    .profile-header {
        padding: 1.5rem;
    }

    .page-container {
        padding: 1.5rem 0 2rem;
    }

    .vehicle-slide {
        flex-direction: column;
    }

    .vehicle-slide-image {
        flex: none;
        max-width: 100%;
        min-height: 220px;
    }

    .vehicle-slide-info {
        padding: 1.5rem;
    }

    .section-page-card {
        flex-wrap: wrap;
    }

    .page-card-status {
        width: 100%;
        margin-top: 0.5rem;
    }

    .admin-page-item {
        flex-wrap: wrap;
    }

    .admin-page-link {
        width: 100%;
        margin-top: 0.25rem;
    }
}

@media (max-width: 576px) {
    .welcome-content h1 {
        font-size: 1.75rem;
    }

    .btn-welcome {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    .card-custom .card-body {
        padding: 1.25rem;
    }

    .section-accordion-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}
