/* Member Area Styles */

/* Common Form Styles */
.pillar-login-form,
.pillar-register-form {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
}

.form-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-container h2 {
    text-align: center;
    color: #2271b1;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1d2327;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.password-requirements {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Base form submit styles */
.form-submit {
    margin-top: 30px;
    text-align: center;
}

.form-submit .button {
    padding: 0.75rem 1.5rem;  /* Reasonable default padding */
    min-width: auto;  /* Remove fixed width */
}

.form-links {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
}

.form-links a {
    color: #2271b1;
    text-decoration: none;
}

.form-links a:hover {
    text-decoration: underline;
}

.separator {
    margin: 0 10px;
    color: #ddd;
}

/* Status Messages */
.status-message {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    position: relative;
}

.status-message.error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.status-message.success {
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

.close-message {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
    color: inherit;
}

.close-message:hover {
    opacity: 0.7;
}

/* Member Dashboard Styles */
.pillar-member-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    width: 100%;
    position: relative;
}

.refresh-button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #64748b;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.refresh-button:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.refresh-button.spinning .dashicons {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.profile-menu {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
}

.profile-name {
    font-size: 0.95rem;
    color: #2d3748;
    font-weight: 500;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
}

.user-name {
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 500;
}

.user-menu img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.profile-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 8px 0;
    display: none;
}

.profile-dropdown.active {
    display: block;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.records-tabs {
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.tab-button.active {
    border-bottom-color: #2271b1;
    color: #2271b1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pillar-login-form,
    .pillar-register-form {
        margin: 20px;
        padding: 15px;
    }

    .form-container {
        padding: 20px;
    }

    .quick-actions {
        flex-direction: column;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }
} 

/* Add these styles */
.pillar-page-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Theme compatibility */
.pillar-page-container .pillar-login-form,
.pillar-page-container .pillar-register-form,
.pillar-page-container .pillar-reset-form {
    max-width: 500px;
    margin: 0 auto;
}

/* Add responsive container */
@media (max-width: 768px) {
    .pillar-page-container {
        margin: 20px auto;
        padding: 0 15px;
    }
} 

/* Search and Sort Styles */
.search-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.records-table th.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 20px;
}

.records-table th.sortable a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.sorting-indicator {
    display: none;
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
}

.sortable:hover .sorting-indicator,
.sorted-asc .sorting-indicator,
.sorted-desc .sorting-indicator {
    display: block;
}

.sorted-asc .sorting-indicator:before {
    content: '▲';
}

.sorted-desc .sorting-indicator:before {
    content: '▼';
}

/* Enhance table styles */
.records-table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.records-table th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 12px;
    text-align: left;
}

.records-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.records-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Checkbox column */
.check-column {
    width: 30px;
    padding: 12px 0 12px 12px !important;
}

.check-column input {
    margin: 0;
} 

/* Add this to style the captcha container */
.g-recaptcha {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

/* Responsive captcha */
@media screen and (max-width: 480px) {
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: center;
    }
} 

.notice {
    margin: 20px 0;
    padding: 12px 15px;
    border-radius: 4px;
    border-left: 4px solid;
}

.notice-success {
    background-color: #f0f9eb;
    border-color: #67c23a;
    color: #67c23a;
}

.notice-error {
    background-color: #fef0f0;
    border-color: #f56c6c;
    color: #f56c6c;
}

.notice.is-dismissible {
    padding-right: 38px;
    position: relative;
}

.notice-dismiss {
    position: absolute;
    top: 0;
    right: 1px;
    border: none;
    margin: 0;
    padding: 9px;
    background: none;
    cursor: pointer;
} 

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input {
    padding-right: 40px !important;
    width: 100%;
}

.wp-hide-pw {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent !important;
    border: none !important;
    color: #50575e !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: none !important;
    outline: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

.wp-hide-pw:hover,
.wp-hide-pw:focus {
    color: #2271b1 !important;
    background: rgba(0, 0, 0, 0.04) !important;
    border-radius: 4px;
}

.wp-hide-pw .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 20px;
    display: inline-block !important;
    font-family: dashicons !important;
}

/* Checkbox styling */
.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
}

.form-group label[for="remember-me"] {
    display: inline-block;
    margin-bottom: 0;
    vertical-align: middle;
    cursor: pointer;
}

/* Checkbox container */
.remember-me-wrapper {
    display: flex;
    align-items: center;
    margin: 15px 0;
}

.remember-me-wrapper label {
    margin-left: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
} 

.verification-links {
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
}

.verification-links a {
    color: #2271b1;
    text-decoration: none;
}

.verification-links a:hover {
    color: #135e96;
    text-decoration: underline;
} 

/* Checkbox styling - make more specific to override theme styles */
.pillar-login-form .remember-me-wrapper input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin-right: 8px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
    cursor: pointer !important;
    appearance: checkbox !important;
    -webkit-appearance: checkbox !important;
    -moz-appearance: checkbox !important;
    border: 1px solid #8c8f94 !important;
    border-radius: 2px !important;
    background-color: #fff !important;
    visibility: visible !important;
}

/* Label styling */
.pillar-login-form .remember-me-wrapper label {
    font-size: 14px !important;
    color: #50575e !important;
    cursor: pointer !important;
    user-select: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Completely disable any theme pseudo-elements */
.pillar-login-form .remember-me-wrapper input[type="checkbox"]::before,
.pillar-login-form .remember-me-wrapper input[type="checkbox"]::after,
.pillar-login-form .remember-me-wrapper label::before,
.pillar-login-form .remember-me-wrapper label::after {
    display: none !important;
    content: none !important;
}

/* Remove any theme-specific wrapper elements */
.pillar-login-form .remember-me-wrapper .checkbox-wrapper,
.pillar-login-form .remember-me-wrapper .checkbox-container {
    all: unset !important;
    display: contents !important;
}

/* Registration success notice styling */
.notice-small {
    font-size: 13px;
    margin-top: 5px;
    opacity: 0.8;
}

/* Adjust notice positioning */
.pillar-login-form .notice {
    margin-bottom: 25px;
} 

/* Dashboard Layout */
.pillar-dashboard-wrapper {
    --sidebar-width: 280px;
    --primary-color: #3174B4;
    --secondary-color: #37B6AB;
    --pending-color: #F6AD55;
    --approved-color: #48BB78;
    --rejected-color: #F56565;
    
    display: grid !important;
    grid-template-columns: var(--sidebar-width) 1fr !important;
    /* Row min-height matches wrapper min-height so the sidebar always stretches
       to viewport height even when the main content is short (e.g. staff register). */
    /* Fill the entire viewport — see member.css for the full reasoning.
       Was `calc(100vh - 100px)`, which left a white strip at the bottom of
       short pages now that App Mode hides the theme header. */
    grid-template-rows: minmax(100vh, auto) !important;
    grid-template-rows: minmax(100dvh, auto) !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    background: #f8fafc;
}

/* Main Content Area */
.dashboard-main {
    /* Layout */
    display: flex;
    flex-direction: column;
    min-height: 100%;
    
    /* Dimensions & Spacing */
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    
    /* Visual & Behavior */
    background: #f8fafc;
    /* `clip` instead of `hidden` so sticky descendants (e.g. the
       training reading-progress bar) actually stick to the viewport.
       `hidden` turns this element into a scroll container, which makes
       sticky stick to *this* element instead of the viewport — and
       since this element doesn't scroll vertically, the sticky bar
       just scrolls away with the page. See member.css for the full
       reasoning and the `hidden` fallback strategy. */
    overflow-x: hidden;
    overflow-x: clip;
    transition: margin-left 0.3s ease;
}

/* Grid/flex child: allow wide tables to scroll inside .staff-list-container instead of clipping */
.pillar-dashboard-wrapper .dashboard-main {
    min-width: 0;
}

.pillar-dashboard-wrapper--staff-management .dashboard-main {
    overflow-x: visible;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    width: 100%;
    position: relative;
}

.dashboard-header .dashboard-header-spacer {
    flex: 1;
    min-width: 0;
}

.dashboard-header--staff-management {
    gap: 1rem;
}

/* Dashboard Content */
.dashboard-content {
    /* Layout */
    display: block !important;
    box-sizing: border-box;
    
    /* Dimensions & Spacing */
    width: 100%;
    max-width: none !important;
    padding: 2rem 3rem;  /* Using the larger padding from second definition */
}

/* Stats Overview Section */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 0 0 2rem 0;
    width: 100%;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    border: none;
}

.stat-content {
    flex: 1;
}

.stat-content h3 {
    margin: 0 0 0.5rem 0;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.stat-label {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

/* Sidebar Styling */
.dashboard-sidebar {
    background: #1a202c;
    min-height: 100%;
    padding: 1.5rem 0;
    width: var(--sidebar-width);
    overflow: hidden;
}

.sidebar-header {
    display: none;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-nav li {
    margin: 0.75rem 0;
    width: 100%;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #cbd5e0;
    text-decoration: none;
    transition: all 0.2s ease;
    gap: 15px;
    font-size: 1.125rem;
    font-weight: 500;
    width: 100%;
    position: relative;
}

.sidebar-nav .dashicons {
    width: 28px !important;
    height: 28px !important;
    font-size: 28px !important;
    color: inherit;
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-nav li a:hover,
.sidebar-nav li a:active,
.sidebar-nav li.active a {
    background: rgba(49, 116, 180, 0.9) !important;
    color: white !important;
}

.sidebar-nav li.active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--secondary-color);
}

.sidebar-bottom {
    margin-top: auto !important;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
}

/* Optional: Add hover effect for logout */
.sidebar-bottom a:hover {
    background: #dc2626 !important;  /* Red color for logout */
}

/* Stats Overview Grid */
.stats-overview {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    gap: 1.5rem;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Individual Stat Card */
.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    gap: 1rem;
    min-height: 100px;
}

/* Stat Icon Styling */
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Different colors for different stat types */
.stat-icon.hours { background: #E1F0FF; color: #2171B1; }
.stat-icon.pending { background: #FEF3C7; color: #92400E; }
.stat-icon.approved { background: #DEF7EC; color: #03543F; }
.stat-icon.latest { background: #E9D8FD; color: #553C9A; }
.stat-icon.rejected { background: #FEE2E2; color: #DC2626; }

.stat-info h3 {
    font-size: 0.875rem;
    color: #64748B;
    margin: 0 0 0.5rem 0;
}

.stat-info .stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1E293B;
    margin: 0 0 0.25rem 0;
}

.stat-info .stat-period {
    font-size: 0.75rem;
    color: #94A3B8;
}

/* Quick Action Cards (renamed to Management Actions for staff) */
.quick-actions {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quick-actions h2 {
    color: #2d3748;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.action-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e2e8f0;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    position: relative;
    padding: 1.5rem;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* Specific styling for Records Review card */
.records-card .card-content {
    background: rgba(255, 237, 213, 0.98);  /* Light orange background */
}

.records-card .card-content h3 {
    color: #C05621;  /* Darker orange for contrast */
}

/* Specific styling for Add Staff card */
.register-card .card-content {
    background: rgba(237, 233, 254, 0.98);  /* Light purple background */
}

.register-card .card-content h3 {
    color: #553C9A;  /* Darker purple for contrast */
}

.card-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: #4A5568;  /* Dark gray for readability */
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Add contrast overlay for better text visibility */
.action-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.02) 100%);
    pointer-events: none;
}

/* Recent Submissions */
.recent-submissions {
    width: 100%;
    margin: 0;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-badge.pending {
    background: var(--pending-color);
    color: #744210;
}

.status-badge.approved {
    background: var(--approved-color);
    color: #22543d;
}

.status-badge.rejected {
    background: var(--rejected-color);
    color: #742a2a;
}

/* Loading States and Animations */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

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

/* Skeleton Loading */
.skeleton {
    background: #f0f0f0;
    background-image: linear-gradient(
        90deg,
        #f0f0f0 0px,
        #f8f8f8 40px,
        #f0f0f0 80px
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear;
}

.loading-state {
    position: relative;
    overflow: hidden;
}

/* Stats Card Loading */
.stat-card.loading {
    pointer-events: none;
}

.stat-card.loading .stat-value {
    width: 60%;
    height: 24px;
    background: #f0f0f0;
    animation: pulse 1.5s infinite ease-in-out;
}

/* Preview Slide Panel */
.preview-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 40%;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 12px rgba(0,0,0,0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    z-index: 1000;
    overflow-y: auto;
}

.preview-panel.active {
    transform: translateX(0);
}

.preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.preview-overlay.active {
    opacity: 1;
    visibility: visible;
}

.preview-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-content {
    padding: 1.5rem;
}

.close-preview {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s ease;
}

.close-preview:hover {
    color: #1e293b;
}

/* Loading Spinner */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Preview Panel */
@media (max-width: 1024px) {
    .preview-panel {
        width: 60%;
    }
}

@media (max-width: 768px) {
    .preview-panel {
        width: 100%;
    }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .dashboard-content {
        padding: 1.5rem;
    }
    
    .action-cards {
        grid-template-columns: 1fr;
    }
}

/* Override WPBakery container limitations */
.wpb_wrapper,
.vc_row,
.vc_column_container,
.vc_column-inner {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Handle WPBakery's default page wrapper */
.page-wrapper,
.main-content-wrapper,
#content,
.entry-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Search Section */
.header-search {
    position: relative;
    flex: 1;
    max-width: 500px;
    margin-right: 2rem;
}

.global-search {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
}

.search-button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Header Actions (Refresh & Profile) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto; /* Push to the right */
    padding-right: calc(1rem + var(--scrollbar-width, 17px)); /* Dynamic padding for scrollbar */
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
}

.user-menu:hover {
    background: #f7fafc;
}

.user-name {
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 500;
}

.user-menu img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-menu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    color: inherit !important;
    cursor: pointer;
}

.user-menu-link:hover {
    opacity: 0.8;
}

/* Override any theme containers */
.container, 
.content-wrapper,
.site-content {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Recent Submissions Styles - New Additions */
.submissions-list {
    margin-top: 1rem;
}

.submission-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    position: relative;
}

.records-container .submission-card {
    grid-template-columns: 32px 84px minmax(240px, 1fr) minmax(300px, auto);
    min-height: 84px;
    gap: 1.25rem;
}

.records-container .record-checkbox-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Themes routinely hide the real checkbox and draw their own from an adjacent
   label, which left these boxes invisible and impossible to click while Select
   All — which does sit inside a label — still worked. Everything a theme reset is
   likely to touch is restated here, and the label gives a finger-sized target
   around a 16px box. */
.records-container .record-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.records-container .record-checkbox {
    -webkit-appearance: checkbox;
    -moz-appearance: checkbox;
    appearance: auto;
    position: static;
    display: inline-block;
    visibility: visible;
    opacity: 1;
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    max-width: 16px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    accent-color: #0f766e;
    flex: 0 0 auto;
}

.records-container .record-checkbox-placeholder {
    width: 16px;
    height: 16px;
    display: block;
}

.records-container .submission-details {
    min-width: 0;
}

.records-container .submission-actions {
    align-items: flex-end;
    justify-self: end;
    min-width: 300px;
}

.records-container .submission-actions .action-buttons {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 0.4rem;
    width: 100%;
}

.records-container .action-btn-container {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
}

.records-container .action-btn {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    flex-direction: row;
    gap: 0.3rem;
    justify-content: center;
    min-height: 34px;
    min-width: 68px;
    padding: 0 0.55rem;
    white-space: nowrap;
}

.records-container .action-btn .dashicons {
    display: none;
}

.lucide-icon,
.action-icon,
.detail-icon {
    display: inline-block;
    flex: 0 0 16px;
    fill: none !important;
    height: 16px;
    overflow: visible;
    stroke: currentColor !important;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    vertical-align: middle;
    width: 16px;
}

.lucide-icon *,
.action-icon *,
.detail-icon * {
    fill: none !important;
    stroke: currentColor !important;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.stat-icon .lucide-icon {
    height: 24px;
    width: 24px;
}

.detail-item .detail-icon {
    height: 14px;
    width: 14px;
}

.filter-actions .lucide-icon,
.bulk-action-buttons .lucide-icon {
    height: 15px;
    width: 15px;
}

.records-container .action-icon {
    display: block;
    flex: 0 0 14px;
    fill: none;
    height: 14px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 14px;
}

.records-container .btn-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    transform: none;
    white-space: nowrap;
}

.submission-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.submission-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.submission-card.evv::before {
    background-color: #37B6AB;
}

.submission-card.timesheet::before {
    background-color: #3174B4;
}

.submission-type-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border-radius: 6px;
    min-width: 80px;
}

.submission-type-indicator .type-icon {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.submission-type-indicator .type-label {
    font-size: 0.75rem;
    font-weight: 500;
}

.submission-type-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border-radius: 6px;
    min-width: 80px;
}

.submission-card[data-type="evv"] .submission-type-indicator {
    background-color: rgba(55, 182, 171, 0.1);  /* Teal background */
    color: #37B6AB;
}

.submission-card[data-type="timesheet"] .submission-type-indicator {
    background-color: rgba(49, 116, 180, 0.1);  /* Blue background */
    color: #3174B4;
}

.submission-details {
    flex: 1;
}

.submission-details h4 {
    margin: 0 0 0.5rem 0;
    color: #2D3748;
    font-size: 1rem;
    font-weight: 600;
}

.details-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #718096;
    font-size: 0.875rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Status Badge Refinements */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pending {
    background-color: #FEF3C7;
    color: #92400E;
}

.status-reopened {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.status-approved {
    background-color: #DEF7EC;
    color: #03543F;
}

.status-rejected {
    background-color: #FDE2E2;
    color: #9B1C1C;
}

/* Action Buttons Refinements */
.action-buttons {
    display: flex;
    gap: 4px;
    align-items: center;
    position: relative;
}

.action-btn-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.export-button-container {
    margin-left: 4px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px 8px;
    border: none;
    background: #3174B4;
    cursor: pointer;
    color: #fff;
    transition: all 0.2s ease;
    border-radius: 4px;
    min-width: 44px;
}

.dashboard-content .submissions-section .action-btn,
.dashboard-content .records-container .action-btn {
    align-items: center;
    display: inline-flex;
    flex-direction: row;
    gap: 5px;
    justify-content: center;
}

.dashboard-content .submissions-section .action-btn .action-icon,
.dashboard-content .records-container .action-btn .action-icon {
    margin: 0;
}

.action-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-bottom: 2px;
    color: inherit;
}

.btn-label {
    font-size: 11px;
    color: inherit;
    text-align: center;
    line-height: 1;
}

.action-btn:hover {
    background: #1e5a8e;
    color: #fff;
}

/* View button */
.action-btn.pillar-view-record {
    background: #3174B4;
}
.action-btn.pillar-view-record:hover {
    background: #1e5a8e;
}

/* Approve button */
.action-btn.staff-approve-record {
    background: #16a34a;
}
.action-btn.staff-approve-record:hover {
    background: #15803d;
}

/* Reject button */
.action-btn.reject-record {
    background: #dc2626;
}
.action-btn.reject-record:hover {
    background: #b91c1c;
}

/* Export button */
.action-btn.export-record {
    background: #37B6AB;
}
.action-btn.export-record:hover {
    background: #2d9a91;
}

/* Edit button */
.action-btn.edit-record {
    background: #6366f1;
}
.action-btn.edit-record:hover {
    background: #4f46e5;
}

/* Delete button */
.action-btn.delete-record {
    background: #ef4444;
}
.action-btn.delete-record:hover {
    background: #dc2626;
}

/* Pagination Dots */
.pagination-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #E2E8F0;
    transition: background-color 0.2s;
}

.dot.active {
    background-color: #3174B4;
}

/* Calendar Styles - Updated */
.calendar-section {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.mini-calendar {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.calendar-title {
    font-weight: 600;
    color: #2D3748;
    font-size: 1.1rem;
}

.calendar-nav {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #718096;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav:hover {
    background-color: #F7FAFC;
    color: #2D3748;
}

.calendar-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #718096;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0.875rem;
    color: #4A5568;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s;
    padding: 0.25rem;
}

.calendar-day:hover {
    background-color: #F7FAFC;
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day .day-number {
    margin-bottom: 0.25rem;
}

/* Updated markers for better visibility */
.day-marker {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin: 0 1px;
}

.day-marker.evv {
    background-color: #37B6AB;
}

.day-marker.timesheet {
    background-color: #3174B4;
}

.calendar-day.has-evv .day-marker,
.calendar-day.has-timesheet .day-marker {
    display: inline-block;
}

/* Calendar Legend */
.calendar-legend {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #E2E8F0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #718096;
}

.legend-item .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.legend-item .dot.evv {
    background-color: #37B6AB;
}

.legend-item .dot.timesheet {
    background-color: #3174B4;
}

/* Today's date highlight */
.calendar-day.today {
    background-color: #EBF8FF;
    font-weight: 600;
}

/* Multiple markers container */
.day-markers {
    display: flex;
    gap: 2px;
    position: absolute;
    bottom: 4px;
}

.dashboard-error {
    background-color: #FEE2E2;
    border: 1px solid #F87171;
    border-right: 2px solid #F87171; /* Stronger right border */
    color: #991B1B;
    padding: 1rem;
    margin: 1rem 2rem 1rem 0; /* Add right margin to avoid sidebar overlap */
    border-radius: 6px;
    display: none;
    position: relative; /* For close button positioning */
}

/* Add close button */
.dashboard-error .close-error {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #991B1B;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.dashboard-error .close-error:hover {
    background-color: rgba(153, 27, 27, 0.1);
}

/* Ensure error text doesn't overlap with close button */
.dashboard-error .error-message {
    padding-right: 30px;
}

/* Make hover labels match their icons */
.action-btn:hover .btn-label {
    color: inherit;
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 999990;
    display: none;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer !important;
    position: relative;
    z-index: 1;
}

.search-result-item:hover {
    background: #f0f7ff;
}

.search-result-item:last-child {
    border-bottom: none;
}

.result-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.result-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

/* Make header-search relative for dropdown positioning */
.header-search {
    position: relative;
}

.pillar-dashboard-wrapper .header-search .search-button {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none !important;
    border: none !important;
    padding: 6px !important;
    cursor: pointer;
    color: #64748b !important;
    display: flex !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    align-items: center;
    justify-content: center;
}

.search-button.loading {
    opacity: 0.5;
    pointer-events: none;
}

.pillar-dashboard-wrapper .header-search .search-clear {
    position: absolute;
    right: 2.25rem;
    top: 50%;
    transform: translateY(-50%);
    background: none !important;
    border: none !important;
    padding: 6px !important;
    cursor: pointer;
    color: #64748b !important;
    display: none !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    align-items: center;
    justify-content: center;
}

.pillar-dashboard-wrapper .header-search .search-clear.visible {
    display: flex !important;
}

.pillar-dashboard-wrapper .header-search .search-clear:hover,
.pillar-dashboard-wrapper .header-search .search-button:hover {
    color: #1e293b !important;
}

/* Refresh Button */
.pillar-dashboard-wrapper .refresh-button {
    background: none !important;
    border: none !important;
    padding: 0.5rem !important;
    cursor: pointer;
    color: #64748b !important;
    border-radius: 6px;
    display: flex !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pillar-dashboard-wrapper .refresh-button:hover {
    background: #f1f5f9 !important;
    color: #1e293b !important;
}

.refresh-button.spinning .dashicons {
    animation: spin 1s linear infinite;
}

/* Success Message */
.refresh-success {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #10B981;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.refresh-success .dashicons {
    font-size: 1.25rem;
}

/* Base Mobile Menu Toggle — hidden on desktop, shown via media query */
.pillar-dashboard-wrapper .mobile-menu-toggle,
.mobile-menu-toggle {
    display: none !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    cursor: pointer;
}

.mobile-menu-toggle .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Combined Mobile & Tablet Styles (up to 1024px) */
@media (max-width: 1024px) {
    /* Switch from 2-column grid to single column — sidebar is now fixed overlay */
    .pillar-dashboard-wrapper {
        grid-template-columns: 1fr !important;
    }

    /* Lock body scroll when sidebar is open */
    body.sidebar-open,
    html.sidebar-open {
        overflow: hidden;
    }

    .dashboard-sidebar {
        position: fixed;
        top: 0;
        left: calc(-1 * var(--sidebar-width, 280px));
        height: 100%;
        width: var(--sidebar-width, 280px);
        z-index: 999999;
        transition: left 0.3s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: #1a202c;
    }

    .dashboard-sidebar.active {
        left: 0;
    }

    /* Show mobile menu toggle — match base specificity */
    .pillar-dashboard-wrapper .mobile-menu-toggle,
    .mobile-menu-toggle {
        display: flex !important;
        position: relative;
        z-index: 999997;
    }

    /* Overlay */
    .pillar-dashboard-wrapper.sidebar-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999998;
    }

    /* Close button - single definition */
    .sidebar-close {
        display: none;
        position: sticky;
        top: 1rem;
        right: 1rem;
        z-index: 1000000;
        background: #1a202c;
        padding: 0.75rem;
        border-radius: 4px;
        border: none;
        color: #fff;
        cursor: pointer;
    }

    .mobile-only .sidebar-close {
        display: block;
    }
}

/* Mobile Only Styles */
@media (max-width: 768px) {
    .dashboard-content {
        padding: 1rem;
        box-sizing: border-box !important;
    }

    .dashboard-header {
        padding: 0.75rem 1rem !important;
        flex-wrap: wrap;
        gap: 0.5rem;
        box-sizing: border-box !important;
    }

    .dashboard-header .mobile-menu-toggle {
        margin-left: -8px;
    }

    .header-actions {
        margin-left: auto;
        padding-right: 0 !important;
    }

    .user-menu {
        padding: 0.25rem !important;
    }

    .header-search {
        order: 2;
        flex: 0 0 100%;
        max-width: 100%;
        margin-right: 0;
        margin-top: 0;
    }

    .stats-overview {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .action-cards,
    .submission-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .calendar-section {
        padding: 0.75rem;
    }

    /* Make buttons stack vertically on mobile */
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    /* Make buttons smaller on mobile */
    .action-button,
    .action-btn {
        padding: 0.5rem;
        font-size: 0.875rem;
        width: 100%;
        justify-content: center;
    }

    /* Adjust icon size */
    .action-button .dashicons,
    .action-btn .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
        margin-right: 0.25rem;
    }

    /* Profile form buttons - mobile specific */
    .form-submit {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .form-submit .button {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.875rem;
        justify-content: center;
    }

    /* Records table: horizontal scroll on small screens */
    .records-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .records-table {
        min-width: 600px;
    }

    /* Submission cards: stack to single column on mobile */
    .submission-card,
    .records-container .submission-card {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .records-container .submission-actions {
        justify-self: stretch;
        align-items: stretch;
        min-width: 0;
        width: 100%;
    }

    .records-container .submission-actions .action-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
    }

    .records-container .action-btn {
        min-height: 40px;
        min-width: 0;
        width: 100%;
    }

    .bulk-actions-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .bulk-action-buttons {
        margin-left: 0;
        width: 100%;
    }

    .bulk-action-buttons .btn {
        flex: 1;
        justify-content: center;
    }
}

/* Tablet Only Styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .submission-cards,
    .action-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-content {
        padding: 1.5rem;
    }
}

/* Mobile close button */
.sidebar-close {
    display: none;  /* Hidden by default */
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
}

.sidebar-close .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

@media (max-width: 1024px) {
    .mobile-only {
        display: block;  /* Show on mobile/tablet */
    }
}

/* Enhanced Management Action Cards */
.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(192, 86, 33, 0.2),  /* Orange tint for records */
        rgba(192, 86, 33, 0.4)
    );
    z-index: 1;
}

.register-card .card-overlay {
    background: linear-gradient(
        to bottom,
        rgba(85, 60, 154, 0.2),  /* Purple tint for register */
        rgba(85, 60, 154, 0.4)
    );
}

.card-content .badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 1rem;
}

.records-card .badge {
    background: #FEEBC8;  /* Light orange */
    color: #C05621;
}

.register-card .badge {
    background: #E9D8FD;  /* Light purple */
    color: #553C9A;
}

/* Enhance hover effect */
.action-card:hover .card-overlay {
    background: linear-gradient(
        to bottom,
        rgba(192, 86, 33, 0.3),
        rgba(192, 86, 33, 0.5)
    );
}

.register-card:hover .card-overlay {
    background: linear-gradient(
        to bottom,
        rgba(85, 60, 154, 0.3),
        rgba(85, 60, 154, 0.5)
    );
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Page Header & Filters */
.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    color: #1a202c;
    font-size: 1.875rem;
    font-weight: 600;
    margin: 0;
}

.records-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568;
}

.date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-range input {
    flex: 1;
    min-width: 0;
}

.date-range span {
    color: #4a5568;
    font-size: 0.875rem;
}

/* Submissions Section */
.submissions-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-top: 2rem;
}

/* Bulk Actions */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 6px;
}

.bulk-actions select {
    min-width: 200px;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: white;
}

.bulk-actions-bar {
    display: none;
    align-items: center;
    gap: 0.8rem;
    padding: 0.65rem 0.85rem;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.bulk-select-all {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: #334155;
}

.bulk-selection-count {
    color: #64748b;
    font-size: 0.8125rem;
}

.bulk-action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.bulk-action-buttons .btn {
    display: inline-flex;
    align-items: center;
    border-radius: 7px;
    gap: 0.3rem;
    min-height: 34px;
    padding: 0.42rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
}

.bulk-action-buttons .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.bulk-action-buttons .btn-danger {
    background: #dc3545;
    color: #fff;
    border: none;
}

.bulk-action-buttons .btn-danger:hover:not(:disabled) {
    background: #b91c1c;
}

/* Submission Actions */
.submission-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.submission-actions .status-badge {
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.submission-actions .action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Notice Styles */
.notice-info {
    background-color: #E1F0FF;
    border-left: 4px solid #3174B4;
    padding: 1rem;
    margin: 1rem 0;
}

/* Form Input Styles */
.regular-text {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 1rem;
}

/* Button Styles */
.button-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.button-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

/* Icon Styles */
.dashicons-visibility {
    width: 20px;
    height: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Status and Loading States */
.loading {
    padding: 1rem;
    text-align: center;
    color: #64748b;
}

.error {
    color: #dc2626;
    padding: 1rem;
    text-align: center;
}

.no-results {
    padding: 2rem;
    text-align: center;
    color: #64748b;
}

/* Success Message */
.dashboard-success {
    background: #DEF7EC;
    border-left: 4px solid #03543F;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.success-message {
    color: #03543F;
}

.close-success {
    background: none;
    border: none;
    color: #03543F;
    cursor: pointer;
}

/* Record Details */
.patient-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 0.5rem 0;
}

/* Search Result Date */
.date {
    color: #64748b;
    font-size: 0.875rem;
}

/* Skeleton Loading */
.skeleton-line {
    height: 20px;
    background: linear-gradient(
        90deg,
        rgba(226, 232, 240, 0.6) 25%,
        rgba(226, 232, 240, 0.8) 37%,
        rgba(226, 232, 240, 0.6) 63%
    );
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* Autosave Status */
.autosave-status {
    font-size: 0.875rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Section Loading */
.section-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
}

/* Dashboard Icons */
.dashicons-clipboard {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

.dashicons-yes-alt {
    width: 20px;
    height: 20px;
    font-size: 20px;
    color: #03543F;
}

/* Menu Items */
.menu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.menu-item:hover {
    color: var(--primary-color);
}

.pillar-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: none;
    visibility: visible !important;  /* Force visibility */
    opacity: 1 !important;  /* Force opacity */
}

.pillar-modal.active {
    display: block !important;  /* Force display */
}

.pillar-modal .modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 500px;
    margin: max(20px, 5vh) auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000000;  /* Ensure content is above overlay */
}

.pillar-modal .modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pillar-modal .modal-body {
    padding: 20px;
}

.pillar-modal .modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.pillar-modal .close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.pillar-modal textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Reason dialog footer (Reject and Reopen).
   .btn-danger and .btn-primary are only defined inside other containers, so both
   buttons here rendered identically and the destructive one did not read as
   destructive. */
#pillar-reason-modal .modal-footer .btn {
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    min-height: 38px;
    padding: 0 18px;
    transition: background 0.15s ease;
}

#pillar-reason-modal .modal-footer .btn-secondary {
    background: #fff;
    border-color: #e2e8f0;
    color: #475569;
}

#pillar-reason-modal .modal-footer .btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

#pillar-reason-modal .modal-footer .btn-danger {
    background: #dc2626;
    color: #fff;
}

#pillar-reason-modal .modal-footer .btn-danger:hover {
    background: #b91c1c;
}

#pillar-reason-modal .modal-footer .btn-primary {
    background: #3174B4;
    color: #fff;
}

#pillar-reason-modal .modal-footer .btn-primary:hover {
    background: #255f94;
}

/* Resubmitted Record Styles */
.record-row.resubmitted {
    background-color: #fff8e8 !important;
}

.resubmitted-badge {
    display: inline-flex !important;
    align-items: center !important;
    background: #ffc107 !important;
    color: #856404 !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
    margin-left: 8px !important;
}

.resubmitted-badge .dashicons {
    font-size: 14px !important;
    margin-right: 4px !important;
}

/* Changes List Styles */
.changes-list {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 4px !important;
    padding: 15px !important;
    margin-top: 10px !important;
}

.field-change {
    margin-bottom: 15px !important;
    padding-bottom: 15px !important;
    border-bottom: 1px solid #e9ecef !important;
}

.field-change:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.field-name {
    font-weight: 600 !important;
    color: #495057 !important;
    margin-bottom: 5px !important;
    display: block !important;
}

.change-details {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-top: 5px !important;
}

.previous-value,
.current-value {
    padding: 8px !important;
    border-radius: 4px !important;
}

.previous-value {
    background: #fff3cd !important;
}

.current-value {
    background: #d4edda !important;
}

.change-details label {
    font-size: 12px !important;
    color: #6c757d !important;
    display: block !important;
    margin-bottom: 3px !important;
}

.filters-section {
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border: 1px solid #e5edf5;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.045);
    margin-bottom: 16px;
    padding: 16px;
}

.filter-group {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) minmax(160px, 1.1fr) minmax(280px, 1.6fr);
    gap: 10px;
    margin-bottom: 12px;
}

.filter-select,
.filter-date {
    background-color: #fff;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    color: #334155;
    font-size: 13px;
    height: 36px;
    line-height: 1.2;
    outline: none;
    padding: 0 11px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    width: 100%;
}

.filter-select:focus,
.filter-date:focus {
    background-color: #fff;
    border-color: #3174B4;
    box-shadow: 0 0 0 3px rgba(49, 116, 180, 0.12);
}

.date-range-filter {
    display: flex;
    gap: 8px;
}

.filter-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.filter-actions .btn {
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    height: 36px;
    justify-content: center;
    line-height: 1;
    padding: 0 13px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.filter-actions .btn:hover {
    transform: translateY(-1px);
}

.filter-actions .btn-primary {
    background: #3174B4;
    box-shadow: 0 6px 14px rgba(49, 116, 180, 0.18);
    color: #fff;
}

.filter-actions .btn-primary:hover {
    background: #255f94;
}

.filter-actions .btn-secondary {
    background: #fff;
    border-color: #e2e8f0;
    color: #475569;
}

.filter-actions .btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.filter-actions .btn-export {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.filter-actions .btn-export:hover {
    background: #ffedd5;
    border-color: #fdba74;
}

.filter-actions .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-group {
        grid-template-columns: 1fr;
    }
    
    .date-range-filter {
        flex-direction: column;
    }

    .filter-actions {
        flex-direction: column;
    }

    .filter-actions .btn {
        width: 100%;
    }
} 
.submissions-pagination {
    margin-top: 20px;
    padding: 10px;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    color: #2271b1;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #6c757d;
}

.pagination-btn:not(:disabled):hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.pagination-btn .dashicons {
    color: inherit;
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #50575e;
    font-weight: 500;
}

.separator {
    color: #666;
}

/* Records Pagination */
.records-pagination {
    margin-top: 20px;
    padding: 10px;
}

.records-pagination .pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.records-pagination .pagination-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    color: #2271b1;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.records-pagination .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    color: #6c757d;
}

.records-pagination .pagination-btn:not(:disabled):hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.records-pagination .pagination-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #50575e;
    font-weight: 500;
}

.records-pagination .separator {
    color: #666;
}

/* ─── Training Compliance Section ─── */
.training-compliance-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.training-compliance-section .section-header h2 {
    margin: 0;
    font-size: 18px;
}
.training-compliance-section .btn-link {
    background: none;
    border: none;
    cursor: pointer;
    color: #646970;
}
.training-completions-table th,
.training-completions-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}
.training-completions-table thead th {
    font-weight: 600;
    color: #1d2327;
    background: #f8f9fa;
}
.training-completions-table .btn-small {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    background: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
.training-completions-table .btn-small:hover {
    background: #005a87;
}

/* Staff Training Modal */
.pillar-training-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100050;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pillar-training-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.55);
}
.pillar-training-modal-content {
    position: relative;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,.2);
    width: 90%;
    max-width: 720px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.pillar-training-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}
.pillar-training-modal-header h3 {
    margin: 0;
    font-size: 16px;
}
.pillar-training-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #646970;
    padding: 0 4px;
    line-height: 1;
}
.pillar-training-modal-close:hover { color: #d63638; }
.pillar-training-modal-body {
    padding: 20px;
    overflow-y: auto;
}
.pillar-training-modal-body .pillar-table {
    border-collapse: collapse;
}
.pillar-training-modal-body .pillar-table th,
.pillar-training-modal-body .pillar-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

/* ─── Staff Management Section ──────────────────────────────────── */

.staff-management-section {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.staff-management-section .section-header h2 {
    margin: 0;
    font-size: 18px;
    color: #1d2327;
}

.staff-search-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.staff-search-input {
    padding: 8px 32px 8px 14px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    font-size: 14px;
    min-width: 220px;
    transition: border-color 0.2s;
}
.staff-search-input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.staff-search-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    font-size: 18px;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}
.staff-search-clear:hover {
    background: #f1f5f9;
    color: #111827;
}
.staff-search-clear[hidden] {
    display: none;
}

.staff-search-count {
    font-size: 13px;
    color: #6b7280;
    white-space: nowrap;
}

#toggle-add-staff-form {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
}

.staff-list-container {
    margin-top: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.staff-list-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
}
.staff-list-table thead th {
    background: #f6f7f7;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #50575e;
    text-align: left;
    border-bottom: 2px solid #dcdcde;
    white-space: nowrap;
}
.staff-list-table tbody td {
    padding: 12px 14px;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: middle;
}
.staff-list-table tbody tr:hover {
    background: #f9f9fa;
}
.staff-list-table tbody tr.row-deactivated {
    opacity: 0.6;
}
.staff-list-table tbody tr.row-deactivated:hover {
    opacity: 0.8;
}

.staff-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.staff-status-badge.status-active {
    background: #edfcf2;
    color: #00a32a;
    border: 1px solid #b8e6c8;
}
.staff-status-badge.status-deactivated {
    background: #fef1f1;
    color: #d63638;
    border: 1px solid #f5c6c7;
}

.staff-actions-cell {
    white-space: nowrap;
}
.staff-actions-cell .action-btn {
    background: none;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    color: #50575e;
    transition: all 0.15s;
    margin-right: 4px;
}
.staff-actions-cell .action-btn:hover {
    background: #f0f0f1;
    border-color: #2271b1;
    color: #2271b1;
}
.staff-actions-cell .action-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

/* Staff Form Section */
.staff-form-section {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    border-left: 4px solid #2271b1;
}
.staff-form-section .section-header {
    margin-bottom: 20px;
}
.staff-form-section .section-header h2 {
    margin: 0;
    font-size: 16px;
    color: #1d2327;
}
.staff-form-section .close-add-form {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #646970;
    line-height: 1;
    padding: 0 4px;
}
.staff-form-section .close-add-form:hover {
    color: #d63638;
}

.staff-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.staff-form-section .form-group {
    margin-bottom: 0;
}
.staff-form-section .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: #1d2327;
}
.staff-form-section .form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 14px;
}
.staff-form-section .form-group input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.staff-form-section .password-requirements {
    font-size: 12px;
    color: #646970;
    margin-top: 4px;
}

.staff-form-section .form-submit {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f1;
}
.staff-form-section .form-submit .button {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* Edit Staff Modal */
#edit-staff-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}
#edit-staff-modal .modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
#edit-staff-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}
#edit-staff-modal .modal-header h3 {
    margin: 0;
    font-size: 16px;
}
#edit-staff-modal .modal-header .close-modal {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #646970;
    line-height: 1;
}
#edit-staff-modal .modal-header .close-modal:hover {
    color: #d63638;
}
#edit-staff-modal .modal-body {
    padding: 20px;
}
#edit-staff-modal .modal-body .form-group {
    margin-bottom: 16px;
}
#edit-staff-modal .modal-body .form-group:last-child {
    margin-bottom: 0;
}
#edit-staff-modal .modal-body label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
    color: #1d2327;
}
#edit-staff-modal .modal-body input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}
#edit-staff-modal .modal-body input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}
#edit-staff-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
}
#edit-staff-modal .btn {
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid transparent;
}
#edit-staff-modal .btn-secondary {
    background: #f0f0f1;
    color: #50575e;
    border-color: #dcdcde;
}
#edit-staff-modal .btn-secondary:hover {
    background: #e0e0e0;
}
#edit-staff-modal .btn-primary {
    background: #2271b1;
    color: #fff;
}
#edit-staff-modal .btn-primary:hover {
    background: #135e96;
}

/* Responsive: Staff Management */
@media (max-width: 768px) {
    .staff-form-grid {
        grid-template-columns: 1fr;
    }
    .staff-search-input {
        min-width: 140px;
        width: 100%;
    }
    .staff-management-section .section-header {
        flex-direction: column;
        align-items: flex-start !important;
    }
    .staff-list-table thead th:nth-child(3),
    .staff-list-table thead th:nth-child(4),
    .staff-list-table tbody td:nth-child(3),
    .staff-list-table tbody td:nth-child(4) {
        display: none;
    }
}

@media (max-width: 480px) {
    .staff-management-section {
        padding: 16px;
    }
    .staff-form-section {
        padding: 16px;
    }
    .staff-list-table thead th,
    .staff-list-table tbody td {
        padding: 8px 8px;
        font-size: 13px;
    }
    #edit-staff-modal .modal-content {
        width: 95%;
    }
}

/* Final records-page action override.
   Keep dense record actions as horizontal pills, regardless of older global button rules. */
.pillar-dashboard-wrapper .records-container .submission-actions .action-buttons {
    align-items: center !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    justify-content: flex-end !important;
}

.pillar-dashboard-wrapper .records-container .submission-actions .action-btn-container {
    align-items: center !important;
    display: flex !important;
    flex-direction: row !important;
    flex: 0 0 auto !important;
}

.pillar-dashboard-wrapper .records-container .submission-actions .action-btn {
    align-items: center !important;
    display: inline-flex !important;
    flex-direction: row !important;
    gap: 5px !important;
    height: 34px !important;
    justify-content: center !important;
    min-height: 34px !important;
    min-width: 72px !important;
    padding: 0 10px !important;
    white-space: nowrap !important;
    width: auto !important;
}

.pillar-dashboard-wrapper .records-container .submission-actions .action-icon {
    display: inline-block !important;
    flex: 0 0 14px !important;
    height: 14px !important;
    margin: 0 !important;
    width: 14px !important;
}

.pillar-dashboard-wrapper .records-container .submission-actions .btn-label {
    display: inline-block !important;
    line-height: 1 !important;
    margin: 0 !important;
    white-space: nowrap !important;
}

/* Final dashboard action spacing override.
   JS-built buttons (Reopen/Export) do not include markup whitespace, so spacing must be explicit. */
.pillar-dashboard-wrapper .submissions-section .submission-actions .action-btn {
    align-items: center !important;
    display: inline-flex !important;
    flex-direction: row !important;
    gap: 0 !important;
    justify-content: center !important;
    white-space: nowrap !important;
}

.pillar-dashboard-wrapper .submissions-section .submission-actions .action-btn .action-icon,
.pillar-dashboard-wrapper .submissions-section .submission-actions .action-btn .lucide-icon {
    flex: 0 0 auto !important;
    margin: 0 5px 0 0 !important;
}

.pillar-dashboard-wrapper .submissions-section .submission-actions .action-btn .btn-label {
    line-height: 1 !important;
    margin: 0 !important;
}

/* Final records toolbar icon spacing override. */
.pillar-dashboard-wrapper .filters-section .filter-actions .btn,
.pillar-dashboard-wrapper .bulk-actions-bar .bulk-action-buttons .btn {
    align-items: center !important;
    display: inline-flex !important;
    flex-direction: row !important;
    gap: 0 !important;
    min-height: 34px !important;
    justify-content: center !important;
    line-height: 1 !important;
    white-space: nowrap !important;
}

.pillar-dashboard-wrapper .filters-section .filter-actions .btn .lucide-icon,
.pillar-dashboard-wrapper .bulk-actions-bar .bulk-action-buttons .btn .lucide-icon {
    flex: 0 0 auto !important;
    margin: 0 6px 0 0 !important;
}

.pillar-dashboard-wrapper .bulk-actions-bar .bulk-action-buttons .btn {
    min-width: 132px !important;
}

/* ─── Staff Profile Page ─────────────────────────────────────────────────── */
/* Mirror of the caregiver profile styles. Without these, the profile-image
   <img> has no dimensional constraints, so the moment FileReader sets its src
   to a freshly-selected file, the picture renders at its full natural size
   and blows out the page layout. */

.profile-section {
    max-width: 720px;
    margin: 0 auto;
}

.profile-section h2 {
    font-size: 1.5em !important;
    font-weight: 600 !important;
    color: #1d2327 !important;
    margin: 0 0 24px 0 !important;
}

.profile-section .form-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.profile-section .form-section h3 {
    font-size: 1.15em !important;
    font-weight: 600 !important;
    color: #1d2327 !important;
    margin: 0 0 20px 0 !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.profile-image-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.profile-image-section .profile-image {
    width: 120px !important;
    height: 120px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid #e5e7eb !important;
    display: block !important;
}

.profile-image-section .profile-image-upload {
    margin-top: 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 14px !important;
    font-size: 13px !important;
    background: #2271b1 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
}

.profile-image-section .profile-image-upload:hover {
    background: #135e96 !important;
}

.profile-section .form-group {
    margin-bottom: 16px;
}

.profile-section .form-group label {
    display: block !important;
    font-weight: 500 !important;
    margin-bottom: 6px !important;
    color: #374151 !important;
    font-size: 0.9em !important;
}

.profile-section .form-group input[type="text"],
.profile-section .form-group input[type="email"],
.profile-section .form-group input[type="password"] {
    width: 100% !important;
    padding: 10px 12px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    transition: border-color 0.2s !important;
}

.profile-section .form-group input:focus {
    border-color: #2271b1 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.15) !important;
}

.profile-section .form-group input:disabled {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
}

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

.profile-section .form-submit {
    text-align: center;
    margin-top: 20px;
}

.profile-section .form-submit button {
    padding: 10px 28px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
}

.profile-section .form-submit .button-primary,
.profile-section .form-submit button[type="submit"] {
    background: #2271b1 !important;
    color: #fff !important;
    border: none !important;
}

.profile-section .form-submit button:hover {
    opacity: 0.9 !important;
}

.profile-section .field-tooltip {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.profile-section .password-input-wrapper {
    position: relative;
}

.profile-section .password-input-wrapper input {
    padding-right: 40px !important;
}

.profile-section .password-input-wrapper .wp-hide-pw {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    padding: 4px;
    color: #6b7280;
    cursor: pointer;
}

.profile-section .password-input-wrapper .wp-hide-pw:hover {
    color: #111827;
}

.profile-section .checkbox-group label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer;
}

.profile-section .checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 4px;
}

.profile-section .checkbox-options label {
    font-weight: 400 !important;
    font-size: 0.9em !important;
    align-items: flex-start !important;
}

.profile-section .status-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    position: relative;
}

.profile-section .status-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #34d399;
}

.profile-section .status-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #f87171;
}

.profile-section .status-message .close-message {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

@media (max-width: 768px) {
    .profile-section .form-row {
        grid-template-columns: 1fr;
    }
}