/* Client Portal Styles - HRMG Brand */
.hrmg-cp-portal-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    padding-bottom: 80px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background: #f8f9fa;
    box-sizing: border-box;
}

.portal-header {
    background: #1a1a1a !important;
    color: #fff;
    padding: 25px 0;
    margin-bottom: 0 !important;
    border-bottom: 4px solid #ff6b35;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
}

.portal-header + .project-stage-progress {
    margin-top: 0;
}

.portal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ff6b35 0%, #ff8c5a 50%, #ff6b35 100%);
}

.portal-header::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 107, 53, 0.3) 50%, transparent 100%);
    z-index: 1;
}

.project-stage-progress {
    margin-top: -2px;
    position: relative;
    z-index: 0;
}

.portal-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    gap: 40px;
}

.portal-logo {
    flex-shrink: 0;
}

.hrmg-logo {
    height: 90px;
    width: auto;
    display: block;
}

.portal-header-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.portal-title-group {
    flex: 1;
}

/* Client portal header - ensure font size is 26px */
.hrmg-cp-portal-wrapper .portal-header h1 {
    margin: 0 0 6px 0;
    color: #fff;
    font-size: 26px !important;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    letter-spacing: -0.3px;
}

.portal-client-name {
    margin: 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.portal-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-header .back-link,
.portal-header .logout-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    padding: 10px 18px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    display: inline-flex;
    align-items: center;
    height: 40px;
    box-sizing: border-box;
}

.portal-header .back-link:hover,
.portal-header .logout-link:hover {
    color: #fff;
    background: rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.4);
    text-decoration: none;
}

.portal-header .logout-link {
    background: rgba(255, 107, 53, 0.15);
    border-color: rgba(255, 107, 53, 0.3);
}

/* Notification Bell Styles */
.hrmg-cp-notification-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.hrmg-cp-notification-bell {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s ease;
    position: relative;
}

.hrmg-cp-notification-bell:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hrmg-cp-notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    min-width: 320px;
    z-index: 1000;
    overflow: hidden;
}

.hrmg-cp-notification-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 16px;
    width: 16px;
    height: 16px;
    background: #1a1a1a;
    transform: rotate(45deg);
    border-radius: 2px;
}

/* Checkbox styling for notification preferences */
.hrmg-cp-notification-dropdown input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.hrmg-cp-notification-dropdown input[type="checkbox"]:checked {
    background: #ff6b35;
    border-color: #ff6b35;
}

.hrmg-cp-notification-dropdown input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.hrmg-cp-notification-dropdown label:hover {
    border-color: #ff6b35 !important;
}

.portal-header .logout-link:hover {
    background: rgba(255, 107, 53, 0.3);
    border-color: #ff6b35;
}

/* Light header styles */
.portal-header-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
    color: #333;
}

.portal-header-light::before {
    background: linear-gradient(90deg, #ff6b35 0%, #ff8c5a 50%, #ff6b35 100%);
}

.portal-header-light::after {
    background: linear-gradient(90deg, transparent 0%, rgba(255, 107, 53, 0.3) 50%, transparent 100%);
}

.portal-header-light h1 {
    color: #1a1a1a;
}

.portal-header-light .portal-client-name {
    color: #666;
}


.portal-subtitle {
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Light header subtitle override */
.portal-header-light .portal-subtitle {
    color: #666;
}

/* Project Stage Progress Tracker */
.project-stage-progress {
    background: #f5f5f5;
    border-bottom: 1px solid #e8e8e8;
    padding: 12px 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-top: -2px;
    position: relative;
    z-index: 0;
}

.project-stage-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stage-item {
    font-size: 14px;
    font-weight: 500;
    color: #bbb;
    padding: 4px 8px;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    white-space: nowrap;
}

.stage-item.active {
    color: #4caf50;
    font-weight: 600;
}

.stage-arrow {
    font-size: 16px;
    color: #ddd;
    padding: 0 4px;
    transition: all 0.3s ease;
    display: inline-block;
}

.stage-arrow.active {
    color: #4caf50;
    font-weight: bold;
}

@media (max-width: 768px) {
    .project-stage-progress {
        padding: 10px 20px;
    }
    
    .project-stage-content {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .stage-item {
        font-size: 12px;
        padding: 3px 6px;
    }
    
    .stage-arrow {
        font-size: 14px;
    }
}

/* Tab Navigation Container */
.hrmg-cp-tabs-container {
    background: #fff;
    margin: 0 auto;
    max-width: 1400px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    margin-bottom: 0;
    position: relative;
}

/* Tab Navigation - Client portal only (target tabs-container which is only in client portal) */
.hrmg-cp-tabs-container .hrmg-cp-manage-tabs {
    display: flex;
    border-bottom: 3px solid #ff6b35;
    margin-top: 60px !important;
    margin-bottom: 0 !important;
    margin-left: 0;
    margin-right: 0;
    background: #fff;
    padding: 0;
    position: relative;
    overflow-x: visible;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.hrmg-cp-tab-button {
    padding: 18px 30px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    margin-right: 5px;
    margin-bottom: -3px;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    white-space: nowrap;
    outline: none;
}

.hrmg-cp-tab-button:focus {
    outline: none;
    box-shadow: none;
}

.hrmg-cp-tab-button:hover {
    color: #ff6b35;
    background: rgba(255, 107, 53, 0.08);
}

.hrmg-cp-tab-button.active {
    background: transparent;
    border-bottom-color: #ff6b35;
    color: #ff6b35;
    font-weight: 600;
}

.hrmg-cp-tab-button.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #ff6b35;
}

/* Tab badges - show count when there's something to see */
.hrmg-cp-tabs-container .hrmg-cp-tab-badge {
    display: inline-block;
    background: #ff6b35;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

.hrmg-cp-tab-content {
    display: none;
    padding: 30px 40px;
    background: #f8f9fa;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 1400px;
    margin-top: 0;
    position: relative;
}

/* Connect tabs to content - extend shadow and remove gap */
.hrmg-cp-tabs-container ~ .hrmg-cp-tab-content {
    margin-top: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

/* Connect tabs to content - remove gap and extend shadow */
.hrmg-cp-tabs-container ~ .hrmg-cp-tab-content {
    margin-top: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.hrmg-cp-tab-content.active {
    display: block;
    min-height: 700px;
}

/* Portal Access Indicator with Tooltip */
.portal-access-indicator {
    position: relative;
    display: inline-block;
    cursor: help;
}

.portal-access-indicator:hover::after {
    content: 'Portal Access';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 6px 10px;
    background-color: #333;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 4px;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.portal-access-indicator:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1001;
    pointer-events: none;
}

.hrmg-cp-tab-content h3 {
    color: #333;
    font-size: 24px;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6b35;
}

/* Team Member Cards - base definitions (overridden in contacts tab section) */

/* Hamburger Menu Button - Mobile */
.hrmg-cp-menu-toggle {
    display: none;
    background: #ff6b35;
    color: #fff;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    margin-bottom: 15px;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.hrmg-cp-menu-toggle:hover {
    background: #ff8c5a;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.hrmg-cp-menu-toggle.active {
    background: #e55a25;
}

.hrmg-cp-menu-toggle-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
    height: 20px;
}

.hrmg-cp-menu-toggle-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hrmg-cp-menu-toggle.active .hrmg-cp-menu-toggle-icon span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hrmg-cp-menu-toggle.active .hrmg-cp-menu-toggle-icon span:nth-child(2) {
    opacity: 0;
}

.hrmg-cp-menu-toggle.active .hrmg-cp-menu-toggle-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu Container */
.hrmg-cp-mobile-menu {
    display: none;
    background: #fff;
    border: 2px solid #ff6b35;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}

.hrmg-cp-mobile-menu.active {
    display: block;
    max-height: 1000px;
    padding: 15px;
    margin-bottom: 20px;
}

.hrmg-cp-mobile-menu .hrmg-cp-tab-button {
    display: block;
    width: 100%;
    padding: 14px 20px;
    margin: 0 0 8px 0;
    border-radius: 6px;
    border-bottom: none;
    text-align: left;
    background: #f8f9fa;
    border-left: 4px solid transparent;
    outline: none;
}

.hrmg-cp-mobile-menu .hrmg-cp-tab-button:focus {
    outline: none;
    box-shadow: none;
}

.hrmg-cp-mobile-menu .hrmg-cp-tab-button:hover {
    background: rgba(255, 107, 53, 0.1);
    border-left-color: #ff6b35;
}

.hrmg-cp-mobile-menu .hrmg-cp-tab-button.active {
    background: rgba(255, 107, 53, 0.15);
    border-left-color: #ff6b35;
    border-bottom-color: transparent;
}

.hrmg-cp-mobile-menu .hrmg-cp-tab-button.active::before {
    display: none;
}

@media (max-width: 768px) {
    .hrmg-cp-menu-toggle {
        display: flex;
    }
    
    .hrmg-cp-manage-tabs {
        display: none;
    }
    
    .hrmg-cp-mobile-menu.active {
        display: block;
    }
    
    .hrmg-cp-tab-button {
        padding: 14px 20px;
        font-size: 14px;
        flex: 1 1 auto;
        min-width: 0;
    }
    
    .hrmg-cp-tab-content {
        padding: 20px;
    }
    
    .hrmg-cp-team-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .hrmg-cp-tab-button {
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* Project Switcher Dropdown */
.hrmg-project-switcher {
    position: relative;
    display: inline-block;
}

.hrmg-project-switcher-btn {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    padding: 10px 18px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    box-sizing: border-box;
    cursor: pointer;
}

.hrmg-project-switcher-btn:hover,
.hrmg-project-switcher-btn.active {
    color: #fff;
    background: rgba(255, 107, 53, 0.2);
    border-color: rgba(255, 107, 53, 0.4);
}

.hrmg-project-switcher-btn .switcher-arrow {
    transition: transform 0.2s ease;
}

.hrmg-project-switcher-btn.active .switcher-arrow {
    transform: rotate(180deg);
}

.hrmg-project-switcher-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    max-width: 350px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 10000;
    overflow: hidden;
}

.hrmg-project-switcher-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.project-dropdown-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 0;
}

.project-dropdown-item {
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    transition: all 0.15s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.project-dropdown-item:hover {
    background: #f8f9fa;
    border-left-color: #ff6b35;
}

.project-dropdown-item.current {
    background: rgba(255, 107, 53, 0.08);
    border-left-color: #ff6b35;
}

.project-dropdown-item .project-name {
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 2px;
}

.project-dropdown-item .project-client {
    font-size: 12px;
    color: #666;
}

.project-dropdown-item .current-indicator {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff6b35;
    font-weight: bold;
}

.project-dropdown-empty {
    padding: 20px 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.project-dropdown-footer {
    border-top: 1px solid #e8e8e8;
    padding: 8px;
    background: #fafafa;
}

.new-project-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: #ff6b35;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.new-project-btn:hover {
    background: #e55a25;
    color: #fff;
    text-decoration: none;
}

.new-project-btn svg {
    flex-shrink: 0;
}

/* Scrollbar for project list */
.project-dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.project-dropdown-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.project-dropdown-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.project-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Mobile responsive for project switcher */
@media (max-width: 768px) {
    .hrmg-project-switcher-dropdown {
        min-width: 260px;
        right: -10px;
    }
    
    .project-dropdown-list {
        max-height: 250px;
    }
}

@media (max-width: 480px) {
    .hrmg-project-switcher-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        min-width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
    }
    
    .hrmg-project-switcher-dropdown.active {
        transform: translateY(0);
    }
    
    .project-dropdown-list {
        max-height: 50vh;
    }
}

.portal-content {
    display: grid;
    gap: 30px;
    padding: 30px 40px;
    background: #f8f9fa;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure tab content has proper background */
.hrmg-cp-tab-content {
    background: #f8f9fa;
    min-height: 400px;
}

.hrmg-cp-manage-project {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.portal-section {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-left: 5px solid #ff6b35;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    margin-bottom: 30px;
}

.portal-section:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* Tasks tab: no outer card styling or hover - only individual task cards react */
.portal-section-tasks {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    margin-bottom: 30px;
}

.portal-section-tasks:hover {
    box-shadow: none;
    transform: none;
}

/* Project Summary Section */
.portal-summary-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.portal-summary-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.portal-summary-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.portal-summary-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 107, 53, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.portal-summary-icon svg {
    fill: #ff6b35;
}

.portal-summary-title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 2px 0;
    border-bottom: none;
    padding-bottom: 0;
    letter-spacing: -0.3px;
}

.portal-summary-title::after {
    display: none;
}

.portal-summary-meta {
    color: rgba(255,255,255,0.45);
    font-size: 13px;
    margin: 0;
    font-weight: 400;
}

.portal-summary-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.55);
    font-size: 11px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.portal-summary-body {
    padding: 28px 28px 24px;
}

.portal-summary-body p {
    color: #444;
    font-size: 15px;
    line-height: 1.75;
    margin: 0 0 16px 0;
}

.portal-summary-body p:last-child {
    margin-bottom: 0;
}

.portal-summary-body p:first-child::first-line {
    font-weight: 600;
    color: #1a1a1a;
}

.portal-summary-footer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 28px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    color: #aaa;
    font-size: 12px;
    line-height: 1.5;
}

.portal-summary-footer svg {
    flex-shrink: 0;
    margin-top: 1px;
    fill: #ccc;
}

@media (max-width: 768px) {
    .portal-summary-header {
        padding: 18px 20px;
    }
    
    .portal-summary-body {
        padding: 20px 20px 18px;
    }
    
    .portal-summary-footer {
        padding: 12px 20px;
    }
    
    .portal-summary-title {
        font-size: 18px;
    }
}

.portal-section h2 {
    margin-top: 0;
    margin-bottom: 30px;
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    padding-bottom: 15px;
    position: relative;
    border-bottom: 2px solid #e8e8e8;
}

.portal-section h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 3px;
    background: #ff6b35;
}

.portal-section h3 {
    margin-top: 20px;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

/* Task list headings should be smaller */
.tasks-list h3 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 12px;
    color: #1a1a1a;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.tasks-list h3:first-child {
    margin-top: 0;
}

/* Status Badges - HRMG Brand */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-active,
.status-badge.status-signed,
.status-badge.status-paid {
    background: #4caf50;
    color: #fff;
}

.status-badge.status-pending,
.status-badge.status-sent {
    background: #ff6b35;
    color: #fff;
}

.status-badge.status-completed {
    background: #2196f3;
    color: #fff;
}

.status-badge.status-on_hold {
    background: #9e9e9e;
    color: #fff;
}

.status-badge.status-blocked {
    background: #dc3545;
    color: #fff;
}

.status-badge.status-closed {
    background: #6c757d;
    color: #fff;
}

/* Tables */
.portal-table,
.hrmg-cp-manage-project table,
.hrmg-cp-manage-project .wp-list-table,
.hrmg-cp-manage-project .widefat {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    box-sizing: border-box;
    table-layout: auto;
}

.portal-table thead,
.hrmg-cp-manage-project table thead,
.hrmg-cp-manage-project .wp-list-table thead,
.hrmg-cp-manage-project .widefat thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f0f0 100%);
}

.portal-table th,
.hrmg-cp-manage-project table th,
.hrmg-cp-manage-project .wp-list-table th,
.hrmg-cp-manage-project .widefat th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #ff6b35;
    box-sizing: border-box;
}

.portal-table td,
.hrmg-cp-manage-project table td,
.hrmg-cp-manage-project .wp-list-table td,
.hrmg-cp-manage-project .widefat td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    font-size: 14px;
    box-sizing: border-box;
}

.portal-table tbody tr,
.hrmg-cp-manage-project table tbody tr,
.hrmg-cp-manage-project .wp-list-table tbody tr,
.hrmg-cp-manage-project .widefat tbody tr {
    transition: background-color 0.2s ease;
}

.portal-table tbody tr:hover,
.hrmg-cp-manage-project table tbody tr:hover,
.hrmg-cp-manage-project .wp-list-table tbody tr:hover,
.hrmg-cp-manage-project .widefat tbody tr:hover {
    background: #fafafa;
}

.portal-table tbody tr:last-child td,
.hrmg-cp-manage-project table tbody tr:last-child td,
.hrmg-cp-manage-project .wp-list-table tbody tr:last-child td,
.hrmg-cp-manage-project .widefat tbody tr:last-child td {
    border-bottom: none;
}

/* Buttons - HRMG Brand */
.button-small {
    display: inline-block;
    padding: 10px 18px;
    background: #ff6b35;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(255, 107, 53, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.button-small:hover {
    background: #ff8c5a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.35);
}

.button-small.button-primary {
    background: #ff6b35;
}

.button-small.button-primary:hover {
    background: #ff8c5a;
}

.button {
    display: inline-block;
    padding: 14px 28px;
    background: #ff6b35;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(255, 107, 53, 0.25);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.button:hover {
    background: #ff8c5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.4);
}

.button-primary {
    background: #ff6b35;
}

.button-primary:hover {
    background: #ff8c5a;
}



/* Tasks */
.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.task-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border-color: #ddd;
}

.task-item-inner {
    display: flex;
    gap: 16px;
    padding: 18px 20px;
}

.task-priority-indicator {
    width: 4px;
    border-radius: 4px;
    flex-shrink: 0;
    align-self: stretch;
    background: #ff6b35;
}

.task-priority-indicator.priority-high {
    background: #e74c3c;
}

.task-priority-indicator.priority-urgent {
    background: #d32f2f;
}

.task-priority-indicator.priority-normal {
    background: #ff6b35;
}

.task-item-content {
    flex: 1;
    min-width: 0;
}

.task-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}

.task-title {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    line-height: 1.4;
    margin: 0;
}

.task-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.task-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.task-badge-status {
    background: #f5f5f5;
    color: #666;
}

.task-badge-due {
    background: #fff8e1;
    color: #f57f17;
}

.task-badge-due.due-today {
    background: #e3f2fd;
    color: #1565c0;
}

.task-badge-due.overdue {
    background: #fce4ec;
    color: #c62828;
}

.task-badge-priority-high {
    background: #fce4ec;
    color: #c62828;
}

.task-badge-priority-medium {
    background: #fff3e0;
    color: #e65100;
}

.task-badge-assigned {
    background: #e3f2fd;
    color: #1565c0;
}

.task-badge-delegated {
    background: #f3e5f5;
    color: #7b1fa2;
}

.task-description {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin: 4px 0 0 0;
}

.task-subtasks-section {
    margin-top: 12px;
    background: #fafafa;
    border-radius: 8px;
    padding: 12px 14px;
}

.task-subtasks-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.task-progress-bar {
    flex: 1;
    max-width: 120px;
    height: 5px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.task-progress-fill {
    height: 100%;
    background: #4caf50;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.task-progress-label {
    font-size: 11px;
    color: #888;
    font-weight: 600;
}

.task-subtask-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 4px 16px;
}

.task-subtask-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    font-size: 13px;
    color: #444;
    line-height: 1.4;
}

.task-subtask-item.completed {
    color: #aaa;
    text-decoration: line-through;
}

.task-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    gap: 12px;
    flex-wrap: wrap;
}

.task-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.task-delegate-btn {
    background: #f5f5f5;
    color: #6b6b6b;
    border: 1px solid #e0e0e0;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.task-delegate-btn:hover {
    background: #e8e8e8;
    color: #7b1fa2;
    border-color: #ce93d8;
}

.task-complete-btn {
    background: #4caf50;
    color: #fff;
    border: none;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s, opacity 0.2s;
}

.task-complete-btn:hover {
    background: #43a047;
}

.task-complete-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

li.hrmg-cp-subtask-toggle {
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

li.hrmg-cp-subtask-toggle:hover {
    background: rgba(0,0,0,0.04);
}

.task-item.task-completed {
    border-color: #e8e8e8;
    background: #fcfcfc;
}

.task-item.task-completed .task-title {
    color: #999;
}

.task-item.task-completed .task-priority-indicator {
    background: #4caf50;
}

.task-completed-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-completed-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
}

.task-completed-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.task-completed-title {
    flex: 1;
    font-size: 14px;
    color: #888;
    text-decoration: line-through;
}

.task-completed-date {
    font-size: 12px;
    color: #aaa;
    flex-shrink: 0;
}

.task-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.task-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-section-count {
    background: #f0f0f0;
    color: #666;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
}

/* Team Members */
.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    padding: 15px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #ff6b35;
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 8px;
}

/* Team Member Contact Cards - Contacts Tab */
/* ---------- CONTACTS TAB ---------- */
#tab-contacts .portal-section {
    margin-bottom: 48px;
}

#tab-contacts .portal-section:last-child {
    margin-bottom: 0;
}

#tab-contacts .hrmg-cp-team-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

#tab-contacts .hrmg-cp-team-header h2 {
    margin: 0;
}

#tab-contacts .hrmg-cp-add-team-member {
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    letter-spacing: 0.3px;
}

.hrmg-cp-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 0;
}

.team-member-card {
    background: #fff;
    border: 1px solid #eaedf0;
    border-radius: 14px;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.team-member-card::before {
    display: none;
}

.team-member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    border-color: #d5d9de;
}

/* Card header with avatar */
.team-member-card .card-header-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 24px 0 24px;
}

.team-member-card .card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: -0.5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.team-member-card .card-identity {
    min-width: 0;
    flex: 1;
}

.team-member-card .card-name {
    font-weight: 700;
    font-size: 16px;
    color: #1a1f2e;
    line-height: 1.3;
    margin-bottom: 2px;
}

.team-member-card .card-title {
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.1px;
}

/* Badges */
.team-member-card .card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 24px 0 24px;
}

.team-member-card .hrmg-cp-contact-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.team-member-card .hrmg-cp-contact-badge--primary {
    background: linear-gradient(135deg, #ff6b35 0%, #e55a25 100%);
    color: #fff;
}

.team-member-card .hrmg-cp-contact-badge--portal {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.team-member-card .hrmg-cp-contact-badge--deactivated {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Contact info section */
.team-member-card .card-contact-info {
    padding: 16px 24px 24px 24px;
    margin-top: 16px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
}

.team-member-card a.card-contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #4b5563;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
    margin: 0 -10px;
    line-height: 1.4;
}

.team-member-card a.card-contact-row:hover {
    background: #fff5f0;
    color: #ea580c;
}

.team-member-card .card-contact-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f8f9fa;
    color: #9ca3af;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.team-member-card a.card-contact-row:hover .card-contact-icon {
    background: #ffedd5;
    color: #ea580c;
}

.team-member-card a.card-contact-row span:last-child {
    word-break: break-word;
    min-width: 0;
}

/* Deactivated card state */
.team-member-card.card--deactivated {
    opacity: 0.65;
}

.team-member-card.card--deactivated:hover {
    opacity: 1;
}

/* Actions */
.team-member-card .card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 24px 20px 24px;
}

.team-member-card .card-actions .hrmg-cp-portal-deactivate-contact,
.team-member-card .card-actions .hrmg-cp-portal-reactivate-contact {
    padding: 7px 16px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    cursor: pointer;
}

.team-member-card .card-actions .hrmg-cp-portal-remove-contact {
    padding: 7px 16px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #9ca3af;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.team-member-card .card-actions .hrmg-cp-portal-remove-contact:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

@media (max-width: 768px) {
    .hrmg-cp-team-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- HEADSHOT AVATARS ---------- */
.team-member-card .card-avatar {
    position: relative;
    overflow: hidden;
}

.team-member-card .card-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.team-member-card .card-avatar--has-image {
    padding: 0;
}

.team-member-card .card-avatar--editable {
    cursor: pointer;
}

.card-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: #fff;
}

.card-avatar--editable:hover .card-avatar-overlay {
    opacity: 1;
}

/* Invoice Detail */
.invoice-detail {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Invoice Detail Modal */
#hrmg-cp-invoice-detail-modal .invoice-detail-modal-content {
    max-height: 80vh;
    overflow-y: auto;
}

#hrmg-cp-invoice-detail-modal .invoice-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

#hrmg-cp-invoice-detail-modal .invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

#hrmg-cp-invoice-detail-modal .invoice-items-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

#hrmg-cp-invoice-detail-modal .invoice-items-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

#hrmg-cp-invoice-detail-modal .invoice-items-table tfoot {
    font-weight: 600;
}

#hrmg-cp-invoice-detail-modal .invoice-items-table .text-right {
    text-align: right;
}

#hrmg-cp-invoice-detail-modal .invoice-items-table .total-row {
    border-top: 2px solid #333;
}

#hrmg-cp-invoice-detail-modal .hrmg-cp-download-invoice-pdf {
    background: #ff6b35;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

#hrmg-cp-invoice-detail-modal .hrmg-cp-download-invoice-pdf:hover {
    background: #e55a2b;
}

#hrmg-cp-invoice-detail-modal .hrmg-cp-download-invoice-pdf:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.invoice-items-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.invoice-items-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.invoice-items-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.invoice-items-table tfoot {
    font-weight: 600;
}

.invoice-items-table .text-right {
    text-align: right;
}

.invoice-items-table .total-row {
    border-top: 2px solid #ddd;
}

.invoice-items-table .balance-row {
    border-top: 2px solid #ff6b35;
}

.balance-due {
    color: #e74c3c;
}

.balance-paid {
    color: #4caf50;
}

.overdue {
    color: #e74c3c;
    font-weight: 600;
}

/* Payment Modal */
.hrmg-cp-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.hrmg-cp-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.hrmg-cp-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
    z-index: 10001;
    pointer-events: auto;
}

.hrmg-cp-modal-close:hover {
    color: #000;
}

/* Add Team Member Modal */
.hrmg-cp-add-member-modal-content {
    max-width: 560px;
    padding: 0;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.add-member-modal-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 32px 36px 28px;
    text-align: center;
}

.add-member-modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 107, 53, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.hrmg-cp-add-member-modal-content .add-member-modal-header h2,
.hrmg-cp-modal-content.hrmg-cp-add-member-modal-content h2 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px 0;
    border-bottom: none;
    padding-bottom: 0;
    padding-right: 0;
    position: static;
}

.hrmg-cp-add-member-modal-content .add-member-modal-header h2::after,
.hrmg-cp-modal-content.hrmg-cp-add-member-modal-content h2::after {
    display: none;
    content: none;
}

.add-member-modal-subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.hrmg-cp-add-member-modal-content form {
    padding: 28px 36px 32px;
}

.add-member-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.add-member-form-row .hrmg-cp-task-form-section {
    margin-bottom: 20px;
}

.hrmg-cp-add-member-modal-content .hrmg-cp-form-input {
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid #e8e8e8;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fafafa;
}

.hrmg-cp-add-member-modal-content .hrmg-cp-form-input:focus {
    background: #fff;
    border-color: #ff6b35;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.08);
}

.hrmg-cp-add-member-modal-content .hrmg-cp-form-input::placeholder {
    color: #bbb;
}

.hrmg-cp-add-member-modal-content .hrmg-cp-form-label {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.add-member-portal-toggle {
    background: #f8f9fa;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 0;
    transition: border-color 0.2s ease;
}

.add-member-portal-toggle:has(input:checked) {
    border-color: #ff6b35;
    background: #fff8f5;
}

.add-member-toggle-label {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    cursor: pointer;
    margin: 0;
}

.add-member-toggle-switch {
    position: relative;
    width: 44px;
    min-width: 44px;
    height: 24px;
    margin-top: 2px;
}

.add-member-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.add-member-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: background 0.25s ease;
    cursor: pointer;
}

.add-member-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.add-member-toggle-switch input:checked + .add-member-toggle-slider {
    background: #ff6b35;
}

.add-member-toggle-switch input:checked + .add-member-toggle-slider::before {
    transform: translateX(20px);
}

.add-member-toggle-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.add-member-toggle-text .toggle-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.add-member-toggle-text .toggle-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.4;
}

.hrmg-cp-add-member-modal-content .hrmg-cp-task-form-actions {
    margin-top: 28px;
    padding-top: 24px;
    justify-content: flex-end;
}

.hrmg-cp-add-member-modal-content .hrmg-cp-button-primary {
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
}

.hrmg-cp-add-member-modal-content .hrmg-cp-button-secondary {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
}

.hrmg-cp-add-member-modal-content .hrmg-cp-modal-close {
    color: rgba(255,255,255,0.45) !important;
    right: 16px;
    top: 16px;
    font-size: 28px;
    transition: color 0.2s ease, background 0.2s ease;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    border: none;
    cursor: pointer;
    padding: 0;
}

.hrmg-cp-add-member-modal-content .hrmg-cp-modal-close:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.15);
}

@media (max-width: 600px) {
    .add-member-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .hrmg-cp-add-member-modal-content {
        margin: 5% auto;
        width: 95%;
        border-radius: 12px;
    }
    
    .add-member-modal-header {
        padding: 24px 20px 20px;
    }
    
    .hrmg-cp-add-member-modal-content form {
        padding: 20px 20px 24px;
    }
}

#hrmg-cp-payment-element {
    margin: 20px 0;
}

#hrmg-cp-payment-errors {
    color: #e74c3c;
    margin: 10px 0;
    font-size: 14px;
}

/* No Items */
.no-items {
    color: #999;
    font-style: italic;
    padding: 20px;
    text-align: center;
}

/* Portal Footer */
.portal-footer {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 50%, #2a2a2a 100%);
    color: #fff;
    padding: 30px 40px;
    margin-top: 0;
    border-top: 4px solid #ff6b35;
    position: relative;
}

.portal-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ff6b35 0%, #ff8c5a 50%, #ff6b35 100%);
}

.portal-footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.portal-footer-links {
    display: flex;
    gap: 25px;
    align-items: center;
    flex-wrap: wrap;
}

.portal-footer-link {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    transition: all 0.2s ease;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    background: transparent !important;
    border: none !important;
    margin: 0 !important;
}

/* Override tab button styles for footer links */
.portal-footer-link.hrmg-cp-tab-button {
    color: rgba(255, 255, 255, 0.85) !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
}

.portal-footer-link.hrmg-cp-tab-button:focus {
    outline: none !important;
    box-shadow: none !important;
}

.portal-footer-link:hover,
.portal-footer-link.hrmg-cp-tab-button:hover {
    color: #ff6b35 !important;
    border-bottom-color: #ff6b35 !important;
    background: transparent !important;
}

/* Active state for footer links with tab functionality */
.portal-footer-link.hrmg-cp-tab-button.active {
    color: #ff6b35 !important;
    border-bottom-color: #ff6b35 !important;
    background: transparent !important;
    border-top: none !important;
}

.portal-footer-link.hrmg-cp-tab-button.active::before {
    display: none !important;
}

.portal-footer-info {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    text-align: right;
}

.portal-footer-info a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
}

.portal-footer-info a:hover {
    color: #ff6b35;
}

/* Security Disclaimer Modal */
.hrmg-cp-security-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.hrmg-cp-security-modal-content {
    background-color: #fff;
    margin: 4% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 640px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: modalFadeIn 0.3s ease;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hrmg-cp-security-modal-close {
    color: rgba(255,255,255,0.5);
    float: right;
    font-size: 24px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 20px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    z-index: 2;
    background: none;
    border: none;
    padding: 4px;
}

.hrmg-cp-security-modal-close:hover {
    color: #fff;
}

.security-modal-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 36px 40px 32px;
    text-align: center;
}

.security-modal-shield {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(76, 175, 80, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.security-modal-header h2 {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px 0;
    border-bottom: none;
    padding-bottom: 0;
    padding-right: 0;
}

.security-modal-header h2::after {
    display: none;
}

.security-modal-header p {
    color: rgba(255,255,255,0.55);
    font-size: 15px;
    margin: 0;
    line-height: 1.5;
}

.security-modal-body {
    padding: 32px 36px 36px;
}

.security-section {
    margin-bottom: 28px;
}

.security-section:last-of-type {
    margin-bottom: 24px;
}

.security-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px 0;
    padding-bottom: 0;
    border-bottom: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.security-section p {
    color: #555;
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

.security-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.security-feature-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f8faf8;
    border: 1px solid #e8f0e8;
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.security-feature-card:hover {
    border-color: #c8e6c9;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.08);
}

.security-feature-icon {
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.security-feature-card div:last-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.security-feature-card strong {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.security-feature-card span {
    font-size: 12px;
    color: #777;
    line-height: 1.4;
}

.security-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.security-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.security-checklist li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.security-checklist li svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.security-contact-bar {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff8f5;
    border: 1px solid #ffe0d0;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 0;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.security-contact-icon {
    width: 40px;
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #ffe8dd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.security-contact-bar strong {
    display: block;
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 2px;
}

.security-contact-bar a {
    color: #ff6b35;
    text-decoration: none;
    font-weight: 600;
}

.security-contact-bar a:hover {
    text-decoration: underline;
}

.security-modal-dismiss {
    display: block;
    width: 100%;
    margin-top: 28px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.15s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.security-modal-dismiss:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .hrmg-cp-portal-wrapper {
        padding: 10px;
    }
    
    .portal-header {
        padding: 20px 0;
    }
    
    .portal-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 0 20px;
    }
    
    .portal-logo {
        align-self: center;
    }
    
    .hrmg-logo {
        height: 60px !important;
    }
    
    .portal-header-text {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        width: 100%;
    }
    
    .portal-title-group {
        width: 100%;
    }
    
    .portal-header h1 {
        font-size: 22px;
        margin-bottom: 5px;
    }
    
    .portal-subtitle {
        font-size: 14px;
    }
    
    .portal-table {
        font-size: 14px;
    }
    
    .portal-table th,
    .portal-table td {
        padding: 8px;
    }
    
    .hrmg-cp-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .portal-content {
        padding: 20px;
    }
    
    .portal-section {
        padding: 25px;
    }
    
    .portal-footer {
        padding: 25px 20px;
    }
    
    .portal-footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .portal-footer-links {
        justify-content: center;
        width: 100%;
    }
    
    .portal-footer-info {
        text-align: center;
        width: 100%;
    }
    
    .hrmg-cp-security-modal-content {
        width: 95%;
        margin: 5% auto;
        border-radius: 14px;
    }
    
    .security-modal-header {
        padding: 28px 24px 24px;
    }
    
    .security-modal-body {
        padding: 24px 20px 28px;
    }
    
    .security-features-grid {
        grid-template-columns: 1fr;
    }
    
    .security-modal-header h2 {
        font-size: 20px;
    }
    
    /* Mobile-friendly task tables - convert to cards */
    .hrmg-cp-tasks-table,
    .hrmg-cp-manage-project .wp-list-table.widefat {
        display: block;
        width: 100%;
    }
    
    .hrmg-cp-tasks-table thead,
    .hrmg-cp-manage-project .wp-list-table.widefat thead {
        display: none;
    }
    
    .hrmg-cp-tasks-table tbody,
    .hrmg-cp-manage-project .wp-list-table.widefat tbody {
        display: block;
        width: 100%;
    }
    
    .hrmg-cp-tasks-table tbody tr,
    .hrmg-cp-manage-project .wp-list-table.widefat tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 15px;
        background: #fff;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.08);
        box-sizing: border-box;
    }
    
    .hrmg-cp-tasks-table tbody td,
    .hrmg-cp-manage-project .wp-list-table.widefat tbody td {
        display: flex;
        width: 100% !important;
        padding: 8px 0 !important;
        border: none !important;
        text-align: left !important;
        align-items: flex-start;
        gap: 10px;
    }
    
    .hrmg-cp-tasks-table tbody td:before,
    .hrmg-cp-manage-project .wp-list-table.widefat tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        display: inline-block;
        min-width: 80px;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        flex-shrink: 0;
    }
    
    /* Hide actions label on mobile for task tables */
    .hrmg-cp-tasks-table tbody td:last-child:before,
    .hrmg-cp-manage-project .wp-list-table.widefat tbody td:last-child:before {
        display: none;
    }
    
    /* Actions column should not use flex on mobile */
    .hrmg-cp-tasks-table tbody td:last-child,
    .hrmg-cp-manage-project .wp-list-table.widefat tbody td:last-child {
        display: block;
    }
    
    .hrmg-cp-tasks-table tbody td:last-child > div,
    .hrmg-cp-manage-project .wp-list-table.widefat tbody td:last-child > div {
        margin-left: 0;
    }
    
    /* Project Overview - single column on mobile */
    .overview-content .form-table {
        display: block;
        width: 100%;
    }
    
    .overview-content .form-table tr {
        display: block;
        width: 100%;
        margin-bottom: 20px;
        border-bottom: 1px solid #e0e0e0;
        padding-bottom: 15px;
    }
    
    .overview-content .form-table th {
        display: block;
        width: 100% !important;
        padding: 0 0 8px 0 !important;
        font-weight: 600;
        font-size: 14px;
        color: #1a1a1a;
        text-align: left;
        border: none;
    }
    
    .overview-content .form-table td {
        display: block;
        width: 100% !important;
        padding: 0 !important;
    }
    
    /* Status badges - smaller on mobile */
    .status-badge {
        padding: 4px 10px;
        font-size: 11px;
        display: inline-block;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Task action buttons - stack on mobile */
    .hrmg-cp-tasks-table tbody td:last-child div {
        display: flex;
        gap: 8px;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .hrmg-logo {
        height: 50px !important;
    }
    
    .portal-header h1 {
        font-size: 20px;
    }
    
    .portal-subtitle {
        font-size: 13px;
    }
    
    .portal-section h2 {
        font-size: 22px;
    }
    
    /* Even smaller status badges on very small screens */
    .status-badge {
        padding: 3px 8px;
        font-size: 10px;
    }
}

/* ==========================================
   PHOTO ALBUMS STYLES (Client Portal)
   ========================================== */

/* Albums Section */
.hrmg-cp-albums-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e8e8e8;
}

/* Album Cards Grid */
.hrmg-cp-albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* Album Card */
.hrmg-cp-album-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hrmg-cp-album-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.hrmg-cp-album-card .album-cover {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hrmg-cp-album-card .album-info {
    padding: 15px;
}

.hrmg-cp-album-card .album-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ---------- ALBUM VIEW MODAL ---------- */
.album-view-modal-content {
    background: #fff;
    margin: 3% auto;
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: albumModalSlideIn 0.25s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

@keyframes albumModalSlideIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.album-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    gap: 16px;
}

.album-view-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.album-view-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.album-view-header-info h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    border-bottom: none;
}

.album-view-header-info h2::after {
    display: none;
}

.album-view-header-info p {
    margin: 2px 0 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.album-view-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.album-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.album-action-btn svg {
    flex-shrink: 0;
}

.album-action-upload {
    background: #ff6b35;
    color: #fff;
}

.album-action-upload:hover {
    background: #e85d26;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.35);
}

.album-action-upload:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.album-action-download {
    background: #28a745;
    color: #fff;
}

.album-action-download:hover {
    background: #219a38;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.35);
}

.album-action-edit {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.album-action-edit:hover {
    background: rgba(255, 255, 255, 0.2);
}

.album-action-cancel {
    background: #f0f0f0;
    color: #555;
}

.album-action-cancel:hover {
    background: #e0e0e0;
}

.album-action-clear {
    background: transparent;
    color: #999;
    padding: 6px 12px;
}

.album-action-clear:hover {
    background: #f5f5f5;
    color: #666;
}

.album-view-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}

.album-view-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.album-view-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    background: #f8f9fa;
}

.album-view-placeholder {
    text-align: center;
    padding: 60px 20px;
}

.album-view-placeholder p {
    color: #888;
    font-size: 15px;
    margin: 12px 0 0 0;
}

.album-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #ff6b35;
    border-radius: 50%;
    margin: 0 auto 16px auto;
    animation: albumSpin 0.8s linear infinite;
}

@keyframes albumSpin {
    to { transform: rotate(360deg); }
}

.album-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px auto;
    color: #ccc;
}

/* Album Images Grid */
.hrmg-cp-album-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

.album-image-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.album-image-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.album-image-card img {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
}

.album-image-card .album-card-info {
    padding: 10px 12px;
}

.album-image-card .album-card-filename {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.album-image-card .album-card-notes {
    font-size: 11px;
    color: #888;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.album-image-card .album-card-cover-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff6b35;
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

.album-image-card .album-card-video-badge {
    position: absolute;
    bottom: 52px;
    right: 10px;
    background: rgba(108, 92, 231, 0.9);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Upload Preview Cards */
.upload-preview-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

/* ---------- ALBUM UPLOAD MODAL ---------- */
.album-upload-modal-content {
    background: #fff;
    margin: 3% auto;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: albumModalSlideIn 0.25s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.album-upload-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    gap: 16px;
}

.album-upload-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.album-upload-header-info h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    border-bottom: none;
}

.album-upload-header-info h2::after {
    display: none;
}

.album-upload-header-info p {
    margin: 2px 0 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
}

.album-upload-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
    background: #f8f9fa;
}

.album-upload-footer {
    padding: 16px 28px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #fff;
}

/* Drop Zone */
#album-drop-zone {
    border: 2px dashed #d0d0d0;
    border-radius: 12px;
    padding: 48px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #fff;
    margin-bottom: 20px;
}

#album-drop-zone:hover,
#album-drop-zone.drag-over {
    border-color: #ff6b35;
    background: #fff8f5;
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.08);
}

.album-drop-zone-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fff0eb, #ffe0d4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
    color: #ff6b35;
}

.album-drop-zone-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.album-drop-zone-divider {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #aaa;
}

.album-drop-zone-hint {
    margin: 16px 0 0 0;
    font-size: 12px;
    color: #aaa;
    line-height: 1.5;
}

/* Upload Preview */
.album-upload-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.album-upload-preview-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.album-upload-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff6b35;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    padding: 0 7px;
}

.album-upload-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Upload Progress */
.album-upload-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.album-upload-progress-header span:first-child {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.album-upload-percent-badge {
    background: #ff6b35;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 10px;
}

.album-upload-progress-track {
    background: #e8e8e8;
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
}

.album-upload-progress-fill {
    background: linear-gradient(90deg, #ff6b35, #ff8f65);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 6px;
}

/* Checkered background for transparent images (logos, PNGs with alpha) */
.hrmg-cp-album-card .album-cover.has-transparency,
.album-image-card.has-transparency {
    background-image: 
        linear-gradient(45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(-45deg, #e0e0e0 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #e0e0e0 75%),
        linear-gradient(-45deg, transparent 75%, #e0e0e0 75%);
    background-size: 16px 16px;
    background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
    background-color: #f5f5f5;
}

.album-image-card.has-transparency img {
    object-fit: contain;
    background: transparent;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hrmg-cp-albums-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
    
    .hrmg-cp-album-card .album-cover {
        height: 100px;
    }
    
    .hrmg-cp-album-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .album-image-card img {
        height: 120px;
    }

    .album-view-modal-content,
    .album-upload-modal-content {
        margin: 0;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .album-view-header,
    .album-upload-header {
        padding: 16px 20px;
        flex-wrap: wrap;
    }

    .album-view-header-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 12px;
    }

    .album-view-body,
    .album-upload-body {
        padding: 16px 20px;
    }

    .album-upload-footer {
        padding: 14px 20px;
    }

    .album-upload-files-grid {
        grid-template-columns: 1fr;
    }
}

/* Subtasks */
.hrmg-subtask-container {
    animation: portalSubtaskSlide 0.2s ease;
}

@keyframes portalSubtaskSlide {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hrmg-subtask-item:last-child {
    border-bottom: none !important;
}

.hrmg-subtask-item:hover .hrmg-subtask-delete-btn {
    opacity: 1 !important;
}

.hrmg-subtask-expand-btn:hover {
    color: #ff6b35;
}

.hrmg-subtask-inline-input:focus {
    border-color: #ff6b35;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.15);
}

.task-subtasks-portal ul li {
    font-size: 13px;
    line-height: 1.4;
}

/* ---------- HEADSHOT LIGHTBOX ---------- */
.hrmg-headshot-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: hrmgLightboxFadeIn 0.2s ease;
}

.hrmg-headshot-lightbox.active {
    display: flex;
}

.hrmg-headshot-lightbox-inner {
    position: relative;
    max-width: 420px;
    width: 90%;
}

.hrmg-headshot-lightbox-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: hrmgLightboxScale 0.25s ease;
}

.hrmg-headshot-lightbox-name {
    text-align: center;
    margin-top: 20px;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    animation: hrmgLightboxScale 0.25s ease;
}

.hrmg-headshot-lightbox-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 20px;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 1;
}

.hrmg-headshot-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@keyframes hrmgLightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hrmgLightboxScale {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

.team-member-card .card-avatar--has-image:not(.card-avatar--editable) {
    cursor: pointer;
}

.team-member-card .card-avatar--has-image.card-avatar--editable {
    cursor: pointer;
}

