/* ReefSecure Angler - Orange Color Scheme */

/* CSS Variables for consistent theming */
:root {
    --primary-orange: #ff6b35;
    --secondary-orange: #ff8c42;
    --dark-orange: #e55a2b;
    --light-orange: #ffb366;
    --accent-orange: #ff9f43;
    --gradient-primary: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    --gradient-secondary: linear-gradient(135deg, #ff8c42 0%, #ffb366 100%);
    --text-dark: #333;
    --text-light: #666;
    --text-white: #ffffff;
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --border-light: #ddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-large: 0 15px 35px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --drop-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-white);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
}

/* Full width container for tabs */
.container.full-width {
    max-width: none;
    margin: 0;
    padding: 0;
    flex: 1;
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

/* Cards */
.card {
    background: var(--bg-white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card h3 {
    margin: 0 0 15px 0;
    color: var(--text-dark);
    border-bottom: 2px solid var(--primary-orange);
    padding-bottom: 10px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-white);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
    background: linear-gradient(135deg, #e55a2b 0%, #ff6b35 100%);
}

.btn-secondary {
    background: var(--text-white);
    color: var(--primary-orange);
    border: 2px solid var(--primary-orange);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.1);
}

.btn-secondary:hover {
    background: var(--primary-orange);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
    border-color: var(--primary-orange);
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-light);
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-orange);
}

/* Alerts */
.alert {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Headers */
.header {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: 20px;
    box-shadow: var(--shadow);
}

.header-content {
    max-width: none;
    margin: 0;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    margin: 0;
    font-size: 24px;
}

/* Tab Description Styles */
.tab-description {
    margin: 8px 0 20px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    max-width: 800px;
}

/* Login Page Styles */
.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-container h1 {
    font-weight: bold;
    margin: 0 0 20px 0;
    font-size: 28px;
    color: var(--text-dark);
}

.login-container {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow-large);
    width: 100%;
    max-width: 400px;
}

.login-container h1 {
    font-weight: bold;
    margin: 0 0 20px 0;
    font-size: 28px;
    color: var(--text-dark);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--text-dark);
    margin: 0;
    font-size: 28px;
}

.login-header p {
    color: var(--text-light);
    margin: 10px 0 0 0;
}

/* Dashboard Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-orange);
    margin: 10px 0;
}

/* Table Styles */
.table-container {
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow-y: auto;
    border: 1px solid var(--border-light);
}

.table-header {
    background: var(--primary-orange);
    color: var(--text-white);
    padding: 25px 30px;
    position: relative;
}

.table-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-white);
    border-bottom: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th {
    background: #f8f9fa;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

th:first-child {
    border-top-left-radius: 0;
}

th:last-child {
    border-top-right-radius: 0;
}

td {
    color: var(--text-dark);
    vertical-align: middle;
}

tr:hover {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8d6 100%);
    transform: scale(1.001);
    transition: all 0.2s ease;
}

tr:nth-child(even) {
    background-color: #fafafa;
}

tr:nth-child(even):hover {
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8d6 100%);
}

.no-data {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Status Colors */
.status-online {
    color: #28a745;
}

.status-warning {
    color: #ffc107;
}

.status-info {
    color: #17a2b8;
}

/* Tab System */
.tabs {
    overflow: hidden;
}

.tab-header {
    display: flex;
    background: var(--bg-white);
    padding: 0;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    z-index: 50;
}

.tab-button {
    flex: 1;
    padding: 18px 24px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.3s ease;
    position: relative;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tab-button:hover {
    color: var(--primary-orange);
    background: #e9ecef;
}

.tab-button.active {
    color: var(--text-white);
    font-weight: 600;
    background: var(--gradient-primary);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-orange);
}

.tab-content {
    display: none;
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    height: 0; /* Allow flex to control height */
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 175px);
}

.tab-content h3 {
    margin: 0 0 20px 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 24px;
    border-bottom: none;
    padding-bottom: 0;
}

/* Clickable links in employee table */
table a {
    color: var(--primary-orange);
    text-decoration: none;
    transition: all 0.3s ease;
}

table a:hover {
    color: var(--dark-orange);
    text-decoration: underline;
    transform: translateY(-1px);
}

/* Footer */
.footer {
    background: var(--gradient-primary);
    color: var(--text-white);
    padding: 8px 0;
    margin-top: auto;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.footer-content {
    max-width: none;
    margin: 0;
    padding: 0 10px;
    text-align: center;
}

.footer p {
    margin: 0;
    font-size: 11px;
    opacity: 0.7;
}

.footer .pluritech {
    font-weight: 500;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.footer .policy-link {
    color: var(--text-white) !important;
    text-decoration: none;
    font-size: 11px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.footer .policy-link:hover {
    opacity: 1;
    text-decoration: underline;
    color: var(--text-white) !important;
}

.footer a {
    color: var(--text-white) !important;
}

.footer .reefsecure-logo {
    display: inline-block;
    vertical-align: middle;
    height: 14px;
    width: 14px;
    margin-right: 4px;
    opacity: 1 !important;
    transition: opacity 0.2s ease;
}

.footer .reefsecure-link:hover .reefsecure-logo {
    opacity: 1;
}

/* Policy Page Styling */
.policy-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.policy-section {
    margin-bottom: 30px;
}

.policy-section h2 {
    color: var(--text-primary);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-light);
    font-size: 1.4rem;
}

.policy-section p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.policy-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.policy-section li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.contact-info {
    background: var(--bg-light);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.contact-info p {
    margin-bottom: 8px;
    font-weight: 500;
}

.last-updated {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.last-updated p {
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
}

/* Action Sections Styling */
.tab-actions {
    margin-bottom: 30px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.tab-actions .btn {
    min-width: 140px;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.3px;
}



/* Subtab Styling */
.subtab-header {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: -28px;
    z-index: 100;
}

.subtab-button {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.subtab-button:hover {
    background: #e9ecef;
    color: #333;
}

.subtab-button.active {
    background: var(--primary-orange);
    color: white;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

.subtab-content {
    position: relative;
}

/* Hide nested subtab content by default */
.subtab-content .subtab-content {
    display: none;
}

/* Show active nested subtab content */
.subtab-content .subtab-content.active {
    display: block;
}

/* Method config specific subtab content styling - more specific to override nested rule */
.method-config-content .subtab-content .subtab-content {
    display: none;
}

.method-config-content .subtab-content .subtab-content.active {
    display: block;
}

/* Ensure subtab content is scrollable within the modal */
.method-config-content .subtab-content {
    max-height: none; /* Allow natural height */
    overflow: visible; /* Allow content to flow naturally */
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Ensure individual subtab content divs are scrollable */
.method-config-content .subtab-content .subtab-content {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    max-height: none;
}

/* Ensure settings sections are properly spaced */
.method-config-content .settings-section {
    margin-bottom: 20px;
}

/* Empty configuration section styling */
.empty-config {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    margin: 20px 0;
}

.empty-config-icon {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-config h6 {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.empty-config p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
    max-width: 400px;
    margin: 0 auto;
}

/* GPT Mailing Configuration Styles */
.test-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.test-section h6 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.test-results {
    margin-top: 20px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.test-results h6 {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.email-preview {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

.form-actions .btn {
    min-width: 120px;
}

/* Test subtab specific styling */
#gpt-mailing-test .test-section {
    margin-top: 0;
    padding: 25px;
}

#gpt-mailing-test .test-section h6 {
    margin-top: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

#gpt-mailing-test .section-description {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Selected employee info styling */
.selected-employee-info {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.selected-employee-info h6 {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.employee-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.employee-details p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.employee-details strong {
    color: var(--text-primary);
}

/* Preview tabs styling */
.preview-tabs {
    margin-top: 15px;
}

.preview-tab-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
}

.preview-tab-button {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.preview-tab-button:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.preview-tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.preview-tab-content {
    position: relative;
}

.preview-tab-panel {
    display: none;
}

.preview-tab-panel.active {
    display: block;
}

.html-code-preview {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    color: #333;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Debug section styling */
.debug-section {
    margin-bottom: 20px;
}

.debug-section h6 {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 8px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.debug-preview {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    line-height: 1.3;
    color: #333;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

/* General settings content styling */
.general-settings-content {
    margin-top: 16px;
}

/* Settings sections spacing */
.settings-section {
    margin-bottom: 32px;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.settings-section:last-child {
    margin-bottom: 0;
}

/* Methods tab specific styling */
#methods .tab-description {
    margin-bottom: 24px;
    color: var(--text-muted);
    line-height: 1.6;
}

#methods .methods-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* Settings Styling - removed conflicting grid display */

.settings-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.settings-card h5 {
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 600;
}

.settings-card p {
    color: #666;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.form-actions .btn {
    min-width: 120px;
}

/* Import Section Styling */
.import-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.import-section h4 {
    margin: 0 0 15px 0;
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 600;
}

.import-section p {
    margin: 0 0 15px 0;
    color: var(--text-light);
    font-size: 14px;
}

/* File input styling */
input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--border-light);
    border-radius: 8px;
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"]:hover {
    border-color: var(--primary-orange);
    background: #fff5f0;
}

input[type="file"]:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state h4 {
    margin: 0 0 10px 0;
    color: var(--text-dark);
    font-size: 18px;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

/* Fix Quill tooltip positioning in modals */
.modal .ql-tooltip {
    z-index: 1001 !important;
    position: absolute !important;
}

.modal .ql-tooltip.ql-editing {
    z-index: 1001 !important;
}

/* Ensure Quill editor content is properly contained */
.modal .ql-editor {
    overflow: visible;
}

.modal .ql-container {
    overflow: visible;
}

/* Confirmation modal should appear on top */
#confirmationModal {
    z-index: 2000;
}

/* Error modal should appear on top of all other modals */
#errorModal {
    z-index: 3000;
}

/* Success modal should appear on top of all other modals */
#successModal {
    z-index: 3000;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    margin: 40px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: var(--gradient-primary);
    color: var(--text-white);
    border-radius: 15px 15px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.close {
    font-size: 32px;
    font-weight: bold;
    color: var(--text-white);
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0; /* Important for flexbox scrolling */
}

/* Extra padding for modals with Quill editors */
#sectionModal .modal-body {
    padding: 30px 50px;
}

/* Additional space around Quill editor in section modal */
#sectionModal #sectionEditor {
    margin: 20px 0;
    border-radius: 8px;
}

#sectionModal .ql-container {
    border-radius: 0 0 8px 8px;
}

/* Email Editor Styling */
.email-editor-container {
    height: 400px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

#email-editor {
    height: 100%;
    overflow-y: auto;
}

#email-editor .ql-container {
    height: calc(100% - 42px);
    border: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#email-editor .ql-editor {
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

#email-editor .ql-toolbar {
    border: none;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    padding: 8px 12px;
}

#email-editor .ql-toolbar .ql-formats {
    margin-right: 15px;
}

#email-editor .ql-toolbar button {
    padding: 6px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

#email-editor .ql-toolbar button:hover {
    background-color: #e9ecef;
}

#email-editor .ql-toolbar button.ql-active {
    background-color: #007bff;
    color: white;
}

/* Email-like styling for the editor content */
#email-editor .ql-editor p {
    margin: 0 0 12px 0;
}

#email-editor .ql-editor h1,
#email-editor .ql-editor h2,
#email-editor .ql-editor h3 {
    margin: 0 0 16px 0;
    font-weight: 600;
}

#email-editor .ql-editor ul,
#email-editor .ql-editor ol {
    margin: 0 0 12px 0;
    padding-left: 20px;
}

#email-editor .ql-editor blockquote {
    margin: 0 0 12px 0;
    padding: 12px 16px;
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 0 4px 4px 0;
}

#email-editor .ql-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 8px 0;
}

/* Template toolbar styling */
.template-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.template-toolbar span {
    font-weight: 500;
    color: #495057;
}

.template-toolbar select {
    padding: 6px 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
    font-size: 14px;
}

.template-toolbar button {
    padding: 6px 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.template-toolbar button:hover {
    background: #0056b3;
}

/* Add Employee Form Specific Styling */
#addEmployeeForm {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

/* Add Admin Form Specific Styling */
#addAdminForm {
    margin: 20px 0;
    padding: 0;
    background: #fafafa;
    border-radius: 10px;
    padding: 25px;
    border: 1px solid #e9ecef;
}

#addEmployeeForm .form-row {
    margin-bottom: 25px;
}

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

#addEmployeeForm .form-group:last-child {
    margin-bottom: 0;
}

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

#addAdminForm .form-group:last-child {
    margin-bottom: 0;
}

/* Custom Fields Section */
#customFields {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid var(--primary-orange);
}

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

/* Configuration Page Styles - removed card styling for cleaner look */

.settings-section h4 {
    color: var(--text-dark);
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.settings-section p {
    color: #666;
    margin: 0 0 20px 0;
    font-size: 14px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1200px) {
    .settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.settings-grid .form-group.full-width {
    grid-column: 1 / -1;
}

.settings-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
    font-style: italic;
}

/* Quill Editor Styling */
.ql-editor {
    min-height: 200px;
    font-size: 14px;
    line-height: 1.5;
}

.ql-toolbar {
    border-top: 1px solid #ccc;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-bottom: none;
}

.ql-container {
    border-bottom: 1px solid #ccc;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    border-top: none;
}

.ql-editor.ql-blank::before {
    color: #999;
    font-style: italic;
}

/* Wider modal for email configuration */
#configureEmailModal .modal-content {
    width: 80%;
    max-width: 800px;
}

/* Test email container styling */
.test-email-container {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.test-email-container input {
    flex: 1;
    margin-bottom: 0;
}

.test-email-container button {
    white-space: nowrap;
    margin-bottom: 0;
}

/* Image formatting modal styling */
#imageFormattingModal .modal-content {
    max-width: 500px;
}

#imageFormattingModal .form-group {
    margin-bottom: 15px;
}

#imageFormattingModal .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-dark);
}

#imageFormattingModal .form-group input[type="number"],
#imageFormattingModal .form-group input[type="color"],
#imageFormattingModal .form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--border-light);
    border-radius: 5px;
    font-size: 14px;
}

#imageFormattingModal .form-group input[type="number"]:focus,
#imageFormattingModal .form-group input[type="color"]:focus,
#imageFormattingModal .form-group select:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

#imageFormattingModal .form-group input[type="checkbox"] {
    margin-right: 8px;
}

#imagePreview {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#imagePreview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Image hover effects in editor */
.ql-editor img {
    transition: opacity 0.2s ease;
}

.ql-editor img:hover {
    opacity: 0.8 !important;
    cursor: pointer;
}

/* Border radius settings styling */
.range-input-container {
    position: relative;
    margin: 10px 0;
}

.form-range {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-orange);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.form-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-orange);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.range-value {
    position: absolute;
    top: -30px;
    right: 0;
    background: var(--primary-orange);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.range-value::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: var(--primary-orange);
}

/* Email template field selector styling */
.template-toolbar {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.template-toolbar span {
    font-size: 13px;
    color: #495057;
    font-weight: 500;
    white-space: nowrap;
}

#field-selector {
    padding: 8px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    color: #495057;
    min-width: 200px;
    transition: all 0.2s ease;
}

#field-selector:focus {
    outline: none;
    border-color: var(--primary-orange, #ff6b35);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

#field-selector:hover {
    border-color: #adb5bd;
}

.template-toolbar button {
    padding: 8px 16px;
    background: var(--primary-orange, #ff6b35);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.template-toolbar button:hover {
    background: var(--dark-orange, #e55a2b);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

.template-toolbar button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(255, 107, 53, 0.3);
}

/* Event Log Styling */
.search-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-container input,
.search-container select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-container input {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.search-container select {
    min-width: 180px;
}

.search-container input:focus,
.search-container select:focus {
    outline: none;
    border-color: var(--primary-orange, #ff6b35);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-container button {
    padding: 10px 16px;
    white-space: nowrap;
}

/* Event Log Table Styling */
#eventLogTable {
    margin-top: 0;
}

#eventLogTable th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

#eventLogTable td {
    vertical-align: middle;
    padding: 12px 8px;
}

#eventLogTable .details-cell {
    max-width: 200px;
    word-wrap: break-word;
    font-size: 12px;
    color: #6c757d;
}

#eventLogTable .timestamp-cell {
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
}

#eventLogTable .campaign-cell,
#eventLogTable .employee-cell {
    font-weight: 500;
}

/* Pagination Styling */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 0;
    border-top: 1px solid #e9ecef;
}

.pagination-info {
    color: #6c757d;
    font-size: 14px;
}

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

.page-info {
    font-size: 14px;
    color: #495057;
    font-weight: 500;
    min-width: 100px;
    text-align: center;
}

.pagination-controls .btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.pagination-controls .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-controls .btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Status Badge Styling */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-sent {
    background-color: #28a745;
    color: white;
}

.status-failed {
    background-color: #dc3545;
    color: white;
}

.status-pending {
    background-color: #ffc107;
    color: white;
}

.action-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-phishing-link-clicked {
    background-color: #dc3545;
    color: white;
}

.action-page-visit {
    background-color: #6c757d;
    color: white;
}

.action-login-attempt {
    background-color: #ffc107;
    color: white;
}

.action-login-failed {
    background-color: #fd7e14;
    color: white;
}

.action-login-success {
    background-color: #28a745;
    color: white;
}

.action-file-download {
    background-color: #20c997;
    color: white;
}

.action-file-downloaded {
    background-color: #20c997;
    color: white;
}

.action-file-opened {
    background-color: #6f42c1;
    color: white;
}

.action-logout {
    background-color: #6c757d;
    color: white;
}

.action-invalid-phishing-link {
    background-color: #fd7e14;
    color: white;
}

.action-phishing-link-error {
    background-color: #dc3545;
    color: white;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding: 25px 30px;
    background: #f8f9fa;
    border-top: 1px solid var(--border-light);
}

/* Form Rows */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

/* Enhanced Form Styles */
.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: var(--bg-white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover {
    border-color: var(--secondary-orange);
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-light);
    font-style: italic;
}

/* Enhanced textarea styling */
textarea.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
    font-family: inherit;
    line-height: 1.5;
}

textarea.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
    outline: none;
}

textarea.form-control:hover {
    border-color: #ced4da;
}

/* Settings form styling */
.settings-card .form-group {
    margin-bottom: 1rem;
}

.settings-card .form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    display: block;
}

/* Custom checkbox styling */
.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    font-weight: 500 !important;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"],
.checkbox-label .form-checkbox {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    background-color: #fff;
    transition: all 0.3s ease;
}

.checkbox-label:hover .checkmark {
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark,
.checkbox-label .form-checkbox:checked + .checkmark {
    background-color: #ff8c00 !important;
    border-color: #ff8c00 !important;
}



/* Checkmark styling - only visible when checked */
.checkmark:after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark:after,
.checkbox-label .form-checkbox:checked + .checkmark:after {
    opacity: 1 !important;
    border-color: white !important;
}

/* Color input styling */
.color-input {
    width: 60px !important;
    height: 40px !important;
    padding: 0 !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-input:hover {
    border-color: var(--primary-color) !important;
    transform: scale(1.05);
}

.color-input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1) !important;
    outline: none !important;
}

.color-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.hex-input {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hex-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
}

/* Color Section Styling */
.color-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.color-section h4 {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

/* Settings Preview Layout */
.settings-preview-container {
    display: flex;
    gap: 20px;
    height: 100%;
}

.settings-panel {
    flex: 0 0 35%;
    min-width: 0;
    max-width: 400px;
}

.preview-panel {
    flex: 1;
    min-width: 0;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
    position: sticky;
    top: 35px;
    align-self: start;
}

.preview-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.preview-header h3 {
    margin: 0 0 5px 0;
    color: #495057;
    font-size: 1.25rem;
}

.preview-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 700px;
    height: 800px;
    overflow: auto;
    position: relative;
}

.preview-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    transition: opacity 0.6s ease-in-out;
    pointer-events: auto; /* Enable scrolling */
}

.refresh-icon {
    font-style: normal;
    font-weight: bold;
    margin-right: 5px;
}

/* Responsive design for preview */
@media (max-width: 1200px) {
    .settings-preview-container {
        flex-direction: column;
    }
    
    .preview-panel {
        margin-top: 20px;
    }
    
    .preview-welcome-container h1 {
        font-size: 2rem;
    }
    
    .preview-welcome-container p {
        font-size: 1rem;
    }
}

/* Select Styles */
select {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* Checkbox Styles */
input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.3);
    accent-color: var(--primary-orange);
}

/* Checkbox Label Styling */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 16px;
    margin-bottom: 0;
    padding: 14px 0;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
    accent-color: var(--primary-orange);
}

/* Section Headers in Modals */
.modal-body h4 {
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-orange);
    display: inline-block;
}

/* Column Management */
.column-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.column-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-color: var(--primary-orange);
}

/* Custom Columns List Container */
#customColumnsList {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
    margin-top: 15px;
}

/* Global Custom Scrollbar Styling */
/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-orange);
}

::-webkit-scrollbar-thumb:active {
    background: var(--secondary-orange);
}

::-webkit-scrollbar-corner {
    background: #f1f1f1;
}

/* Firefox scrollbar styling */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-orange) #f1f1f1;
}

/* Specific scrollbar styling for different elements */
.table-container::-webkit-scrollbar,
.tab-content::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.preview-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-container::-webkit-scrollbar-track,
.tab-content::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.preview-container::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb,
.tab-content::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.preview-container::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover,
.tab-content::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.preview-container::-webkit-scrollbar-thumb:hover {
    background: var(--dark-orange);
}

/* Custom scrollbar for columns list */
#customColumnsList::-webkit-scrollbar {
    width: 6px;
}

#customColumnsList::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#customColumnsList::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 3px;
}

#customColumnsList::-webkit-scrollbar-thumb:hover {
    background: var(--dark-orange);
}


/* Existing columns section */
.existing-columns-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.existing-columns-section h4 {
    margin-bottom: 15px;
    flex-shrink: 0;
}

/* Add column section */
.add-column-section {
    flex-shrink: 0;
    margin-bottom: 30px;
}

.column-info {
    flex: 1;
}

.column-name {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 16px;
}

.column-details {
    font-size: 14px;
    color: var(--text-light);
    display: flex;
    gap: 15px;
    align-items: center;
}

.column-details span {
    background: var(--primary-orange);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.delete-column-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.delete-column-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .tab-header {
        flex-direction: column;
        padding: 0;
    }
    
    .tab-button {
        text-align: left;
        border-bottom: 1px solid var(--border-light);
        margin: 0;
        padding: 15px 20px;
        font-size: 14px;
        background: #f8f9fa;
    }
    
    .tab-button:last-child {
        border-bottom: none;
    }
    
    .tab-button:hover {
        transform: none;
    }
    
    .tab-button.active {
        transform: none;
        box-shadow: none;
    }
    
    .tab-content {
        padding: 20px;
        min-height: 300px;
    }
    
    .tab-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .tab-actions .btn {
        width: 100%;
        min-width: auto;
    }
}

/* Statistics Styles */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
}

.stat-content h4 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.stat-content p {
    margin: 5px 0 0 0;
    color: #6c757d;
    font-size: 14px;
}

.stats-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stats-section h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.stats-section .text-muted {
    margin-bottom: 20px;
    color: #6c757d;
}

/* Funnel Styles */
.funnel-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
    max-width: 100%;
    overflow-x: auto;
}

.funnel-step {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 15px;
    min-width: 160px;
    max-width: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.funnel-step:hover {
    border-color: var(--primary-orange);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.funnel-content {
    width: 100%;
}

.funnel-content h5 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

.funnel-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-orange);
    margin-bottom: 6px;
}

.funnel-percentage {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

/* Pie Chart Styles */
.pie-chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pie-chart {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pie-slice {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        var(--primary-orange) 0deg,
        var(--primary-orange) calc(var(--percentage) * 3.6deg),
        #e9ecef calc(var(--percentage) * 3.6deg),
        #e9ecef 360deg
    );
}

.pie-chart::before {
    content: '';
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    position: absolute;
}

.pie-label {
    font-size: 11px;
    color: #6c757d;
    font-weight: 600;
    text-align: center;
}

/* Risk Level Tags */
.risk-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-tag.high {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.risk-tag.medium {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.risk-tag.low {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.funnel-arrow {
    font-size: 24px;
    color: var(--primary-orange);
    margin: 0 10px;
    flex-shrink: 0;
}

/* Responsive adjustments for horizontal funnel */
@media (max-width: 768px) {
    .funnel-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .funnel-arrow {
        transform: rotate(90deg);
        margin: 10px 0;
    }
    
    .funnel-step {
        min-width: 100%;
        max-width: 100%;
    }
}

/* Terms of Use Styles */
.terms-container {
    width: 100%;
    padding: 20px;
    line-height: 1.6;
}

.terms-section {
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
}

.terms-section h4 {
    color: var(--primary-orange);
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.terms-section p {
    margin-bottom: 15px;
    color: #333;
}

.terms-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.terms-section li {
    margin-bottom: 8px;
    color: #555;
}

.terms-footer {
    margin-top: 40px;
    padding: 20px;
    background: #e9ecef;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #dee2e6;
}

.terms-footer p {
    margin-bottom: 10px;
    color: #6c757d;
}

.terms-footer p:last-child {
    margin-bottom: 0;
}

/* Campaign Stats */
.campaign-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.campaign-stat-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid var(--primary-orange);
}

.campaign-stat-item h6 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
}

.campaign-stat-item .vulnerability-rate {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-orange);
}

/* Password Strength Indicator Styles */
.password-strength {
    margin-top: 10px;
}

.strength-bar {
    width: 100%;
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: 3px;
}

.strength-fill.weak {
    background-color: #ff4444;
    width: 25%;
}

.strength-fill.fair {
    background-color: #ff8800;
    width: 50%;
}

.strength-fill.good {
    background-color: #ffbb00;
    width: 75%;
}

.strength-fill.strong {
    background-color: #00bb00;
    width: 100%;
}

.strength-text {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
}

.strength-text.weak {
    color: #ff4444;
}

.strength-text.fair {
    color: #ff8800;
}

.strength-text.good {
    color: #ffbb00;
}

.strength-text.strong {
    color: #00bb00;
}

.password-requirements {
    font-size: 11px;
    color: #666;
}

.requirement {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.requirement i {
    margin-right: 6px;
    width: 12px;
}

.requirement.valid i {
    color: #00bb00;
}

.requirement.invalid i {
    color: #ff4444;
}

.password-match {
    margin-top: 5px;
    font-size: 12px;
    font-weight: bold;
}

.password-match.match {
    color: #00bb00;
}

.password-match.no-match {
    color: #ff4444;
}

/* Enhanced User Display Styles */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-welcome {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.welcome-text {
    font-weight: 600;
    color: #ffffff;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Logo Upload Styles */
.logo-upload-container {
    margin-bottom: 15px;
}

.logo-preview {
    margin-top: 15px;
    padding: 15px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
}

.logo-preview-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-preview-info {
    flex: 1;
}

.logo-preview-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
}

.logo-preview-info p:first-child {
    font-weight: 600;
    color: #333;
}

.logo-placeholder {
    margin-top: 15px;
    padding: 30px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
    text-align: center;
    color: #999;
}

.logo-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

.logo-placeholder p {
    margin: 0;
    font-size: 14px;
}

/* Sections management styles */
.sections-management {
    margin-top: 20px;
}

.sections-header {
    margin-bottom: 20px;
}

.sections-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.section-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    transition: all 0.2s ease;
}

.section-item:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.section-item.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
}

.section-info {
    flex: 1;
}

.section-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.section-preview {
    font-size: 14px;
    color: #666;
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-actions {
    display: flex;
    gap: 10px;
}

.section-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.section-edit-btn {
    background: #007bff;
    color: white;
}

.section-edit-btn:hover {
    background: #0056b3;
}

.section-delete-btn {
    background: #dc3545;
    color: white;
}

.section-delete-btn:hover {
    background: #c82333;
}

.section-drag-handle {
    color: #6c757d;
    cursor: grab;
    margin-right: 10px;
    font-size: 16px;
}

.section-drag-handle:active {
    cursor: grabbing;
}

.empty-sections {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn {
    padding: 14px;
    border-radius: 6px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

/* Animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes pulse-warning {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

@keyframes pulse-danger {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .user-info {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }
    
    .user-welcome {
        align-items: flex-end;
    }
    
    .user-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

.campaign-stat-item .campaign-details {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Employee Profiles Table */
#employeeProfilesTable th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.risk-level {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.risk-high {
    background: #f8d7da;
    color: #721c24;
}

.risk-medium {
    background: #fff3cd;
    color: #856404;
}

.risk-low {
    background: #d1edff;
    color: #0c5460;
}

/* Insights */
.insights-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.insights-column h5 {
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.insights-list, .recommendations-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.insights-list li, .recommendations-list li {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary-orange);
    font-size: 14px;
    line-height: 1.5;
}

.insights-list li:before {
    content: "💡";
    margin-right: 8px;
}

.recommendations-list li:before {
    content: "📚";
    margin-right: 8px;
}

/* Statistics Filters */
.stats-filters {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.filters-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.filter-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.filter-group .form-control {
    padding: 8px 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.filter-group .form-control:focus {
    outline: none;
    border-color: var(--primary-orange);
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
}

.filter-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.filter-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.filter-actions .btn-secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.filter-actions .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.filter-actions .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.filter-actions .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* Responsive filters */
@media (max-width: 768px) {
    .stats-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters-left {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .filter-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .filter-actions .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

/* Performance Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.metric-card {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.metric-card:hover {
    border-color: var(--primary-orange);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.metric-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
    flex-shrink: 0;
}

.metric-content {
    flex: 1;
}

.metric-content h5 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-orange);
    margin-bottom: 5px;
}

.metric-description {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

/* Responsive metrics */
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Events Over Time Chart */
.chart-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chart-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.chart-toggle {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
}

.chart-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
}

.chart-btn.active {
    background: var(--primary-orange);
    color: white;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

.chart-btn:hover:not(.active) {
    background: #e9ecef;
    color: #495057;
}

.chart-wrapper {
    position: relative;
    height: 400px;
    margin-bottom: 20px;
}

.chart-wrapper canvas {
    max-width: 100%;
    height: auto;
}

.chart-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
}

/* Responsive chart */
@media (max-width: 768px) {
    .chart-container {
        padding: 15px;
    }
    
    .chart-wrapper {
        height: 300px;
    }
    
    .chart-legend {
        gap: 15px;
    }
    
    .legend-item {
        font-size: 12px;
    }
}

/* Export Actions */
.export-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.export-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.export-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.export-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.export-actions .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.export-actions .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* Responsive export actions */
@media (max-width: 768px) {
    .export-actions {
        flex-direction: column;
    }
    
    .export-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Hourly Activity Heatmap Styles */
.hourly-heatmap-container {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.hourly-heatmap-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.hourly-heatmap-header h4 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
}

.hourly-heatmap-header p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

.hourly-heatmap-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.hourly-heatmap-toggle {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.hourly-heatmap-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
}

.hourly-heatmap-btn:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

.hourly-heatmap-btn.active {
    background: var(--primary-orange);
    color: white;
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
    transform: translateY(-1px);
}

.hourly-heatmap-chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 20px;
    background: #fafbfc;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.hourly-heatmap-chart-container canvas {
    max-width: 100%;
    height: auto;
}

.hourly-heatmap-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.hourly-heatmap-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.hourly-heatmap-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
    border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hourly-heatmap-legend-color.no-activity {
    background: #e9ecef;
}

.hourly-heatmap-legend-color.low-activity {
    background: #ffb366;
}

.hourly-heatmap-legend-color.medium-activity {
    background: #ff8c42;
}

.hourly-heatmap-legend-color.high-activity {
    background: #ff6b35;
}

/* Responsive adjustments for hourly heatmap */
@media (max-width: 768px) {
    .hourly-heatmap-container {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .hourly-heatmap-chart-container {
        height: 300px;
        padding: 10px;
    }
    
    .hourly-heatmap-toggle {
        flex-direction: column;
        gap: 2px;
    }
    
    .hourly-heatmap-btn {
        min-width: auto;
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .hourly-heatmap-legend {
        gap: 15px;
        padding: 10px;
    }
    
    .hourly-heatmap-legend-item {
        font-size: 12px;
    }
    
    .hourly-heatmap-legend-color {
        width: 16px;
        height: 16px;
    }
}

/* Mobile and Tablet Access Restriction - Admin Dashboard Only */
@media (max-width: 1024px) {
    /* Only apply to admin dashboard pages */
    body.admin-dashboard .container,
    body.admin-dashboard .header,
    body.admin-dashboard .footer {
        display: none !important;
    }
    
    /* Show restriction message overlay only on admin dashboard */
    body.admin-dashboard::before {
        content: "";
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: var(--gradient-primary) !important;
        z-index: 9999 !important;
        box-sizing: border-box !important;
    }
    
    /* Add warning content only on admin dashboard */
    body.admin-dashboard::after {
        content: "⚠️ Admin Dashboard Access Restricted ⚠️\A\AThe admin dashboard is only accessible on desktop devices.\APlease use a computer to access this area.";
        white-space: pre-line !important;
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: transparent !important;
        color: var(--text-white) !important;
        font-family: Arial, sans-serif !important;
        font-size: 20px !important;
        font-weight: bold !important;
        text-align: center !important;
        padding-top: 40vh !important;
        z-index: 10000 !important;
        box-sizing: border-box !important;
        text-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
        line-height: 1.6 !important;
    }
}

/* Unified Import/Export Actions */
.import-export-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.import-export-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
    min-width: 140px;
    justify-content: center;
}

.import-export-actions .btn-primary {
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.import-export-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.import-export-actions .btn-secondary {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

.import-export-actions .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
}

.import-export-actions .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.import-export-actions .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

@media (max-width: 768px) {
    .import-export-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .import-export-actions .btn {
        width: 100%;
        min-width: auto;
    }
}

/* Unified Import/Export Button Styling */
.import-export-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    min-width: 140px !important;
    justify-content: center !important;
}

.import-export-btn.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #495057) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3) !important;
}

.import-export-btn.btn-secondary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4) !important;
}

/* Background Image Preview Styles */
.image-upload-container {
    margin-bottom: 15px;
}

.image-preview {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f8f9fa;
}

.image-preview-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.image-preview-content img {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-preview-info {
    flex: 1;
}

.image-preview-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.image-preview-info p:first-child {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.image-placeholder {
    margin-top: 15px;
    padding: 30px;
    text-align: center;
    border: 2px dashed #ddd;
    border-radius: 8px;
    background: #f8f9fa;
    color: #666;
}

.image-placeholder i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
    color: #999;
}

.image-placeholder p {
    margin: 0;
    font-size: 14px;
}

.import-export-btn.btn-success {
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3) !important;
}

.import-export-btn.btn-success:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4) !important;
}

/* Method Cards Styles */
.methods-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.method-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.method-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-large);
    border-color: var(--primary-orange);
}

.method-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f8f9fa;
}

.method-card.disabled:hover {
    transform: none;
    box-shadow: var(--shadow);
    border-color: var(--border-light);
}

.method-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.method-header h4 {
    margin: 0;
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 600;
}

.method-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.method-status.active {
    background: #d4edda;
    color: #155724;
}

.method-status.coming-soon {
    background: #fff3cd;
    color: #856404;
}

.method-description {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.method-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.method-stats .stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
}

.method-stats .stat i {
    color: var(--primary-orange);
}

.method-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.method-actions .btn {
    flex: 1;
    justify-content: center;
}

/* Method Configuration Modal - full screen with proper backdrop */
.method-config-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.method-config-panel {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: var(--bg-white);
    border-radius: 15px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    z-index: 1000;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.method-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: var(--gradient-primary);
    color: var(--text-white);
    border-radius: 15px 15px 0 0;
    flex-shrink: 0;
}

.method-config-panel .method-config-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--text-white) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    background-clip: unset !important;
}

.method-config-header .close {
    font-size: 32px;
    font-weight: bold;
    color: var(--text-white);
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.method-config-header .close:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.method-config-content {
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-height: calc(100vh - 140px); /* Account for header height */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
}

.method-info {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary-orange);
}

.method-info h4 {
    color: var(--text-dark);
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    display: inline-block;
}

.method-info p {
    color: var(--text-muted);
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Method Badge Styles */
.method-badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--primary-orange);
    color: white;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .methods-container {
        grid-template-columns: 1fr;
    }
    
    .method-card {
        padding: 20px;
    }
    
    .method-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .method-config-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Loading Modal Styles */
#loadingModal {
    z-index: 4000 !important;
}

.loading-modal-content {
    max-width: 400px;
    text-align: center;
    padding: 40px 30px;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.loading-text p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

.loading-progress {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* Email Viewer Modal Styles */
.email-viewer-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.email-metadata {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.email-warning-banner {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-left: 4px solid #ffc107;
    color: #856404;
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.email-field {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.email-field:last-child {
    margin-bottom: 0;
}

.email-field strong {
    min-width: 80px;
    margin-right: 10px;
    color: #495057;
}

.email-content-container {
    border: 1px solid #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.email-content-tabs {
    display: flex;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.email-tab-button {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #6c757d;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.email-tab-button:hover {
    background-color: #e9ecef;
    color: #495057;
}

.email-tab-button.active {
    color: #007bff;
    border-bottom-color: #007bff;
    background-color: white;
}

.email-content-panel {
    position: relative;
    min-height: 300px;
}

.email-content {
    display: none;
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.email-content.active {
    display: block;
}

#emailRenderedContent {
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

#emailHtmlContent pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin: 0;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.4;
}

#emailHtmlContent code {
    color: #495057;
    white-space: pre-wrap;
    word-wrap: break-word;
}