/* ===================================================================
   Pontos de Memória — Frontend Styles
   =================================================================== */

:root {
    --pdm-primary: #1a4480;
    --pdm-primary-light: #2e5ea0;
    --pdm-primary-bg: #e8f4fd;
    --pdm-success: #059669;
    --pdm-success-bg: #ecfdf5;
    --pdm-danger: #dc2626;
    --pdm-danger-bg: #fef2f2;
    --pdm-warning: #d97706;
    --pdm-warning-bg: #fffbeb;
    --pdm-bg: #f8f9fa;
    --pdm-card-bg: #ffffff;
    --pdm-text: #1e293b;
    --pdm-text-light: #64748b;
    --pdm-border: #e2e8f0;
    --pdm-radius: 8px;
    --pdm-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ── Base Buttons ──────────────────────────────────────────────── */
.pdm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: 2px solid transparent;
    border-radius: var(--pdm-radius);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1.4;
}

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

.pdm-btn-primary {
    background: var(--pdm-primary);
    color: #fff;
    border-color: var(--pdm-primary);
}

.pdm-btn-primary:hover {
    background: var(--pdm-primary-light);
    border-color: var(--pdm-primary-light);
    color: #fff;
}

.pdm-btn-secondary {
    background: transparent;
    color: var(--pdm-primary);
    border-color: var(--pdm-primary);
}

.pdm-btn-secondary:hover {
    background: var(--pdm-primary);
    color: #fff;
}

.pdm-btn-danger {
    background: transparent;
    color: var(--pdm-danger);
    border-color: var(--pdm-danger);
}

.pdm-btn-danger:hover {
    background: var(--pdm-danger);
    color: #fff;
}

.pdm-btn-sm {
    padding: 4px 12px;
    font-size: 12px;
}

/* ── Notices ────────────────────────────────────────────────────── */
.pdm-notice {
    padding: 14px 18px;
    border-radius: var(--pdm-radius);
    border-left: 4px solid;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.5;
}

.pdm-notice p {
    margin: 0;
}

.pdm-notice-success {
    background: var(--pdm-success-bg);
    border-left-color: var(--pdm-success);
    color: #065f46;
}

.pdm-notice-error {
    background: var(--pdm-danger-bg);
    border-left-color: var(--pdm-danger);
    color: #991b1b;
}

.pdm-notice-warning {
    background: var(--pdm-warning-bg);
    border-left-color: var(--pdm-warning);
    color: #92400e;
}

.pdm-notice-info {
    background: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e40af;
}

.pdm-notice-detail {
    margin-top: 8px !important;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* ── Action Card ──────────────────────────────────────────────── */
.pdm-action-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
}

.pdm-action-card h4 {
    margin: 0 0 8px;
    color: var(--pdm-text);
    font-size: 16px;
}

.pdm-action-card p {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 14px;
}

/* ── Evaluator Feedback ───────────────────────────────────────── */
.pdm-feedback-section {
    margin-top: 24px;
}

.pdm-feedback-section h4 {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--pdm-text);
}

.pdm-feedback-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.pdm-feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.pdm-feedback-body {
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
}

.pdm-text-muted {
    color: #94a3b8 !important;
    font-style: italic;
}

/* ── Gestor Action Groups ─────────────────────────────────────── */
.pdm-action-group {
    margin-bottom: 12px;
}

.pdm-action-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #475569;
}

.pdm-action-group .pdm-textarea {
    margin-bottom: 8px;
}

.pdm-btn-warning {
    background: #f59e0b;
    color: #fff;
    border: none;
}

.pdm-btn-warning:hover {
    background: #d97706;
}

/* ── Messages container ────────────────────────────────────────── */
.pdm-messages:empty {
    display: none;
}

/* ── Form Fields ───────────────────────────────────────────────── */
.pdm-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.pdm-form-field {
    margin-bottom: 12px;
}

.pdm-form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--pdm-text);
    font-size: 14px;
}

.pdm-form-field-full {
    grid-column: 1 / -1;
}

.pdm-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pdm-border);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pdm-input:focus {
    border-color: var(--pdm-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 68, 128, 0.15);
}

.pdm-input-file {
    font-size: 14px;
}

.pdm-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pdm-textarea:focus {
    border-color: var(--pdm-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 68, 128, 0.15);
}

.pdm-field-description {
    font-size: 13px;
    color: var(--pdm-text-light);
    margin: 0 0 8px;
}

.pdm-field-hint {
    font-size: 12px;
    color: var(--pdm-text-light);
    margin: 4px 0 0;
}

.pdm-section-description {
    font-size: 14px;
    color: var(--pdm-text-light);
    margin: 0 0 16px;
}

/* Legacy alias */
.pdm-form-group { margin-bottom: 16px; }
.pdm-form-group label { display: block; font-weight: 600; margin-bottom: 4px; color: var(--pdm-text); font-size: 14px; }
.pdm-form-group input,
.pdm-form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--pdm-border); border-radius: 4px; font-size: 14px; font-family: inherit; }

/* ── Data Table ────────────────────────────────────────────────── */
.pdm-eval-submit {
    text-align: center;
    padding-top: 32px;
    padding-bottom: 32px;
}

#pdm-submit-btn {
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(26, 68, 128, 0.2);
    transition: all 0.2s ease;
}

#pdm-submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(26, 68, 128, 0.3);
}

#pdm-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pdm-textarea {
    width: 100%;
    border: 2px solid var(--pdm-border);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.7;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.pdm-textarea:focus {
    border-color: var(--pdm-primary);
    box-shadow: 0 0 0 3px rgba(26, 68, 128, 0.12);
    outline: none;
}

.pdm-field-description {
    font-size: 13px;
    color: var(--pdm-text-light);
    margin: -8px 0 12px;
    line-height: 1.5;
}

.pdm-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.pdm-data-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--pdm-text-light);
    background: transparent;
    border-bottom: none;
    width: 140px;
    vertical-align: top;
}

.pdm-data-table td {
    padding: 12px 16px;
    border-bottom: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--pdm-text);
}

.pdm-data-table tr {
    border-bottom: 1px solid #f1f5f9;
}

.pdm-data-table tr:last-child {
    border-bottom: none;
}

.pdm-data-table a {
    color: var(--pdm-primary);
}

/* ── Evaluation Form ───────────────────────────────────────────── */
.pdm-evaluation-form {
    max-width: 920px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pdm-eval-header {
    background: linear-gradient(135deg, var(--pdm-primary), var(--pdm-primary-light));
    color: #fff;
    padding: 28px 32px;
    border-radius: var(--pdm-radius) var(--pdm-radius) 0 0;
    box-shadow: 0 4px 12px rgba(26, 68, 128, 0.25);
}

.pdm-eval-header h2 {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

.pdm-eval-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.pdm-eval-section {
    padding: 28px 32px;
    background: var(--pdm-card-bg);
    border-left: 1px solid var(--pdm-border);
    border-right: 1px solid var(--pdm-border);
    border-bottom: 1px solid #f1f5f9;
}

.pdm-eval-section:last-child {
    border-bottom: 1px solid var(--pdm-border);
    border-radius: 0 0 var(--pdm-radius) var(--pdm-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.pdm-eval-section h3 {
    color: var(--pdm-primary);
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pdm-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Instruction Box ───────────────────────────────────────────── */
.pdm-instruction-box {
    background: linear-gradient(135deg, #f0f7ff, #e8f4fd);
    border-left: 4px solid var(--pdm-primary);
    padding: 20px 24px;
    border-radius: 0 var(--pdm-radius) var(--pdm-radius) 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--pdm-text);
}

.pdm-instruction-box p {
    margin: 0 0 8px;
}

.pdm-instruction-box p:last-child {
    margin-bottom: 0;
}

.pdm-instruction-box ul {
    margin: 4px 0 8px;
    padding-left: 20px;
}

.pdm-instruction-box strong {
    color: var(--pdm-primary);
}

/* ── Complementary Items ───────────────────────────────────────── */
.pdm-complementary-items {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--pdm-border);
}

.pdm-complementary-items h4 {
    font-size: 14px;
    margin: 0 0 8px;
    color: var(--pdm-text);
}

.pdm-complementary-items ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pdm-complementary-items li {
    padding: 4px 0;
}

.pdm-complementary-items a {
    color: var(--pdm-primary);
}

.pdm-item-id {
    font-size: 12px;
    color: var(--pdm-text-light);
}

/* ── Criteria Table ────────────────────────────────────────────── */
.pdm-criteria-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    border-radius: var(--pdm-radius);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.pdm-criteria-table thead th {
    background: linear-gradient(135deg, var(--pdm-primary), var(--pdm-primary-light));
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.pdm-criteria-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s ease;
}

.pdm-criteria-table tbody tr:hover {
    background: #f0f5ff;
}

.pdm-criteria-label {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdm-weight-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--pdm-primary);
    color: #fff;
    font-size: 11px;
    padding: 3px 12px;
    border-radius: 12px;
    font-weight: 700;
    min-width: 28px;
}

.pdm-score-select {
    padding: 8px 12px;
    border: 2px solid var(--pdm-border);
    border-radius: 6px;
    font-size: 14px;
    width: 100px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.pdm-score-select:focus {
    border-color: var(--pdm-primary);
    box-shadow: 0 0 0 3px rgba(26, 68, 128, 0.12);
    outline: none;
}

.pdm-subtotal-value {
    font-weight: 700;
    color: var(--pdm-primary);
    min-width: 40px;
    display: inline-block;
    text-align: center;
    font-size: 15px;
}

.pdm-total-row {
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
}

.pdm-total-row td {
    padding: 16px;
    border-top: 2px solid var(--pdm-primary);
    font-size: 16px;
}

.pdm-max-score {
    font-size: 14px;
    font-weight: 400;
    color: var(--pdm-text-light);
}

/* ── Score Bar ─────────────────────────────────────────────────── */
.pdm-score-bar-container {
    margin: 20px 0;
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: var(--pdm-radius);
    border: 1px solid var(--pdm-border);
}

.pdm-score-bar {
    height: 16px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: visible;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pdm-score-bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    background: var(--pdm-text-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pdm-score-bar-fill.pdm-bar-success {
    background: linear-gradient(90deg, #059669, #10b981);
}

.pdm-score-bar-fill.pdm-bar-danger {
    background: linear-gradient(90deg, #dc2626, #f87171);
}

.pdm-score-threshold {
    position: absolute;
    top: -4px;
    height: 20px;
    width: 2px;
    background: var(--pdm-danger);
}

.pdm-threshold-label {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--pdm-danger);
    font-weight: 600;
    white-space: nowrap;
}

.pdm-score-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--pdm-text-light);
    margin-top: 4px;
}

/* ── Parecer / Submit ──────────────────────────────────────────── */
.pdm-submit-warning {
    font-size: 13px;
    color: var(--pdm-warning);
    margin-top: 12px;
    text-align: center;
    padding: 8px 16px;
    background: var(--pdm-warning-bg);
    border-radius: 6px;
    display: inline-block;
}

.pdm-eval-submit .pdm-btn {
    display: block;
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

/* ── Portal ────────────────────────────────────────────────────── */
.pdm-portal {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pdm-portal-header {
    background: var(--pdm-primary);
    color: #fff;
    padding: 24px 32px;
    border-radius: var(--pdm-radius) var(--pdm-radius) 0 0;
}

.pdm-portal-header h2 {
    margin: 0;
    padding: 0;
    font-size: 22px;
    color: #fff;
    line-height: 1.3;
}

.pdm-portal-header .pdm-portal-institution-name {
    margin: 4px 0 0;
    padding: 0;
    opacity: 0.85;
    font-size: 32px;
    color: #fff;
    line-height: 1.4;
}

/* ── Tabs ──────────────────────────────────────────────────────── */
.pdm-portal-tabs {
    background: var(--pdm-card-bg);
    border: 1px solid var(--pdm-border);
    border-top: none;
    border-radius: 0 0 var(--pdm-radius) var(--pdm-radius);
}

.pdm-tab-nav {
    display: flex;
    border-bottom: 2px solid var(--pdm-border);
    background: var(--pdm-card-bg);
}

.pdm-tab-nav .pdm-tab-btn {
    display: inline-block;
    padding: 14px 24px;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    background: none !important;
    font-size: 14px;
    font-weight: 600;
    color: var(--pdm-text-light) !important;
    text-decoration: none !important;
    cursor: pointer !important;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    pointer-events: auto !important;
    opacity: 1 !important;
    -webkit-appearance: none;
    user-select: none;
}

.pdm-tab-nav .pdm-tab-btn:hover,
.pdm-tab-nav .pdm-tab-btn:focus {
    color: var(--pdm-primary) !important;
    text-decoration: none !important;
}

.pdm-tab-nav .pdm-tab-btn.pdm-tab-active {
    color: var(--pdm-primary) !important;
    border-bottom-color: var(--pdm-primary) !important;
}

.pdm-tab-panel {
    display: none;
    padding: 32px;
}

.pdm-tab-panel.pdm-tab-panel-active,
.pdm-tab-panel.active {
    display: block;
}

/* Legacy aliases */
.pdm-tabs { display: flex; border-bottom: 2px solid var(--pdm-border); background: var(--pdm-card-bg); }
.pdm-tab-content { display: none; padding: 32px; background: var(--pdm-card-bg); border: 1px solid var(--pdm-border); border-top: none; }
.pdm-tab-content.active { display: block; }

/* ── Horizontal Timeline ───────────────────────────────────────── */
.pdm-timeline-h {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px 24px;
    margin: 0 0 24px;
    background: var(--pdm-bg);
    border-radius: var(--pdm-radius);
    overflow-x: auto;
}

.pdm-tl-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    min-width: 100px;
    max-width: 180px;
}

.pdm-tl-connector {
    position: absolute;
    top: 20px;
    right: 50%;
    width: 100%;
    height: 3px;
    background: var(--pdm-border);
    z-index: 0;
}

.pdm-tl-connector--done {
    background: var(--pdm-success);
}

.pdm-tl-connector--active {
    background: linear-gradient(90deg, var(--pdm-success) 0%, var(--pdm-primary) 100%);
}

.pdm-tl-marker {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 3px solid var(--pdm-card-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pdm-tl-marker--done {
    background: var(--pdm-success);
    color: #fff;
}

.pdm-tl-marker--active {
    background: var(--pdm-primary);
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 0 4px rgba(26, 68, 128, 0.2), 0 2px 8px rgba(0,0,0,0.15);
}

.pdm-tl-marker--error {
    background: var(--pdm-danger);
    color: #fff;
}

.pdm-tl-marker--appeal {
    background: var(--pdm-warning);
    color: #fff;
}

.pdm-tl-marker--pending {
    background: var(--pdm-card-bg);
    color: var(--pdm-text-light);
    border-color: var(--pdm-border);
}

.pdm-tl-num {
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

/* Pulse animation for active step */
.pdm-tl-pulse {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    animation: pdm-pulse 1.5s ease-in-out infinite;
}

@keyframes pdm-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.7; }
}

.pdm-tl-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: 10px;
    gap: 2px;
}

.pdm-tl-label strong {
    font-size: 13px;
    color: var(--pdm-text);
    line-height: 1.3;
}

.pdm-tl-status {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.pdm-tl-status--completed,
.pdm-tl-status--approved {
    color: var(--pdm-success);
    background: var(--pdm-success-bg);
}

.pdm-tl-status--in_progress,
.pdm-tl-status--pending_docs {
    color: var(--pdm-primary);
    background: var(--pdm-primary-bg);
}

.pdm-tl-status--rejected,
.pdm-tl-status--appeal_rejected {
    color: var(--pdm-danger);
    background: var(--pdm-danger-bg);
}

.pdm-tl-status--appeal {
    color: var(--pdm-warning);
    background: var(--pdm-warning-bg);
}

.pdm-tl-status--pending {
    color: var(--pdm-text-light);
    background: transparent;
}

/* Current step highlight */
.pdm-tl-step--current .pdm-tl-label strong {
    color: var(--pdm-primary);
}

/* ── Upload Area ───────────────────────────────────────────────── */
.pdm-upload-area {
    border: 2px dashed var(--pdm-border);
    border-radius: var(--pdm-radius);
    padding: 24px;
    background: var(--pdm-bg);
    transition: all 0.2s;
}

.pdm-upload-area:hover,
.pdm-upload-area.dragover {
    border-color: var(--pdm-primary);
    background: var(--pdm-primary-bg);
}

/* ── Documents — Pending Banner ────────────────────────────────── */
.pdm-docs-pending-banner {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    background: var(--pdm-warning-bg);
    border: 1px solid var(--pdm-warning);
    border-radius: var(--pdm-radius);
    margin-bottom: 24px;
}

.pdm-docs-pending-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
}

.pdm-docs-pending-body h3 {
    margin: 0 0 6px;
    font-size: 17px;
    color: #92400e;
}

.pdm-docs-pending-body p {
    margin: 0;
    font-size: 14px;
    color: #78350f;
}

.pdm-docs-pending-motivo {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
}

.pdm-docs-pending-motivo strong {
    display: block;
    margin-bottom: 4px;
    color: #92400e;
}

.pdm-docs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.pdm-docs-header h3 {
    margin: 0;
}

/* ── Documents — Dropzone ─────────────────────────────────────── */
.pdm-dropzone {
    border: 2px dashed var(--pdm-border);
    border-radius: var(--pdm-radius);
    padding: 32px 24px;
    text-align: center;
    background: var(--pdm-bg);
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
}

.pdm-dropzone:hover {
    border-color: var(--pdm-primary);
    background: var(--pdm-primary-bg);
}

.pdm-dropzone-input {
    position: absolute;
    left: 0; top: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

.pdm-dropzone-icon {
    font-size: 36px;
    margin-bottom: 8px;
    line-height: 1;
}

.pdm-dropzone-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--pdm-text);
    margin: 0 0 4px;
}

.pdm-dropzone-hint {
    font-size: 13px;
    color: var(--pdm-text-light);
    margin: 0 0 12px;
}

.pdm-dropzone-dragover {
    padding: 40px 24px;
}

.pdm-dropzone-dragover .pdm-dropzone-icon {
    font-size: 48px;
}

/* ── Documents — Upload Queue ─────────────────────────────────── */
.pdm-upload-queue {
    margin-top: 16px;
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    background: var(--pdm-card-bg);
    overflow: hidden;
}

.pdm-upload-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--pdm-bg);
    border-bottom: 1px solid var(--pdm-border);
}

.pdm-upload-queue-header h4 {
    margin: 0;
    font-size: 14px;
}

.pdm-upload-queue-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pdm-queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--pdm-border);
    position: relative;
    transition: background 0.2s;
}

.pdm-queue-item:last-child {
    border-bottom: none;
}

.pdm-queue-item--done {
    background: var(--pdm-success-bg);
}

.pdm-queue-item--error {
    background: var(--pdm-danger-bg);
}

.pdm-queue-item--uploading {
    background: var(--pdm-primary-bg);
}

.pdm-queue-item-preview {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--pdm-bg);
    border-radius: 6px;
}

.pdm-queue-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pdm-queue-item-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdm-queue-item-size {
    font-size: 12px;
    color: var(--pdm-text-light);
}

.pdm-queue-item-desc {
    font-size: 12px !important;
    padding: 4px 8px !important;
    margin-top: 2px;
}

.pdm-queue-item-actions {
    flex-shrink: 0;
}

.pdm-queue-remove {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--pdm-text-light);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s;
}

.pdm-queue-remove:hover {
    background: var(--pdm-danger-bg);
    color: var(--pdm-danger);
}

.pdm-queue-item-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.pdm-progress-bar {
    height: 100%;
    background: var(--pdm-border);
    overflow: hidden;
}

.pdm-progress-fill {
    height: 100%;
    width: 0;
    background: var(--pdm-primary);
    transition: width 0.2s;
}

.pdm-upload-queue-actions {
    padding: 12px 16px;
    background: var(--pdm-bg);
    border-top: 1px solid var(--pdm-border);
    text-align: right;
}

/* ── Upload Progress List ─────────────────────────────────────── */
.pdm-upload-progress-list {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    overflow: hidden;
    background: var(--pdm-card-bg);
}

.pdm-up-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--pdm-border);
    position: relative;
    font-size: 13px;
    transition: background 0.3s;
}

.pdm-up-row:last-child {
    border-bottom: none;
}

.pdm-up-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.pdm-up-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.pdm-up-name small {
    font-weight: 400;
    color: var(--pdm-text-light);
}

.pdm-up-status {
    flex-shrink: 0;
    font-weight: 600;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 10px;
    background: var(--pdm-primary-bg);
    color: var(--pdm-primary);
}

.pdm-up-bar {
    width: 100%;
    height: 4px;
    background: var(--pdm-border);
    border-radius: 2px;
    overflow: hidden;
}

.pdm-up-fill {
    height: 100%;
    width: 0;
    background: var(--pdm-primary);
    border-radius: 2px;
    transition: width 0.15s;
}

.pdm-up-row--done {
    background: var(--pdm-success-bg);
}

.pdm-up-row--done .pdm-up-status {
    background: var(--pdm-success-bg);
    color: var(--pdm-success);
}

.pdm-up-row--done .pdm-up-fill {
    background: var(--pdm-success);
    width: 100%;
}

.pdm-up-row--error {
    background: var(--pdm-danger-bg);
}

.pdm-up-row--error .pdm-up-status {
    background: var(--pdm-danger-bg);
    color: var(--pdm-danger);
}

.pdm-up-row--error .pdm-up-fill {
    background: var(--pdm-danger);
}

/* ── Documents — Confirm Section ──────────────────────────────── */
.pdm-docs-confirm-section {
    margin-top: 24px;
}

.pdm-docs-confirm-card {
    padding: 20px 24px;
    background: var(--pdm-primary-bg);
    border: 1px solid var(--pdm-primary);
    border-radius: var(--pdm-radius);
    text-align: center;
}

.pdm-docs-confirm-card p {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--pdm-text);
}

/* ── Documents — Card Grid ────────────────────────────────────── */
.pdm-documents-list {
    margin-top: 24px;
}

.pdm-docs-list-title {
    font-size: 15px;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdm-docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}

.pdm-doc-card {
    position: relative;
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    overflow: hidden;
    background: var(--pdm-card-bg);
    transition: box-shadow 0.2s, transform 0.2s;
}

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

.pdm-doc-card--new {
    animation: pdm-card-appear 0.3s ease;
}

@keyframes pdm-card-appear {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

.pdm-doc-card-preview {
    display: block;
    height: 100px;
    overflow: hidden;
    background: var(--pdm-bg);
}

.pdm-doc-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pdm-doc-card-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pdm-danger-bg);
}

.pdm-doc-card-icon span {
    font-size: 20px;
    font-weight: 700;
    color: var(--pdm-danger);
}

.pdm-doc-card-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pdm-doc-card-name {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdm-doc-card-date {
    font-size: 11px;
    color: var(--pdm-text-light);
}

.pdm-doc-card-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
}

.pdm-doc-card:hover .pdm-doc-card-delete {
    opacity: 1;
}

.pdm-doc-card-delete:hover {
    background: var(--pdm-danger);
}

/* ── Documents — Help List ────────────────────────────────────── */
.pdm-help-section {
    margin-bottom: 16px;
}

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

.pdm-help-section h4 {
    margin: 0 0 6px;
    font-size: 14px;
}

.pdm-help-section p {
    margin: 0;
    font-size: 13px;
    color: var(--pdm-text-light);
}

.pdm-help-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--pdm-text-light);
}

.pdm-help-list li {
    margin-bottom: 4px;
}

/* Old doc thumb/icon kept for backwards compat */
.pdm-doc-thumb {
    border-radius: 4px;
    object-fit: cover;
}

.pdm-doc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--pdm-danger-bg);
    color: var(--pdm-danger);
    font-weight: 700;
    font-size: 14px;
    border-radius: 4px;
}

.pdm-empty-state {
    text-align: center;
    color: var(--pdm-text-light);
    padding: 32px 16px;
    font-size: 14px;
}

/* ── Documents — Responsive ───────────────────────────────────── */
@media (max-width: 600px) {
    .pdm-docs-pending-banner {
        flex-direction: column;
        gap: 8px;
    }
    .pdm-docs-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    .pdm-queue-item {
        flex-wrap: wrap;
    }
    .pdm-queue-item-info {
        min-width: calc(100% - 100px);
    }
}

/* ── Certificate Viewer ────────────────────────────────────────── */
.pdm-certificate-viewer {
    max-width: 700px;
    margin: 40px auto;
    text-align: center;
}

.pdm-cert-card {
    background: var(--pdm-card-bg);
    border-radius: var(--pdm-radius);
    box-shadow: var(--pdm-shadow);
    overflow: hidden;
}

.pdm-cert-header {
    background: var(--pdm-primary);
    color: #fff;
    padding: 24px;
}

.pdm-cert-header h2 {
    margin: 0 0 4px;
    font-size: 20px;
    color: #fff;
}

.pdm-cert-issuer {
    margin: 0;
    opacity: 0.85;
    font-size: 14px;
}

.pdm-cert-body {
    padding: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    text-align: left;
}

.pdm-cert-info {
    flex: 1;
    min-width: 300px;
}

.pdm-cert-qrcode {
    text-align: center;
}

.pdm-cert-qrcode-label {
    font-size: 12px;
    color: var(--pdm-text-light);
    margin-top: 8px;
}

.pdm-cert-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 0 32px 24px;
}

.pdm-cert-footer {
    padding: 16px 32px;
    background: var(--pdm-bg);
    font-size: 12px;
    color: var(--pdm-text-light);
    text-align: center;
}

.pdm-cert-footer p {
    margin: 4px 0;
}

.pdm-cert-footer a {
    color: var(--pdm-primary);
    word-break: break-all;
}

/* Portal certificate section */
.pdm-certificate-available {
    text-align: center;
    padding: 20px 0;
}

.pdm-certificate-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.pdm-certificate-available h4 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--pdm-text);
}

.pdm-certificate-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

.pdm-certificate-pending {
    text-align: center;
    color: var(--pdm-text-light);
    padding: 20px 0;
}

.pdm-certificate-pending a {
    color: var(--pdm-primary);
}

/* ── Toast (Frontend) ──────────────────────────────────────────── */
.pdm-toast-frontend {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    padding: 14px 24px;
    border-radius: var(--pdm-radius);
    color: #fff;
    font-size: 14px;
    box-shadow: var(--pdm-shadow);
    animation: pdm-slide-in 0.3s ease;
}

.pdm-toast-frontend--success { background: var(--pdm-success); }
.pdm-toast-frontend--error { background: var(--pdm-danger); }

@keyframes pdm-slide-in {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ── Submission Guard — Duplicate Warning Banner ──────────────── */
.pdm-duplicate-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    margin: 16px 0;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-left: 5px solid #d97706;
    border-radius: var(--pdm-radius);
    font-size: 14px;
    line-height: 1.5;
    color: #78350f;
    position: relative;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.15);
}

.pdm-duplicate-banner-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.pdm-duplicate-banner-content {
    flex: 1;
}

.pdm-duplicate-banner-content strong {
    display: block;
    font-size: 15px;
    margin-bottom: 6px;
    color: #92400e;
}

.pdm-duplicate-banner-message {
    margin: 0;
}

.pdm-duplicate-banner-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    color: #92400e;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.pdm-duplicate-banner-close:hover {
    opacity: 1;
}

/* ── Public Panels (DataTables) ─────────────────────────────────── */
.pdm-public-panel {
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pdm-panel-header {
    background: linear-gradient(135deg, #e0ecf8 0%, #d4e4f7 50%, #c9daf5 100%);
    color: var(--pdm-primary);
    padding: 20px 28px;
    border-radius: 12px 12px 0 0;
    border: 1px solid #b8d0ea;
    border-bottom: none;
}

.pdm-panel-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.pdm-panel-body {
    background: var(--pdm-card-bg);
    padding: 28px;
    border: 1px solid #dfe6ee;
    border-top: none;
    border-radius: 0 0 12px 12px;
    overflow-x: auto;
    box-shadow: 0 4px 16px rgba(26, 68, 128, 0.06);
}

/* DataTables overrides for public panels */
.pdm-public-panel .dataTables_wrapper {
    font-size: 14px;
}

.pdm-public-panel .dataTables_filter label {
    color: var(--pdm-text-light);
    font-size: 13px;
    font-weight: 500;
}

.pdm-public-panel .dataTables_filter input {
    padding: 8px 14px;
    border: 1px solid #d1dbe6;
    border-radius: 8px;
    font-size: 14px;
    margin-left: 8px;
    background: #f7f9fc;
    transition: all 0.2s;
}

.pdm-public-panel .dataTables_filter input:focus {
    border-color: var(--pdm-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 68, 128, 0.1);
    background: #fff;
}

.pdm-public-panel .dataTables_length label {
    color: var(--pdm-text-light);
    font-size: 13px;
    font-weight: 500;
}

.pdm-public-panel .dataTables_length select {
    padding: 6px 10px;
    border: 1px solid #d1dbe6;
    border-radius: 8px;
    font-size: 14px;
    background: #f7f9fc;
    appearance: auto;
}

.pdm-public-panel table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    width: 100% !important;
    border: none !important;
}

.pdm-public-panel table.dataTable thead th {
    background: linear-gradient(180deg, #f0f4f8 0%, #e8eef4 100%);
    color: var(--pdm-primary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 2px solid #c9d6e3;
    border-top: none;
    white-space: nowrap;
}

.pdm-public-panel table.dataTable thead th:first-child {
    border-radius: 8px 0 0 0;
}

.pdm-public-panel table.dataTable thead th:last-child {
    border-radius: 0 8px 0 0;
}

.pdm-public-panel table.dataTable tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid #edf1f5;
    font-size: 14px;
    color: var(--pdm-text);
    vertical-align: middle;
}

.pdm-public-panel table.dataTable tbody tr {
    transition: background 0.15s ease;
}

.pdm-public-panel table.dataTable tbody tr:nth-child(even) {
    background: #fafbfd;
}

.pdm-public-panel table.dataTable tbody tr:hover {
    background: #edf2fa !important;
}

.pdm-public-panel table.dataTable tbody tr:last-child td:first-child {
    border-radius: 0 0 0 8px;
}

.pdm-public-panel table.dataTable tbody tr:last-child td:last-child {
    border-radius: 0 0 8px 0;
}

/* DataTables info & pagination */
.pdm-public-panel .dataTables_info {
    font-size: 13px;
    color: var(--pdm-text-light);
    padding-top: 16px;
}

.pdm-public-panel .dataTables_paginate {
    padding-top: 16px;
}

.pdm-public-panel .dataTables_paginate .paginate_button {
    padding: 6px 14px;
    margin: 0 3px;
    border-radius: 8px;
    border: 1px solid #d1dbe6 !important;
    background: #f7f9fc !important;
    color: var(--pdm-text) !important;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.pdm-public-panel .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, var(--pdm-primary) 0%, var(--pdm-primary-light) 100%) !important;
    color: #fff !important;
    border-color: var(--pdm-primary) !important;
    box-shadow: 0 2px 6px rgba(26, 68, 128, 0.25);
}

.pdm-public-panel .dataTables_paginate .paginate_button:hover:not(.current):not(.disabled) {
    background: #e8eef4 !important;
    color: var(--pdm-primary) !important;
    border-color: var(--pdm-primary) !important;
}

.pdm-public-panel .dataTables_paginate .paginate_button.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pdm-public-panel .dataTables_processing {
    background: rgba(255, 255, 255, 0.92) !important;
    color: var(--pdm-primary);
    font-weight: 600;
    border-radius: 8px;
}

.pdm-public-panel .dataTables_empty {
    color: var(--pdm-text-light);
    font-style: italic;
    padding: 32px 16px !important;
}

.pdm-dt-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.pdm-dt-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* ── Badges ────────────────────────────────────────────────────── */
.pdm-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.pdm-badge-approved {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #86efac;
}

.pdm-badge-rejected {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.pdm-badge-pending {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #475569;
    border: 1px solid #cbd5e1;
}

.pdm-badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

a.pdm-badge {
    transition: all 0.2s;
}

a.pdm-badge:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ── Text utilities ────────────────────────────────────────────── */
.pdm-text-muted { color: var(--pdm-text-light); }
.pdm-text-success { color: var(--pdm-success); font-weight: 600; }
.pdm-text-danger { color: var(--pdm-danger); font-weight: 600; }

/* ── Tainacan Item Page ────────────────────────────────────────── */

/* Metadata sections as cards */
section[class*="metadata-section-slug-"] {
    background: var(--pdm-card-bg);
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    margin-bottom: 20px;
    box-shadow: var(--pdm-shadow);
    overflow: hidden;
}

/* Section headings */
section[class*="metadata-section-slug-"] > h2 {
    background: linear-gradient(135deg, #e0ecf8 0%, #d4e4f7 100%);
    color: var(--pdm-primary);
    padding: 14px 24px;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 2px solid #b8d0ea;
    letter-spacing: -0.2px;
}

/* Metadata list — grid layout */
.metadata-section__metadata-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    padding: 0;
    margin: 0;
}

/* Individual metadata field */
.metadata-section__metadata-list > div {
    padding: 14px 24px;
    border-bottom: 1px solid #f0f4f8;
    border-right: 1px solid #f0f4f8;
    transition: background 0.15s;
}

.metadata-section__metadata-list > div:hover {
    background: #fafbfe;
}

/* Remove right border on even items (2nd column) */
.metadata-section__metadata-list > div:nth-child(2n) {
    border-right: none;
}

/* Remove bottom border on last row */
.metadata-section__metadata-list > div:last-child,
.metadata-section__metadata-list > div:nth-last-child(2):nth-child(odd) {
    border-bottom: none;
}

/* Labels (h3) */
.metadata-section__metadata-list h3 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--pdm-text-light);
    margin: 0 0 4px;
    line-height: 1.3;
}

/* Values (p) */
.metadata-section__metadata-list p {
    margin: 0;
    font-size: 14px;
    color: var(--pdm-text);
    word-break: break-word;
    line-height: 1.5;
}

/* Title field — full width, highlighted */
.metadata-type-core_title {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    padding: 16px 24px !important;
}

.metadata-type-core_title h3 {
    display: none;
}

.metadata-type-core_title p {
    font-size: 20px;
    font-weight: 700;
    color: var(--pdm-primary);
    letter-spacing: -0.3px;
}

/* Description field — full width */
.metadata-type-core_description,
.metadata-section__metadata-list > div[class*="metadata-type-textarea"] {
    grid-column: 1 / -1;
}

.metadata-type-core_description p {
    line-height: 1.7;
}

/* Compound metadata — full width */
.metadata-section__metadata-list > div[class*="metadata-type-compound"] {
    grid-column: 1 / -1;
}

/* URL metadata */
.metadata-section__metadata-list a {
    color: var(--pdm-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.metadata-section__metadata-list a:hover {
    border-bottom-color: var(--pdm-primary);
}

/* Document and Attachments sections */
#tainacan-default-document-section,
#tainacan-default-attachments-section {
    background: var(--pdm-card-bg);
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    margin-bottom: 20px;
    box-shadow: var(--pdm-shadow);
    overflow: hidden;
}

#tainacan-default-document-section > h2,
#tainacan-default-attachments-section > h2 {
    background: linear-gradient(135deg, #e0ecf8 0%, #d4e4f7 100%);
    color: var(--pdm-primary);
    padding: 14px 24px;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 2px solid #b8d0ea;
}

/* Empty sections — subtle hint */
#tainacan-default-document-section:not(:has(.tainacan-media-component)),
#tainacan-default-attachments-section:not(:has(.tainacan-media-component)) {
    opacity: 0.6;
}

/* Glossary hover cards */
.metadata-section__metadata-list .glossary-item-container {
    border-bottom: 1px dotted var(--pdm-primary);
    cursor: help;
}

/* ── Modal de Análise ──────────────────────────────────────────── */
.pdm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}

.pdm-modal.pdm-modal--open {
    display: flex;
}

.pdm-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.pdm-modal-container {
    position: relative;
    background: var(--pdm-card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: pdm-modal-enter 0.25s ease;
}

@keyframes pdm-modal-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pdm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    background: linear-gradient(135deg, var(--pdm-primary) 0%, var(--pdm-primary-light) 100%);
    color: #fff;
    border-radius: 16px 16px 0 0;
}

.pdm-modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.pdm-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 22px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.pdm-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.pdm-modal-body {
    padding: 28px;
    overflow-y: auto;
}

body.pdm-modal-open {
    overflow: hidden;
}

/* Modal sections */
.pdm-modal-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--pdm-border);
}

.pdm-modal-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.pdm-modal-section h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--pdm-text-light);
    margin: 0 0 12px;
}

.pdm-modal-comentarios {
    margin-top: 12px;
    padding: 14px 18px;
    background: var(--pdm-bg);
    border-radius: var(--pdm-radius);
    border-left: 3px solid var(--pdm-primary);
}

.pdm-modal-comentarios strong {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--pdm-text-light);
}

.pdm-modal-comentarios p {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--pdm-text);
}

/* Modal table */
.pdm-modal-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--pdm-radius);
    overflow: hidden;
    border: 1px solid var(--pdm-border);
}

.pdm-modal-table thead th {
    background: linear-gradient(180deg, #f0f4f8 0%, #e8eef4 100%);
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--pdm-primary);
    text-align: left;
    border-bottom: 2px solid #c9d6e3;
}

.pdm-modal-table tbody td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid #edf1f5;
}

.pdm-modal-table tbody tr:last-child td {
    border-bottom: none;
}

.pdm-modal-table tbody tr:hover {
    background: #f8fafd;
}

/* Resultado */
.pdm-modal-resultado {
    text-align: center;
    padding-top: 16px;
}

.pdm-modal-resultado-badge {
    display: inline-block;
    margin-top: 8px;
}

.pdm-modal-resultado-badge .pdm-badge {
    font-size: 14px;
    padding: 8px 24px;
}

/* ── Perfil Público ────────────────────────────────────────────── */

.pdm-profile-fieldset {
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    padding: 20px 24px;
    margin: 0 0 20px;
    background: #fafbfe;
}

.pdm-profile-fieldset legend {
    font-size: 14px;
    font-weight: 700;
    color: var(--pdm-primary);
    padding: 0 8px;
    letter-spacing: -0.2px;
}

.pdm-required {
    color: var(--pdm-danger);
}

.pdm-profile-images-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--pdm-border);
}

.pdm-profile-images-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--pdm-text);
    margin: 0 0 8px;
}

.pdm-profile-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.pdm-profile-image-card {
    position: relative;
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    overflow: hidden;
    background: var(--pdm-card-bg);
    transition: box-shadow 0.2s;
}

.pdm-profile-image-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pdm-profile-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.pdm-profile-image-card .pdm-delete-image-btn {
    width: 100%;
    border-radius: 0;
    font-size: 12px;
    padding: 6px;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .pdm-eval-section,
    .pdm-tab-panel {
        padding: 16px;
    }

    .pdm-tab-nav {
        overflow-x: auto;
    }

    .pdm-tab-btn {
        padding: 12px 16px;
        font-size: 13px;
        white-space: nowrap;
    }

    .pdm-timeline-h {
        padding: 24px 8px 16px;
    }

    .pdm-tl-step {
        min-width: 70px;
    }

    .pdm-tl-marker {
        width: 32px;
        height: 32px;
    }

    .pdm-tl-connector {
        top: 16px;
    }

    .pdm-tl-label strong {
        font-size: 11px;
    }

    .pdm-tl-status {
        font-size: 10px;
        padding: 1px 6px;
    }

    .pdm-form-grid {
        grid-template-columns: 1fr;
    }

    .pdm-cert-actions,
    .pdm-certificate-actions {
        flex-direction: column;
        align-items: center;
    }

    .pdm-cert-body {
        flex-direction: column;
    }

    .pdm-criteria-table {
        font-size: 13px;
    }

    .pdm-criteria-table th,
    .pdm-criteria-table td {
        padding: 8px 10px;
    }

    .pdm-panel-header {
        padding: 16px 20px;
    }

    .pdm-panel-body {
        padding: 16px;
    }

    .pdm-public-panel table.dataTable thead th,
    .pdm-public-panel table.dataTable tbody td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .pdm-dt-top,
    .pdm-dt-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Tainacan item page */
    .metadata-section__metadata-list {
        grid-template-columns: 1fr;
    }

    .metadata-section__metadata-list > div {
        border-right: none;
    }

    section[class*="metadata-section-slug-"] > h2,
    #tainacan-default-document-section > h2,
    #tainacan-default-attachments-section > h2 {
        padding: 12px 16px;
        font-size: 15px;
    }

    .metadata-section__metadata-list > div {
        padding: 12px 16px;
    }

    .metadata-type-core_title p {
        font-size: 18px;
    }

    .pdm-profile-fieldset {
        padding: 16px;
    }

    .pdm-profile-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .pdm-profile-thumb {
        height: 90px;
    }
}

/* ===================================================================
   Login Page
   =================================================================== */
.pdm-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 16px;
}

.pdm-login-card {
    background: var(--pdm-card-bg);
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    box-shadow: var(--pdm-shadow);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.pdm-login-header {
    background: var(--pdm-primary);
    color: #fff;
    padding: 28px 32px;
    text-align: center;
}

.pdm-login-header h1 {
    margin: 0;
    padding: 0;
    font-size: 20px;
    color: #fff;
    line-height: 1.3;
}

.pdm-login-header p {
    margin: 6px 0 0;
    padding: 0;
    font-size: 13px;
    opacity: 0.85;
    color: #fff;
}

.pdm-login-form {
    padding: 28px 32px;
}

.pdm-login-error {
    background: var(--pdm-danger-bg);
    color: var(--pdm-danger);
    border: 1px solid var(--pdm-danger);
    border-radius: var(--pdm-radius);
    padding: 10px 16px;
    margin: 0 32px;
    font-size: 14px;
}

.pdm-form-group {
    margin-bottom: 18px;
}

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

.pdm-login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdm-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 400 !important;
    cursor: pointer;
}

.pdm-login-forgot {
    font-size: 13px;
    color: var(--pdm-primary);
    text-decoration: none;
}

.pdm-login-forgot:hover {
    text-decoration: underline;
}

.pdm-btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.pdm-login-logged-in {
    padding: 28px 32px;
    text-align: center;
}

.pdm-login-logged-in p {
    margin: 0 0 12px;
    font-size: 15px;
    color: var(--pdm-text);
}

.pdm-login-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* ===================================================================
   Gestor Dashboard — Layout
   =================================================================== */

.pdm-gestor-app {
    display: flex;
    min-height: 80vh;
    background: var(--pdm-bg);
    border-radius: var(--pdm-radius);
    overflow: hidden;
    border: 1px solid var(--pdm-border);
    margin: -20px 0;
}

/* Sidebar */
.pdm-gestor-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--pdm-primary);
    color: #fff;
    display: flex;
    flex-direction: column;
}

.pdm-gestor-sidebar-header {
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.pdm-gestor-sidebar-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.pdm-gestor-sidebar-header p {
    margin: 4px 0 0;
    font-size: 13px;
    opacity: 0.7;
    color: #fff;
}

.pdm-gestor-sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.pdm-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
}

.pdm-sidebar-link:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
}

.pdm-sidebar-link--active {
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-weight: 600;
    border-left: 3px solid #fff;
}

.pdm-sidebar-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.pdm-gestor-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.pdm-sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.pdm-sidebar-link--logout {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
    padding: 6px 0;
}

.pdm-sidebar-link--logout:hover {
    color: #fff;
    background: transparent;
}

/* Mobile sidebar toggle */
.pdm-gestor-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--pdm-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    align-items: center;
    justify-content: center;
}

.pdm-gestor-sidebar-toggle .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Main content */
.pdm-gestor-main {
    flex: 1;
    padding: 24px 32px;
    overflow-x: auto;
    min-width: 0;
}

/* ── Page Header ──────────────────────────────────────────────── */
.pdm-page-header {
    margin-bottom: 24px;
}

.pdm-page-header h1 {
    margin: 0 0 4px;
    font-size: 24px;
    font-weight: 700;
    color: var(--pdm-text);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pdm-page-header p {
    margin: 0;
    color: var(--pdm-text-light);
    font-size: 14px;
}

.pdm-page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.pdm-page-actions {
    display: flex;
    gap: 8px;
}

.pdm-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--pdm-primary);
    text-decoration: none;
    margin-bottom: 8px;
}

.pdm-back-link:hover { text-decoration: underline; }

/* ── Alert ────────────────────────────────────────────────────── */
.pdm-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--pdm-radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.pdm-alert--warning {
    background: var(--pdm-warning-bg);
    border: 1px solid var(--pdm-warning);
    color: #92400e;
}

.pdm-alert .dashicons {
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Dashboard Cards ──────────────────────────────────────────── */
.pdm-dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.pdm-card {
    background: var(--pdm-card-bg);
    border-radius: var(--pdm-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--pdm-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.pdm-card--sm {
    padding: 14px;
    gap: 12px;
}

.pdm-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pdm-card-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #fff;
}

.pdm-card--warning .pdm-card-icon { background: var(--pdm-warning); }
.pdm-card--primary .pdm-card-icon { background: var(--pdm-primary); }
.pdm-card--success .pdm-card-icon { background: var(--pdm-success); }
.pdm-card--danger .pdm-card-icon  { background: var(--pdm-danger); }
.pdm-card--divergent .pdm-card-icon { background: #e11d48; }
.pdm-card--muted .pdm-card-icon   { background: #94a3b8; }

.pdm-card-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--pdm-text);
    line-height: 1;
}

.pdm-card-label {
    font-size: 13px;
    color: var(--pdm-text-light);
    margin-top: 2px;
}

/* ── Dashboard Lists ─────────────────────────────────────────── */
.pdm-dashboard-lists {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.pdm-dashboard-list {
    background: #fff;
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    overflow: hidden;
}

.pdm-dashboard-list-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--pdm-border);
}

.pdm-dashboard-list-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdm-dashboard-list-header .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.pdm-dashboard-list-header .pdm-badge {
    margin-left: auto;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.pdm-badge-warning   { background: #fef3c7; color: #92400e; }
.pdm-badge-primary   { background: var(--pdm-primary-bg); color: var(--pdm-primary); }
.pdm-badge-success   { background: #dcfce7; color: #166534; }
.pdm-badge-danger    { background: #fee2e2; color: #991b1b; }
.pdm-badge-divergent { background: #fce7f3; color: #9d174d; }

.pdm-dashboard-list--warning .pdm-dashboard-list-header   { border-left: 3px solid var(--pdm-warning); }
.pdm-dashboard-list--primary .pdm-dashboard-list-header   { border-left: 3px solid var(--pdm-primary); }
.pdm-dashboard-list--success .pdm-dashboard-list-header   { border-left: 3px solid var(--pdm-success); }
.pdm-dashboard-list--danger .pdm-dashboard-list-header    { border-left: 3px solid var(--pdm-danger); }
.pdm-dashboard-list--divergent .pdm-dashboard-list-header { border-left: 3px solid #e11d48; }

.pdm-dashboard-list-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pdm-dashboard-list-items li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    line-height: 1.4;
}

.pdm-dashboard-list-items li:last-child {
    border-bottom: none;
}

.pdm-dashboard-list-items li:hover {
    background: #f8fafc;
}

.pdm-dashboard-list-id {
    flex-shrink: 0;
    color: var(--pdm-text-light);
    font-size: 12px;
    font-weight: 600;
    min-width: 50px;
}

.pdm-dashboard-list-title {
    flex: 1;
    font-weight: 500;
    color: var(--pdm-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdm-dashboard-list-meta {
    flex-shrink: 0;
    color: var(--pdm-text-light);
    font-size: 12px;
}

.pdm-dashboard-list-link {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.pdm-dashboard-list-link:hover .pdm-dashboard-list-title {
    color: var(--pdm-primary);
}

.pdm-dashboard-list-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--pdm-border);
    text-align: center;
}

@media (max-width: 600px) {
    .pdm-dashboard-lists {
        grid-template-columns: 1fr;
    }
}

/* ── Tables ───────────────────────────────────────────────────── */
.pdm-table-responsive {
    overflow-x: initial;
    margin-bottom: 20px;
}

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

.pdm-table th,
.pdm-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--pdm-border);
}

.pdm-table th {
    background: #f1f5f9;
    font-weight: 600;
    color: var(--pdm-text);
    font-size: 13px;
    white-space: nowrap;
}

.pdm-table--striped tbody tr:nth-child(even) {
    background: #f8fafc;
}

.pdm-table tbody tr:hover {
    background: var(--pdm-primary-bg);
}

.pdm-actions-cell {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

/* ── Buttons ──────────────────────────────────────────────────── */
.pdm-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--pdm-border);
    border-radius: 6px;
    background: var(--pdm-card-bg);
    color: var(--pdm-text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}

.pdm-btn:hover {
    background: #f1f5f9;
    text-decoration: none;
    color: var(--pdm-text);
}

.pdm-btn-primary {
    background: var(--pdm-primary);
    color: #fff;
    border-color: var(--pdm-primary);
}

.pdm-btn-primary:hover {
    background: var(--pdm-primary-light);
    color: #fff;
}

.pdm-btn-danger {
    background: var(--pdm-danger);
    color: #fff;
    border-color: var(--pdm-danger);
}

.pdm-btn-danger:hover {
    background: #b91c1c;
    color: #fff;
}

.pdm-btn-sm {
    padding: 5px 10px;
    font-size: 13px;
}

.pdm-btn-block {
    display: flex;
    justify-content: center;
    width: 100%;
}

.pdm-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ── Badges ───────────────────────────────────────────────────── */
.pdm-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    text-decoration: none;
}

.pdm-badge-sm { padding: 2px 8px; font-size: 11px; }

.pdm-badge-pending  { background: #fef3c7; color: #92400e; }
.pdm-badge-primary  { background: var(--pdm-primary-bg); color: var(--pdm-primary); }
.pdm-badge-approved { background: var(--pdm-success-bg); color: #065f46; }
.pdm-badge-rejected { background: var(--pdm-danger-bg); color: #991b1b; }
.pdm-badge-warning  { background: var(--pdm-warning-bg); color: #92400e; text-decoration: none; }
.pdm-badge-success  { background: var(--pdm-success-bg); color: #065f46; }
.pdm-badge-muted    { background: #f1f5f9; color: #475569; }

/* ── Sections / Accordion ─────────────────────────────────────── */
.pdm-section {
    background: var(--pdm-card-bg);
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    padding: 20px;
    margin-bottom: 16px;
}

.pdm-section h2 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--pdm-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdm-section h2 .dashicons {
    color: var(--pdm-primary);
}

.pdm-section h2 small {
    font-size: 13px;
    font-weight: 400;
    color: var(--pdm-text-light);
}

.pdm-section h3 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--pdm-text);
}

.pdm-section--accordion .pdm-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 16px 20px;
    margin: -20px -20px 0;
    border-radius: var(--pdm-radius) var(--pdm-radius) 0 0;
    user-select: none;
}

.pdm-section--accordion .pdm-section-header:hover {
    background: #f8fafc;
}

.pdm-section--accordion .pdm-section-header h2 {
    margin: 0;
}

.pdm-section--accordion .pdm-section-body {
    padding-top: 16px;
    transition: max-height 0.3s ease;
    overflow: hidden;
}

.pdm-section-body--collapsed {
    max-height: 0 !important;
    padding-top: 0 !important;
    overflow: hidden;
}

.pdm-toggle-icon {
    transition: transform 0.2s;
    color: var(--pdm-text-light);
}

.pdm-toggle-icon--rotated {
    transform: rotate(180deg);
}

.pdm-section--done {
    border-color: var(--pdm-success);
}

/* ── Forms ─────────────────────────────────────────────────────── */
.pdm-form-group {
    margin-bottom: 14px;
}

.pdm-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--pdm-text);
    margin-bottom: 4px;
}

.pdm-input,
.pdm-select,
.pdm-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--pdm-border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--pdm-text);
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.pdm-input:focus,
.pdm-select:focus,
.pdm-textarea:focus {
    outline: none;
    border-color: var(--pdm-primary);
    box-shadow: 0 0 0 3px rgba(26,68,128,0.1);
}

.pdm-textarea {
    resize: vertical;
    min-height: 80px;
}

.pdm-select-score {
    width: 70px;
}

.pdm-radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.pdm-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

.pdm-radio input[type="radio"] {
    margin: 0;
}

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

.pdm-form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
}

/* ── Two Columns Layout ───────────────────────────────────────── */
.pdm-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.pdm-two-columns--sidebar {
    grid-template-columns: 1fr 320px;
}

/* ── Detail Grid / List ───────────────────────────────────────── */
.pdm-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pdm-detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pdm-detail-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--pdm-text-light);
    text-transform: uppercase;
}

.pdm-detail-value {
    font-size: 14px;
    color: var(--pdm-text);
}

.pdm-detail-list {
    font-size: 14px;
    line-height: 1.8;
}

.pdm-detail-list--sm {
    font-size: 13px;
}

/* ── Progress Timeline ────────────────────────────────────────── */
.pdm-progress-timeline {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--pdm-card-bg);
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
}

.pdm-progress-step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
    font-size: 13px;
    color: var(--pdm-text-light);
}

.pdm-progress-step::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--pdm-border);
    margin: 0 8px;
}

.pdm-progress-step:last-child::after {
    display: none;
}

.pdm-progress-step--active .pdm-progress-dot {
    background: var(--pdm-primary);
    box-shadow: 0 0 0 3px rgba(26, 68, 128, 0.2);
}

.pdm-progress-step--active {
    color: var(--pdm-primary);
    font-weight: 600;
}

/* Progress lines (separadas dos steps, como no admin) */
.pdm-progress-line {
    flex: 1;
    height: 2px;
    background: var(--pdm-border);
    margin: 0 4px;
}

.pdm-progress-line--done {
    background: var(--pdm-success);
}

.pdm-progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--pdm-border);
    flex-shrink: 0;
}

.pdm-progress-step--done .pdm-progress-dot {
    background: var(--pdm-success);
}

.pdm-progress-step--done {
    color: var(--pdm-success);
    font-weight: 600;
}

.pdm-progress-step--done::after {
    background: var(--pdm-success);
}

/* ── Criteria Grid ────────────────────────────────────────────── */
.pdm-criteria-grid {
    border: 1px solid var(--pdm-border);
    border-radius: 6px;
    overflow: hidden;
}

.pdm-criteria-header {
    display: grid;
    grid-template-columns: 1fr 100px 80px;
    gap: 8px;
    padding: 8px 12px;
    background: #f1f5f9;
    font-size: 12px;
    font-weight: 600;
    color: var(--pdm-text-light);
    text-transform: uppercase;
}

.pdm-criteria-row {
    display: grid;
    grid-template-columns: 1fr 100px 80px;
    gap: 8px;
    padding: 8px 12px;
    align-items: center;
    border-top: 1px solid var(--pdm-border);
    font-size: 14px;
}

.pdm-criteria-row:hover {
    background: #f8fafc;
}

.pdm-criteria-label {
    font-weight: 500;
}

.pdm-criteria-weight {
    color: var(--pdm-text-light);
    font-size: 13px;
    text-align: center;
}

.pdm-criteria-weighted {
    font-weight: 600;
    text-align: center;
}

.pdm-criteria-total {
    display: grid;
    grid-template-columns: 1fr 100px 80px;
    gap: 8px;
    padding: 10px 12px;
    border-top: 2px solid var(--pdm-border);
    font-weight: 700;
    font-size: 15px;
    background: #f8fafc;
}

.pdm-score-total {
    text-align: center;
    color: var(--pdm-primary);
}

.pdm-score-total.pdm-score--high { color: var(--pdm-success); }
.pdm-score-total.pdm-score--medium { color: var(--pdm-warning); }
.pdm-score-total.pdm-score--low { color: var(--pdm-danger); }

/* ── Score Summary ────────────────────────────────────────────── */
.pdm-score-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pdm-score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--pdm-border);
}

.pdm-score-row:last-child { border-bottom: none; }

.pdm-score-value {
    font-weight: 700;
}

.pdm-score--pass { color: var(--pdm-success); }
.pdm-score--fail { color: var(--pdm-danger); }

/* ── Modals ───────────────────────────────────────────────────── */
.pdm-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}

.pdm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.pdm-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    animation: pdm-modal-slide-in 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pdm-modal-slide-in {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pdm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--pdm-border);
    background: linear-gradient(135deg, var(--pdm-primary), var(--pdm-primary-light));
    border-radius: 12px 12px 0 0;
}

.pdm-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.pdm-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 20px;
    cursor: pointer;
    color: #fff;
    padding: 4px 10px;
    line-height: 1;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 600;
}

.pdm-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.pdm-modal-body {
    padding: 24px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--pdm-text);
}

/* ── Criteria Description Formatting ─────────────────────────── */
.pdm-criteria-intro {
    margin: 0 0 16px;
    padding: 12px 16px;
    background: var(--pdm-primary-bg);
    border-left: 3px solid var(--pdm-primary);
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    line-height: 1.7;
}

.pdm-criteria-section-title {
    margin: 16px 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--pdm-primary);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--pdm-border);
}

.pdm-criteria-level {
    margin: 8px 0;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
}

.pdm-criteria-level:nth-of-type(1) {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
}

.pdm-criteria-level:nth-of-type(2) {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
}

.pdm-criteria-level:nth-of-type(3) {
    background: #ecfdf5;
    border-left: 3px solid #10b981;
}

.pdm-criteria-level strong {
    display: inline;
    font-weight: 700;
}

.pdm-modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 16px 20px;
    border-top: 1px solid var(--pdm-border);
}

/* ── Toast Notifications ──────────────────────────────────────── */
.pdm-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pdm-toast {
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    max-width: 400px;
}

.pdm-toast--visible {
    transform: translateX(0);
    opacity: 1;
}

.pdm-toast--success {
    background: var(--pdm-success);
    color: #fff;
}

.pdm-toast--error {
    background: var(--pdm-danger);
    color: #fff;
}

/* ── DataTables Override ──────────────────────────────────────── */
.pdm-gestor-main .dataTables_wrapper {
    font-size: 14px;
}

.pdm-gestor-main .dataTables_length select,
.pdm-gestor-main .dataTables_filter input {
    border: 1px solid var(--pdm-border);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 14px;
}

.pdm-gestor-main .dataTables_info,
.pdm-gestor-main .dataTables_paginate {
    padding: 12px 0;
    font-size: 13px;
}

.pdm-gestor-main .dataTables_paginate .paginate_button {
    padding: 4px 10px;
    border-radius: 4px;
    margin: 0 2px;
}

.pdm-gestor-main .dataTables_paginate .paginate_button.current {
    background: var(--pdm-primary) !important;
    color: #fff !important;
    border: none;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .pdm-two-columns,
    .pdm-two-columns--sidebar {
        grid-template-columns: 1fr;
    }

    .pdm-criteria-header,
    .pdm-criteria-row,
    .pdm-criteria-total {
        grid-template-columns: 1fr 80px 60px;
    }
}

@media (max-width: 768px) {
    .pdm-gestor-sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        height: 100%;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }

    .pdm-gestor-sidebar--open {
        left: 0;
    }

    .pdm-gestor-sidebar-toggle {
        display: flex;
    }

    .pdm-gestor-main {
        padding: 16px;
    }

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

    .pdm-form-row {
        grid-template-columns: 1fr;
    }

    .pdm-detail-grid {
        grid-template-columns: 1fr;
    }

    .pdm-progress-timeline {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .pdm-progress-step::after {
        display: none;
    }

    .pdm-page-header h1 {
        font-size: 20px;
    }

    .pdm-criteria-header,
    .pdm-criteria-row,
    .pdm-criteria-total {
        grid-template-columns: 1fr 70px 50px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .pdm-dashboard-cards {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
   Evaluator Panel
   =================================================================== */

.pdm-evaluator-panel {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 0;
}

.pdm-evaluator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--pdm-border);
}

.pdm-evaluator-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--pdm-text);
}

.pdm-evaluator-header p {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--pdm-text-light);
}

/* ── Help Icon (Criteria) ─────────────────────────────────────── */
.pdm-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--pdm-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1;
    padding: 0;
    transition: background 0.2s;
}

.pdm-help-icon:hover,
.pdm-help-icon:focus {
    background: var(--pdm-primary-light);
    outline: 2px solid var(--pdm-primary-bg);
}

/* ── Modals hidden by default (opened via pdm-modal--open) ───── */
#pdm-criteria-modal,
#pdm-detail-modal,
#pdm-inscricao-modal,
#pdm-preview-modal,
#pdm-docs-request-modal,
#pdm-help-homologacao {
    display: none;
}
#pdm-criteria-modal.pdm-modal--open,
#pdm-detail-modal.pdm-modal--open,
#pdm-inscricao-modal.pdm-modal--open,
#pdm-preview-modal.pdm-modal--open,
#pdm-docs-request-modal.pdm-modal--open,
#pdm-help-homologacao.pdm-modal--open {
    display: flex;
}

/* ── Detail Modal (Homologação) ──────────────────────────────── */
.pdm-detail-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--pdm-text);
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--pdm-border);
}

.pdm-detail-section-title:first-child {
    margin-top: 0;
}

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

.pdm-detail-table th {
    text-align: left;
    padding: 10px 16px;
    color: var(--pdm-text-muted);
    font-weight: 500;
    width: 140px;
    white-space: nowrap;
    vertical-align: top;
}

.pdm-detail-table td {
    padding: 10px 16px;
    color: var(--pdm-text);
}

.pdm-detail-table tr + tr {
    border-top: 1px solid var(--pdm-border-light, #f0f0f5);
}

.pdm-detail-alert {
    padding: 12px 16px;
    border-radius: var(--pdm-radius);
    font-size: 14px;
    line-height: 1.5;
}

.pdm-detail-alert--warning {
    background: #fff8e1;
    border-left: 4px solid var(--pdm-warning, #e6a817);
    color: #6e4b00;
}

.pdm-detail-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pdm-detail-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    margin-bottom: 8px;
    background: var(--pdm-bg-subtle, #f8f9fa);
    font-size: 14px;
}

.pdm-detail-file-icon {
    color: var(--pdm-primary);
    font-size: 22px;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.pdm-detail-file-name {
    flex: 1;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdm-detail-file-size {
    color: var(--pdm-text-muted);
    font-size: 13px;
    white-space: nowrap;
}

.pdm-detail-file-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* ── Preview modal: layout flex para iframe preencher o espaço ── */
#pdm-preview-modal .pdm-modal-content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#pdm-preview-modal .pdm-modal-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
    min-height: 0;
}

/* ── Checklist de documentos pendentes ────────────────────────── */
.pdm-docs-checklist {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px;
    margin-top: 12px;
}

.pdm-docs-checklist-item {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    background: var(--pdm-bg-subtle, #f8f9fa);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-size: 14px;
    line-height: 1.4;
}

.pdm-docs-checklist-item:hover {
    background: var(--pdm-primary-bg);
    border-color: var(--pdm-primary);
}

.pdm-docs-checklist-item input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--pdm-primary);
}

.pdm-docs-checklist-item input[type="checkbox"]:checked + span {
    color: var(--pdm-primary);
    font-weight: 500;
}

.pdm-detail-external-link {
    margin: 16px 0;
    text-align: center;
}

.pdm-detail-external-link a {
    text-decoration: none;
    color: var(--pdm-primary);
    font-weight: 500;
}

.pdm-detail-external-link a:hover {
    text-decoration: underline;
}

#pdm-detail-modal .pdm-modal-footer {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--pdm-border);
    background: var(--pdm-bg-subtle, #f8f9fa);
    border-radius: 0 0 var(--pdm-radius-lg, 12px) var(--pdm-radius-lg, 12px);
    flex-wrap: wrap;
}

.pdm-btn-warning {
    background: var(--pdm-warning, #e6a817);
    border-color: var(--pdm-warning, #e6a817);
    color: #fff;
}

.pdm-btn-warning:hover {
    background: #c69500;
    border-color: #c69500;
}

.pdm-btn-danger {
    background: var(--pdm-danger, #dc3545);
    border-color: var(--pdm-danger, #dc3545);
    color: #fff;
}

.pdm-btn-danger:hover {
    background: #b32d2e;
    border-color: #b32d2e;
}

.pdm-btn-outline {
    background: transparent;
    border: 1px solid var(--pdm-border);
    color: var(--pdm-text);
}

.pdm-btn-outline:hover {
    background: var(--pdm-bg-subtle, #f8f9fa);
}

.pdm-btn-ver-inscricao {
    white-space: nowrap;
}

.pdm-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.pdm-textarea:focus {
    border-color: var(--pdm-primary);
    outline: none;
    box-shadow: 0 0 0 2px var(--pdm-primary-bg, rgba(26,68,128,0.1));
}

.pdm-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--pdm-border);
    border-top-color: var(--pdm-primary);
    border-radius: 50%;
    animation: pdm-spin 0.8s linear infinite;
}

@keyframes pdm-spin {
    to { transform: rotate(360deg); }
}

.pdm-text-danger {
    color: var(--pdm-danger, #dc3545);
}

/* ── Pastel Button ────────────────────────────────────────────────── */
.pdm-btn-pastel {
    background: #e0edff;
    color: #1a4480;
    border: 1px solid #b3d1ff;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
}

.pdm-btn-pastel:hover {
    background: #c7ddff;
    border-color: #8bb8f5;
    color: #0f2d54;
}

/* ── Inscription Modal (full-screen responsive) ─────────────── */
.pdm-modal-content--lg {
    width: 80vw;
    max-width: 900px;
    height: 85vh;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
}

.pdm-modal-content--lg .pdm-modal-header {
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--pdm-primary), var(--pdm-primary-light));
    border-bottom: none;
    padding: 18px 24px;
}

.pdm-modal-content--lg .pdm-modal-header h3 {
    color: #fff;
    font-size: 18px;
}

.pdm-modal-content--lg .pdm-modal-header .pdm-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
}

.pdm-modal-content--lg .pdm-modal-header .pdm-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.pdm-modal-content--lg .pdm-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 24px;
}

@media (max-width: 768px) {
    .pdm-modal-content--lg {
        width: 95vw;
        max-width: 95vw;
        height: 90vh;
        max-height: 90vh;
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .pdm-modal-content--lg {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }
}

.pdm-inscricao-section {
    margin-bottom: 20px;
}

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

.pdm-inscricao-section-title {
    margin: 0 0 12px;
    padding: 8px 12px;
    background: var(--pdm-primary-bg);
    border-left: 3px solid var(--pdm-primary);
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--pdm-primary);
}

.pdm-inscricao-section-title .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
    margin-right: 4px;
}

.pdm-inscricao-fields {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pdm-inscricao-field {
    display: flex;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
}

.pdm-inscricao-field:nth-child(odd) {
    background: #f8fafc;
}

.pdm-inscricao-label {
    flex: 0 0 338px;
    padding-right: 20px;
    font-weight: 600;
    color: var(--pdm-text);
}

.pdm-inscricao-value {
    flex: 1;
    color: var(--pdm-text-light);
    word-break: break-word;
}

.pdm-inscricao-value a {
    color: var(--pdm-primary);
    word-break: break-all;
}

.pdm-empty-value {
    color: #94a3b8;
    font-style: italic;
}

.pdm-inscricao-attachments {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pdm-inscricao-attachment {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid var(--pdm-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--pdm-text);
    transition: all 0.2s;
}

.pdm-inscricao-attachment:hover {
    background: var(--pdm-primary-bg);
    border-color: var(--pdm-primary);
}

.pdm-inscricao-attachment .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: var(--pdm-primary);
}

.pdm-attachment-info {
    display: flex;
    flex-direction: column;
}

.pdm-attachment-name {
    font-size: 13px;
    font-weight: 600;
}

.pdm-attachment-meta {
    font-size: 11px;
    color: var(--pdm-text-light);
}

.pdm-inscricao-complementary {
    display: block;
    padding: 8px 12px;
    margin-bottom: 4px;
    background: #f8fafc;
    border: 1px solid var(--pdm-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--pdm-primary);
    font-size: 13px;
    transition: all 0.2s;
}

.pdm-inscricao-complementary:hover {
    background: var(--pdm-primary-bg);
}

.pdm-inscricao-complementary small {
    color: var(--pdm-text-light);
}

/* ── Read-only Text ──────────────────────────────────────────── */
.pdm-readonly-text {
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid var(--pdm-border);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--pdm-text);
}

/* ── Spin animation ──────────────────────────────────────────── */
.pdm-spin {
    animation: pdm-spin 1s linear infinite;
}

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

.pdm-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--pdm-text-light);
    font-size: 14px;
}

.pdm-loading .dashicons {
    display: inline-block;
    margin-right: 8px;
    vertical-align: text-bottom;
}

@media (max-width: 600px) {
    .pdm-inscricao-field {
        flex-direction: column;
    }
    .pdm-inscricao-label {
        flex: none;
        margin-bottom: 2px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   Sidebar Panels (alinhado com o admin)
   ═══════════════════════════════════════════════════════════════════ */

.pdm-sidebar-panel {
    background: var(--pdm-card-bg);
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    margin-bottom: 16px;
    overflow: hidden;
}

.pdm-sidebar-panel-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--pdm-text);
    background: #f8fafc;
    border-bottom: 1px solid var(--pdm-border);
}

.pdm-sidebar-panel-title .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--pdm-text-light);
}

.pdm-sidebar-panel-body {
    padding: 12px 16px;
}

/* ── Compact details (dt/dd pairs) ────────────────────────────── */
.pdm-compact-details {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    font-size: 13px;
}

.pdm-compact-details dt {
    color: var(--pdm-text-light);
    font-weight: 500;
}

.pdm-compact-details dd {
    margin: 0;
    color: var(--pdm-text);
    word-break: break-word;
}

/* ── Summary rows (resumo de notas) ───────────────────────────── */
.pdm-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

.pdm-summary-row:last-child {
    border-bottom: none;
}

.pdm-summary-label {
    color: var(--pdm-text-light);
}

.pdm-summary-value {
    font-weight: 600;
    font-size: 14px;
}

.pdm-summary-row--total {
    border-top: 2px solid var(--pdm-border);
    padding-top: 8px;
    margin-top: 4px;
}

.pdm-summary-value--total {
    font-size: 16px;
    color: var(--pdm-primary);
}

.pdm-text-success { color: var(--pdm-success) !important; }
.pdm-text-warning { color: var(--pdm-warning) !important; }
.pdm-text-danger { color: var(--pdm-danger) !important; }
.pdm-text-muted { color: var(--pdm-text-light) !important; font-weight: 400 !important; }

/* ── Evaluator info line ──────────────────────────────────────── */
.pdm-evaluator-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: #f8fafc;
    border-radius: var(--pdm-radius);
    font-size: 13px;
}

.pdm-evaluator-info .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--pdm-text-light);
}

/* ── Score summary inline (within form actions) ───────────────── */
.pdm-score-summary-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--pdm-text-light);
}

.pdm-score-display {
    font-size: 15px;
}

.pdm-score--high { color: var(--pdm-success); }
.pdm-score--medium { color: var(--pdm-warning); }
.pdm-score--low { color: var(--pdm-danger); }
.pdm-score--none { color: var(--pdm-text-light); font-weight: 400; font-style: italic; }

/* ── Page header actions (badge + delete button inline) ───────── */
.pdm-page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Form description text ────────────────────────────────────── */
.pdm-form-description {
    margin-top: 4px;
    font-size: 12px;
    color: var(--pdm-text-light);
    font-style: italic;
}

/* ── Item card (Nova Avaliação - alinhado com admin) ──────────── */
.pdm-item-card {
    background: var(--pdm-card-bg);
    border: 1px solid var(--pdm-border);
    border-radius: var(--pdm-radius);
    overflow: hidden;
}

.pdm-item-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f8fafc;
    border-bottom: 1px solid var(--pdm-border);
}

.pdm-item-card-header .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--pdm-primary);
}

.pdm-item-card-header h2 {
    margin: 0;
    font-size: 16px;
}

.pdm-item-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--pdm-primary);
    text-decoration: none;
}

.pdm-item-card-link:hover {
    text-decoration: underline;
}

.pdm-item-card-body {
    padding: 16px 20px;
}

.pdm-item-details {
    margin: 0;
}

.pdm-item-detail-row {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
}

.pdm-item-detail-row:last-child {
    border-bottom: none;
}

.pdm-item-detail-row dt {
    flex: 0 0 110px;
    color: var(--pdm-text-light);
    font-weight: 500;
}

.pdm-item-detail-row dd {
    margin: 0;
    flex: 1;
    color: var(--pdm-text);
}

/* ── Auto-suggestion tag ──────────────────────────────────────── */
.pdm-auto-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--pdm-success);
}

.pdm-auto-tag .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* ── Role badges (avaliadores page) ───────────────────────────── */
.pdm-role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.pdm-role-badge--avaliadoribram {
    background: #dbeafe;
    color: #1e40af;
}

.pdm-role-badge--avaliadorsociedade {
    background: #d1fae5;
    color: #065f46;
}

.pdm-role-badge--dpmus {
    background: #fef3c7;
    color: #92400e;
}

.pdm-role-badge--instituicao {
    background: #f1f5f9;
    color: #475569;
}

/* ── Alterar role UI ──────────────────────────────────────────── */
.pdm-alterar-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: var(--pdm-radius);
    margin-bottom: 16px;
}

.pdm-alterar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--pdm-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.pdm-alterar-user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pdm-alterar-user-details span {
    font-size: 12px;
    color: var(--pdm-text-light);
}

.pdm-alterar-role-current {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.pdm-alterar-arrow {
    color: var(--pdm-text-light);
}

