/* ESG Custom Portal Styles */
/* These styles match the theme's design exactly */

/* Form Visibility Control - Ensure only one form is visible at a time */
.esg-form-content {
    display: none;
}

/* Only show the form that should be visible (controlled by JavaScript) */
.esg-form-content[style*="display: block"],
.esg-form-content[style*="display:block"] {
    display: block !important;
}

/* Hide Social form sections when Environment or Governance forms are active */
#environment-form .esg-field-group[data-group="complaints_about_working_conditions"],
#environment-form .esg-field-group[data-group="injury_rate_and_safety"],
#environment-form .esg-field-group[data-group="ceo_pay_ratio"],
#environment-form .esg-field-group[data-group="temporary_worker_ratio"],
#environment-form .esg-field-group[data-group="global_health_&_safety"],
#environment-form .esg-field-group[data-group="marketing"],
#governance-form .esg-field-group[data-group="complaints_about_working_conditions"],
#governance-form .esg-field-group[data-group="injury_rate_and_safety"],
#governance-form .esg-field-group[data-group="ceo_pay_ratio"],
#governance-form .esg-field-group[data-group="temporary_worker_ratio"],
#governance-form .esg-field-group[data-group="global_health_&_safety"],
#governance-form .esg-field-group[data-group="marketing"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* General Button Styles - Ensure all buttons are visible */
.esg-portal-container .btn,
.esg-portal-container button:not(.esg-tab-btn):not(.esg-form-tab-btn) {
    display: inline-block;
    visibility: visible;
    opacity: 1;
}

/* Ensure buttons have proper styling if no class is applied */
.esg-portal-container button:not([class]) {
    background: #127801;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Login Form Styles - Matching Theme Design */
.esg-login-container {
    max-width: 450px;
    margin: 60px auto;
    padding: 0;
    background: transparent;
}

.esg-login-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    border-top: 4px solid #127801;
}

.esg-login-form h2 {
    margin: 0 0 30px 0;
    text-align: center;
    color: #127801;
    font-size: 28px;
    font-weight: 700;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.esg-form-group {
    margin-bottom: 25px;
}

.esg-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.esg-form-group input[type="text"],
.esg-form-group input[type="password"],
.esg-form-group input[type="email"],
.esg-form-group input[type="number"],
.esg-form-group select,
.esg-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.esg-form-group input[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
    color: #495057;
}

.esg-form-group input[readonly]:focus {
    border-color: #127801;
    background-color: #fff;
}

.esg-form-group input[type="text"]:focus,
.esg-form-group input[type="password"]:focus,
.esg-form-group input[type="email"]:focus,
.esg-form-group input[type="number"]:focus,
.esg-form-group select:focus,
.esg-form-group textarea:focus {
    outline: none;
    border-color: #127801;
    box-shadow: 0 0 0 3px rgba(18, 120, 1, 0.1);
}

/* Login Button - Theme Green */
.esg-login-form .btn,
.esg-login-form .btn-primary,
.esg-login-form button[type="submit"],
.esg-login-form #esg-login-submit {
    width: 100%;
    padding: 14px 24px;
    background: #127801;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    display: block;
    text-align: center;
    box-sizing: border-box;
}

/* Ensure button container is properly aligned */
.esg-login-form .esg-form-group:last-child {
    margin-bottom: 0;
    margin-top: 20px;
}

.esg-login-form .esg-form-group:last-child button {
    margin-top: 0;
}

.esg-login-form .btn:hover,
.esg-login-form .btn-primary:hover,
.esg-login-form button[type="submit"]:hover,
.esg-login-form #esg-login-submit:hover {
    background: #0f5f01;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 120, 1, 0.3);
}

/* Login button group alignment */
.esg-login-form .esg-login-button-group {
    margin-top: 25px;
    margin-bottom: 0;
    text-align: center;
}

.esg-login-form .esg-login-button-group button {
    width: 100%;
    max-width: 100%;
}

.esg-login-form .btn:active,
.esg-login-form .btn-primary:active,
.esg-login-form button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(18, 120, 1, 0.2);
}

.esg-error {
    background: #fff3cd;
    color: #856404;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    border-left: 4px solid #ffc107;
    font-size: 14px;
    line-height: 1.5;
}

.esg-success {
    background: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 25px;
    border-left: 4px solid #28a745;
    font-size: 14px;
    line-height: 1.5;
}

/* Portal Tabs */
.esg-portal-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.esg-portal-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

/* Tab Buttons - Matching Theme Style */
.esg-tab-btn {
    background: transparent;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #64748b;
    cursor: pointer;
    font-size: 16px;
}

.esg-tab-btn:hover {
    background: rgba(18, 120, 1, 0.1);
    color: #127801;
}

.esg-tab-btn.active {
    background: linear-gradient(135deg, #127801 0%, #127801 100%);
    color: white;
}

.esg-tab-content {
    display: none;
}

.esg-tab-content.active {
    display: block;
}

/* Form Tabs */
.esg-form-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

/* Form Tab Buttons - Matching Theme Style */
.esg-form-tab-btn {
    background: transparent;
    border: none;
    padding: 15px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #64748b;
    cursor: pointer;
    font-size: 16px;
}

.esg-form-tab-btn:hover {
    background: rgba(18, 120, 1, 0.1);
    color: #127801;
}

.esg-form-tab-btn.active {
    background: linear-gradient(135deg, #127801 0%, #127801 100%);
    color: white;
    background: #127801;
    color: #fff;
    border-color: #127801;
}

.esg-form-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.esg-form {
    max-width: 100%;
}

.esg-form-group .required {
    color: #dc3545;
    font-weight: bold;
    margin-left: 3px;
}

/* Form Submit Buttons - Theme Green (Matching Theme Style) */
.esg-form .btn,
.esg-form .btn-primary,
.esg-form button[type="submit"] {
    background: linear-gradient(135deg, #127801 0%, #127801 100%);
    color: #fff;
    border: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 20px;
    display: inline-block;
    box-shadow: 0 8px 20px rgba(18, 120, 1, 0.3);
}

.esg-form .btn:hover,
.esg-form .btn-primary:hover,
.esg-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #0f5f01 0%, #0f5f01 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(18, 120, 1, 0.4);
}

.esg-form .btn:active,
.esg-form .btn-primary:active,
.esg-form button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(18, 120, 1, 0.2);
}

.esg-form .btn:disabled,
.esg-form .btn-primary:disabled,
.esg-form button[type="submit"]:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* History Container - Enhanced */
.esg-history-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.esg-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.esg-history-header h2 {
    color: #127801;
    margin: 0;
    font-size: 28px;
}

.esg-history-actions {
    display: none !important;
}

.esg-history-actions .btn {
    display: none !important;
}

/* User Dashboard Statistics */
.esg-user-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.esg-stat-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.esg-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.esg-stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.esg-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #127801;
    margin-bottom: 5px;
}

.esg-stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.esg-stat-card.esg-stat-environment {
    border-left: 4px solid #4caf50;
}

.esg-stat-card.esg-stat-social {
    border-left: 4px solid #2196f3;
}

.esg-stat-card.esg-stat-governance {
    border-left: 4px solid #ff9800;
}

.esg-stat-card.esg-stat-published {
    border-left: 4px solid #4caf50;
}

.esg-stat-card.esg-stat-pending {
    border-left: 4px solid #ff9800;
}

.esg-stat-card.esg-stat-draft {
    border-left: 4px solid #9e9e9e;
}

/* View Toggle */
.esg-view-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: flex-end;
}

.esg-view-btn {
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.esg-view-btn:hover {
    background: #e0e0e0;
}

.esg-view-btn.active {
    background: #127801;
    color: #fff;
    border-color: #127801;
}

/* Search Input */
.esg-search-input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    max-width: 300px;
}

.esg-search-input:focus {
    outline: none;
    border-color: #127801;
    box-shadow: 0 0 0 3px rgba(18, 120, 1, 0.1);
}

.esg-history-container h2 {
    color: #127801;
    margin-bottom: 25px;
    font-size: 28px;
}

/* History Filters */
.esg-history-filters {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.esg-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.esg-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.esg-filter-group.esg-filter-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-self: flex-end;
    align-items: flex-end;
}

/* Create invisible label to match other filter groups - full width on first row */
.esg-filter-group.esg-filter-buttons::before {
    content: '';
    display: block;
    height: 21px;
    width: 100%;
    visibility: hidden;
    flex-shrink: 0;
    order: -1;
    flex-basis: 100%;
}

/* Buttons display horizontally on second row */
.esg-filter-group.esg-filter-buttons .btn {
    height: 38px;
    padding: 10px 20px;
    min-width: 120px;
    white-space: nowrap;
    flex: 0 0 auto;
    margin: 0;
}

.esg-filter-group label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.esg-filter-select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.esg-filter-select:focus {
    outline: none;
    border-color: #127801;
    box-shadow: 0 0 0 3px rgba(18, 120, 1, 0.1);
}

/* Select2 styling to match theme */
.select2-container--default .select2-selection--multiple {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    min-height: 38px;
    padding: 2px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: #127801;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    margin: 2px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #fff;
    margin-right: 5px;
    cursor: pointer;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ffeb3b;
}

.select2-container--default .select2-search--inline .select2-search__field {
    margin-top: 2px;
    padding: 4px;
}

.select2-container--default .select2-selection--single {
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    height: 38px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
}

.esg-filter-btn {
    padding: 12px 24px;
    height: fit-content;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.esg-filter-form .btn-primary,
.esg-filter-form .esg-filter-btn.btn-primary {
    background: #127801;
    color: #fff;
    box-shadow: 0 2px 4px rgba(18, 120, 1, 0.2);
}

.esg-filter-form .btn-primary:hover,
.esg-filter-form .esg-filter-btn.btn-primary:hover {
    background: #0f6a01;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(18, 120, 1, 0.3);
}

.esg-filter-form .btn-secondary,
.esg-filter-form .esg-filter-btn.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e0e0e0;
}

.esg-filter-form .btn-secondary:hover,
.esg-filter-form .esg-filter-btn.btn-secondary:hover {
    background: #e9ecef;
    border-color: #d0d0d0;
    color: #222;
}

.esg-history-stats {
    margin-bottom: 20px;
    padding: 15px;
    background: #e8f5e9;
    border-left: 4px solid #127801;
    border-radius: 4px;
}

/* History Cards */
.esg-history-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.esg-history-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.esg-history-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.esg-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.esg-card-title-group {
    flex: 1;
}

.esg-card-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.esg-card-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.esg-type-environment {
    background: #e8f5e9;
    color: #2e7d32;
}

.esg-type-governance {
    background: #e3f2fd;
    color: #1976d2;
}

.esg-type-social {
    background: #fce4ec;
    color: #c2185b;
}

.esg-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-published {
    background: #d4edda;
    color: #155724;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-draft {
    background: #f8d7da;
    color: #721c24;
}

.esg-card-body {
    margin-bottom: 15px;
}

.esg-card-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.esg-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}

.esg-info-item:last-child {
    border-bottom: none;
}

.esg-info-label {
    font-weight: 600;
    color: #666;
    font-size: 14px;
}

.esg-info-value {
    color: #333;
    font-size: 14px;
    text-align: right;
}

.esg-card-footer {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.esg-card-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    color: #fff;
    background: #127801;
    box-shadow: 0 2px 4px rgba(18, 120, 1, 0.2);
}

.esg-card-btn:hover {
    background: #0f6a01;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(18, 120, 1, 0.3);
}

.esg-card-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(18, 120, 1, 0.2);
}

.esg-card-btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e0e0e0;
}

.esg-card-btn-secondary:hover {
    background: #e9ecef;
    border-color: #d0d0d0;
    color: #222;
}

.esg-card-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.esg-card-details-content {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.esg-no-submissions {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.esg-no-submissions-icon {
    display: none;
}

.esg-no-submissions h3 {
    color: #666;
    margin-bottom: 10px;
}

.esg-no-submissions p {
    color: #999;
    margin-bottom: 15px;
}

/* Admin View - Enhanced */
.esg-admin-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

.esg-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.esg-admin-header h1 {
    color: #127801;
    margin: 0;
    font-size: 32px;
}

.esg-admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.esg-admin-actions .btn,
.esg-admin-actions .btn-secondary {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    border: none;
}

.esg-admin-actions .btn-secondary {
    background: #6c757d;
    color: #fff;
}

.esg-admin-actions .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.esg-filter-item .btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: none;
    white-space: nowrap;
}

.esg-filter-item .btn-primary {
    background: linear-gradient(135deg, #127801 0%, #127801 100%);
    color: #fff;
}

.esg-filter-item .btn-primary:hover {
    background: linear-gradient(135deg, #0f5f01 0%, #0f5f01 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(18, 120, 1, 0.3);
}

.esg-filter-item .btn-secondary {
    background: #6c757d;
    color: #fff;
}

.esg-filter-item .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.esg-filter-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: flex-end;
    justify-content: flex-start;
}

.esg-filter-buttons .btn {
    white-space: nowrap;
    min-width: 120px;
    padding: 10px 20px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.esg-admin-filters {
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.esg-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: end;
}

.esg-filter-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.esg-filter-item label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.esg-search-input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    min-width: 200px;
}

/* Admin filter buttons alignment */
.esg-filter-item.esg-filter-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

/* Create invisible label space to match other filter items - full width on first row */
.esg-filter-item.esg-filter-buttons::before {
    content: '';
    display: block;
    height: 21px;
    width: 100%;
    visibility: hidden;
    flex-shrink: 0;
    order: -1;
    flex-basis: 100%;
}

/* Buttons display horizontally */
.esg-filter-item.esg-filter-buttons .btn {
    height: 38px;
    padding: 10px 20px;
    min-width: 120px;
    white-space: nowrap;
    margin: 0;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.esg-search-input:focus {
    outline: none;
    border-color: #127801;
    box-shadow: 0 0 0 3px rgba(18, 120, 1, 0.1);
}

/* Dashboard Statistics Cards */
.esg-admin-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.esg-stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 4px solid #127801;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.esg-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.esg-stat-card.esg-stat-environment {
    border-top-color: #28a745;
}

.esg-stat-card.esg-stat-social {
    border-top-color: #dc3545;
}

.esg-stat-card.esg-stat-governance {
    border-top-color: #007bff;
}

.esg-stat-card.esg-stat-published {
    border-top-color: #28a745;
}

.esg-stat-card.esg-stat-pending {
    border-top-color: #ffc107;
}

.esg-stat-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.esg-stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #127801;
    margin: 10px 0;
    line-height: 1;
}

.esg-stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Active Filter Chips */
.esg-active-filters {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.esg-filter-label {
    font-weight: 600;
    color: #555;
    margin-right: 10px;
}

.esg-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.esg-filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #127801;
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    gap: 8px;
}

.esg-chip-remove {
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.esg-chip-remove:hover {
    opacity: 1;
}

/* Loading States */
.esg-loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.esg-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #127801;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.esg-error-state {
    text-align: center;
    padding: 40px 20px;
    color: #dc3545;
    background: #f8d7da;
    border-radius: 6px;
    border-left: 4px solid #dc3545;
}

/* Status Select Dropdown */
.esg-status-select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.esg-status-select:hover {
    border-color: #127801;
}

.esg-status-select:focus {
    outline: none;
    border-color: #127801;
    box-shadow: 0 0 0 3px rgba(18, 120, 1, 0.1);
}

/* Date Range Inputs */
.esg-date-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.esg-date-input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.esg-date-separator {
    color: #666;
    font-weight: 500;
}

/* Toast Notifications */
#esg-toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 99999;
    pointer-events: none;
    max-width: 400px;
}

.esg-toast {
    position: relative;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-weight: 500;
    min-width: 300px;
    max-width: 400px;
    margin-bottom: 15px;
    opacity: 0;
    transform: translateX(120%);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: block;
    word-wrap: break-word;
    line-height: 1.5;
}

.esg-toast.show {
    opacity: 1;
    transform: translateX(0);
    display: block !important;
}

.esg-toast.hide {
    opacity: 0;
    transform: translateX(120%);
}

.esg-toast-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.esg-toast-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.esg-toast-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

#esg-toast-container .esg-toast {
    pointer-events: auto;
    cursor: pointer;
}

#esg-toast-container .esg-toast:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Search Highlighting */
.esg-admin-table mark {
    background: #ffeb3b;
    padding: 2px 4px;
    border-radius: 2px;
    font-weight: 600;
}

.esg-admin-stats {
    margin-bottom: 20px;
    padding: 15px;
    background: #e8f5e9;
    border-left: 4px solid #127801;
    border-radius: 4px;
    font-weight: 600;
    color: #2e7d32;
}

.esg-admin-table-container {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.esg-admin-table-wrapper {
    overflow-x: auto;
}

.esg-admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.esg-admin-table th,
.esg-admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.esg-admin-table th {
    background: #f8f9fa;
    font-weight: 600;
    position: relative;
}

.esg-admin-table th.sortable {
    cursor: pointer;
    user-select: none;
    padding-right: 30px;
}

.esg-admin-table th.sortable:hover {
    background: #e9ecef;
}

.sort-indicator {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #999;
}

.esg-admin-table tr:hover {
    background: #f8f9fa;
}

.esg-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* NEW badge for recently submitted records */
.esg-new-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: #ff6b6b;
    color: #fff;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Highlight new submissions in table */
.esg-admin-table tr.esg-new-submission {
    background: #fff9e6 !important;
    border-left: 3px solid #ff6b6b;
}

.esg-admin-table tr.esg-new-submission:hover {
    background: #fff5d6 !important;
}

/* Highlight new submissions in card view */
.esg-history-card.esg-new-submission-card {
    border: 2px solid #ff6b6b;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.2);
}

.esg-history-card.esg-new-submission-card:hover {
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.esg-no-results {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* Pagination */
.esg-pagination {
    margin-top: 25px;
    text-align: center;
}

.esg-pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.esg-pagination li {
    display: inline-block;
}

.esg-pagination a,
.esg-pagination span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #127801;
    transition: all 0.3s ease;
}

.esg-pagination a:hover {
    background: #127801;
    color: white;
    border-color: #127801;
}

.esg-pagination .current {
    background: #127801;
    color: white;
    border-color: #127801;
}

/* View Details Links - Matching Theme Button Style */
.esg-view-submission,
.esg-view-details {
    border: none;
    border-radius: 20px;
    padding: 8px 20px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    background: linear-gradient(135deg, #127801, #127801);
    text-decoration: none;
    display: inline-block;
}

.esg-view-submission:hover,
.esg-view-details:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(18, 120, 1, 0.4);
    text-decoration: none;
    color: white;
}

/* Help Section */
.esg-help-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.esg-help-content h3 {
    color: #127801;
    margin-top: 20px;
    margin-bottom: 10px;
}

.esg-help-content p {
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Field Groups */
/* Form Card Styling - Applied to all forms (Environment, Social, Governance) */
#environment-form .esg-field-group,
#social-form .esg-field-group,
#governance-form .esg-field-group {
    margin-bottom: 30px;
    padding: 0;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

#environment-form .esg-field-group .esg-section-card,
#social-form .esg-field-group .esg-section-card,
#governance-form .esg-field-group .esg-section-card {
    padding: 25px 30px;
}

#environment-form .esg-field-group .esg-section-header,
#social-form .esg-field-group .esg-section-header,
#governance-form .esg-field-group .esg-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

#environment-form .esg-field-group .esg-section-badge,
#social-form .esg-field-group .esg-section-badge,
#governance-form .esg-field-group .esg-section-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #127801 0%, #0d5d01 100%);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(18, 120, 1, 0.3);
}

#environment-form .esg-field-group h3,
#social-form .esg-field-group h3,
#governance-form .esg-field-group h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: #127801;
    flex: 1;
}

#environment-form .esg-field-group .esg-validation-requirements {
    margin: 10px 0 20px 48px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-left: 3px solid #127801;
    border-radius: 4px;
    font-size: 12px;
    color: #555;
    line-height: 1.6;
}

#environment-form .esg-field-group .esg-validation-requirements ul {
    margin: 5px 0 0 0;
    padding-left: 20px;
}

#environment-form .esg-field-group .esg-validation-requirements li {
    margin-bottom: 4px;
}

/* General field group styling (for Governance and Social forms) */
.esg-field-group {
    margin-bottom: 40px;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.esg-field-group:first-child {
    margin-top: 0;
}

.esg-field-group h3 {
    color: #127801;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 3px solid #127801;
    font-size: 22px;
    font-weight: 700;
}

.esg-field-note {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Checkbox Groups */
.esg-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.esg-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
}

.esg-checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Repeater Fields */
.esg-repeater {
    margin-top: 15px;
}

.esg-repeater-row {
    margin-bottom: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    position: relative;
    transition: all 0.3s ease;
}

.esg-repeater-row:hover {
    border-color: #127801;
    box-shadow: 0 2px 8px rgba(18, 120, 1, 0.1);
}

.esg-repeater-row label {
    font-size: 13px;
    margin-bottom: 6px;
}

.esg-add-repeater-row {
    margin-top: 10px;
    background: #127801 !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}

.esg-add-repeater-row:hover {
    background: #0f5f01 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 120, 1, 0.3) !important;
}

.esg-remove-row {
    background: #dc3545 !important;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.esg-remove-row:hover {
    background: #c82333 !important;
}

/* Hidden fields (when Not Applicable is checked) */
.esg-form-group[style*="display: none"] {
    opacity: 0.5;
}

/* Submission Details Modal */
.esg-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.esg-modal-content {
    background: white;
    max-width: 900px;
    margin: 50px auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.esg-modal-header {
    padding: 20px 25px;
    border-bottom: 2px solid #127801;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.esg-modal-header h2 {
    margin: 0;
    color: #127801;
    font-size: 24px;
}

.esg-modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.3s;
}

.esg-modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.esg-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.esg-modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.esg-modal-footer .btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    border: none;
}

.esg-modal-footer .btn-primary {
    background: linear-gradient(135deg, #127801 0%, #127801 100%);
    color: #fff;
}

.esg-modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #0f5f01 0%, #0f5f01 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(18, 120, 1, 0.3);
}

.esg-modal-footer .btn-secondary {
    background: #6c757d;
    color: #fff;
}

.esg-modal-footer .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.esg-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Submission Details */
.esg-submission-details {
    font-size: 14px;
}

.esg-detail-section {
    margin-bottom: 30px;
}

.esg-detail-section h3 {
    color: #127801;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #127801;
    font-size: 20px;
}

.esg-detail-section h4 {
    color: #333;
    margin: 20px 0 10px 0;
    font-size: 16px;
}

.esg-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.esg-detail-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
}

.esg-detail-table td:first-child {
    width: 40%;
    font-weight: 600;
    color: #555;
}

.esg-detail-table tr:last-child td {
    border-bottom: none;
}

.esg-field-group-display {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #127801;
}

.esg-field-group-display h4 {
    color: #127801;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.esg-na-indicator {
    background: #fff3cd;
    color: #856404;
    padding: 10px 15px;
    border-left: 3px solid #ffc107;
    font-style: italic;
}

.esg-app-indicator {
    background: #d4edda;
    color: #155724;
    padding: 10px 15px;
    border-left: 3px solid #28a745;
    font-style: italic;
}

.esg-repeater-display {
    margin-top: 10px;
}

.esg-repeater-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.esg-repeater-item strong {
    display: block;
    margin-bottom: 10px;
    color: #127801;
    font-size: 14px;
}

.esg-repeater-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.esg-repeater-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.esg-repeater-table td:first-child {
    width: 50%;
    font-weight: 500;
    color: #666;
}

.esg-repeater-table tr:last-child td {
    border-bottom: none;
    border-left: 4px solid #127801;
}

.esg-na-indicator {
    background: #fff3cd;
    color: #856404;
    font-style: italic;
    padding: 8px 15px !important;
}

.esg-app-indicator {
    background: #d1ecf1;
    color: #0c5460;
    font-style: italic;
    padding: 8px 15px !important;
}

.esg-repeater-display {
    margin-top: 10px;
}

.esg-repeater-item {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.esg-repeater-item:last-child {
    margin-bottom: 0;
}

.esg-repeater-table {
    width: 100%;
    margin-top: 10px;
    font-size: 13px;
}

.esg-repeater-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.esg-repeater-table tr:last-child td {
    border-bottom: none;
}

/* Search Highlight */
mark {
    background: #ffeb3b;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* History Table View */
.esg-history-table-view {
    margin-top: 20px;
}

.esg-history-table-view .esg-admin-table {
    width: 100%;
}

/* Filter Buttons Container - Duplicate removed, using main rule above */

.esg-error {
    color: #dc3545;
    padding: 15px;
    background: #f8d7da;
    border-radius: 4px;
    margin: 10px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .esg-portal-tabs {
        flex-direction: column;
    }
    
    .esg-form-tabs {
        flex-direction: column;
    }
    
    .esg-admin-filters {
        flex-direction: column;
    }
    
    .esg-admin-table-container {
        overflow-x: scroll;
    }
    
    .esg-repeater-row {
        padding: 10px;
    }
    
    .esg-repeater-row > div {
        flex-direction: column !important;
    }
    
    .esg-modal-content {
        margin: 20px auto;
        max-width: 95%;
    }
    
    .esg-modal-header,
    .esg-modal-body,
    .esg-modal-footer {
        padding: 15px;
    }
    
    .esg-detail-table td:first-child {
        width: 35%;
        font-size: 13px;
    }
    
    /* Responsive Login Form */
    .esg-login-container {
        max-width: 100%;
        margin: 30px 15px;
        padding: 0;
    }
    
    .esg-login-form {
        padding: 30px 25px;
    }
    
    .esg-login-form h2 {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .esg-form-group {
        margin-bottom: 20px;
    }
}

/* Additional Login Form Enhancements */
.esg-login-form .esg-form-group:last-of-type {
    margin-bottom: 0;
}

.esg-login-form .esg-form-group input::placeholder {
    color: #999;
    opacity: 1;
}

.esg-login-form .esg-form-group input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset;
    -webkit-text-fill-color: #333;
}

.esg-login-form .esg-form-group input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px white inset, 0 0 0 3px rgba(18, 120, 1, 0.1);
}

/* Login Form Animations */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.esg-login-form.shake {
    animation: shake 0.5s;
}

@media (max-width: 480px) {
    .esg-login-form {
        padding: 25px 20px;
        border-radius: 8px;
    }
    
    .esg-login-form h2 {
        font-size: 22px;
    }
    
    .esg-login-form .btn,
    .esg-login-form .btn-primary,
    .esg-login-form button[type="submit"] {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVENESS
   ============================================ */

/* Tablet and below (768px) */
@media (max-width: 768px) {
    /* Form containers */
    .esg-portal-container {
        padding: 15px;
    }
    
    .esg-form-container {
        padding: 15px;
    }
    
    /* Form fields */
    .esg-form-group {
        margin-bottom: 20px;
    }
    
    .esg-form-group input[type="text"],
    .esg-form-group input[type="email"],
    .esg-form-group input[type="number"],
    .esg-form-group input[type="url"],
    .esg-form-group input[type="tel"],
    .esg-form-group input[type="date"],
    .esg-form-group select,
    .esg-form-group textarea {
        width: 100% !important;
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
        box-sizing: border-box;
    }
    
    /* Buttons */
    .esg-portal-container .btn,
    .esg-portal-container button:not(.esg-tab-btn):not(.esg-form-tab-btn) {
        width: 100%;
        max-width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    /* Button groups */
    .esg-form-actions,
    .esg-button-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .esg-form-actions .btn,
    .esg-button-group .btn {
        width: 100%;
        margin: 0;
    }
    
    /* Repeater fields */
    .esg-repeater-row {
        flex-direction: column !important;
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .esg-repeater-row > div {
        width: 100% !important;
        margin-bottom: 10px;
    }
    
    .esg-repeater-row > div:last-child {
        margin-bottom: 0;
    }
    
    /* Document rows */
    .doc-row {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .doc-row > div {
        width: 100% !important;
        flex: 1 1 100% !important;
    }
    
    .doc-row > div[style*="padding-top"] {
        padding-top: 0 !important;
        margin-top: 10px;
    }
    
    /* Tables */
    .esg-table-container,
    .esg-admin-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
        font-size: 14px;
    }
    
    table th,
    table td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    /* Modals */
    .esg-modal-content,
    #account-request-modal > div {
        max-width: 95% !important;
        margin: 20px auto !important;
        padding: 20px 15px !important;
    }
    
    /* Form sections */
    .esg-field-group {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .esg-field-group h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    /* Progress bar */
    .esg-progress-container {
        padding: 15px;
    }
    
    .esg-progress-bar {
        height: 25px;
    }
    
    /* Checkboxes and radio buttons */
    .esg-form-group input[type="checkbox"],
    .esg-form-group input[type="radio"] {
        width: auto;
        margin-right: 8px;
    }
    
    /* Labels */
    .esg-form-group label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    /* TinyMCE editors */
    .mce-tinymce {
        width: 100% !important;
    }
    
    .mce-container-body {
        width: 100% !important;
    }
    
    /* File upload fields */
    .esg-form-group input[type="file"] {
        width: 100%;
        padding: 10px;
    }
    
    /* Help text */
    .esg-form-group small,
    .esg-form-group .description {
        font-size: 12px;
        display: block;
        margin-top: 5px;
    }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
    /* Even tighter spacing */
    .esg-portal-container {
        padding: 10px;
    }
    
    .esg-form-container {
        padding: 10px;
    }
    
    /* Smaller font sizes */
    .esg-form-group input[type="text"],
    .esg-form-group input[type="email"],
    .esg-form-group input[type="number"],
    .esg-form-group input[type="url"],
    .esg-form-group input[type="tel"],
    .esg-form-group input[type="date"],
    .esg-form-group select,
    .esg-form-group textarea {
        padding: 10px 12px;
        font-size: 16px; /* Keep 16px to prevent iOS zoom */
    }
    
    /* Buttons */
    .esg-portal-container .btn {
        padding: 12px 18px;
        font-size: 15px;
    }
    
    /* Headings */
    .esg-field-group h3 {
        font-size: 16px;
    }
    
    /* Tables */
    table {
        min-width: 500px;
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    /* Modals */
    .esg-modal-content,
    #account-request-modal > div {
        padding: 15px 10px !important;
    }
    
    /* Form sections */
    .esg-field-group {
        padding: 12px;
    }
}

/* Extra small devices (360px and below - Samsung Galaxy S8+) */
@media (max-width: 360px) {
    .esg-portal-container {
        padding: 8px;
    }
    
    .esg-form-container {
        padding: 8px;
    }
    
    .esg-form-group input[type="text"],
    .esg-form-group input[type="email"],
    .esg-form-group input[type="number"],
    .esg-form-group input[type="url"],
    .esg-form-group input[type="tel"],
    .esg-form-group input[type="date"],
    .esg-form-group select,
    .esg-form-group textarea {
        padding: 10px;
        font-size: 16px;
    }
    
    .esg-portal-container .btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .esg-field-group h3 {
        font-size: 15px;
    }
    
    table {
        min-width: 400px;
    }
    
    .esg-modal-content,
    #account-request-modal > div {
        padding: 12px 8px !important;
    }
}

/* Landscape orientation fixes */
@media (max-width: 768px) and (orientation: landscape) {
    .esg-modal-content,
    #account-request-modal > div {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Prevent horizontal scroll */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .esg-portal-container,
    .esg-form-container {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* Ensure all child elements respect container width */
    .esg-portal-container *,
    .esg-form-container * {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* Form Validation Error Styles */
.esg-has-error input,
.esg-has-error select,
.esg-has-error textarea {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
}

.esg-has-error input:focus,
.esg-has-error select:focus,
.esg-has-error textarea:focus {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* Form Sub-section Numbering - Applied to all forms (Environment, Social, Governance) */
#environment-form .esg-form-group[data-field] label,
#social-form .esg-form-group[data-field] label,
#governance-form .esg-form-group[data-field] label {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

#environment-form .esg-form-group[data-field] label .esg-subsection-number,
#social-form .esg-form-group[data-field] label .esg-subsection-number,
#governance-form .esg-form-group[data-field] label .esg-subsection-number {
    font-weight: 700;
    color: #127801;
    flex-shrink: 0;
    margin-right: 6px;
}

/* Hide Save as Draft button */
/* Save as Draft button - now visible and functional */
.esg-save-draft-btn {
    display: inline-block !important;
    background: #6c757d !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.esg-save-draft-btn:hover {
    background: #5a6268 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
}

.esg-field-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    font-weight: 500;
}

/* Input field error styling */
input.esg-field-error,
select.esg-field-error,
textarea.esg-field-error {
    border-color: #dc3545 !important;
    border-width: 2px !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Validation error message */
.esg-validation-error {
    color: #856404;
    font-size: 13px;
    margin-top: 8px;
    padding: 10px 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    display: block;
    font-weight: 500;
}

.esg-validation-error strong {
    color: #856404;
    font-weight: 600;
}

.esg-error-summary {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid #dc3545;
}

.esg-error-summary strong {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
}

.esg-error-summary ul {
    margin: 10px 0 0 20px;
    padding: 0;
    list-style-type: disc;
}

.esg-error-summary li {
    margin: 5px 0;
    font-size: 13px;
}

/* Repeater Row Error Styles */
.esg-repeater-row .esg-field-error {
    font-size: 11px;
    margin-top: 3px;
}

.esg-repeater-row.esg-has-error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

/* Form Progress Indicator */
.esg-form-progress-container {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, position 0.1s ease;
    width: 100%;
    box-sizing: border-box;
    /* Position will be set by JavaScript */
}

/* Enhanced shadow when sticky (scrolled) */
.esg-form-progress-container.sticky-active {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

/* Spacer to prevent content jump when progress bar becomes fixed */
.esg-progress-spacer {
    display: block;
    visibility: hidden;
}

.esg-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.esg-progress-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.esg-progress-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.esg-progress-percentage {
    font-size: 24px;
    font-weight: 700;
    color: #127801;
}

.esg-progress-counter {
    font-size: 13px;
    color: #666;
}

.esg-progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.esg-progress-fill {
    height: 100%;
    background: #127801;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 6px;
}

.esg-progress-fill.progress-low {
    background: #dc3545;
}

.esg-progress-fill.progress-medium {
    background: #ff9800;
}

.esg-progress-fill.progress-high {
    background: #2196f3;
}

.esg-progress-fill.progress-complete {
    background: #4caf50;
}

/* Form Actions */
.esg-form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.esg-draft-status {
    font-size: 13px;
    color: #1976d2;
}

.esg-draft-message {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Preview Modal */
.esg-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.esg-preview-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.esg-preview-modal-header {
    padding: 20px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #127801;
    color: #fff;
}

.esg-preview-modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.esg-preview-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.esg-preview-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.esg-preview-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.esg-preview-table {
    width: 100%;
    border-collapse: collapse;
}

.esg-preview-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.esg-preview-table td:first-child {
    width: 40%;
    font-weight: 600;
    color: #333;
}

.esg-preview-table tr:last-child td {
    border-bottom: none;
}

.esg-preview-modal-footer {
    padding: 20px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8f9fa;
}

/* Help Section */
.esg-help-container {
    max-width: 1000px;
    margin: 0 auto;
}

.esg-help-header {
    margin-bottom: 30px;
}

.esg-help-header h2 {
    color: #127801;
    margin-bottom: 20px;
}

.esg-help-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.esg-help-search .esg-search-input {
    flex: 1;
    max-width: 400px;
}

.esg-help-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.esg-help-tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

/* Hide Contact Support Tab */
.esg-help-tab-btn[data-help-tab="contact"],
#help-contact {
    display: none !important;
}

.esg-help-tab-btn:hover {
    color: #127801;
}

.esg-help-tab-btn.active {
    color: #127801;
    border-bottom-color: #127801;
}

.esg-help-tab-content {
    display: none;
}

.esg-help-tab-content.active {
    display: block;
}

.esg-help-section {
    background: #fff;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 4px solid #127801;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.esg-help-section h3 {
    color: #127801;
    margin-top: 0;
    margin-bottom: 15px;
}

.esg-help-section ol,
.esg-help-section ul {
    line-height: 1.8;
}

.esg-help-section li {
    margin-bottom: 8px;
}

/* FAQ */
.esg-faq-list {
    max-width: 800px;
}

.esg-faq-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.esg-faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    transition: background 0.3s ease;
}

.esg-faq-question:hover {
    background: #e9ecef;
}

.esg-faq-question h4 {
    margin: 0;
    flex: 1;
    color: #333;
}

.esg-faq-toggle {
    font-size: 24px;
    font-weight: 300;
    color: #127801;
    width: 30px;
    text-align: center;
}

.esg-faq-item.active .esg-faq-question {
    background: #e8f5e9;
}

.esg-faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.esg-faq-item.active .esg-faq-answer {
    padding: 20px;
    max-height: 500px;
}

.esg-faq-answer p {
    margin: 0;
    line-height: 1.6;
    color: #666;
}

/* Field Help */
.esg-field-help-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.esg-field-help-section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.esg-field-help-section h3 {
    color: #127801;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.esg-field-help-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.esg-field-help-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.esg-field-help-item h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
}

.esg-field-help-item p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Contact Support */
.esg-contact-support {
    max-width: 600px;
}

.esg-support-form {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 30px;
}

.esg-support-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #127801;
}

.esg-support-info h4 {
    margin-top: 0;
    color: #127801;
}

.esg-support-info p {
    margin: 8px 0;
    color: #666;
}

/* Profile Section */
.esg-profile-container {
    max-width: 1000px;
    margin: 0 auto;
}

.esg-profile-header {
    margin-bottom: 30px;
}

.esg-profile-header h2 {
    color: #127801;
    margin-bottom: 20px;
}

.esg-profile-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.esg-profile-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.esg-profile-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.esg-profile-section h3 {
    color: #127801;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #127801;
}

.esg-profile-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.esg-profile-field {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #127801;
    margin-bottom: 10px;
}

.esg-profile-field label {
    min-width: 150px;
    max-width: 150px;
    font-weight: 600;
    color: #333;
    margin-right: 15px;
    flex-shrink: 0;
}

.esg-profile-field span {
    color: #666;
    flex: 1;
    word-break: break-word;
}

.esg-profile-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.esg-profile-actions .btn {
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.esg-profile-actions .btn-primary {
    background: #127801;
    color: white;
    border: none;
}

.esg-profile-actions .btn-primary:hover {
    background: #0f5f01;
}

.esg-profile-actions .btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
}

.esg-profile-actions .btn-secondary:hover {
    background: #5a6268;
}

/* Quick Actions - Hidden */
.esg-quick-actions,
.esg-history-actions,
.esg-quick-action-btn {
    display: none !important;
}

/* Comparison Modal */
.esg-comparison-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.esg-comparison-container {
    background: #fff;
    border-radius: 8px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.esg-comparison-header {
    padding: 20px;
    background: #127801;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.esg-comparison-header h3 {
    margin: 0;
    color: #fff;
}

.esg-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
}

.esg-comparison-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.esg-comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.esg-comparison-table th,
.esg-comparison-table td {
    padding: 12px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.esg-comparison-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

/* Access Prompt Styles - Login and Permission Denied Messages */
.esg-access-prompt {
    max-width: 600px;
    margin: 60px auto;
    padding: 40px 20px;
}

.esg-access-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 50px 40px;
    text-align: center;
    border-top: 4px solid #127801;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.esg-access-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.esg-access-card.esg-access-denied {
    border-top-color: #dc3545;
}

.esg-access-icon {
    font-size: 64px;
    margin-bottom: 20px;
    color: #127801;
    display: block;
}

.esg-access-icon.esg-access-icon-warning {
    color: #dc3545;
}

.esg-access-card h3 {
    color: #127801;
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.esg-access-card.esg-access-denied h3 {
    color: #dc3545;
}

.esg-access-card p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 30px 0;
}

.esg-access-button {
    display: inline-block;
    background: linear-gradient(135deg, #127801 0%, #0f5f01 100%);
    color: #fff;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(18, 120, 1, 0.3);
    border: none;
    cursor: pointer;
}

.esg-access-button:hover {
    background: linear-gradient(135deg, #0f5f01 0%, #0d4d01 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(18, 120, 1, 0.4);
    color: #fff;
    text-decoration: none;
}

.esg-access-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(18, 120, 1, 0.3);
}

.esg-access-button-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
}

.esg-access-button-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    box-shadow: 0 12px 25px rgba(108, 117, 125, 0.4);
}

.esg-access-support {
    color: #999;
    font-size: 14px;
    margin-top: 25px;
    margin-bottom: 0;
}

.esg-access-support a {
    color: #127801;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.esg-access-support a:hover {
    color: #0f5f01;
    text-decoration: underline;
}

/* Responsive Design for Access Prompt */
@media (max-width: 768px) {
    .esg-access-prompt {
        margin: 40px auto;
        padding: 20px 15px;
    }
    
    .esg-access-card {
        padding: 40px 30px;
    }
    
    .esg-access-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }
    
    .esg-access-card h3 {
        font-size: 24px;
    }
    
    .esg-access-button {
        padding: 14px 30px;
        font-size: 14px;
    }
}

.esg-comparison-table tr:nth-child(even) {
    background: #f8f9fa;
}

