/* Firma Digital OTN - Public CSS */

.fdo-mis-documentos,
.fdo-listar-plantillas,
.fdo-firmar-personal,
.fdo-firmar-colaborativo,
.fdo-crear-colaborativo,
.fdo-formulario-registro {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    overflow: hidden;
}

.fdo-doc-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 20px 0;
}

.fdo-doc-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px 14px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.fdo-doc-card-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.fdo-doc-id {
    flex: 0 0 auto;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.fdo-doc-title {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: #0f172a;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.fdo-doc-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.fdo-doc-date {
    color: #64748b;
    font-size: 13px;
}

.fdo-acciones-doc {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.fdo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.fdo-mis-documentos .fdo-btn,
.fdo-mis-documentos a.fdo-btn,
.fdo-mis-documentos button.fdo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none;
    box-sizing: border-box;
    width: auto;
    flex: 0 0 auto;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}

.fdo-actions .fdo-btn {
    width: auto;
    padding: 10px 16px;
}

.fdo-mis-documentos .fdo-btn .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
    margin: 0;
}

.fdo-mis-documentos .fdo-btn-ghost {
    background: #f6f7f7;
    color: #1d4ed8;
    border-color: #d0d7de;
}

.fdo-mis-documentos .fdo-btn-ghost:hover,
.fdo-mis-documentos .fdo-btn-ghost:focus {
    background: #eef4ff;
    color: #1e40af;
    border-color: #93c5fd;
}

.fdo-mis-documentos .fdo-btn-primary {
    background: #1d4ed8;
    color: #fff;
    border-color: #1d4ed8;
}

.fdo-mis-documentos .fdo-btn-primary:hover,
.fdo-mis-documentos .fdo-btn-primary:focus {
    background: #1e40af;
    color: #fff;
    border-color: #1e40af;
}

.fdo-mis-documentos .fdo-btn-danger {
    background: #fff;
    color: #b91c1c;
    border-color: #fecaca;
}

.fdo-mis-documentos .fdo-btn-danger:hover,
.fdo-mis-documentos .fdo-btn-danger:focus {
    background: #fef2f2;
    color: #991b1b;
    border-color: #f87171;
}

.fdo-mis-documentos .fdo-btn:active {
    transform: translateY(1px);
}

.fdo-verificar-resultado {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.45;
    max-height: 60vh;
    overflow: auto;
    margin: 0;
}

.fdo-warning {
    color: #dc3545;
    font-weight: 600;
}

.fdo-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

.fdo-pagination-info {
    font-weight: 600;
    color: #555;
}

.fdo-visibilidad {
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
}

.fdo-vis-publico {
    background-color: #d4edda;
    color: #155724;
}

.fdo-vis-privado {
    background-color: #f8d7da;
    color: #721c24;
}

.fdo-modal {
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.fdo-modal-content {
    background-color: #fff;
    margin: 8vh auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 560px;
    border-radius: 5px;
}

.fdo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.fdo-modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.fdo-stats-summary {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
}

.fdo-stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fdo-stat-label {
    font-weight: 600;
    color: #666;
}

.fdo-stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #0073aa;
}

.fdo-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    table-layout: auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.fdo-table th,
.fdo-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #eef0f2;
    vertical-align: middle;
}

.fdo-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #475569;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.fdo-table tbody tr:hover {
    background-color: #f8fafc;
}

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

.fdo-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78em;
    font-weight: 700;
}

.fdo-status-success {
    background-color: #d4edda;
    color: #155724;
}

.fdo-status-error {
    background-color: #f8d7da;
    color: #721c24;
}

.fdo-status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.fdo-status-inactive {
    background-color: #e2e3e5;
    color: #383d41;
}

.fdo-plantillas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.fdo-plantilla-card {
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}

.fdo-plantilla-icon {
    margin-bottom: 15px;
    color: #0073aa;
}

.fdo-plantilla-card h3 {
    margin: 10px 0;
    color: #333;
}

.fdo-plantilla-categoria {
    margin: 10px 0;
}

.fdo-badge {
    display: inline-block;
    padding: 4px 8px;
    background-color: #0073aa;
    color: #fff;
    border-radius: 3px;
    font-size: 0.85em;
}

.fdo-plantilla-descripcion {
    color: #666;
    margin: 10px 0;
    min-height: 60px;
}

.fdo-documento-info {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    margin: 20px 0;
}

.fdo-documento-info p {
    margin: 5px 0;
}

.fdo-firma-form {
    margin: 20px 0;
}

.fdo-info-box {
    margin: 20px 0;
    padding: 15px;
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    border-radius: 3px;
}

.fdo-info-box h3 {
    margin-top: 0;
    color: #0073aa;
}

.fdo-info-box ul {
    margin: 10px 0;
    padding-left: 20px;
}

.fdo-info-box li {
    margin: 5px 0;
}

.fdo-tabs {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    border-bottom: 2px solid #ddd;
}

.fdo-tab-button {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1em;
    color: #666;
}

.fdo-tab-button:hover {
    color: #0073aa;
}

.fdo-tab-button.fdo-tab-active {
    border-bottom-color: #0073aa;
    color: #0073aa;
    font-weight: 600;
}

.fdo-tab-content {
    display: none;
    padding: 20px 0;
}

.fdo-tab-content.fdo-tab-active {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .fdo-stats-summary {
        flex-direction: column;
    }
    
    .fdo-plantillas-grid {
        grid-template-columns: 1fr;
    }
    
    .fdo-table {
        font-size: 0.9em;
    }
    
    .fdo-table th,
    .fdo-table td {
        padding: 8px;
    }
}

.fdo-inline-notice {
    margin: 10px 0 16px;
    padding: 10px 14px;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
    background: #d4edda;
    color: #155724;
}
.fdo-inline-notice-error {
    border-color: #f5c6cb;
    background: #f8d7da;
    color: #721c24;
}
