/*
 * P4U Vtiger School Dashboard - Frontend Styles
 */

/* --- General Styles --- */
.p4uvt-login-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 40px auto;
    padding: 0;
    background-color: #fff;
    border: none;
    border-radius: 12px;
    max-width: 480px;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.p4uvt-dashboard-container {
    font-family: sans-serif;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    max-width: 1400px; /* Wider to prevent text cutoff */
    box-sizing: border-box;
}

.p4uvt-login-wrapper h3 {
    margin: 0;
    padding: 30px 40px;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    border: none;
}

.p4uvt-dashboard-container h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #333;
}

/* Buttons */
.p4uvt-login-form input[type="submit"],
.p4uvt-filters input[type="submit"],
.p4uvt-contact-details .button,
.p4uvt-logged-in .p4uvt-logout-button,
.p4uvt-dashboard-container .button /* General button class for back links etc. */
{
    background-color: #0073aa; /* WordPress blue */
    color: white;
    border: none;
    padding: 10px 15px;
    text-decoration: none;
    font-size: 1em;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    display: inline-block; /* For <a> tags styled as buttons */
}

.p4uvt-login-form input[type="submit"]:hover,
.p4uvt-filters input[type="submit"]:hover,
.p4uvt-contact-details .button:hover,
.p4uvt-logged-in .p4uvt-logout-button:hover,
.p4uvt-dashboard-container .button:hover {
    background-color: #005a87;
}

/* --- Search Form Styles --- */
.p4uvt-search-form {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.p4uvt-search-field {
    margin-bottom: 15px;
}

.p4uvt-search-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

.p4uvt-search-field input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.p4uvt-search-field input[type="text"]:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

.p4uvt-searchable-fields-info {
    background-color: #f0f7fc;
    border-left: 3px solid #0073aa;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.p4uvt-search-explanation {
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 600;
    color: #23282d;
}

.p4uvt-searchable-fields-list {
    margin: 0;
    padding-left: 20px;
    columns: 2;
}

.p4uvt-searchable-fields-list li {
    margin-bottom: 5px;
    color: #555;
}

.p4uvt-search-actions {
    margin-top: 20px;
    text-align: right;
}

.p4uvt-search-button {
    padding: 10px 20px !important;
    font-size: 1.05em !important;
}

/* --- Login Form Styles --- */
.p4uvt-login-form-container {
    padding: 40px;
}

.p4uvt-login-form-container > p {
    margin: 0 0 30px 0;
    color: #6c757d;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
}

.p4uvt-login-form p {
    margin-bottom: 25px;
}

.p4uvt-login-form p:first-of-type {
    margin-top: 0;
}

.p4uvt-login-form label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.p4uvt-login-form input[type="text"],
.p4uvt-login-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 0;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fafbfc;
}

.p4uvt-login-form input[type="text"]:hover,
.p4uvt-login-form input[type="password"]:hover {
    border-color: #c5c9cd;
    background: #fff;
}

.p4uvt-login-form input[type="text"]:focus,
.p4uvt-login-form input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.p4uvt-login-form input[type="submit"] {
    width: 100%;
    margin-top: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    padding: 16px 48px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.p4uvt-login-form input[type="submit"]:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.p4uvt-login-form input[type="submit"]:active {
    transform: translateY(0);
}

/* Logged-in message */
.p4uvt-logged-in {
    padding: 40px;
    text-align: center;
}

.p4uvt-logged-in p {
    font-size: 17px;
    color: #2c3e50;
    margin-bottom: 25px;
    line-height: 1.6;
}

.p4uvt-logged-in strong {
    color: #667eea;
    font-weight: 700;
}

.p4uvt-logged-in .p4uvt-logout-button {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.p4uvt-logged-in .p4uvt-logout-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}


/* --- Flash Notices (Login/Logout) --- */
.p4uvt-notice {
    padding: 20px 24px;
    margin: -40px -40px 30px -40px;
    border-radius: 0;
    border: none;
    border-bottom: 3px solid;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.p4uvt-notice::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
}

.p4uvt-notice-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.p4uvt-notice-success::before {
    background: #28a745;
    color: #fff;
}

.p4uvt-notice-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.p4uvt-notice-error::before {
    content: "✕";
    background: #dc3545;
    color: #fff;
}

/* --- Dashboard General Messages --- */
.p4uvt-dashboard-message {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}
.p4uvt-dashboard-message.p4uvt-error {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}
.p4uvt-dashboard-message.p4uvt-warning {
    color: #8a6d3b;
    background-color: #fcf8e3;
    border-color: #faebcc;
}
.p4uvt-dashboard-message.p4uvt-info {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}


/* --- Dashboard Filters --- */
.p4uvt-filters-wrapper {
    margin-bottom: 25px;
}

.p4uvt-toggle-filters-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 250px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    margin-bottom: 15px;
}

.p4uvt-toggle-filters-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.p4uvt-toggle-filters-btn .p4uvt-filter-icon {
    font-size: 18px;
}

.p4uvt-toggle-filters-btn .p4uvt-toggle-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
    font-size: 12px;
}

.p4uvt-toggle-filters-btn.active .p4uvt-toggle-arrow {
    transform: rotate(180deg);
}

.p4uvt-filters {
    display: none;
    margin-bottom: 0;
    padding: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    opacity: 0;
    max-height: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease, padding 0.4s ease;
}

.p4uvt-filters.open {
    opacity: 1;
    max-height: 1000px;
    padding: 20px;
}

.p4uvt-filters form {
    display: block;
    width: 100%;
}

.p4uvt-filter-container {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 15px;
}

.p4uvt-filter-block {
    flex: 0 0 calc(50% - 10px);
    margin-right: 20px;
    box-sizing: border-box;
}

.p4uvt-filter-block:last-child {
    margin-right: 0;
}

.p4uvt-filters label {
    height: 25px;
    line-height: 25px;
    margin-bottom: 5px;
    display: block;
    font-weight: 600;
    font-size: 14px;
}

.p4uvt-filters label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    width: auto;
}

.p4uvt-filters select {
    padding: 6px 10px;
    width: 100%;
    box-sizing: border-box;
}

.p4uvt-filters select[multiple] {
    min-height: 120px;
    height: auto;
    width: 280px;
    display: block; /* Ensure it's block level */
}

.p4uvt-filter-help {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: #666;
    font-style: italic;
    max-width: 280px;
}

.p4uvt-filter-buttons {
    display: block;
    text-align: right;
    margin-top: 10px;
    clear: both;
}

.p4uvt-filters .button {
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
}

.p4uvt-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-start;
}

.p4uvt-action-buttons .button-primary {
    background-color: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.p4uvt-action-buttons .button-primary:hover {
    background-color: #005a87;
    border-color: #005a87;
}

/* --- Records Summary --- */
.p4uvt-records-summary {
    margin-bottom: 15px;
    font-style: italic;
    color: #555;
}

/* --- Dashboard Table --- */
.p4uvt-dashboard-table {
    width: 100%;
    table-layout: auto; /* Let columns adjust to content */
    border-collapse: collapse;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.p4uvt-dashboard-table th,
.p4uvt-dashboard-table td {
    border: 1px solid #ddd;
    padding: 12px 20px;
    text-align: left;
    vertical-align: middle;
    white-space: normal; /* Allow text to wrap if needed */
}

/* Column width specifications - removed fixed widths to allow content to dictate size */

.p4uvt-dashboard-table th {
    background-color: #e9ecef; /* Lighter header */
    font-weight: 600; /* Bolder header text */
    color: #333;
}
.p4uvt-dashboard-table tbody tr {
    transition: all 0.3s ease;
}

.p4uvt-dashboard-table tbody tr:nth-child(even) {
    background-color: #f8f9fa; /* Subtle striping */
}

.p4uvt-dashboard-table tbody tr:hover {
    background-color: #e2e6ea; /* Hover effect */
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.p4uvt-dashboard-table td a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.p4uvt-dashboard-table td a:hover {
    text-decoration: underline;
    color: #005a87;
}

/* --- Pagination --- */
.p4uvt-pagination {
    margin-top: 20px;
    text-align: center;
    clear: both;
}

/* Fix for WordPress pagination list display */
.p4uvt-pagination ul {
    list-style: none !important;
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    padding: 0 !important;
    margin: 0 !important;
}

.p4uvt-pagination li {
    margin: 0 3px !important;
    display: inline-block !important;
}

.p4uvt-pagination .page-numbers { /* This class is used by paginate_links() */
    display: inline-block;
    padding: 8px 12px;
    margin: 0;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #0073aa;
    border-radius: 3px;
    background-color: #fff;
    transition: background-color 0.2s, color 0.2s;
}

/* Current page styling */
.p4uvt-pagination .page-numbers.current {
    background-color: #005a87; /* Darker for current page */
    color: #fff;
    border-color: #005a87;
    font-weight: bold;
}

/* Hover effects for pagination links */
.p4uvt-pagination .page-numbers:hover {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
.p4uvt-pagination .dots {
    padding: 8px 0; /* Align dots better */
}


/* --- Contact Detail Styles --- */

/* Contact Header */
.p4uvt-contact-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
    position: relative;
}

.p4uvt-header-title {
    font-size: 1.4em;
    color: #23282d;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Header fields container */
.p4uvt-header-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: stretch;
}

/* Individual header field */
.p4uvt-header-field {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.p4uvt-header-field:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

.p4uvt-header-field-label {
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.p4uvt-header-field-value {
    font-size: 1.2em;
    color: #333;
    font-weight: 500;
}

/* Style for contact name */
.p4uvt-name-value {
    font-size: 1.3em;
    font-weight: 600;
}

/* Style for contact ID */
.p4uvt-header-field .p4uvt-contact-id {
    font-size: 1.1em;
    color: #555;
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-top: 0;
    font-weight: 500;
}

/* Status field styling */
.p4uvt-header-field.status-new,
.p4uvt-header-field.status-progress,
.p4uvt-header-field.status-waiting,
.p4uvt-header-field.status-completed,
.p4uvt-header-field.status-rejected {
    border-left: 4px solid;
}

.p4uvt-header-field.status-new {
    background-color: #e3f2fd;
    border-left-color: #2196F3;
}

.p4uvt-header-field.status-progress {
    background-color: #fff8e1;
    border-left-color: #FFC107;
}

.p4uvt-header-field.status-waiting {
    background-color: #e8f5e9;
    border-left-color: #4CAF50;
}

.p4uvt-header-field.status-completed {
    background-color: #e0f2f1;
    border-left-color: #009688;
}

.p4uvt-header-field.status-rejected {
    background-color: #ffebee;
    border-left-color: #F44336;
}

.p4uvt-header-field.status-default {
    background-color: #f5f5f5;
    border-left-color: #607D8B;
}

/* Highlight the status field */
.p4uvt-header-field .p4uvt-status-label {
    color: #0073aa;
    font-weight: 700;
}

.p4uvt-header-field .p4uvt-status-value {
    font-weight: 700;
    font-size: 1.3em;
}

/* Status Banner */
.p4uvt-status-banner {
    margin-top: 15px;
    padding: 10px 15px;
    background-color: #f0f8ff;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: inline-block;
    font-weight: 500;
    border-left: 4px solid #0073aa;
    transition: all 0.3s ease;
}

/* Status color variations */
.p4uvt-status-banner.status-new {
    background-color: #e3f2fd;
    border-left-color: #2196F3;
}

.p4uvt-status-banner.status-progress {
    background-color: #fff8e1;
    border-left-color: #FFC107;
}

.p4uvt-status-banner.status-waiting {
    background-color: #e8f5e9;
    border-left-color: #4CAF50;
}

.p4uvt-status-banner.status-completed {
    background-color: #e0f2f1;
    border-left-color: #009688;
}

.p4uvt-status-banner.status-rejected {
    background-color: #ffebee;
    border-left-color: #F44336;
}

.p4uvt-status-label {
    color: #0073aa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

.p4uvt-status-value {
    font-size: 1.05em;
    color: #333;
    font-weight: 600;
}
.p4uvt-contact-details {
    padding: 25px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.p4uvt-contact-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #0073aa, #00a0d2);
}

/* 3-Column Layout */
.p4uvt-three-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.p4uvt-column {
    flex: 1;
    min-width: 250px;
    padding: 10px;
    background-color: #fcfcfc;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.p4uvt-column:hover {
    background-color: #f9f9f9;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.p4uvt-field {
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 2px;
}

.p4uvt-rounded-field {
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 15px 18px;
    transition: all 0.2s ease;
    background: #fcfcfc;
    margin-bottom: 15px;
}

.p4uvt-rounded-field:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.p4uvt-rounded-field .p4uvt-field-label {
    color: #555;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.p4uvt-rounded-field .p4uvt-field-value {
    border-bottom: none;
    padding: 0;
    font-size: 1.1em;
}

.p4uvt-field-label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 0.95em;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #0073aa; /* WordPress blue */
}

.p4uvt-field-value {
    padding: 8px 0;
    color: #444;
    font-size: 1.05em;
    line-height: 1.5;
}

/* Search Form Styles */
.p4uvt-search-container {
    margin-bottom: 30px;
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.p4uvt-search-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #0073aa, #00a0d2);
}

.p4uvt-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.p4uvt-search-field {
    flex: 1;
    min-width: 250px;
}

.p4uvt-search-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #444;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.p4uvt-search-field input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.p4uvt-search-actions {
    width: 100%;
    padding-top: 15px;
    display: flex;
    gap: 10px;
}

.p4uvt-search-button {
    background-color: #0073aa !important;
    color: white !important;
    border: none !important;
}

.p4uvt-search-button:hover {
    background-color: #005d8c !important;
}

.p4uvt-reset-button {
    background-color: #f5f5f5 !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
}

.p4uvt-loading {
    padding: 15px;
    text-align: center;
    background-color: #f8f8f8;
    border-radius: 4px;
    margin: 10px 0;
    font-style: italic;
    color: #666;
}

/* Search Results */
.p4uvt-search-results {
    margin-top: 20px;
}

.p4uvt-search-results h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #444;
}

.p4uvt-search-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.p4uvt-search-results-table th {
    background-color: #f5f5f5;
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid #eee;
    font-weight: 600;
}

.p4uvt-search-results-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.p4uvt-search-results-table tr:hover td {
    background-color: #f9f9f9;
}

.p4uvt-search-pagination {
    margin-top: 15px;
    text-align: center;
}

.p4uvt-search-pagination a,
.p4uvt-search-pagination span {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 3px;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    text-decoration: none;
    border-radius: 3px;
}

.p4uvt-search-pagination a:hover {
    background-color: #0073aa;
    color: white;
    border-color: #0073aa;
}

.p4uvt-current-page {
    background-color: #0073aa !important;
    color: white !important;
    border-color: #0073aa !important;
}

.p4uvt-no-results {
    padding: 20px;
    background-color: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 4px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.p4uvt-error {
    padding: 10px;
    background-color: #fef1f1;
    border-left: 4px solid #dc3232;
    color: #666;
    margin: 10px 0;
}

/* Legacy styles for backward compatibility */
.p4uvt-contact-details ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.p4uvt-contact-details li {
    padding: 5px 0;
    border-bottom: 1px dotted #eee;
}

.p4uvt-contact-details li:last-child {
    border-bottom: none;
}

.p4uvt-contact-details strong {
    display: inline-block;
    min-width: 150px;
    margin-right: 10px;
}

.p4uvt-contact-details li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee; /* Softer separator */
    display: flex; /* For better alignment if needed */
    flex-wrap: wrap; /* Allow wrapping for long content */
}
.p4uvt-contact-details li:last-child {
    border-bottom: none;
}
.p4uvt-contact-details li strong {
    display: inline-block;
    width: 200px; /* Adjust as needed for label width */
    color: #333;
    margin-right: 10px; /* Space between label and value */
    flex-shrink: 0; /* Prevent label from shrinking */
}
.p4uvt-contact-details li span { /* If you wrap values in spans */
    flex-grow: 1; /* Allow value to take remaining space */
    word-break: break-word; /* Break long words */
}

/* --- Email Display Styles --- */
.p4uvt-email-actions {
    margin: 20px 0;
}

.p4uvt-show-email-button {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 15px;
    text-decoration: none;
    font-size: 1em;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    display: inline-block;
}

.p4uvt-show-email-button:hover {
    background-color: #005a87;
}

.p4uvt-emails-container {
    margin: 20px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* Modal Styles */
.p4uvt-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.p4uvt-modal-content {
    position: relative;
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.p4uvt-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}

.p4uvt-modal-close:hover,
.p4uvt-modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.p4uvt-email-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.p4uvt-email-header h2 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-right: 30px;
    font-size: 1.4em;
}

.p4uvt-email-meta {
    margin-bottom: 5px;
    color: #666;
}

.p4uvt-email-body {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    white-space: pre-line;
}

.p4uvt-emails-container h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #333;
}

.p4uvt-emails-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.p4uvt-emails-table th,
.p4uvt-emails-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.p4uvt-emails-table th {
    background-color: #f2f2f2;
    font-weight: 600;
}

.p4uvt-emails-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.p4uvt-no-emails {
    padding: 15px;
    background-color: #f7f7f7;
    border-left: 3px solid #999;
    color: #666;
}

.p4uvt-loading {
    padding: 10px;
    text-align: center;
    color: #666;
}

.p4uvt-error {
    padding: 10px;
    background-color: #ffeaea;
    border-left: 3px solid #d32f2f;
    color: #d32f2f;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .p4uvt-login-wrapper {
        margin: 20px 15px;
        border-radius: 8px;
    }
    
    .p4uvt-login-wrapper h3 {
        padding: 25px 20px;
        font-size: 22px;
    }
    
    .p4uvt-login-form-container {
        padding: 30px 20px;
    }
    
    .p4uvt-login-form input[type="text"],
    .p4uvt-login-form input[type="password"] {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .p4uvt-dashboard-container {
        padding: 15px;
    }
    
    /* Make columns stack on mobile */
    .p4uvt-three-columns,
    .p4uvt-header-fields {
        flex-direction: column;
        gap: 15px;
    }
    
    .p4uvt-column,
    .p4uvt-header-field {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .p4uvt-contact-details {
        padding: 15px;
    }
    
    .p4uvt-header-title {
        font-size: 1.2em;
    }
    
    .p4uvt-header-field-value {
        font-size: 1.1em;
    }
    
    .p4uvt-header-field .p4uvt-status-value {
        font-size: 1.2em;
    }

    .p4uvt-filters {
        display: flex;
        flex-direction: column;
    }
    .p4uvt-filters label,
    .p4uvt-filters select,
    .p4uvt-filters input[type="submit"] {
        width: 100%;
        margin-bottom: 10px;
        margin-right: 0;
    }

    .p4uvt-dashboard-table {
        display: block;
        overflow-x: auto; /* Allow horizontal scroll for table on small screens */
        white-space: nowrap; /* Prevent text wrapping in cells that breaks layout */
    }
        /* Ensure table elements display properly on smaller screens */
    .p4uvt-dashboard-table thead, 
    .p4uvt-dashboard-table tbody, 
    .p4uvt-dashboard-table th, 
    .p4uvt-dashboard-table td, 
    .p4uvt-dashboard-table tr {
        max-width: 100%;
    }
     /* If you really want to stack table on mobile (more complex):
    .p4uvt-dashboard-table thead tr { display: none; }
    .p4uvt-dashboard-table tr { border-bottom: 2px solid #ddd; margin-bottom: 10px; display: block; }
    .p4uvt-dashboard-table td { display: block; text-align: right; border-bottom: 1px dotted #ccc; padding-left: 50%; position: relative; }
    .p4uvt-dashboard-table td:before { content: attr(data-label); position: absolute; left: 10px; width: calc(50% - 20px); padding-right: 10px; white-space: nowrap; text-align: left; font-weight: bold; }
    */
    .p4uvt-pagination { justify-content: center; }
    .p4uvt-contact-details { padding: 15px; }
    .p4uvt-detail-group { padding: 10px; }
    .p4uvt-back-button { margin-top: 15px; }
}

/* --- Contact Creation Form --- */
.p4uvt-contact-form-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.p4uvt-contact-form-container h2 {
    margin: 0;
    padding: 30px 40px;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    border: none;
}

.p4uvt-contact-form {
    padding: 40px;
}

#p4uvt-contact-form-messages {
    margin-bottom: 20px;
}

.p4uvt-form-section {
    margin: 40px 0 30px;
    padding: 20px 0 10px;
    border-top: none;
    background: linear-gradient(to right, #f8f9fa 0%, transparent 100%);
    border-left: 4px solid #667eea;
    padding-left: 20px;
}

.p4uvt-section-title {
    margin: 0 0 8px 0;
    color: #667eea;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.p4uvt-section-description {
    margin: 0 0 20px 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
}

.p4uvt-form-field {
    margin-bottom: 25px;
}

.p4uvt-form-field label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.p4uvt-required {
    color: #d63638;
    margin-left: 3px;
}

.p4uvt-field-input,
.p4uvt-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fafbfc;
}

.p4uvt-field-input:hover,
.p4uvt-textarea:hover {
    border-color: #c5c9cd;
    background: #fff;
}

.p4uvt-field-input:focus,
.p4uvt-textarea:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.p4uvt-textarea {
    resize: vertical;
    min-height: 100px;
}

.p4uvt-checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.p4uvt-field-checkbox {
    margin-right: 8px;
    cursor: pointer;
}

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

.p4uvt-form-actions {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.p4uvt-submit-contact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
    padding: 16px 48px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.p4uvt-submit-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.p4uvt-submit-contact:active {
    transform: translateY(0);
}

.p4uvt-submit-contact:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.p4uvt-reset-form {
    padding: 16px 32px;
    background: #fff;
    border: 2px solid #e1e4e8;
    color: #6c757d;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.p4uvt-reset-form:hover {
    border-color: #6c757d;
    color: #495057;
    background: #f8f9fa;
}

.p4uvt-form-spinner .spinner {
    float: none;
    margin: 0;
}

/* Success/Error Messages */
.p4uvt-message {
    padding: 20px 24px;
    margin: -40px -40px 30px -40px;
    border-radius: 0;
    border: none;
    border-bottom: 3px solid;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.p4uvt-message::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
}

.p4uvt-message.success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.p4uvt-message.success::before {
    background: #28a745;
    color: #fff;
}

.p4uvt-message.error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.p4uvt-message.error::before {
    content: "✕";
    background: #dc3545;
    color: #fff;
}

.p4uvt-message p {
    margin: 0;
    flex: 1;
}

/* --- Hide Email Button --- */
.p4uvt-show-email-button,
.p4uvt-email-actions {
    display: none !important;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .p4uvt-contact-form-container {
        margin: 20px 15px;
        border-radius: 8px;
    }
    
    .p4uvt-contact-form-container h2 {
        padding: 25px 20px;
        font-size: 24px;
    }
    
    .p4uvt-contact-form {
        padding: 30px 20px;
    }
    
    .p4uvt-form-section {
        margin: 30px 0 20px;
        padding: 15px 0 10px 15px;
    }
    
    .p4uvt-section-title {
        font-size: 20px;
    }
    
    .p4uvt-form-field {
        margin-bottom: 20px;
    }
    
    .p4uvt-field-input,
    .p4uvt-textarea {
        padding: 12px 14px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

@media screen and (max-width: 480px) {
    .p4uvt-pagination .page-numbers {
        padding: 6px 10px;
        font-size: 0.9em;
    }
    
    .p4uvt-contact-form-container h2 {
        font-size: 20px;
        padding: 20px 15px;
    }
    
    .p4uvt-form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .p4uvt-submit-contact,
    .p4uvt-reset-form {
        width: 100%;
        padding: 14px 24px;
    }
    
    .p4uvt-message {
        margin: -30px -20px 20px -20px;
        padding: 16px 20px;
        font-size: 14px;
    }
}
